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

ROHC common definitions and routines. More...

#include <stdlib.h>
#include <inttypes.h>
Include dependency graph for rohc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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 was performed without problem.
#define ROHC_ERROR_NO_CONTEXT   -1
 Return code: the action failed 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 action succeeded but packet needs to be segmented.
#define ROHC_NON_FINAL_SEGMENT   -8
 Return code: the action succeeded but packet is a non-final segment.
#define ROHC_LARGE_CID_MAX   ((1 << 14) - 1) /* 2^14 - 1 = 16383 */
 The maximum value for large CIDs.
#define ROHC_SMALL_CID_MAX   15
 The maximum value for small CIDs.
#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

Typedefs

typedef size_t rohc_cid_t

Enumerations

enum  rohc_status_t {
  ROHC_STATUS_OK = 0, ROHC_STATUS_SEGMENT = 1, ROHC_STATUS_MALFORMED = 2, ROHC_STATUS_NO_CONTEXT = 3,
  ROHC_STATUS_BAD_CRC = 4, ROHC_STATUS_OUTPUT_TOO_SMALL = 5, ROHC_STATUS_ERROR = 6
}
 The status code of several functions in the library API. More...
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_mode_t { ROHC_U_MODE = 1, ROHC_O_MODE = 2, ROHC_R_MODE = 3 }
 ROHC operation modes. More...
enum  rohc_cid_type_t { ROHC_LARGE_CID, ROHC_SMALL_CID }
 The different types of Context IDs (CID) More...
enum  rohc_profile_t {
  ROHC_PROFILE_UNCOMPRESSED = 0x0000, ROHC_PROFILE_RTP = 0x0001, ROHC_PROFILE_UDP = 0x0002, ROHC_PROFILE_ESP = 0x0003,
  ROHC_PROFILE_IP = 0x0004, ROHC_PROFILE_TCP = 0x0006, ROHC_PROFILE_UDPLITE = 0x0008
}
 The different ROHC compression/decompression profiles. More...

Functions

char *ROHC_EXPORT rohc_version (void)
 Get the version of the ROHC library.
const char *ROHC_EXPORT rohc_strerror (const rohc_status_t status)
 Give a description for the given ROHC status code.
const char *ROHC_EXPORT rohc_get_mode_descr (const rohc_mode_t mode)
 Give a description for the given ROHC mode.
const char *ROHC_EXPORT rohc_get_profile_descr (const rohc_profile_t profile)
 Give a description for the given ROHC profile.
int ROHC_EXPORT crc_get_polynom (int type)
 Get the polynom for the given CRC type.
void ROHC_EXPORT crc_init_table (unsigned char *table, unsigned char polynum)
 Initialize a CRC table given a 256-byte table and the polynom to use.

Variables

unsigned char ROHC_EXPORT crc_table_2 [256]
unsigned char ROHC_EXPORT crc_table_3 [256]
unsigned char ROHC_EXPORT crc_table_6 [256]
unsigned char ROHC_EXPORT crc_table_7 [256]
unsigned char ROHC_EXPORT crc_table_8 [256]

Detailed Description

ROHC common definitions and routines.

Author:
Didier Barvaux <didier.barvaux@toulouse.viveris.com>
Didier Barvaux <didier@barvaux.org>

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_EXPORT

Macro that handles DLL export declarations gracefully


Typedef Documentation

typedef size_t rohc_cid_t

A ROHC Context ID (CID)


Variable Documentation

unsigned char ROHC_EXPORT crc_table_2[256]

The table to enable fast CRC-2 computation

Deprecated:
please do not use this variable anymore
unsigned char ROHC_EXPORT crc_table_3[256]

The table to enable fast CRC-3 computation

Deprecated:
please do not use this variable anymore
unsigned char ROHC_EXPORT crc_table_6[256]

The table to enable fast CRC-6 computation

Deprecated:
please do not use this variable anymore
unsigned char ROHC_EXPORT crc_table_7[256]

The table to enable fast CRC-7 computation

Deprecated:
please do not use this variable anymore
unsigned char ROHC_EXPORT crc_table_8[256]

The table to enable fast CRC-8 computation

Deprecated:
please do not use this variable anymore