ROHC compression/decompression library
Data Structures | Typedefs | Enumerations | Functions
ROHC compression API
Collaboration diagram for ROHC compression API:

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_comprohc_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 Documentation

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.

Parameters:
compThe ROHC compressor
user_contextThe context given by the user when he/she called the rohc_comp_set_random_cb function, may be NULL.
See also:
rohc_comp_set_random_cb
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.

Parameters:
ipThe innermost IP packet
udpThe UDP header of the packet
payloadThe UDP payload of the packet
payload_sizeThe size of the UDP payload (in bytes)
rtp_privateA pointer to a memory area to be used by the callback function, may be NULL.
Returns:
true if the packet is an RTP packet, false otherwise
See also:
rohc_comp_set_rtp_detection_cb

Enumeration Type Documentation

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.

Enumerator:
IR 

The Initialization and Refresh (IR) state

FO 

The First Order (FO) state

SO 

The Second Order (SO) state


Function Documentation

void rohc_activate_profile ( struct rohc_comp comp,
int  profile 
)

Activate a profile for a compressor.

Parameters:
compThe ROHC compressor
profileThe 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]
int rohc_c_info ( char *  buffer)

Get information about available compression profiles.

This function outputs XML.

Deprecated:
do not use this function anymore, use rohc_comp_get_general_info() instead
Parameters:
bufferThe buffer where to store profile information
Returns:
The length of the data stored in the buffer

References C_NUM_PROFILES.

int rohc_c_is_enabled ( struct rohc_comp comp)

Whether the ROHC compressor is enabled or not.

Parameters:
compThe ROHC compressor
Returns:
Whether the compressor is enabled or not

References enabled.

Referenced by main().

void rohc_c_set_enable ( struct rohc_comp comp,
int  enable 
)

Enable the ROHC compressor.

Parameters:
compThe ROHC compressor
enableWhether to enable the compressor or not

References enabled.

Referenced by main().

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.

Parameters:
compThe ROHC compressor
headerThe 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.

Parameters:
compThe ROHC compressor
large_cidWhether 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.

Parameters:
compThe ROHC compressor
valueThe 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.

Deprecated:
do not use this function anymore, use rohc_comp_set_mrru() instead
Parameters:
compThe ROHC compressor
valueThe 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.

Deprecated:
do not use this function anymore, use rohc_comp_get_general_info() instead
Parameters:
compThe ROHC compressor
indentThe indent level to beautify the XML output
bufferThe buffer where to store the information
Returns:
The length of the data stored in the buffer if successful, -1 if an error occurs

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.

Parameters:
compThe ROHC compressor
Returns:
Whether the compressor uses small CID or not

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.

Parameters:
compThe ROHC compressor
portThe UDP port to add in the list
Returns:
true on success, false otherwise

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.

Parameters:
compThe ROHC compressor
Returns:
true in case of success, false otherwise

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.

Parameters:
compThe ROHC compressor
cid_typeOUT: The current CID type among ROHC_SMALL_CID and ROHC_LARGE_CID
Returns:
true if the CID type was successfully retrieved, false otherwise

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:

  • Major 0, minor 0

See rohc_comp_general_info_t for details about fields that are supported in the above versions.

Parameters:
compThe ROHC compressor to get information from
infoIN/OUT: the structure where information will be stored
Returns:
true in case of success, false otherwise

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 
)
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:

  • Major 0, minor 0

See rohc_comp_last_packet_info2_t for details about fields that are supported in the above versions.

Parameters:
compThe ROHC compressor to get information from
infoIN/OUT: the structure where information will be stored
Returns:
true in case of success, false otherwise

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.

Parameters:
compThe ROHC compressor
max_cidOUT: The current maximal CID value
Returns:
true if MAX_CID was successfully retrieved, false otherwise

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.

Parameters:
compThe ROHC compressor
mrruOUT: The current MRRU value
Returns:
true if MRRU was successfully retrieved, false otherwise

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.

Parameters:
compThe ROHC compressor
segmentThe buffer where to store the ROHC segment
max_lenThe maximum length (in bytes) of the buffer for the ROHC segment
lenOUT: The length (in bytes) of the ROHC segment
Returns:
  • ROHC_NEED_SEGMENT if a ROHC segment is returned and more segments are available,
  • ROHC_OK if a ROHC segment is returned and no more ROHC segment is available
  • ROHC_ERROR if an error occurred

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.

Parameters:
stateThe compression context state to get a description for
Returns:
A string that describes the given compression context state

References FO, IR, and SO.

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.

Parameters:
compThe ROHC compressor
portThe UDP port to remove
Returns:
true on success, false otherwise

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.

Parameters:
compThe ROHC compressor
Returns:
true on success, false otherwise

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.

Parameters:
compThe ROHC compressor
mrruThe new MRRU value
Returns:
true if the MRRU was successfully set, false otherwise

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.

Warning:
The values can not be modified after library initialization
Parameters:
compThe ROHC compressor
ir_timeoutThe number of packets to compress before going back to IR state to force a context refresh
fo_timeoutThe number of packets to compress before going back to FO state to force a context refresh
Returns:
true in case of success, false in case of failure

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.

Parameters:
compThe ROHC compressor to set the random callback for
callbackThe random callback to set
user_contextPrivate 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.

Parameters:
compThe ROHC compressor
callbackThe callback function used to detect RTP packets The callback is deactivated if NULL is given as parameter
rtp_privateA pointer to an external memory area provided and used by the callback user
Returns:
true on success, false otherwise

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.

Warning:
The value must be a power of 2
The value can not be modified after library initialization
Parameters:
compThe ROHC compressor
widthThe width of the W-LSB sliding window
Returns:
true in case of success, false in case of failure

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.

Deprecated:
do not use this function anymore, use rohc_compress2() instead
Parameters:
compThe ROHC compressor
ibufThe uncompressed packet to compress
isizeThe size of the uncompressed packet
obufThe buffer where to store the ROHC packet
osizeThe size of the buffer for the ROHC packet
Returns:
The size of the ROHC packet in case of success, 0 in case of error

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.

Parameters:
compThe ROHC compressor
uncomp_packetThe uncompressed packet to compress
uncomp_packet_lenThe size of the uncompressed packet
rohc_packetThe buffer where to store the ROHC packet
rohc_packet_max_lenThe maximum length (in bytes) of the buffer for the ROHC packet
rohc_packet_lenOUT: The length (in bytes) of the ROHC packet
Returns:
  • ROHC_OK if a ROHC packet is returned
  • ROHC_NEED_SEGMENT if no compressed data is returned and segmentation required
  • ROHC_ERROR if an error occurred

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.

Parameters:
compThe ROHC compressor
obufThe buffer where to store the feedback-only packet
osizeThe size of the buffer for the feedback-only packet
Returns:
The size of the feedback-only packet, 0 if there is no feedback data to send

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.

Parameters:
compThe ROHC compressor
Returns:
true if action succeeded, false in case of error

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.

Parameters:
compThe ROHC compressor
Returns:
true if action succeeded, false in case of error

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.

Parameters:
compThe compressor to destroy

References rohc_debug, ROHC_PROFILE_GENERAL, ROHC_TRACE_COMP, and zfree.

Referenced by main().