ROHC compression/decompression library
Data Structures | Defines | Enumerations | Functions
ROHC compressor/decompressor common API

Data Structures

struct  medium
 ROHC medium (CID characteristics). More...

Defines

#define ROHC_ETHERTYPE   0x22f1
 The Ethertype assigned to the ROHC protocol by the IEEE.

Enumerations

enum  rohc_mode { U_MODE = 1, O_MODE = 2, R_MODE = 3 }
 ROHC operation modes (see 4.4 in the RFC 3095) More...
enum  rohc_cid_type_t { ROHC_LARGE_CID, ROHC_SMALL_CID }
 The different types of Context IDs (CID) a stream/context may use. More...

Functions

static unsigned char static
unsigned char static unsigned
char static unsigned char
static unsigned char int 
crc_get_polynom (int type)
 Get the polynom for the given CRC type.
void crc_init_table (unsigned char *table, unsigned char poly)
 Initialize a CRC table given a 256-byte table and the polynom to use.
char * rohc_version (void)
 Get the version of the ROHC library.
const char * rohc_get_mode_descr (const rohc_mode mode)
 Give a description for the given ROHC mode.
const char * rohc_get_packet_descr (const rohc_packet_t packet_type)
 Give a description for the given type of ROHC packet.
const char * rohc_get_ext_descr (const rohc_ext_t ext_type)
 Give a description for the given type of ROHC extension.

Define Documentation

#define ROHC_ETHERTYPE   0x22f1

The Ethertype assigned to the ROHC protocol by the IEEE.

See also:
http://standards.ieee.org/regauth/ethertype/eth.txt

Enumeration Type Documentation

The different types of Context IDs (CID) a stream/context may use.

Possible values are: ROHC_LARGE_CID, ROHC_SMALL_CID.

Small CID means CID in the $[0-ROHC\_SMALL\_CID\_MAX]$ interval.

Large CID means CID in the $[0-ROHC\_LARGE\_CID\_MAX]$ interval.

See also:
ROHC_SMALL_CID_MAX ROHC_LARGE_CID_MAX
Enumerator:
ROHC_LARGE_CID 

The context uses large CID.

Value in the $[0-ROHC\_LARGE\_CID\_MAX]$ interval.

ROHC_SMALL_CID 

The context uses small CID.

Value in the $[0-ROHC\_SMALL\_CID\_MAX]$ interval.

enum rohc_mode

ROHC operation modes (see 4.4 in the RFC 3095)

If you add a new operation mode, please also add the corresponding textual description in rohc_get_mode_descr.

Enumerator:
U_MODE 

The Unidirectional mode (U-mode)

O_MODE 

The Bidirectional Optimistic mode (O-mode)

R_MODE 

The Bidirectional Reliable mode (R-mode)


Function Documentation

static unsigned char static unsigned char static unsigned char static unsigned char static unsigned char int crc_get_polynom ( int  type)

Get the polynom for the given CRC type.

Public functions

Deprecated:
please do not use crc_get_polynom anymore, simply remove it from your code
Parameters:
typeThe CRC type
Returns:
The polynom for the requested CRC type
void crc_init_table ( unsigned char *  table,
unsigned char  poly 
)

Initialize a CRC table given a 256-byte table and the polynom to use.

Deprecated:
please do not use crc_init_table anymore, simply remove it from your code
Parameters:
tableThe 256-byte table
polyThe polynom
const char* rohc_get_ext_descr ( const rohc_ext_t  ext_type)

Give a description for the given type of ROHC extension.

The descriptions are not part of the API. They may change between releases without any warning. Do NOT use them for other means that providing to users a textual description of the extensions used by the library. If unsure, ask on the mailing list.

Parameters:
ext_typeThe type of extension to get a description for
Returns:
A string that describes the given extension type

References PACKET_EXT_0, PACKET_EXT_1, PACKET_EXT_2, PACKET_EXT_3, PACKET_EXT_UNKNOWN, and PACKET_NOEXT.

Referenced by code_UO2_packet().

const char* rohc_get_mode_descr ( const rohc_mode  mode)

Give a description for the given ROHC mode.

The descriptions are not part of the API. They may change between releases without any warning. Do NOT use them for other means that providing to users a textual description of modes used by the library. If unsure, ask on the mailing list.

Parameters:
modeThe ROHC mode to get a description for
Returns:
A string that describes the given ROHC mode

References O_MODE, R_MODE, and U_MODE.

const char* rohc_get_packet_descr ( const rohc_packet_t  packet_type)

Give a description for the given type of ROHC packet.

The descriptions are not part of the API. They may change between releases without any warning. Do NOT use them for other means that providing to users a textual description of the packets used by the library. If unsure, ask on the mailing list.

Parameters:
packet_typeThe type of packet to get a description for
Returns:
A string that describes the given packet type

References PACKET_CCE, PACKET_CCE_OFF, PACKET_IR, PACKET_IR_DYN, PACKET_NORMAL, PACKET_UNKNOWN, PACKET_UO_0, PACKET_UO_1, PACKET_UO_1_ID, PACKET_UO_1_RTP, PACKET_UO_1_TS, PACKET_UOR_2, PACKET_UOR_2_ID, PACKET_UOR_2_RTP, and PACKET_UOR_2_TS.

Referenced by d_generic_decode(), and rohc_compress2().

char* rohc_version ( void  )

Get the version of the ROHC library.

Returns:
the version of the library