ROHC compression/decompression library
|
Data Structures | |
struct | rohc_comp_last_packet_info_t |
Some information about the last compressed packet. More... | |
struct | __attribute__ |
Some information about the last compressed packet. More... | |
Typedefs | |
typedef bool(* | rohc_rtp_detection_callback_t )(const unsigned char *const ip, const unsigned char *const udp, const unsigned char *const payload, const unsigned int payload_size, void *const rtp_private) __attribute__((warn_unused_result)) |
The prototype of the RTP detection callback. | |
typedef int(* | rohc_comp_random_cb_t )(const struct rohc_comp *const comp, void *const user_context) __attribute__((warn_unused_result)) |
The prototype of the callback for random numbers. | |
Enumerations | |
enum | rohc_c_state { IR = 1, FO = 2, SO = 3 } |
The different ROHC compressor states. More... | |
Functions | |
struct rohc_comp * | rohc_alloc_compressor (int max_cid, int jam_use, int adapt_size, int encap_size) |
Create one ROHC compressor. | |
void | rohc_free_compressor (struct rohc_comp *comp) |
Destroy one ROHC compressor. | |
bool | rohc_comp_set_random_cb (struct rohc_comp *const comp, rohc_comp_random_cb_t callback, void *const user_context) |
Set the user-defined callback for random numbers. | |
int | rohc_compress (struct rohc_comp *comp, unsigned char *ibuf, int isize, unsigned char *obuf, int osize) |
Compress a ROHC packet. | |
int | rohc_compress2 (struct rohc_comp *const comp, const unsigned char *const uncomp_packet, const size_t uncomp_packet_len, unsigned char *const rohc_packet, const size_t rohc_packet_max_len, size_t *const rohc_packet_len) |
Compress a ROHC packet. | |
int | rohc_comp_get_segment (struct rohc_comp *const comp, unsigned char *const segment, const size_t max_len, size_t *const len) |
Get the next ROHC segment if any. | |
bool | rohc_comp_force_contexts_reinit (struct rohc_comp *const comp) |
Force the compressor to re-initialize all its contexts. | |
bool | rohc_comp_set_wlsb_window_width (struct rohc_comp *const comp, const size_t width) |
Set the window width for the W-LSB algorithm. | |
bool | rohc_comp_set_periodic_refreshes (struct rohc_comp *const comp, const size_t ir_timeout, const size_t fo_timeout) |
Set the timeout values for IR and FO periodic refreshes. | |
bool | rohc_comp_set_rtp_detection_cb (struct rohc_comp *const comp, rohc_rtp_detection_callback_t callback, void *const rtp_private) |
Set the RTP detection callback function. | |
void | rohc_activate_profile (struct rohc_comp *comp, int profile) |
Activate a profile for a compressor. | |
int | rohc_c_using_small_cid (struct rohc_comp *comp) |
Whether the compressor uses small CID or not. | |
void | rohc_c_set_header (struct rohc_comp *comp, int header) |
Set the maximal header size. The maximal header size is ignored for the moment. | |
void | rohc_c_set_mrru (struct rohc_comp *comp, int value) |
Set the Maximum Reconstructed Reception Unit (MRRU). | |
bool | rohc_comp_set_mrru (struct rohc_comp *const comp, const size_t mrru) |
Set the Maximum Reconstructed Reception Unit (MRRU). | |
bool | rohc_comp_get_mrru (const struct rohc_comp *const comp, size_t *const mrru) |
Get the Maximum Reconstructed Reception Unit (MRRU). | |
void | rohc_c_set_max_cid (struct rohc_comp *comp, int value) |
Set the maximal CID value the compressor should use. | |
bool | rohc_comp_get_max_cid (const struct rohc_comp *const comp, size_t *const max_cid) |
Get the maximal CID value the compressor uses. | |
void | rohc_c_set_large_cid (struct rohc_comp *comp, int large_cid) |
Tell the compressor to use large CIDs. | |
bool | rohc_comp_get_cid_type (const struct rohc_comp *const comp, rohc_cid_type_t *const cid_type) |
Get the CID type the compressor uses. | |
bool | rohc_comp_add_rtp_port (struct rohc_comp *const comp, const unsigned int port) |
Add a port to the list of UDP ports dedicated for RTP traffic. | |
bool | rohc_comp_remove_rtp_port (struct rohc_comp *const comp, const unsigned int port) |
Remove a port from the list of UDP ports dedicated to RTP traffic. | |
bool | rohc_comp_reset_rtp_ports (struct rohc_comp *const comp) |
Reset the list of dedicated RTP ports. | |
void | rohc_c_set_enable (struct rohc_comp *comp, int enable) |
Enable the ROHC compressor. | |
int | rohc_c_is_enabled (struct rohc_comp *comp) |
Whether the ROHC compressor is enabled or not. | |
int | rohc_c_info (char *buffer) |
Get information about available compression profiles. | |
int | rohc_c_statistics (struct rohc_comp *comp, unsigned int indent, char *buffer) |
Get information about a ROHC compressor. | |
int | rohc_feedback_flush (struct rohc_comp *comp, unsigned char *obuf, int osize) |
Send as much feedback data as possible. | |
int | rohc_comp_get_last_packet_info (const struct rohc_comp *const comp, rohc_comp_last_packet_info_t *const info) |
Get some information about the last compressed packet. | |
bool | rohc_comp_get_last_packet_info2 (const struct rohc_comp *const comp, rohc_comp_last_packet_info2_t *const info) |
Get some information about the last compressed packet. | |
bool | rohc_comp_get_general_info (const struct rohc_comp *const comp, rohc_comp_general_info_t *const info) |
Get some generak information about the compressor. | |
const char * | rohc_comp_get_state_descr (const rohc_c_state state) |
Give a description for the given ROHC compression context state. | |
bool | rohc_feedback_remove_locked (struct rohc_comp *const comp) |
Remove all feedbacks locked during the packet build. | |
bool | rohc_feedback_unlock (struct rohc_comp *const comp) |
Unlock all feedbacks locked during the packet build. |
typedef int(* rohc_comp_random_cb_t)(const struct rohc_comp *const comp, void *const user_context) __attribute__((warn_unused_result)) |
The prototype of the callback for random numbers.
comp | The ROHC compressor |
user_context | The context given by the user when he/she called the rohc_comp_set_random_cb function, may be NULL. |
typedef bool(* rohc_rtp_detection_callback_t)(const unsigned char *const ip, const unsigned char *const udp, const unsigned char *const payload, const unsigned int payload_size, void *const rtp_private) __attribute__((warn_unused_result)) |
The prototype of the RTP detection callback.
ip | The innermost IP packet |
udp | The UDP header of the packet |
payload | The UDP payload of the packet |
payload_size | The size of the UDP payload (in bytes) |
rtp_private | A pointer to a memory area to be used by the callback function, may be NULL. |
enum rohc_c_state |
The different ROHC compressor states.
See 4.3.1 in the RFC 3095.
If you add a new compressor state, please also add the corresponding textual description in rohc_comp_get_state_descr.
void rohc_activate_profile | ( | struct rohc_comp * | comp, |
int | profile | ||
) |
Activate a profile for a compressor.
comp | The ROHC compressor |
profile | The ID of the profile to activate |
References C_NUM_PROFILES, profiles, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, and rohc_warning.
Referenced by main().
struct rohc_comp* rohc_alloc_compressor | ( | int | max_cid, |
int | jam_use, | ||
int | adapt_size, | ||
int | encap_size | ||
) | [read] |
Create one ROHC compressor.
max_cid | The maximal CID value the compressor should use for contexts |
jam_use | not used anymore, must be 0 |
adapt_size | not used anymore, ignored |
encap_size | not used anymore, ignored |
References C_NUM_PROFILES, C_WINDOW_WIDTH, CHANGE_TO_FO_COUNT, CHANGE_TO_IR_COUNT, medium::cid_type, crc_table_2, crc_table_3, crc_table_6, crc_table_7, crc_table_8, rohc_feedback::data, enabled, FEEDBACK_RING_SIZE, feedbacks, feedbacks_first, feedbacks_first_unlocked, feedbacks_next, rohc_feedback::is_locked, last_context, rohc_feedback::length, medium::max_cid, MAX_RTP_PORTS, medium, mrru, num_packets, profiles, random_cb, random_cb_ctxt, rohc_comp_add_rtp_port(), rohc_comp_set_periodic_refreshes(), rohc_comp_set_wlsb_window_width(), rohc_crc_init_table(), ROHC_CRC_TYPE_2, ROHC_CRC_TYPE_3, ROHC_CRC_TYPE_6, ROHC_CRC_TYPE_7, ROHC_CRC_TYPE_8, ROHC_SMALL_CID, ROHC_SMALL_CID_MAX, rtp_ports, total_compressed_size, total_uncompressed_size, trace_callback, and zfree.
Referenced by main().
int rohc_c_info | ( | char * | buffer | ) |
Get information about available compression profiles.
This function outputs XML.
buffer | The buffer where to store profile information |
References C_NUM_PROFILES.
int rohc_c_is_enabled | ( | struct rohc_comp * | comp | ) |
void rohc_c_set_enable | ( | struct rohc_comp * | comp, |
int | enable | ||
) |
void rohc_c_set_header | ( | struct rohc_comp * | comp, |
int | header | ||
) |
Set the maximal header size. The maximal header size is ignored for the moment.
comp | The ROHC compressor |
header | The maximal header size |
References max_header_size.
void rohc_c_set_large_cid | ( | struct rohc_comp * | comp, |
int | large_cid | ||
) |
Tell the compressor to use large CIDs.
comp | The ROHC compressor |
large_cid | Whether to use large CIDs or not |
References medium::cid_type, medium::max_cid, medium, rohc_c_set_max_cid(), ROHC_LARGE_CID, ROHC_SMALL_CID, and ROHC_SMALL_CID_MAX.
Referenced by main().
void rohc_c_set_max_cid | ( | struct rohc_comp * | comp, |
int | value | ||
) |
Set the maximal CID value the compressor should use.
comp | The ROHC compressor |
value | The new maximal CID value |
References medium::cid_type, medium::max_cid, medium, ROHC_LARGE_CID, ROHC_LARGE_CID_MAX, and ROHC_SMALL_CID_MAX.
Referenced by main(), and rohc_c_set_large_cid().
void rohc_c_set_mrru | ( | struct rohc_comp * | comp, |
int | value | ||
) |
Set the Maximum Reconstructed Reception Unit (MRRU).
The MRRU value must be in range [0 ; ROHC_MAX_MRRU]. Remember that the MRRU includes the 32-bit CRC that protects it.
If set to 0, segmentation is disabled as no segment headers are allowed on the channel. No segment will be generated.
comp | The ROHC compressor |
value | The new MRRU value |
References __attribute__, and rohc_comp_set_mrru().
int rohc_c_statistics | ( | struct rohc_comp * | comp, |
unsigned int | indent, | ||
char * | buffer | ||
) |
Get information about a ROHC compressor.
This function outputs XML.
comp | The ROHC compressor |
indent | The indent level to beautify the XML output |
buffer | The buffer where to store the information |
References C_NUM_PROFILES, medium::cid_type, c_profile::description, enabled, c_profile::id, medium::max_cid, medium, mrru, num_contexts_used, num_packets, profiles, ROHC_LARGE_CID, total_compressed_size, total_uncompressed_size, and zfree.
int rohc_c_using_small_cid | ( | struct rohc_comp * | comp | ) |
Whether the compressor uses small CID or not.
comp | The ROHC compressor |
References medium::cid_type, medium, and ROHC_SMALL_CID.
Referenced by main().
bool rohc_comp_add_rtp_port | ( | struct rohc_comp *const | comp, |
const unsigned int | port | ||
) |
Add a port to the list of UDP ports dedicated for RTP traffic.
comp | The ROHC compressor |
port | The UDP port to add in the list |
References MAX_RTP_PORTS, rohc_debug, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, rohc_warning, and rtp_ports.
Referenced by main(), and rohc_alloc_compressor().
bool rohc_comp_force_contexts_reinit | ( | struct rohc_comp *const | comp | ) |
Force the compressor to re-initialize all its contexts.
Make all contexts restart their initialization with decompressor, ie. they go in the lowest compression state. This function can be used once the ROHC channel is established again after an interruption.
comp | The ROHC compressor |
References contexts, medium::max_cid, medium, num_contexts_used, c_context::profile, c_profile::reinit_context, rohc_info, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, rohc_warning, and c_context::used.
Referenced by main().
bool rohc_comp_get_cid_type | ( | const struct rohc_comp *const | comp, |
rohc_cid_type_t *const | cid_type | ||
) |
Get the CID type the compressor uses.
comp | The ROHC compressor |
cid_type | OUT: The current CID type among ROHC_SMALL_CID and ROHC_LARGE_CID |
References medium::cid_type, and medium.
Referenced by main().
bool rohc_comp_get_general_info | ( | const struct rohc_comp *const | comp, |
rohc_comp_general_info_t *const | info | ||
) |
Get some generak information about the compressor.
To use the function, call it with a pointer on a pre-allocated 'rohc_comp_general_info_t' structure with the 'version_major' and 'version_minor' fields set to one of the following supported versions:
See rohc_comp_general_info_t for details about fields that are supported in the above versions.
comp | The ROHC compressor to get information from |
info | IN/OUT: the structure where information will be stored |
References num_contexts_used, num_packets, rohc_error, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, total_compressed_size, and total_uncompressed_size.
Referenced by main().
int rohc_comp_get_last_packet_info | ( | const struct rohc_comp *const | comp, |
rohc_comp_last_packet_info_t *const | info | ||
) |
Get some information about the last compressed packet.
comp | The ROHC compressor to get information from |
info | IN/OUT: the structure where information will be stored |
References rohc_comp_last_packet_info_t::context_mode, rohc_comp_last_packet_info_t::context_state, rohc_comp_last_packet_info_t::header_last_comp_size, c_context::header_last_compressed_size, rohc_comp_last_packet_info_t::header_last_uncomp_size, c_context::header_last_uncompressed_size, last_context, c_context::mode, rohc_comp_last_packet_info_t::packet_type, c_context::packet_type, rohc_error, ROHC_ERROR, ROHC_OK, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, c_context::state, rohc_comp_last_packet_info_t::total_last_comp_size, c_context::total_last_compressed_size, rohc_comp_last_packet_info_t::total_last_uncomp_size, and c_context::total_last_uncompressed_size.
bool rohc_comp_get_last_packet_info2 | ( | const struct rohc_comp *const | comp, |
rohc_comp_last_packet_info2_t *const | info | ||
) |
Get some information about the last compressed packet.
To use the function, call it with a pointer on a pre-allocated 'rohc_comp_last_packet_info2_t' structure with the 'version_major' and 'version_minor' fields set to one of the following supported versions:
See rohc_comp_last_packet_info2_t for details about fields that are supported in the above versions.
comp | The ROHC compressor to get information from |
info | IN/OUT: the structure where information will be stored |
References c_context::cid, c_context::header_last_compressed_size, c_context::header_last_uncompressed_size, c_profile::id, last_context, c_context::mode, c_context::num_sent_packets, c_context::packet_type, c_context::profile, rohc_error, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, c_context::state, c_context::total_last_compressed_size, c_context::total_last_uncompressed_size, and c_context::used.
Referenced by main().
bool rohc_comp_get_max_cid | ( | const struct rohc_comp *const | comp, |
size_t *const | max_cid | ||
) |
Get the maximal CID value the compressor uses.
comp | The ROHC compressor |
max_cid | OUT: The current maximal CID value |
References medium::max_cid, and medium.
Referenced by main().
bool rohc_comp_get_mrru | ( | const struct rohc_comp *const | comp, |
size_t *const | mrru | ||
) |
Get the Maximum Reconstructed Reception Unit (MRRU).
The MRRU value is in range [0 ; ROHC_MAX_MRRU]. Remember that the MRRU includes the 32-bit CRC that protects it.
If MRRU value is 0, segmentation is disabled.
comp | The ROHC compressor |
mrru | OUT: The current MRRU value |
References mrru.
Referenced by main().
int rohc_comp_get_segment | ( | struct rohc_comp *const | comp, |
unsigned char *const | segment, | ||
const size_t | max_len, | ||
size_t *const | len | ||
) |
Get the next ROHC segment if any.
To get all the segments of one ROHC packet, call this function until ROHC_SEGMENT_LAST is returned.
comp | The ROHC compressor |
segment | The buffer where to store the ROHC segment |
max_len | The maximum length (in bytes) of the buffer for the ROHC segment |
len | OUT: The length (in bytes) of the ROHC segment |
References rohc_debug, ROHC_ERROR, rohc_min, ROHC_NEED_SEGMENT, ROHC_OK, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, rohc_warning, rru, rru_len, and rru_off.
Referenced by main().
const char* rohc_comp_get_state_descr | ( | const rohc_c_state | state | ) |
Give a description for the given ROHC compression context state.
The descriptions are not part of the API. They may change between releases without any warning. Do NOT use them for other means that providing to users a textual description of compression context states used by the library. If unsure, ask on the mailing list.
state | The compression context state to get a description for |
Referenced by main().
bool rohc_comp_remove_rtp_port | ( | struct rohc_comp *const | comp, |
const unsigned int | port | ||
) |
Remove a port from the list of UDP ports dedicated to RTP traffic.
comp | The ROHC compressor |
port | The UDP port to remove |
References contexts, c_profile::destroy, medium::max_cid, MAX_RTP_PORTS, medium, num_contexts_used, c_context::profile, rohc_debug, rohc_hton16(), ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, rohc_warning, rtp_ports, c_profile::use_udp_port, and c_context::used.
Referenced by main().
bool rohc_comp_reset_rtp_ports | ( | struct rohc_comp *const | comp | ) |
Reset the list of dedicated RTP ports.
comp | The ROHC compressor |
References MAX_RTP_PORTS, rohc_debug, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, and rtp_ports.
Referenced by main().
bool rohc_comp_set_mrru | ( | struct rohc_comp *const | comp, |
const size_t | mrru | ||
) |
Set the Maximum Reconstructed Reception Unit (MRRU).
The MRRU value must be in range [0 ; ROHC_MAX_MRRU]. Remember that the MRRU includes the 32-bit CRC that protects it.
If set to 0, segmentation is disabled as no segment headers are allowed on the channel. No segment will be generated.
comp | The ROHC compressor |
mrru | The new MRRU value |
References mrru, rohc_debug, ROHC_MAX_MRRU, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, and rohc_warning.
Referenced by main(), and rohc_c_set_mrru().
bool rohc_comp_set_periodic_refreshes | ( | struct rohc_comp *const | comp, |
const size_t | ir_timeout, | ||
const size_t | fo_timeout | ||
) |
Set the timeout values for IR and FO periodic refreshes.
The IR timeout shall be greater than the FO timeout. Both timeouts are expressed in number of compressed packets.
IR timeout is set to CHANGE_TO_IR_COUNT by default. FO timeout is set to CHANGE_TO_FO_COUNT by default.
comp | The ROHC compressor |
ir_timeout | The number of packets to compress before going back to IR state to force a context refresh |
fo_timeout | The number of packets to compress before going back to FO state to force a context refresh |
References num_packets, periodic_refreshes_fo_timeout, periodic_refreshes_ir_timeout, rohc_info, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, and rohc_warning.
Referenced by main(), and rohc_alloc_compressor().
bool rohc_comp_set_random_cb | ( | struct rohc_comp *const | comp, |
rohc_comp_random_cb_t | callback, | ||
void *const | user_context | ||
) |
Set the user-defined callback for random numbers.
If no callback is defined, an internal one that always returns 0 will be defined for compatibility reasons.
comp | The ROHC compressor to set the random callback for |
callback | The random callback to set |
user_context | Private data that will be given to the callback, may be used as a context by user |
References random_cb, and random_cb_ctxt.
Referenced by main().
bool rohc_comp_set_rtp_detection_cb | ( | struct rohc_comp *const | comp, |
rohc_rtp_detection_callback_t | callback, | ||
void *const | rtp_private | ||
) |
Set the RTP detection callback function.
comp | The ROHC compressor |
callback | The callback function used to detect RTP packets The callback is deactivated if NULL is given as parameter |
rtp_private | A pointer to an external memory area provided and used by the callback user |
References rtp_callback, and rtp_private.
Referenced by main().
bool rohc_comp_set_wlsb_window_width | ( | struct rohc_comp *const | comp, |
const size_t | width | ||
) |
Set the window width for the W-LSB algorithm.
W-LSB window width is set to C_WINDOW_WIDTH by default.
comp | The ROHC compressor |
width | The width of the W-LSB sliding window |
References num_packets, rohc_info, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, rohc_warning, and wlsb_window_width.
Referenced by main(), and rohc_alloc_compressor().
int rohc_compress | ( | struct rohc_comp * | comp, |
unsigned char * | ibuf, | ||
int | isize, | ||
unsigned char * | obuf, | ||
int | osize | ||
) |
Compress a ROHC packet.
comp | The ROHC compressor |
ibuf | The uncompressed packet to compress |
isize | The size of the uncompressed packet |
obuf | The buffer where to store the ROHC packet |
osize | The size of the buffer for the ROHC packet |
References rohc_compress2(), and ROHC_OK.
int rohc_compress2 | ( | struct rohc_comp *const | comp, |
const unsigned char *const | uncomp_packet, | ||
const size_t | uncomp_packet_len, | ||
unsigned char *const | rohc_packet, | ||
const size_t | rohc_packet_max_len, | ||
size_t *const | rohc_packet_len | ||
) |
Compress a ROHC packet.
May return a full ROHC packet, or a segment of a ROHC packet if the output buffer was too small for the ROHC packet or if MRRU was exceeded. Use the rohc_comp_get_segment function to retrieve next ROHC segments.
comp | The ROHC compressor |
uncomp_packet | The uncompressed packet to compress |
uncomp_packet_len | The size of the uncompressed packet |
rohc_packet | The buffer where to store the ROHC packet |
rohc_packet_max_len | The maximum length (in bytes) of the buffer for the ROHC packet |
rohc_packet_len | OUT: The length (in bytes) of the ROHC packet |
References c_add_wlsb(), crc_calc_fcs32(), CRC_FCS32_LEN, CRC_INIT_FCS32, c_profile::description, c_profile::destroy, c_profile::encode, c_context::header_16_compressed, c_context::header_16_uncompressed, c_context::header_compressed_size, c_context::header_last_compressed_size, c_context::header_last_uncompressed_size, c_context::header_uncompressed_size, c_profile::id, ip_create(), ip_get_inner_packet(), ip_get_protocol(), ip_get_raw_data(), ip_get_totlen(), last_context, c_context::latest_used, mrru, num_contexts_used, num_packets, c_context::num_sent_packets, c_context::packet_type, c_context::profile, rohc_debug, rohc_dump_packet(), ROHC_ERROR, rohc_feedback_remove_locked(), rohc_feedback_unlock(), rohc_get_packet_descr(), rohc_info, ROHC_IPPROTO_IPIP, ROHC_IPPROTO_IPV6, rohc_min, ROHC_NEED_SEGMENT, rohc_ntoh32(), ROHC_OK, ROHC_PROFILE_GENERAL, ROHC_PROFILE_UNCOMPRESSED, ROHC_TRACE_COMP, ROHC_TRACE_DEBUG, rohc_warning, rru, rru_len, rru_off, c_context::total_16_compressed, c_context::total_16_uncompressed, total_compressed_size, c_context::total_compressed_size, c_context::total_last_compressed_size, c_context::total_last_uncompressed_size, total_uncompressed_size, c_context::total_uncompressed_size, trace_callback, and c_context::used.
Referenced by main(), and rohc_compress().
int rohc_feedback_flush | ( | struct rohc_comp * | comp, |
unsigned char * | obuf, | ||
int | osize | ||
) |
Send as much feedback data as possible.
comp | The ROHC compressor |
obuf | The buffer where to store the feedback-only packet |
osize | The size of the buffer for the feedback-only packet |
References rohc_debug, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, and c_feedback::size.
Referenced by main().
bool rohc_feedback_remove_locked | ( | struct rohc_comp *const | comp | ) |
Remove all feedbacks locked during the packet build.
This function does remove the locked feedbacks. See function rohc_feedback_unlock instead if you want not to remove them.
comp | The ROHC compressor |
References rohc_feedback::data, FEEDBACK_RING_SIZE, feedbacks, feedbacks_first, feedbacks_first_unlocked, rohc_feedback::is_locked, rohc_feedback::length, rohc_debug, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, and zfree.
Referenced by main(), and rohc_compress2().
bool rohc_feedback_unlock | ( | struct rohc_comp *const | comp | ) |
Unlock all feedbacks locked during the packet build.
This function does not remove the locked feedbacks. See function rohc_feedback_remove_locked instead if you want to remove them.
comp | The ROHC compressor |
References FEEDBACK_RING_SIZE, feedbacks, feedbacks_first, feedbacks_first_unlocked, feedbacks_next, and rohc_feedback::is_locked.
Referenced by main(), and rohc_compress2().
void rohc_free_compressor | ( | struct rohc_comp * | comp | ) |
Destroy one ROHC compressor.
comp | The compressor to destroy |
References rohc_debug, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, and zfree.
Referenced by main().