ROHC compression/decompression library
Functions
cid.c File Reference

Context ID (CID) routines. More...

#include "cid.h"
#include "sdvl.h"
#include "rohc_traces.h"
#include <stdint.h>
#include <assert.h>
Include dependency graph for cid.c:

Functions

int code_cid_values (const rohc_cid_type_t cid_type, const int cid, unsigned char *const dest, const int dest_size, int *const 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

int code_cid_values ( const rohc_cid_type_t  cid_type,
const int  cid,
unsigned char *const  dest,
const int  dest_size,
int *const  first_position 
)

Build the CID part of the ROHC packets.

Parameters:
cid_typeThe type of CID in use for the compression context: ROHC_SMALL_CID or ROHC_LARGE_CID
cidThe value of the CID for the 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_bytesSdvl(), c_encodeSdvl(), rohc_debugf, rohc_debugf_, and ROHC_SMALL_CID.

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