ROHC compression/decompression library
Functions
decode.c File Reference

ROHC packet related routines. More...

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

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.
int d_is_ir (const unsigned char *data, const size_t len)
 Find out whether a ROHC packet is an IR packet or not.
int d_is_irdyn (const unsigned char *data, const size_t len)
 Find out whether a ROHC packet is an IR-DYN 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)

Detailed Description

ROHC packet related routines.

Author:
Didier Barvaux <didier.barvaux@toulouse.viveris.com>
Didier Barvaux <didier@barvaux.org>
The hackers from ROHC for Linux

Function Documentation

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)

Parameters:
dataThe ROHC packet with a possible add-CID byte
Returns:
0 if no add-CID byte is present, the CID value otherwise

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.

Parameters:
dataThe feedback header
Returns:
The size of the feedback header (1 or 2 bytes)

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.

Parameters:
dataThe feedback header
Returns:
The size of the feedback

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.

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

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.

Parameters:
dataThe ROHC packet to analyze
Returns:
Whether the ROHC packet is a Feedback packet or not

References D_FEEDBACK, and GET_BIT_3_7.

int d_is_ir ( const unsigned char *  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

References D_IR_PACKET, and GET_BIT_1_7.

Referenced by d_decode_header().

int d_is_irdyn ( const unsigned char *  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

References D_IR_DYN_PACKET, and GET_BIT_0_7.

Referenced by d_decode_header().

int d_is_padding ( const unsigned char *  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

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.

Parameters:
dataThe field to analyze
Returns:
Whether the field is a segment field or not

References D_SEGMENT, and GET_BIT_1_7.