|
#define | SPRT_MIN_TC0_PAYLOAD_BYTES 140 |
|
#define | SPRT_MAX_TC0_PAYLOAD_BYTES 256 |
|
#define | SPRT_DEFAULT_TC0_PAYLOAD_BYTES 140 |
|
#define | SPRT_MIN_TC1_PAYLOAD_BYTES 132 |
|
#define | SPRT_MAX_TC1_PAYLOAD_BYTES 256 |
|
#define | SPRT_DEFAULT_TC1_PAYLOAD_BYTES 132 |
|
#define | SPRT_MIN_TC1_WINDOWS_SIZE 32 |
|
#define | SPRT_MAX_TC1_WINDOWS_SIZE 96 |
|
#define | SPRT_DEFAULT_TC1_WINDOWS_SIZE 32 |
|
#define | SPRT_MIN_TC2_PAYLOAD_BYTES 132 |
|
#define | SPRT_MAX_TC2_PAYLOAD_BYTES 256 |
|
#define | SPRT_DEFAULT_TC2_PAYLOAD_BYTES 132 |
|
#define | SPRT_MIN_TC2_WINDOWS_SIZE 8 |
|
#define | SPRT_MAX_TC2_WINDOWS_SIZE 32 |
|
#define | SPRT_DEFAULT_TC2_WINDOWS_SIZE 8 |
|
#define | SPRT_MIN_TC3_PAYLOAD_BYTES 140 |
|
#define | SPRT_MAX_TC3_PAYLOAD_BYTES 256 |
|
#define | SPRT_DEFAULT_TC3_PAYLOAD_BYTES 140 |
|
#define | SPRT_MAX_WINDOWS_SIZE 96 |
|
#define | SPRT_DEFAULT_TIMER_TC1_TA01 90000 /* us */ |
|
#define | SPRT_DEFAULT_TIMER_TC1_TA02 130000 /* us */ |
|
#define | SPRT_DEFAULT_TIMER_TC1_TR03 500000 /* us */ |
|
#define | SPRT_DEFAULT_TIMER_TC2_TA01 90000 /* us */ |
|
#define | SPRT_DEFAULT_TIMER_TC2_TA02 500000 /* us */ |
|
#define | SPRT_DEFAULT_TIMER_TC2_TR03 500000 /* us */ |
|
#define | SPRT_MIN_MAX_TRIES 1 |
|
#define | SPRT_MAX_MAX_TRIES 20 |
|
#define | SPRT_DEFAULT_MAX_TRIES 10 |
|
#define | SPRT_CHANNELS 4 |
|
|
enum | sprt_status_e { SPRT_STATUS_OK = 0,
SPRT_STATUS_EXCESS_RETRIES = 1,
SPRT_STATUS_SUBSESSION_CHANGED = 2,
SPRT_STATUS_OUT_OF_SEQUENCE = 3
} |
|
enum | sprt_tcid_range_view_e { SPRT_TCID_MIN = 0,
SPRT_TCID_MIN_RELIABLE = 1,
SPRT_TCID_MAX_RELIABLE = 2,
SPRT_TCID_MAX = 3
} |
|
enum | sprt_tcid_e { SPRT_TCID_UNRELIABLE_UNSEQUENCED = 0,
SPRT_TCID_RELIABLE_SEQUENCED = 1,
SPRT_TCID_EXPEDITED_RELIABLE_SEQUENCED = 2,
SPRT_TCID_UNRELIABLE_SEQUENCED = 3
} |
|
enum | sprt_timer_e { SPRT_TIMER_TA01 = 0,
SPRT_TIMER_TA02 = 1,
SPRT_TIMER_TR03 = 2
} |
|
enum | sprt_timer_action_e { SPRT_TIMER_SET = 0,
SPRT_TIMER_CLEAR = 1,
SPRT_TIMER_ADJUST = 2
} |
|
|
const char * | sprt_transmission_channel_to_str (int channel) |
| Find the name of an SPRT channel. More...
|
|
int | sprt_timer_expired (sprt_state_t *s, span_timestamp_t now) |
|
int | sprt_rx_packet (sprt_state_t *s, const uint8_t pkt[], int len) |
| Process a packet arriving from the far end. If the packet validates as an SPRT packet 0 is returned. If the packet does not follow the structure of an SPRT packet, or its packet type field does not contain the expected value, -1 is returned. In a mixed packet environment, where things like RTP, T.38 and SPRT packets are mixed in the same stream, -1 should indicate than one of the other packet sinks should be tried. More...
|
|
int | sprt_tx (sprt_state_t *s, int channel, const uint8_t buf[], int len) |
| Send a message to a SPRT channel. More...
|
|
int | sprt_set_local_tc_windows_size (sprt_state_t *s, int channel, int size) |
|
int | sprt_get_local_tc_windows_size (sprt_state_t *s, int channel) |
|
int | sprt_set_local_tc_payload_bytes (sprt_state_t *s, int channel, int max_len) |
|
int | sprt_get_local_tc_payload_bytes (sprt_state_t *s, int channel) |
|
int | sprt_set_local_tc_max_tries (sprt_state_t *s, int channel, int max_tries) |
|
int | sprt_get_local_tc_max_tries (sprt_state_t *s, int channel) |
|
int | sprt_set_far_tc_payload_bytes (sprt_state_t *s, int channel, int max_len) |
|
int | sprt_get_far_tc_payload_bytes (sprt_state_t *s, int channel) |
|
int | sprt_set_far_tc_windows_size (sprt_state_t *s, int channel, int size) |
|
int | sprt_get_far_tc_windows_size (sprt_state_t *s, int channel) |
|
int | sprt_set_tc_timeout (sprt_state_t *s, int channel, int timer, int timeout) |
|
int | sprt_get_tc_timeout (sprt_state_t *s, int channel, int timer) |
|
int | sprt_set_local_busy (sprt_state_t *s, int channel, bool busy) |
| Test if local end of SPRT context is busy. More...
|
|
bool | sprt_get_far_busy_status (sprt_state_t *s, int channel) |
| Test if far end of SPRT context is busy. More...
|
|
logging_state_t * | sprt_get_logging_state (sprt_state_t *s) |
| Get the logging context associated with an SPRT context. More...
|
|
sprt_state_t * | sprt_init (sprt_state_t *s, uint8_t subsession_id, uint8_t rx_payload_type, uint8_t tx_payload_type, channel_parms_t parms[4], sprt_tx_packet_handler_t tx_packet_handler, void *tx_user_data, sprt_rx_delivery_handler_t rx_delivery_handler, void *rx_user_data, sprt_timer_handler_t timer_handler, void *timer_user_data, span_modem_status_func_t status_handler, void *status_user_data) |
| Initialise an SPRT context. More...
|
|
int | sprt_release (sprt_state_t *s) |
| Release an SPRT context. More...
|
|
int | sprt_free (sprt_state_t *s) |
| Free an SPRT context. More...
|
|
int sprt_rx_packet |
( |
sprt_state_t * |
s, |
|
|
const uint8_t |
pkt[], |
|
|
int |
len |
|
) |
| |
Process a packet arriving from the far end. If the packet validates as an SPRT packet 0 is returned. If the packet does not follow the structure of an SPRT packet, or its packet type field does not contain the expected value, -1 is returned. In a mixed packet environment, where things like RTP, T.38 and SPRT packets are mixed in the same stream, -1 should indicate than one of the other packet sinks should be tried.
- Parameters
-
s | The SPRT context. |
pkt | The SPRT packet buffer. |
len | The length of the packet. |
- Returns
- 0 for accepted as a valid SPRT packet. -1 for rejected as an SPRT packet.
References sprt_state_s::logging, and span_log_buf().