ROHC compression/decompression library
Functions
cid.c File Reference

Context ID (CID) routines. More...

#include "cid.h"
#include "rohc_traces.h"
Include dependency graph for cid.c:

Functions

unsigned char c_add_cid (int cid)
 Set an add-CID value.
int code_cid_values (struct c_context *context, unsigned char *dest, int dest_size, int *first_position)
 Build the CID part of the ROHC packets.

Detailed Description

Context ID (CID) routines.

Author:
Didier Barvaux <didier.barvaux@toulouse.viveris.com>
The hackers from ROHC for Linux

Function Documentation

unsigned char c_add_cid ( int  cid)

Set an add-CID value.

Add-CID is needed when using small CIDs.

Parameters:
cidThe small CID to set
Returns:
The add-CID byte

Referenced by code_cid_values().

int code_cid_values ( struct c_context context,
unsigned char *  dest,
int  dest_size,
int *  first_position 
)

Build the CID part of the ROHC packets.

Parameters:
contextThe compression context
destThe rohc-packet-under-build buffer
dest_sizeThe length of the rohc-packet-under-build buffer
first_positionOUT: The position of the first byte to be completed by other functions
Returns:
The position in the rohc-packet-under-build buffer

References c_add_cid(), c_bytesSdvl(), c_encodeSdvl(), c_context::cid, medium::cid_type, c_context::compressor, rohc_comp::medium, rohc_debugf, and rohc_debugf_.

Referenced by code_IR_DYN_packet(), code_IR_packet(), code_UO0_packet(), code_UO1_packet(), code_UO2_packet(), uncompressed_code_IR_packet(), and uncompressed_code_normal_packet().