ROHC compression/decompression library
|
ROHC packet related routines. More...
Go to the source code of this file.
Defines | |
#define | D_SEGMENT (0xfe >> 1) |
The magic bits to find out whether a field is a segment field or not. | |
#define | D_PADDING 0xe0 |
The magic byte to find out whether a field is a padding field or not. | |
#define | D_FEEDBACK (0xf0 >> 3) |
The magic bits to find out whether a ROHC packet is a Feedback packet or not. | |
#define | D_IR_PACKET (0xfc >> 1) |
The magic bits to find out whether a ROHC packet is an IR packet or not. | |
#define | D_IR_DYN_PACKET 0xf8 |
The magic byte to find out whether a ROHC packet is an IR-DYN packet or not. | |
#define | D_ADD_CID 0xe |
The magic bits to find out whether a ROHC packet starts with an add-CID byte or not. | |
Functions | |
int ROHC_EXPORT | d_is_segment (const unsigned char *) |
Find out whether the field is a segment field or not. | |
int ROHC_EXPORT | d_is_padding (const unsigned char *) |
Find out whether the field is a padding field or not. | |
int ROHC_EXPORT | d_is_feedback (const unsigned char *) |
Find out whether a ROHC packet is a Feedback packet or not. | |
int ROHC_EXPORT | d_feedback_size (const unsigned char *) |
Find out the size of the feedback. | |
int ROHC_EXPORT | d_feedback_headersize (const unsigned char *) |
Find out the size of the feedback header. | |
bool ROHC_EXPORT | d_is_ir (const unsigned char *data, const size_t len) |
Find out whether a ROHC packet is an IR packet or not. | |
bool ROHC_EXPORT | d_is_irdyn (const unsigned char *data, const size_t len) |
Find out whether a ROHC packet is an IR-DYN packet or not. | |
bool ROHC_EXPORT | d_is_uo0 (const unsigned char *data, const size_t len) |
Find out whether a ROHC packet is an UO-0 packet or not. | |
bool ROHC_EXPORT | d_is_uo1 (const unsigned char *data, const size_t len) |
Find out whether a ROHC packet is an UO-1* packet or not. | |
bool ROHC_EXPORT | d_is_uor2 (const unsigned char *data, const size_t len) |
Find out whether a ROHC packet is an UOR-2* packet or not. | |
bool ROHC_EXPORT | d_is_uor2_ts (const unsigned char *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. | |
bool ROHC_EXPORT | d_is_uor2_rtp (const unsigned char *const data, const size_t data_len, const size_t large_cid_len) |
Find out whether a ROHC packet is an UOR-2-RTP packet or not. | |
int ROHC_EXPORT | d_is_add_cid (const unsigned char *) |
Check whether a ROHC packet starts with an add-CID byte or not. | |
int ROHC_EXPORT | d_decode_add_cid (const unsigned char *) |
Decode the add-CID byte of a ROHC packet (if the add-CID byte is present) |
ROHC packet related routines.
#define D_ADD_CID 0xe |
The magic bits to find out whether a ROHC packet starts with an add-CID byte or not.
Referenced by d_is_add_cid().
#define D_FEEDBACK (0xf0 >> 3) |
The magic bits to find out whether a ROHC packet is a Feedback packet or not.
Referenced by d_is_feedback().
#define D_IR_DYN_PACKET 0xf8 |
The magic byte to find out whether a ROHC packet is an IR-DYN packet or not.
Referenced by d_is_irdyn().
#define D_IR_PACKET (0xfc >> 1) |
The magic bits to find out whether a ROHC packet is an IR packet or not.
Referenced by d_is_ir().
#define D_PADDING 0xe0 |
The magic byte to find out whether a field is a padding field or not.
Referenced by d_is_padding().
#define D_SEGMENT (0xfe >> 1) |
The magic bits to find out whether a field is a segment field or not.
Referenced by d_is_segment().
int ROHC_EXPORT d_decode_add_cid | ( | const unsigned char * | data | ) |
Decode the add-CID byte of a ROHC packet (if the add-CID byte is present)
data | The ROHC packet with a possible add-CID byte |
References d_is_add_cid(), and GET_BIT_0_3.
Referenced by c_deliver_feedback().
int ROHC_EXPORT d_feedback_headersize | ( | const unsigned char * | data | ) |
Find out the size of the feedback header.
See 5.2.2 in the RFC 3095 for details.
data | The feedback header |
References GET_BIT_0_2.
int ROHC_EXPORT d_feedback_size | ( | const unsigned char * | data | ) |
Find out the size of the feedback.
See 5.2.2 in the RFC 3095 for details.
data | The feedback header |
References GET_BIT_0_2, and GET_BIT_0_7.
int ROHC_EXPORT d_is_add_cid | ( | const unsigned char * | data | ) |
Check whether a ROHC packet starts with an add-CID byte or not.
data | The ROHC packet with a possible add-CID byte |
References D_ADD_CID, and GET_BIT_4_7.
Referenced by c_deliver_feedback(), and d_decode_add_cid().
int ROHC_EXPORT d_is_feedback | ( | const unsigned char * | data | ) |
Find out whether a ROHC packet is a Feedback packet or not.
data | The ROHC packet to analyze |
References D_FEEDBACK, and GET_BIT_3_7.
bool ROHC_EXPORT d_is_ir | ( | const unsigned char * | data, |
const size_t | len | ||
) |
Find out whether a ROHC packet is an IR packet or not.
data | The ROHC packet to analyze |
len | The length of the ROHC packet |
References D_IR_PACKET, and GET_BIT_1_7.
Referenced by d_decode_header(), and ip_detect_packet_type().
bool ROHC_EXPORT d_is_irdyn | ( | const unsigned char * | data, |
const size_t | len | ||
) |
Find out whether a ROHC packet is an IR-DYN packet or not.
data | The ROHC packet to analyze |
len | The length of the ROHC packet |
References D_IR_DYN_PACKET, and GET_BIT_0_7.
Referenced by d_decode_header(), and ip_detect_packet_type().
int ROHC_EXPORT d_is_padding | ( | const unsigned char * | data | ) |
Find out whether the field is a padding field or not.
data | The field to analyze |
References D_PADDING, and GET_BIT_0_7.
int ROHC_EXPORT d_is_segment | ( | const unsigned char * | data | ) |
Find out whether the field is a segment field or not.
data | The field to analyze |
References D_SEGMENT, and GET_BIT_1_7.
bool ROHC_EXPORT d_is_uo0 | ( | const unsigned char * | data, |
const size_t | len | ||
) |
Find out whether a ROHC packet is an UO-0 packet or not.
data | The ROHC packet to analyze |
len | The length of the ROHC packet |
References GET_BIT_7.
Referenced by ip_detect_packet_type().
bool ROHC_EXPORT d_is_uo1 | ( | const unsigned char * | data, |
const size_t | len | ||
) |
Find out whether a ROHC packet is an UO-1* packet or not.
data | The ROHC packet to analyze |
len | The length of the ROHC packet |
References GET_BIT_6_7.
Referenced by ip_detect_packet_type().
bool ROHC_EXPORT d_is_uor2 | ( | const unsigned char * | data, |
const size_t | len | ||
) |
Find out whether a ROHC packet is an UOR-2* packet or not.
data | The ROHC packet to analyze |
len | The length of the ROHC packet |
References GET_BIT_5_7.
Referenced by ip_detect_packet_type().
bool ROHC_EXPORT d_is_uor2_rtp | ( | const unsigned char *const | data, |
const size_t | data_len, | ||
const size_t | large_cid_len | ||
) |
Find out whether a ROHC packet is an UOR-2-RTP packet or not.
If RTP disambiguation bit is enabled, check it. Otherwise, always return true.
The RTP disambiguation bit type is a proprietary extension to the ROHC standard. It was introduced to avoid reparsing the UOR-2* headers in cases where RND changes in extension 3.
data | The ROHC packet to analyze |
data_len | The length of the ROHC packet |
large_cid_len | The length of the optional large CID field |
References GET_BIT_6.
bool ROHC_EXPORT d_is_uor2_ts | ( | const unsigned char *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.
data | The ROHC packet to analyze |
data_len | The length of the ROHC packet |
large_cid_len | The length of the optional large CID field |
References GET_BIT_7.