26 #if !defined(_SPANDSP_PRIVATE_T38_CORE_H_)
27 #define _SPANDSP_PRIVATE_T38_CORE_H_
int field_type
Definition: t38_core.h:192
void t38_set_t38_version(t38_core_state_t *s, int t38_version)
Definition: t38_core.c:1034
int t38_core_send_flags_delay(t38_core_state_t *s, int indicator)
Find the delay to allow for HDLC flags after sending an indicator.
Definition: t38_core.c:932
logging_state_t * t38_core_get_logging_state(t38_core_state_t *s)
Get a pointer to the logging context associated with a T.38 context.
Definition: t38_core.c:1076
int fastest_image_data_rate
The fastest data rate supported by the T.38 channel.
Definition: private/t38_core.h:96
void t38_set_mmr_transcoding(t38_core_state_t *s, int mmr_transcoding)
Definition: t38_core.c:1010
const char * t38_data_type_to_str(int data_type)
Convert the code for a type of data to a short text name.
Definition: t38_core.c:148
int v34_rate
The bit rate for V.34 operation.
Definition: private/t38_core.h:125
int current_rx_field_type
The current receive field type - i.e. the last field_type received.
Definition: private/t38_core.h:121
const char * t38_jm_to_str(const uint8_t *data, int len)
Convert a JM message code to text description.
Definition: t38_core.c:241
int span_log_test(logging_state_t *s, int level)
Test if logging of a specified severity level is enabled.
Definition: logging.c:76
void t38_set_jbig_transcoding(t38_core_state_t *s, int jbig_transcoding)
Definition: t38_core.c:1016
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
int t35_decode(const uint8_t *msg, int len, const char **country, const char **vendor, const char **model)
Decode an NSF field.
Definition: t35.c:909
t38_rx_missing_handler_t * rx_missing_handler
Handler routine to process the missing packet condition.
Definition: private/t38_core.h:44
int t35_real_country_code(int country_code, int country_code_extension)
Resolve a T.35 country code with bit reversal resolution.
Definition: t35.c:791
int allow_for_tep
Allow time for TEP playout.
Definition: private/t38_core.h:93
Definition: private/t38_core.h:33
@ T38_PACKET_CATEGORY_CONTROL_DATA
Control data packet.
Definition: t38_core.h:176
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
int t38_core_free(t38_core_state_t *s)
Free a signaling tone transmitter context.
Definition: t38_core.c:1157
@ T38_PACKET_CATEGORY_INDICATOR
Indicator packet.
Definition: t38_core.h:174
int rx_expected_seq_no
The sequence number expected in the next received packet.
Definition: private/t38_core.h:114
Definition: t38_core.h:190
const char * t35_real_country_code_to_str(int country_code, int country_code_extension)
Decode a T.35 country code to a country name, with bit reversal resolution.
Definition: t35.c:843
void t38_set_redundancy_control(t38_core_state_t *s, int category, int setting)
Send a data packet.
Definition: t38_core.c:1058
t38_core_state_t * t38_core_init(t38_core_state_t *s, t38_rx_indicator_handler_t *rx_indicator_handler, t38_rx_data_handler_t *rx_data_handler, t38_rx_missing_handler_t *rx_missing_handler, void *rx_user_data, t38_tx_packet_handler_t *tx_packet_handler, void *tx_packet_user_data)
Initialise a T.38 core context.
Definition: t38_core.c:1102
SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data)
Get the next bit of a transmitted serial bit stream.
const char * t35_country_code_to_str(int country_code, int country_code_extension)
Decode a T.35 country code to a country name.
Definition: t35.c:853
const char * t38_field_type_to_str(int field_type)
Convert the code for a type of data field to a short text name.
Definition: t38_core.c:187
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
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
int current_tx_indicator
The current transmit indicator - i.e. the last indicator transmitted.
Definition: private/t38_core.h:123
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_PACKET_CATEGORY_IMAGE_DATA
Image data packet.
Definition: t38_core.h:180
void t38_set_fill_bit_removal(t38_core_state_t *s, int fill_bit_removal)
Definition: t38_core.c:1004
void * rx_user_data
An opaque pointer passed to any of the above receive handling routines.
Definition: private/t38_core.h:46
int current_rx_data_type
The current receive data type - i.e. the last data type received.
Definition: private/t38_core.h:119
int t38_core_restart(t38_core_state_t *s)
Restart a T.38 core context.
Definition: t38_core.c:1082
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
int t38_core_send_indicator(t38_core_state_t *s, int indicator)
Send an indicator packet.
Definition: t38_core.c:889
void t38_set_data_transport_protocol(t38_core_state_t *s, int data_transport_protocol)
Definition: t38_core.c:998
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
int jbig_transcoding
Indicates the ability to convert to/from JBIG to reduce bandwidth.
Definition: private/t38_core.h:73
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
const char * t38_indicator_to_str(int indicator)
Convert the code for an indicator to a short text name.
Definition: t38_core.c:93
const char * t38_cm_profile_to_str(int profile)
Convert the code for a CM profile code to text description.
Definition: t38_core.c:220
int current_rx_indicator
The current receive indicator - i.e. the last indicator received.
Definition: private/t38_core.h:117
int t38_core_release(t38_core_state_t *s)
Release a signaling tone transmitter context.
Definition: t38_core.c:1151
@ T38_PACKET_CATEGORY_CONTROL_DATA_END
Terminating control data packet.
Definition: t38_core.h:178
int span_log(logging_state_t *s, int level, const char *format,...)
Generate a log entry.
Definition: logging.c:84
logging_state_t logging
Error and flow logging control.
Definition: private/t38_core.h:132
@ T38_PACKET_CATEGORY_IMAGE_DATA_END
Terminating image data packet.
Definition: t38_core.h:182
t38_rx_indicator_handler_t * rx_indicator_handler
Handler routine to process received indicator packets.
Definition: private/t38_core.h:40
void t38_set_data_rate_management_method(t38_core_state_t *s, int method)
Definition: t38_core.c:992
void t38_set_sequence_number_handling(t38_core_state_t *s, int check)
Definition: t38_core.c:1040
int tx_seq_no
The sequence number for the next packet to be transmitted.
Definition: private/t38_core.h:112
int missing_packets
Definition: private/t38_core.h:129
t38_rx_data_handler_t * rx_data_handler
Handler routine to process received data packets.
Definition: private/t38_core.h:42
int span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len)
Generate a log entry displaying the contents of a buffer.
Definition: logging.c:158
void t38_set_max_buffer_size(t38_core_state_t *s, int max_buffer_size)
Definition: t38_core.c:1022
void * tx_packet_user_data
An opaque pointer passed to tx_packet_handler.
Definition: private/t38_core.h:37
int t38_core_send_training_delay(t38_core_state_t *s, int indicator)
Find the delay to allow for modem training after sending an indicator.
Definition: t38_core.c:940
const uint8_t * field
Definition: t38_core.h:194
int field_len
Definition: t38_core.h:196
void t38_set_max_datagram_size(t38_core_state_t *s, int max_datagram_size)
Definition: t38_core.c:1028
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
int pace_transmission
Pace transmission.
Definition: private/t38_core.h:99
Definition: private/logging.h:34
int t38_v34rate_to_bps(const uint8_t *data, int len)
Convert a V34rate message to an actual bit rate.
Definition: t38_core.c:272
int t38_core_send_data(t38_core_state_t *s, int data_type, int field_type, const uint8_t field[], int field_len, int category)
Send a data packet.
Definition: t38_core.c:948
void t38_set_tep_handling(t38_core_state_t *s, int allow_for_tep)
Definition: t38_core.c:1052
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
int t38_core_send_data_multi_field(t38_core_state_t *s, int data_type, const t38_data_field_t field[], int fields, int category)
Send a data packet.
Definition: t38_core.c:972