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

Functions related to packet detection. More...

#include "rohc_decomp_detect_packet.h"
#include "rohc_bit_ops.h"
Include dependency graph for rohc_decomp_detect_packet.c:

Macros

#define D_SEGMENT   (0xfe >> 1)
 
#define D_PADDING   0xe0
 
#define D_IR_PACKET   (0xfc >> 1)
 
#define D_IR_DYN_PACKET   0xf8
 

Functions

bool rohc_decomp_packet_is_segment (const uint8_t *const data)
 Find out whether the field is a segment field or not. More...
 
bool rohc_decomp_packet_is_padding (const uint8_t *const data)
 Find out whether the field is a padding field or not. More...
 
bool rohc_decomp_packet_is_ir (const uint8_t *const data, const size_t len)
 Find out whether a ROHC packet is an IR packet or not. More...
 
bool rohc_decomp_packet_is_irdyn (const uint8_t *const data, const size_t len)
 Find out whether a ROHC packet is an IR-DYN packet or not. More...
 
bool rohc_decomp_packet_is_uo0 (const uint8_t *const data, const size_t len)
 Find out whether a ROHC packet is an UO-0 packet or not. More...
 
bool rohc_decomp_packet_is_uo1 (const uint8_t *const data, const size_t len)
 Find out whether a ROHC packet is an UO-1* packet or not. More...
 
bool rohc_decomp_packet_is_uo1_ts (const uint8_t *const data, const size_t len)
 Find out whether a ROHC packet is an UO-1-TS packet or not. More...
 
bool rohc_decomp_packet_is_uor2 (const uint8_t *const data, const size_t len)
 Find out whether a ROHC packet is an UOR-2* packet or not. More...
 
bool rohc_decomp_packet_is_uor2_ts (const uint8_t *const data, const size_t data_len, const size_t large_cid_len)
 Find out whether a ROHC packet is an UOR-2-TS packet or not. More...
 

Detailed Description

Functions related to packet detection.

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 D_IR_DYN_PACKET   0xf8

The magic byte to find out whether a ROHC packet is an IR-DYN packet

#define D_IR_PACKET   (0xfc >> 1)

The magic bits to find out whether a ROHC packet is an IR packet or not

#define D_PADDING   0xe0

The magic byte to find out whether a field is a padding field or not

#define D_SEGMENT   (0xfe >> 1)

The magic bits to find out whether a field is a segment field or not

Function Documentation

bool rohc_decomp_packet_is_ir ( const uint8_t *const  data,
const size_t  len 
)

Find out whether a ROHC packet is an IR packet or not.

Parameters
dataThe ROHC packet to analyze
lenThe length of the ROHC packet
Returns
Whether the ROHC packet is an IR packet or not
bool rohc_decomp_packet_is_irdyn ( const uint8_t *const  data,
const size_t  len 
)

Find out whether a ROHC packet is an IR-DYN packet or not.

Parameters
dataThe ROHC packet to analyze
lenThe length of the ROHC packet
Returns
Whether the ROHC packet is an IR-DYN packet or not
bool rohc_decomp_packet_is_padding ( const uint8_t *const  data)

Find out whether the field is a padding field or not.

Parameters
dataThe field to analyze
Returns
Whether the field is a padding field or not
bool rohc_decomp_packet_is_segment ( const uint8_t *const  data)

Find out whether the field is a segment field or not.

Parameters
dataThe field to analyze
Returns
Whether the field is a segment field or not
bool rohc_decomp_packet_is_uo0 ( const uint8_t *const  data,
const size_t  len 
)

Find out whether a ROHC packet is an UO-0 packet or not.

Parameters
dataThe ROHC packet to analyze
lenThe length of the ROHC packet
Returns
Whether the ROHC packet is an UO-0 packet or not
bool rohc_decomp_packet_is_uo1 ( const uint8_t *const  data,
const size_t  len 
)

Find out whether a ROHC packet is an UO-1* packet or not.

Parameters
dataThe ROHC packet to analyze
lenThe length of the ROHC packet
Returns
Whether the ROHC packet is an UO-1* packet or not
bool rohc_decomp_packet_is_uo1_ts ( const uint8_t *const  data,
const size_t  len 
)

Find out whether a ROHC packet is an UO-1-TS packet or not.

Check the T field that discriminates between UO-1-TS and UO-1-ID.

Parameters
dataThe ROHC packet to analyze
lenThe length of the ROHC packet
Returns
Whether the ROHC packet is an UO-1-TS packet or not
bool rohc_decomp_packet_is_uor2 ( const uint8_t *const  data,
const size_t  len 
)

Find out whether a ROHC packet is an UOR-2* packet or not.

Parameters
dataThe ROHC packet to analyze
lenThe length of the ROHC packet
Returns
Whether the ROHC packet is an UOR-2* packet or not
bool rohc_decomp_packet_is_uor2_ts ( const uint8_t *const  data,
const size_t  data_len,
const size_t  large_cid_len 
)

Find out whether a ROHC packet is an UOR-2-TS packet or not.

Check the T field that discriminates between UOR-2-TS and UOR-2-ID.

Parameters
dataThe ROHC packet to analyze
data_lenThe length of the ROHC packet
large_cid_lenThe length of the optional large CID field
Returns
Whether the ROHC packet is an UOR-2-TS packet or not