private/t38_core.h
/*
* SpanDSP - a series of DSP components for telephony
*
* private/t38_core.h - An implementation of T.38, less the packet exchange part
*
* Written by Steve Underwood <steveu@coppice.org>
*
* Copyright (C) 2005 Steve Underwood
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if !defined(_SPANDSP_PRIVATE_T38_CORE_H_)
#define _SPANDSP_PRIVATE_T38_CORE_H_
/*!
Core T.38 state, common to all modes of T.38.
*/
struct t38_core_state_s
{
/*! \brief Handler routine to transmit IFP packets generated by the T.38 protocol engine */
t38_tx_packet_handler_t *tx_packet_handler;
/*! \brief An opaque pointer passed to tx_packet_handler */
void *tx_packet_user_data;
/*! \brief Handler routine to process received indicator packets */
t38_rx_indicator_handler_t *rx_indicator_handler;
/*! \brief Handler routine to process received data packets */
t38_rx_data_handler_t *rx_data_handler;
/*! \brief Handler routine to process the missing packet condition */
t38_rx_missing_handler_t *rx_missing_handler;
/*! \brief An opaque pointer passed to any of the above receive handling routines */
void *rx_user_data;
/*! NOTE - Bandwidth reduction shall only be done on suitable Phase C data, i.e., MH, MR
and - in the case of transcoding to JBIG - MMR. MMR and JBIG require reliable data
transport such as that provided by TCP. When transcoding is selected, it shall be
applied to every suitable page in a call. */
/*! \brief Method 1: Local generation of TCF (required for use with TCP).
Method 2: Transfer of TCF is required for use with UDP (UDPTL or RTP).
Method 2 is not recommended for use with TCP. */
int data_rate_management_method;
/*! \brief The emitting gateway may indicate a preference for either UDP/UDPTL, or
UDP/RTP, or TCP for transport of T.38 IFP Packets. The receiving device
selects the transport protocol. */
int data_transport_protocol;
/*! \brief Indicates the capability to remove and insert fill bits in Phase C, non-ECM
data to reduce bandwidth in the packet network. */
int fill_bit_removal;
/*! \brief Indicates the ability to convert to/from MMR from/to the line format to
improve the compression of the data, and reduce the bandwidth, in the
packet network. */
int mmr_transcoding;
/*! \brief Indicates the ability to convert to/from JBIG to reduce bandwidth. */
int jbig_transcoding;
/*! \brief For UDP (UDPTL or RTP) modes, this option indicates the maximum
number of octets that can be stored on the remote device before an
overflow condition occurs. It is the responsibility of the transmitting
application to limit the transfer rate to prevent an overflow. The
negotiated data rate should be used to determine the rate at which
data is being removed from the buffer. */
int max_buffer_size;
/*! \brief This option indicates the maximum size of a UDPTL packet or the
maximum size of the payload within an RTP packet that can be accepted
by the remote device. */
int max_datagram_size;
/*! \brief This is the version number of ITU-T Rec. T.38. New versions shall be
compatible with previous versions. */
int t38_version;
/*! \brief Allow time for TEP playout */
int allow_for_tep;
/*! \brief The fastest data rate supported by the T.38 channel. */
int fastest_image_data_rate;
/*! \brief Pace transmission */
int pace_transmission;
/*! \brief TRUE if IFP packet sequence numbers are relevant. For some transports, like TPKT
over TCP they are not relevent. */
int check_sequence_numbers;
/*! \brief The number of times each packet type will be sent (low byte). The
depth of redundancy (2nd byte). Higher numbers may increase reliability
for UDP transmission. Zero is valid for the indicator packet category,
to suppress all indicator packets (typicaly for TCP transmission). */
int category_control[5];
/*! \brief The sequence number for the next packet to be transmitted */
int tx_seq_no;
/*! \brief The sequence number expected in the next received packet */
int rx_expected_seq_no;
/*! \brief The current receive indicator - i.e. the last indicator received */
int current_rx_indicator;
/*! \brief The current receive data type - i.e. the last data type received */
int current_rx_data_type;
/*! \brief The current receive field type - i.e. the last field_type received */
int current_rx_field_type;
/*! \brief The current transmit indicator - i.e. the last indicator transmitted */
int current_tx_indicator;
/*! \brief The bit rate for V.34 operation */
int v34_rate;
/*! A count of missing receive packets. This count might not be accurate if the
received packet numbers jump wildly. */
int missing_packets;
/*! \brief Error and flow logging control */
logging_state_t logging;
};
#endif
/*- End of file ------------------------------------------------------------*/
logging_state_t
struct logging_state_s logging_state_t
Definition logging.h:75
t38_core_state_s
Definition private/t38_core.h:33
t38_core_state_s::current_tx_indicator
int current_tx_indicator
The current transmit indicator - i.e. the last indicator transmitted.
Definition private/t38_core.h:123
t38_core_state_s::current_rx_field_type
int current_rx_field_type
The current receive field type - i.e. the last field_type received.
Definition private/t38_core.h:121
t38_core_state_s::missing_packets
int missing_packets
Definition private/t38_core.h:129
t38_core_state_s::tx_seq_no
int tx_seq_no
The sequence number for the next packet to be transmitted.
Definition private/t38_core.h:112
t38_core_state_s::max_buffer_size
int max_buffer_size
For UDP (UDPTL or RTP) modes, this option indicates the maximum number of octets that can be stored o...
Definition private/t38_core.h:81
t38_core_state_s::fastest_image_data_rate
int fastest_image_data_rate
The fastest data rate supported by the T.38 channel.
Definition private/t38_core.h:96
t38_core_state_s::fill_bit_removal
int fill_bit_removal
Indicates the capability to remove and insert fill bits in Phase C, non-ECM data to reduce bandwidth ...
Definition private/t38_core.h:65
t38_core_state_s::rx_missing_handler
t38_rx_missing_handler_t * rx_missing_handler
Handler routine to process the missing packet condition.
Definition private/t38_core.h:44
t38_core_state_s::data_transport_protocol
int data_transport_protocol
The emitting gateway may indicate a preference for either UDP/UDPTL, or UDP/RTP, or TCP for transport...
Definition private/t38_core.h:61
t38_core_state_s::max_datagram_size
int max_datagram_size
This option indicates the maximum size of a UDPTL packet or the maximum size of the payload within an...
Definition private/t38_core.h:86
t38_core_state_s::rx_user_data
void * rx_user_data
An opaque pointer passed to any of the above receive handling routines.
Definition private/t38_core.h:46
t38_core_state_s::rx_expected_seq_no
int rx_expected_seq_no
The sequence number expected in the next received packet.
Definition private/t38_core.h:114
t38_core_state_s::pace_transmission
int pace_transmission
Pace transmission.
Definition private/t38_core.h:99
t38_core_state_s::jbig_transcoding
int jbig_transcoding
Indicates the ability to convert to/from JBIG to reduce bandwidth.
Definition private/t38_core.h:73
t38_core_state_s::rx_indicator_handler
t38_rx_indicator_handler_t * rx_indicator_handler
Handler routine to process received indicator packets.
Definition private/t38_core.h:40
t38_core_state_s::tx_packet_handler
t38_tx_packet_handler_t * tx_packet_handler
Handler routine to transmit IFP packets generated by the T.38 protocol engine.
Definition private/t38_core.h:35
t38_core_state_s::v34_rate
int v34_rate
The bit rate for V.34 operation.
Definition private/t38_core.h:125
t38_core_state_s::rx_data_handler
t38_rx_data_handler_t * rx_data_handler
Handler routine to process received data packets.
Definition private/t38_core.h:42
t38_core_state_s::tx_packet_user_data
void * tx_packet_user_data
An opaque pointer passed to tx_packet_handler.
Definition private/t38_core.h:37
t38_core_state_s::t38_version
int t38_version
This is the version number of ITU-T Rec. T.38. New versions shall be compatible with previous version...
Definition private/t38_core.h:90
t38_core_state_s::current_rx_data_type
int current_rx_data_type
The current receive data type - i.e. the last data type received.
Definition private/t38_core.h:119
t38_core_state_s::current_rx_indicator
int current_rx_indicator
The current receive indicator - i.e. the last indicator received.
Definition private/t38_core.h:117
t38_core_state_s::logging
logging_state_t logging
Error and flow logging control.
Definition private/t38_core.h:132
t38_core_state_s::category_control
int category_control[5]
The number of times each packet type will be sent (low byte). The depth of redundancy (2nd byte)....
Definition private/t38_core.h:109
t38_core_state_s::mmr_transcoding
int mmr_transcoding
Indicates the ability to convert to/from MMR from/to the line format to improve the compression of th...
Definition private/t38_core.h:70
t38_core_state_s::data_rate_management_method
int data_rate_management_method
Method 1: Local generation of TCF (required for use with TCP). Method 2: Transfer of TCF is required ...
Definition private/t38_core.h:56
t38_core_state_s::check_sequence_numbers
int check_sequence_numbers
TRUE if IFP packet sequence numbers are relevant. For some transports, like TPKT over TCP they are no...
Definition private/t38_core.h:103
t38_core_state_s::allow_for_tep
int allow_for_tep
Allow time for TEP playout.
Definition private/t38_core.h:93