ROHC compression/decompression library
Functions
ROHC decompression API

Functions

struct rohc_decomprohc_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.

Function Documentation

void clear_statistics ( struct rohc_decomp decomp)
void d_change_mode_feedback ( struct rohc_decomp decomp,
struct d_context context 
)

Create a feedback ACK packet telling the compressor to change state.

Parameters:
decompThe ROHC decompressor
contextThe 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.

Parameters:
compressor
  • The ROHC compressor to associate the decompressor with
  • NULL to disable feedback and force undirectional mode
Returns:
The newly-created decompressor if successful, NULL otherwise

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.

Parameters:
decompThe ROHC decompressor
indentThe level of indentation to add during output
bufferThe buffer where to outputs the statistics
Returns:
The length of data written to the buffer

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 
)
void rohc_free_decompressor ( struct rohc_decomp decomp)

Destroy one ROHC decompressor.

Parameters:
decompThe 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.

Parameters:
decompThe ROHC decompressor
feedback_maxvalThe feedback interval given by user

References maxval.