ROHC compression/decompression library
|
Functions | |
struct rohc_decomp * | rohc_alloc_decompressor (struct rohc_comp *compressor) |
Create one ROHC decompressor. | |
void | rohc_free_decompressor (struct rohc_decomp *decomp) |
Destroy one ROHC decompressor. | |
int | rohc_decompress (struct rohc_decomp *decomp, unsigned char *ibuf, int isize, unsigned char *obuf, int osize) |
Decompress a ROHC packet. | |
void | clear_statistics (struct rohc_decomp *decomp) |
Clear all the statistics. | |
int | rohc_d_statistics (struct rohc_decomp *decomp, unsigned int indent, char *buffer) |
Output the decompression statistics of one decompressor to a buffer. The buffer must be large enough to store all the statistics. | |
void | d_change_mode_feedback (struct rohc_decomp *decomp, struct d_context *context) |
Create a feedback ACK packet telling the compressor to change state. | |
void | user_interactions (struct rohc_decomp *decomp, int feedback_maxval) |
Update feedback interval by the user. |
void clear_statistics | ( | struct rohc_decomp * | decomp | ) |
Clear all the statistics.
decomp | The ROHC decompressor |
References d_statistics::packets_failed_crc, d_statistics::packets_failed_decompression, d_statistics::packets_failed_no_context, d_statistics::packets_feedback, d_statistics::packets_received, and statistics.
Referenced by rohc_alloc_decompressor().
void d_change_mode_feedback | ( | struct rohc_decomp * | decomp, |
struct d_context * | context | ||
) |
Create a feedback ACK packet telling the compressor to change state.
decomp | The ROHC decompressor |
context | The decompression context |
References ACKTYPE_ACK, c_piggyback_feedback(), medium::cid_type, compressor, contexts, crc_table_8, f_feedback2(), f_wrap_feedback(), d_profile::get_sn, medium, d_context::mode, num_contexts, d_context::profile, rohc_debugf, ROHC_LARGE_CID, WITH_CRC, and zfree.
Referenced by decode_extension3().
struct rohc_decomp* rohc_alloc_decompressor | ( | struct rohc_comp * | compressor | ) | [read] |
Create one ROHC decompressor.
compressor |
|
References clear_statistics(), compressor, context_array_increase(), contexts, crc_table_2, crc_table_3, crc_table_6, crc_table_7, crc_table_8, CRC_TYPE_2, CRC_TYPE_3, CRC_TYPE_6, CRC_TYPE_7, CRC_TYPE_8, curval, errval, last_context, maxval, medium, num_contexts, okval, rohc_crc_init_table(), rohc_debugf, ROHC_SMALL_CID, and zfree.
int rohc_d_statistics | ( | struct rohc_decomp * | decomp, |
unsigned int | indent, | ||
char * | buffer | ||
) |
Output the decompression statistics of one decompressor to a buffer. The buffer must be large enough to store all the statistics.
decomp | The ROHC decompressor |
indent | The level of indentation to add during output |
buffer | The buffer where to outputs the statistics |
References D_NUM_PROFILES, d_profile::description, d_profile::id, rohc_d_context(), and zfree.
int rohc_decompress | ( | struct rohc_decomp * | decomp, |
unsigned char * | ibuf, | ||
int | isize, | ||
unsigned char * | obuf, | ||
int | osize | ||
) |
Decompress a ROHC packet.
decomp | The ROHC decompressor |
ibuf | The ROHC packet to decompress |
isize | The size of the ROHC packet |
obuf | The buffer where to store the decompressed packet |
osize | The size of the buffer for the decompressed packet |
References d_decode_data::active, d_decode_data::addcidUsed, c_add_wlsb(), d_decode_data::cid, compressor, curval, d_context::curval, d_decode_header(), d_operation_mode_feedback(), errval, d_decode_data::largecidUsed, maxval, d_context::mode, d_context::num_decomp_failures, d_context::num_recv_packets, O_MODE, okval, d_statistics::packets_failed_crc, d_statistics::packets_failed_decompression, d_statistics::packets_failed_no_context, d_statistics::packets_feedback, d_statistics::packets_received, rohc_debugf, ROHC_ERROR, ROHC_ERROR_CRC, ROHC_ERROR_NO_CONTEXT, ROHC_ERROR_PACKET_FAILED, ROHC_FEEDBACK_ONLY, ROHC_OK, d_context::state, statistics, d_context::total_16_compressed, d_context::total_16_uncompressed, d_context::total_compressed_size, d_context::total_uncompressed_size, and U_MODE.
Referenced by rohc_decompress_both().
void rohc_free_decompressor | ( | struct rohc_decomp * | decomp | ) |
Destroy one ROHC decompressor.
decomp | The decompressor to destroy |
References context_free(), contexts, medium, num_contexts, and zfree.
void user_interactions | ( | struct rohc_decomp * | decomp, |
int | feedback_maxval | ||
) |
Update feedback interval by the user.
decomp | The ROHC decompressor |
feedback_maxval | The feedback interval given by user |
References maxval.