ROHC compression API


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.
int rohc_compress (struct rohc_comp *comp, unsigned char *ibuf, int isize, unsigned char *obuf, int osize)
 Compress a ROHC packet.
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). The MRRU is ignored for the moment.
void rohc_c_set_max_cid (struct rohc_comp *comp, int value)
 Set the maximal CID value the compressor should use.
void rohc_c_set_large_cid (struct rohc_comp *comp, int large_cid)
 Tell the compressor to use large CIDs.
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.

Function Documentation

void rohc_activate_profile ( struct rohc_comp comp,
int  profile 
)

Activate a profile for a compressor.

Parameters:
comp The ROHC compressor
profile The ID of the profile to activate

References C_NUM_PROFILES, profiles, and rohc_debugf.

struct rohc_comp* rohc_alloc_compressor ( int  max_cid,
int  jam_use,
int  adapt_size,
int  encap_size 
) [read]

Create one ROHC compressor.

Parameters:
max_cid The maximal CID value the compressor should use for contexts
jam_use The parameter which indicates if the use of the jamming is activated 0 if not activated else 1
adapt_size The size of the header or trailer of the adaptation layer
encap_size The packet size of the encapsulation layer
Returns:
The newly-created compressor if successful, NULL otherwise

References adapt_size, c_create_contexts(), C_NUM_PROFILES, medium::cid_type, enabled, encap_size, feedback_buffer, FEEDBACK_BUFFER_SIZE, feedback_pointer, feedback_size, jam_use, last_context, medium::max_cid, medium, mrru, num_packets, profiles, rohc_debugf, total_compressed_size, total_uncompressed_size, and zfree.

int rohc_c_info ( char *  buffer  ) 

Get information about available compression profiles.

This function outputs XML.

Parameters:
buffer The 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:
comp The ROHC compressor
Returns:
Whether the compressor is enabled or not

References enabled.

void rohc_c_set_enable ( struct rohc_comp comp,
int  enable 
)

Enable the ROHC compressor.

Parameters:
comp The ROHC compressor
enable Whether to enable the compressor or not

References enabled.

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

Parameters:
comp The ROHC compressor
large_cid Whether to use large CIDs or not

References medium::cid_type, medium::max_cid, and medium.

void rohc_c_set_max_cid ( struct rohc_comp comp,
int  value 
)

Set the maximal CID value the compressor should use.

Parameters:
comp The ROHC compressor
value The new maximal CID value

References medium::cid_type, medium::max_cid, and medium.

void rohc_c_set_mrru ( struct rohc_comp comp,
int  value 
)

Set the Maximum Reconstructed Reception Unit (MRRU). The MRRU is ignored for the moment.

Parameters:
comp The ROHC compressor
value The new MRRU value

References mrru.

int rohc_c_statistics ( struct rohc_comp comp,
unsigned int  indent,
char *  buffer 
)

Get information about a ROHC compressor.

This function outputs XML.

Parameters:
comp The ROHC compressor
indent The indent level to beautify the XML output
buffer The 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_c_context(), total_compressed_size, total_uncompressed_size, c_profile::version, and zfree.

int rohc_c_using_small_cid ( struct rohc_comp comp  ) 

Whether the compressor uses small CID or not.

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

References medium::cid_type, and medium.

int rohc_compress ( struct rohc_comp comp,
unsigned char *  ibuf,
int  isize,
unsigned char *  obuf,
int  osize 
)

void rohc_free_compressor ( struct rohc_comp comp  ) 

Destroy one ROHC compressor.

Parameters:
comp The compressor to destroy

References c_destroy_contexts(), c_piggyback_destroy(), rohc_debugf, and zfree.


Generated on Mon Mar 22 13:29:43 2010 for ROHC compression/decompression library by  doxygen 1.5.8