ROHC compression/decompression library
Macros | Functions
rohc_add_cid.c File Reference

Functions related to ROHC add-CID. More...

#include "rohc_add_cid.h"
#include "rohc_bit_ops.h"
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for rohc_add_cid.c:

Macros

#define ROHC_ADD_CID   0xe
 The magic bits to find out whether a ROHC packet starts with an add-CID byte or not. More...
 

Functions

static bool rohc_add_cid_is_present (const uint8_t *const data, const size_t len)
 Check whether a ROHC packet starts with an add-CID byte or not. More...
 
uint8_t rohc_add_cid_decode (const uint8_t *const data, const size_t len)
 Decode the add-CID byte of a ROHC packet (if the add-CID byte is present) More...
 

Detailed Description

Functions related to ROHC add-CID.

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

Macro Definition Documentation

#define ROHC_ADD_CID   0xe

The magic bits to find out whether a ROHC packet starts with an add-CID byte or not.

Function Documentation

uint8_t rohc_add_cid_decode ( const uint8_t *const  data,
const size_t  len 
)

Decode the add-CID byte of a ROHC packet (if the add-CID byte is present)

Parameters
dataThe ROHC packet with a possible add-CID byte
lenThe length of the ROHC packet
Returns
UINT8_MAX if no add-CID byte is present, the CID value otherwise
static bool rohc_add_cid_is_present ( const uint8_t *const  data,
const size_t  len 
)
static

Check whether a ROHC packet starts with an add-CID byte or not.

Parameters
dataThe ROHC packet with a possible add-CID byte
lenThe length of the ROHC packet
Returns
Whether the ROHC packet starts with an add-CID byte or not