ROHC compression/decompression library
|
ROHC packet related routines. More...
Functions | |
int | d_is_segment (const unsigned char *data) |
Find out whether the field is a segment field or not. | |
int | d_is_padding (const unsigned char *data) |
Find out whether the field is a padding field or not. | |
int | d_is_feedback (const unsigned char *data) |
Find out whether a ROHC packet is a Feedback packet or not. | |
int | d_feedback_size (const unsigned char *data) |
Find out the size of the feedback. | |
int | d_feedback_headersize (const unsigned char *data) |
Find out the size of the feedback header. | |
bool | d_is_ir (const unsigned char *data, const size_t len) |
Find out whether a ROHC packet is an IR packet or not. | |
bool | 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 | 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 | 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 | 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 | 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 | 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 | d_is_add_cid (const unsigned char *data) |
Check whether a ROHC packet starts with an add-CID byte or not. | |
int | d_decode_add_cid (const unsigned char *data) |
Decode the add-CID byte of a ROHC packet (if the add-CID byte is present) |
ROHC packet related routines.
int 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 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 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 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 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 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 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 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 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 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 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 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 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 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.