27 #if !defined(_SPANDSP_UDPTL_H_) 28 #define _SPANDSP_UDPTL_H_ 30 #define LOCAL_FAX_MAX_DATAGRAM 400 31 #define LOCAL_FAX_MAX_FEC_PACKETS 5 33 #define UDPTL_BUF_MASK 15 35 typedef int (*udptl_rx_packet_handler_t) (
void *user_data,
const uint8_t msg[],
int len,
int seq_no);
40 uint8_t buf[LOCAL_FAX_MAX_DATAGRAM];
46 uint8_t buf[LOCAL_FAX_MAX_DATAGRAM];
47 int fec_len[LOCAL_FAX_MAX_FEC_PACKETS];
48 uint8_t fec[LOCAL_FAX_MAX_FEC_PACKETS][LOCAL_FAX_MAX_DATAGRAM];
55 udptl_rx_packet_handler_t rx_packet_handler;
82 int rx_expected_seq_no;
93 UDPTL_ERROR_CORRECTION_NONE,
94 UDPTL_ERROR_CORRECTION_FEC,
95 UDPTL_ERROR_CORRECTION_REDUNDANCY
100 #if defined(__cplusplus) 109 SPAN_DECLARE(
int) udptl_rx_packet(
udptl_state_t *s,
const uint8_t buf[],
int len);
117 SPAN_DECLARE(
int) udptl_build_packet(
udptl_state_t *s, uint8_t buf[],
const uint8_t msg[],
int msg_len);
125 SPAN_DECLARE(
int) udptl_set_error_correction(
udptl_state_t *s,
int ec_scheme,
int span,
int entries);
133 SPAN_DECLARE(
int) udptl_get_error_correction(
udptl_state_t *s,
int *ec_scheme,
int *span,
int *entries);
135 SPAN_DECLARE(
int) udptl_set_local_max_datagram(
udptl_state_t *s,
int max_datagram);
137 SPAN_DECLARE(
int) udptl_get_local_max_datagram(
udptl_state_t *s);
139 SPAN_DECLARE(
int) udptl_set_far_max_datagram(
udptl_state_t *s,
int max_datagram);
141 SPAN_DECLARE(
int) udptl_get_far_max_datagram(
udptl_state_t *s);
157 SPAN_DECLARE(
udptl_state_t *) udptl_init(
udptl_state_t *s,
int ec_scheme,
int span,
int entries, udptl_rx_packet_handler_t rx_packet_handler,
void *user_data);
169 #if defined(__cplusplus)
int far_max_datagram_size
Definition: udptl.h:72
int error_correction_scheme
Definition: udptl.h:60
int error_correction_span
Definition: udptl.h:68
int error_correction_entries
Definition: udptl.h:64
logging_state_t logging
Error and flow logging control.
Definition: udptl.h:88
Definition: private/logging.h:33
int local_max_datagram_size
Definition: udptl.h:76