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

ROHC CRC routines. More...

#include "ip.h"
#include "dllexport.h"
#include <stdbool.h>
Include dependency graph for crc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CRC_INIT_2   0x3
 The CRC-2 initial value.
#define CRC_INIT_3   0x7
 The CRC-3 initial value.
#define CRC_INIT_6   0x3f
 The CRC-6 initial value.
#define CRC_INIT_7   0x7f
 The CRC-7 initial value.
#define CRC_INIT_8   0xff
 The CRC-8 initial value.

Enumerations

enum  rohc_crc_type_t {
  ROHC_CRC_TYPE_NONE = 0, ROHC_CRC_TYPE_2 = 2, ROHC_CRC_TYPE_3 = 3, ROHC_CRC_TYPE_6 = 6,
  ROHC_CRC_TYPE_7 = 7, ROHC_CRC_TYPE_8 = 8
}

Functions

bool ROHC_EXPORT rohc_crc_init_table (unsigned char *const table, const rohc_crc_type_t crc_type) __attribute__((nonnull(1)
unsigned int ROHC_EXPORT crc_calculate (const rohc_crc_type_t crc_type, const unsigned char *const data, const int length, const unsigned int init_val, const unsigned char *const crc_table) __attribute__((nonnull(2
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT 
compute_crc_static (const unsigned char *const ip, const unsigned char *const ip2, const unsigned char *const next_header, const rohc_crc_type_t crc_type, const unsigned int init_val, const unsigned char *const crc_table) __attribute__((nonnull(1
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT 
compute_crc_dynamic (const unsigned char *const ip, const unsigned char *const ip2, const unsigned char *const next_header, const rohc_crc_type_t crc_type, const unsigned int init_val, const unsigned char *const crc_table) __attribute__((nonnull(1
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT 
udp_compute_crc_static (const unsigned char *const ip, const unsigned char *const ip2, const unsigned char *const next_header, const rohc_crc_type_t crc_type, const unsigned int init_val, const unsigned char *const crc_table) __attribute__((nonnull(1
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT 
udp_compute_crc_dynamic (const unsigned char *const ip, const unsigned char *const ip2, const unsigned char *const next_header, const rohc_crc_type_t crc_type, const unsigned int init_val, const unsigned char *const crc_table) __attribute__((nonnull(1
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT 
esp_compute_crc_static (const unsigned char *const ip, const unsigned char *const ip2, const unsigned char *const next_header, const rohc_crc_type_t crc_type, const unsigned int init_val, const unsigned char *const crc_table) __attribute__((nonnull(1
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT 
esp_compute_crc_dynamic (const unsigned char *const ip, const unsigned char *const ip2, const unsigned char *const next_header, const rohc_crc_type_t crc_type, const unsigned int init_val, const unsigned char *const crc_table) __attribute__((nonnull(1
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT 
rtp_compute_crc_static (const unsigned char *const ip, const unsigned char *const ip2, const unsigned char *const next_header, const rohc_crc_type_t crc_type, const unsigned int init_val, const unsigned char *const crc_table) __attribute__((nonnull(1
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT
unsigned int ROHC_EXPORT 
rtp_compute_crc_dynamic (const unsigned char *const ip, const unsigned char *const ip2, const unsigned char *const next_header, const rohc_crc_type_t crc_type, const unsigned int init_val, const unsigned char *const crc_table) __attribute__((nonnull(1

Variables

bool ROHC_EXPORT warn_unused_result

Detailed Description

ROHC CRC routines.

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

Define Documentation

#define CRC_INIT_2   0x3

The CRC-2 initial value.

#define CRC_INIT_3   0x7

The CRC-3 initial value.

Referenced by code_UO0_packet(), and code_UO1_packet().

#define CRC_INIT_6   0x3f

The CRC-6 initial value.

Referenced by code_UO2_packet().

#define CRC_INIT_7   0x7f

The CRC-7 initial value.

Referenced by code_UO2_packet().

#define CRC_INIT_8   0xff

The CRC-8 initial value.

Referenced by c_generic_feedback(), code_IR_DYN_packet(), code_IR_packet(), and f_wrap_feedback().


Enumeration Type Documentation

The different types of CRC used to protect ROHC headers

Enumerator:
ROHC_CRC_TYPE_NONE 

No CRC selected

ROHC_CRC_TYPE_2 

The CRC-2 type

ROHC_CRC_TYPE_3 

The CRC-3 type

ROHC_CRC_TYPE_6 

The CRC-6 type

ROHC_CRC_TYPE_7 

The CRC-7 type

ROHC_CRC_TYPE_8 

The CRC-8 type


Function Documentation

unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT compute_crc_dynamic ( const unsigned char *const  ip,
const unsigned char *const  ip2,
const unsigned char *const  next_header,
const rohc_crc_type_t  crc_type,
const unsigned int  init_val,
const unsigned char *const  crc_table 
)
unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT compute_crc_static ( const unsigned char *const  ip,
const unsigned char *const  ip2,
const unsigned char *const  next_header,
const rohc_crc_type_t  crc_type,
const unsigned int  init_val,
const unsigned char *const  crc_table 
)
unsigned int ROHC_EXPORT crc_calculate ( const rohc_crc_type_t  crc_type,
const unsigned char *const  data,
const int  length,
const unsigned int  init_val,
const unsigned char *const  crc_table 
)
unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT esp_compute_crc_dynamic ( const unsigned char *const  ip,
const unsigned char *const  ip2,
const unsigned char *const  next_header,
const rohc_crc_type_t  crc_type,
const unsigned int  init_val,
const unsigned char *const  crc_table 
)
unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT esp_compute_crc_static ( const unsigned char *const  ip,
const unsigned char *const  ip2,
const unsigned char *const  next_header,
const rohc_crc_type_t  crc_type,
const unsigned int  init_val,
const unsigned char *const  crc_table 
)
bool ROHC_EXPORT rohc_crc_init_table ( unsigned char *const  table,
const rohc_crc_type_t  crc_type 
)
unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT rtp_compute_crc_dynamic ( const unsigned char *const  ip,
const unsigned char *const  ip2,
const unsigned char *const  next_header,
const rohc_crc_type_t  crc_type,
const unsigned int  init_val,
const unsigned char *const  crc_table 
)
unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT rtp_compute_crc_static ( const unsigned char *const  ip,
const unsigned char *const  ip2,
const unsigned char *const  next_header,
const rohc_crc_type_t  crc_type,
const unsigned int  init_val,
const unsigned char *const  crc_table 
)
unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT udp_compute_crc_dynamic ( const unsigned char *const  ip,
const unsigned char *const  ip2,
const unsigned char *const  next_header,
const rohc_crc_type_t  crc_type,
const unsigned int  init_val,
const unsigned char *const  crc_table 
)
unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT unsigned int ROHC_EXPORT udp_compute_crc_static ( const unsigned char *const  ip,
const unsigned char *const  ip2,
const unsigned char *const  next_header,
const rohc_crc_type_t  crc_type,
const unsigned int  init_val,
const unsigned char *const  crc_table 
)

Variable Documentation