ROHC compression/decompression library
Functions
cid.c File Reference

Context ID (CID) routines. More...

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

Functions

static uint8_t c_add_cid (const rohc_cid_t cid)
 Set an add-CID value. More...
 
int code_cid_values (const rohc_cid_type_t cid_type, const rohc_cid_t cid, uint8_t *const dest, const size_t dest_size, size_t *const first_position)
 Build the CID part of the ROHC packets. More...
 

Detailed Description

Context ID (CID) routines.

Author
Didier Barvaux didie.nosp@m.r.ba.nosp@m.rvaux.nosp@m.@tou.nosp@m.louse.nosp@m..viv.nosp@m.eris..nosp@m.com
Didier Barvaux didie.nosp@m.r@ba.nosp@m.rvaux.nosp@m..org

Function Documentation

static uint8_t c_add_cid ( const rohc_cid_t  cid)
static

Set an add-CID value.

Add-CID is needed when using small CIDs.

Parameters
cidThe small CID to set
Returns
The add-CID byte
int code_cid_values ( const rohc_cid_type_t  cid_type,
const rohc_cid_t  cid,
uint8_t *const  dest,
const size_t  dest_size,
size_t *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 in case of success, -1 in case of error