ROHC compression/decompression library
Data Structures | Defines | Enumerations | Functions | Variables
rohc.h File Reference

ROHC common definitions and routines. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

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

Defines

#define ROHC_DEPRECATED(msg)
#define ROHC_EXPORT
#define ROHC_ETHERTYPE   0x22f1
 The Ethertype assigned to the ROHC protocol by the IEEE.
#define ROHC_OK   1
 Return code: the action done without problem.
#define ROHC_ERROR_NO_CONTEXT   -1
 Return code: the action can not proceed because no context is defined.
#define ROHC_ERROR_PACKET_FAILED   -2
 Return code: the action failed due to an unattended or malformed packet.
#define ROHC_FEEDBACK_ONLY   -3
 Return code: the action failed because the packet only contains feedback info.
#define ROHC_ERROR_CRC   -4
 Return code: the action failed due to a CRC failure.
#define ROHC_ERROR   -5
 Return code: the action encountered a problem.
#define ROHC_NEED_REPARSE   -6
 Return code: the packet needs to be parsed again.
#define ROHC_NEED_SEGMENT   -7
 Return code: the packet needs to be segmented.
#define ROHC_NON_FINAL_SEGMENT   -8
 Return code: the action failed because the packet is a non-final segment.
#define ROHC_LARGE_CID_MAX   ((1 << 14) - 1) /* 2^14 - 1 = 16383 */
#define ROHC_SMALL_CID_MAX   15
#define ROHC_PROFILE_UNCOMPRESSED   0x0000
 The number allocated for the ROHC Uncompressed profile (RFC 3095, 5.10)
#define ROHC_PROFILE_RTP   0x0001
 The number allocated for the ROHC RTP profile (RFC 3095, 8)
#define ROHC_PROFILE_UDP   0x0002
 The number allocated for the ROHC UDP profile (RFC 3095, 5.11)
#define ROHC_PROFILE_ESP   0x0003
 The number allocated for the ROHC ESP profile (RFC 3095, 5.12)
#define ROHC_PROFILE_IP   0x0004
 The number allocated for the ROHC IP-only profile (see 5 in the RFC 3843)
#define ROHC_PROFILE_UDPLITE   0x0008
 The number allocated for the ROHC UDP-Lite profile (see 7 in the RFC 4019)
#define CRC_TYPE_2   1
#define CRC_TYPE_3   2
#define CRC_TYPE_6   3
#define CRC_TYPE_7   4
#define CRC_TYPE_8   5

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

unsigned char ROHC_EXPORT
crc_table_2[256] 
ROHC_DEPRECATED ("please do not use this variable anymore, simply drop it")
char *ROHC_EXPORT rohc_version (void)
 Get the version of the ROHC library.
const char *ROHC_EXPORT rohc_get_mode_descr (const rohc_mode mode)
 Give a description for the given ROHC mode.
int ROHC_EXPORT crc_get_polynom (int type) ROHC_DEPRECATED("please do not use this function anymore
void ROHC_EXPORT crc_init_table (unsigned char *table, unsigned char polynum) ROHC_DEPRECATED("please do not use this function anymore

Variables

typedef __attribute__
int ROHC_EXPORT simply drop it

Detailed Description

ROHC common definitions and routines.

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

Define Documentation

#define CRC_TYPE_2   1

The CRC-2 type (deprecated)

#define CRC_TYPE_3   2

The CRC-3 type (deprecated)

#define CRC_TYPE_6   3

The CRC-6 type (deprecated)

#define CRC_TYPE_7   4

The CRC-7 type (deprecated)

#define CRC_TYPE_8   5

The CRC-8 type (deprecated)

#define ROHC_DEPRECATED (   msg)

Macro that handles deprecated declarations gracefully

#define ROHC_ERROR   -5
#define ROHC_ERROR_CRC   -4

Return code: the action failed due to a CRC failure.

Referenced by d_optimistic_feedback(), and rohc_decompress().

#define ROHC_ERROR_NO_CONTEXT   -1

Return code: the action can not proceed because no context is defined.

Referenced by d_optimistic_feedback(), and rohc_decompress().

#define ROHC_ERROR_PACKET_FAILED   -2

Return code: the action failed due to an unattended or malformed packet.

Referenced by d_optimistic_feedback(), and rohc_decompress().

#define ROHC_EXPORT

Macro that handles DLL export declarations gracefully

#define ROHC_FEEDBACK_ONLY   -3

Return code: the action failed because the packet only contains feedback info.

Referenced by rohc_decompress().

#define ROHC_LARGE_CID_MAX   ((1 << 14) - 1) /* 2^14 - 1 = 16383 */

The maximum value for large CIDs

Referenced by d_optimistic_feedback(), f_append_cid(), main(), rohc_c_set_max_cid(), and rohc_decomp_set_max_cid().

#define ROHC_NEED_REPARSE   -6

Return code: the packet needs to be parsed again.

#define ROHC_NEED_SEGMENT   -7

Return code: the packet needs to be segmented.

Referenced by rohc_comp_get_segment(), and rohc_compress2().

#define ROHC_NON_FINAL_SEGMENT   -8

Return code: the action failed because the packet is a non-final segment.

Referenced by rohc_decompress().

#define ROHC_OK   1
#define ROHC_PROFILE_ESP   0x0003

The number allocated for the ROHC ESP profile (RFC 3095, 5.12)

#define ROHC_PROFILE_IP   0x0004

The number allocated for the ROHC IP-only profile (see 5 in the RFC 3843)

Referenced by main().

#define ROHC_PROFILE_RTP   0x0001

The number allocated for the ROHC RTP profile (RFC 3095, 8)

Referenced by code_EXT3_packet(), code_UO1_packet(), and code_UO2_packet().

#define ROHC_PROFILE_UDP   0x0002

The number allocated for the ROHC UDP profile (RFC 3095, 5.11)

#define ROHC_PROFILE_UDPLITE   0x0008

The number allocated for the ROHC UDP-Lite profile (see 7 in the RFC 4019)

#define ROHC_PROFILE_UNCOMPRESSED   0x0000

The number allocated for the ROHC Uncompressed profile (RFC 3095, 5.10)

Referenced by rohc_compress2().

#define ROHC_SMALL_CID_MAX   15

Function Documentation

int ROHC_EXPORT crc_get_polynom ( int  type)
void ROHC_EXPORT crc_init_table ( unsigned char *  table,
unsigned char  polynum 
)
unsigned char ROHC_EXPORT crc_table_2 [256] ROHC_DEPRECATED ( "please do not use this variable  anymore,
simply drop it  
)

The table to enable fast CRC-2 computation

Deprecated:
please do not use this variable anymore

The table to enable fast CRC-3 computation

Deprecated:
please do not use this variable anymore

The table to enable fast CRC-6 computation

Deprecated:
please do not use this variable anymore

The table to enable fast CRC-7 computation

Deprecated:
please do not use this variable anymore

The table to enable fast CRC-8 computation

Deprecated:
please do not use this variable anymore

Variable Documentation

void ROHC_EXPORT simply drop it