libschc
Classes | Macros | Typedefs | Enumerations | Functions
schc.h File Reference
#include "schc_config.h"

Go to the source code of this file.

Classes

struct  schc_bitarray_t
 
struct  schc_field
 
struct  schc_ipv6_rule_t
 
struct  schc_udp_rule_t
 
struct  schc_layer_rule_t
 
struct  schc_compression_rule_t
 
struct  schc_rule_t
 
struct  schc_device
 
struct  schc_udpip_hdr
 

Macros

#define UDP_HLEN   8
 
#define IP6_HLEN   40
 
#define WINDOW_SIZE_BITS   1
 
#define MIC_C_SIZE_BITS   1
 
#define RULE_SIZE_BYTES   (RULE_SIZE_BITS / 8)
 
#define DTAG_SIZE_BYTES   ((RULE_SIZE_BITS + DTAG_SIZE_BITS) / 8) + 1
 
#define WINDOW_SIZE_BYTES   ((RULE_SIZE_BITS + DTAG_SIZE_BITS + WINDOW_SIZE_BITS) / 8) + 1
 

Typedefs

typedef struct schc_bitarray_t schc_bitarray_t
 
typedef uint8_t schc_ip6addr_t[16]
 
typedef schc_ip6addr_t schc_ipaddr_t
 

Enumerations

enum  direction { UP = 0, DOWN = 1, BI = 2 }
 
enum  CDA {
  NOTSENT = 0, VALUESENT = 1, MAPPINGSENT = 2, LSB = 3,
  COMPLENGTH = 4, COMPCHK = 5, DEVIID = 6, APPIID = 7
}
 
enum  schc_layer_t { SCHC_IPV6 = 0, SCHC_UDP = 1, SCHC_COAP = 2 }
 
enum  reliability_mode { ACK_ALWAYS = 1, ACK_ON_ERROR = 2, NO_ACK = 3, NOT_FRAGMENTED = 4 }
 

Functions

static uint8_t equal (struct schc_field *target_field, unsigned char *field_value, uint16_t field_offset)
 
static uint8_t ignore (struct schc_field *target_field, unsigned char *field_value, uint16_t field_offset)
 
static uint8_t MSB (struct schc_field *target_field, unsigned char *field_value, uint16_t field_offset)
 
static uint8_t matchmap (struct schc_field *target_field, unsigned char *field_value, uint16_t field_offset)
 

Macro Definition Documentation

◆ DTAG_SIZE_BYTES

#define DTAG_SIZE_BYTES   ((RULE_SIZE_BITS + DTAG_SIZE_BITS) / 8) + 1

◆ IP6_HLEN

#define IP6_HLEN   40

◆ MIC_C_SIZE_BITS

#define MIC_C_SIZE_BITS   1

◆ RULE_SIZE_BYTES

#define RULE_SIZE_BYTES   (RULE_SIZE_BITS / 8)

◆ UDP_HLEN

#define UDP_HLEN   8

◆ WINDOW_SIZE_BITS

#define WINDOW_SIZE_BITS   1

◆ WINDOW_SIZE_BYTES

#define WINDOW_SIZE_BYTES   ((RULE_SIZE_BITS + DTAG_SIZE_BITS + WINDOW_SIZE_BITS) / 8) + 1

Typedef Documentation

◆ schc_bitarray_t

◆ schc_ip6addr_t

typedef uint8_t schc_ip6addr_t[16]

◆ schc_ipaddr_t

Enumeration Type Documentation

◆ CDA

enum CDA
Enumerator
NOTSENT 
VALUESENT 
MAPPINGSENT 
LSB 
COMPLENGTH 
COMPCHK 
DEVIID 
APPIID 

◆ direction

enum direction
Enumerator
UP 
DOWN 
BI 

◆ reliability_mode

Enumerator
ACK_ALWAYS 
ACK_ON_ERROR 
NO_ACK 
NOT_FRAGMENTED 

◆ schc_layer_t

Enumerator
SCHC_IPV6 
SCHC_UDP 
SCHC_COAP 

Function Documentation

◆ equal()

static uint8_t equal ( struct schc_field target_field,
unsigned char *  field_value,
uint16_t  field_offset 
)
static

◆ ignore()

static uint8_t ignore ( struct schc_field target_field,
unsigned char *  field_value,
uint16_t  field_offset 
)
static

◆ matchmap()

static uint8_t matchmap ( struct schc_field target_field,
unsigned char *  field_value,
uint16_t  field_offset 
)
static

◆ MSB()

static uint8_t MSB ( struct schc_field target_field,
unsigned char *  field_value,
uint16_t  field_offset 
)
static