ROHC compression/decompression library
Functions
comp_list_ipv6.c File Reference

ROHC list compression of IPv6 extension headers. More...

#include "schemes/comp_list_ipv6.h"
#include <string.h>
Include dependency graph for comp_list_ipv6.c:

Functions

static int get_index_ipv6_table (const uint8_t next_header_type, const size_t occur_nr)
 Get the index for the given IPv6 extension type. More...
 
static bool cmp_ipv6_ext (const struct rohc_list_item *const item, const uint8_t ext_type, const uint8_t *const ext_data, const size_t ext_len)
 Compare two IPv6 items. More...
 
void rohc_comp_list_ipv6_new (struct list_comp *const comp, const size_t list_trans_nr, rohc_trace_callback2_t trace_cb, void *const trace_cb_priv, const int profile_id)
 Create one context for compressing lists of IPv6 extension headers. More...
 
void rohc_comp_list_ipv6_free (struct list_comp *const comp)
 Free one context for compressing lists of IPv6 extension headers. More...
 

Detailed Description

ROHC list compression of IPv6 extension headers.

Author
Didier Barvaux didie.nosp@m.r@ba.nosp@m.rvaux.nosp@m..org

Function Documentation

static bool cmp_ipv6_ext ( const struct rohc_list_item *const  item,
const uint8_t  ext_type,
const uint8_t *const  ext_data,
const size_t  ext_len 
)
static

Compare two IPv6 items.

Parameters
itemThe IPv6 item to compare
ext_typeThe IPv6 Next Header type
ext_dataThe IPv6 extension context
ext_lenThe length (in bytes) of the IPv6 extension context
Returns
true if the two items are equal, false if they are different
static int get_index_ipv6_table ( const uint8_t  next_header_type,
const size_t  occur_nr 
)
static

Get the index for the given IPv6 extension type.

Handle GRE, Authentication (AH), MINE, and all IPv6 extension headers.

The list of IPv6 extension headers was retrieved from the registry maintained by IANA at: http://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml Remember to update rohc_is_ipv6_opt if you update the list.

Parameters
next_header_typeThe Next Header type to get an index for
occur_nrThe number of occurrence of the Extension Header seen so far (current one included)
Returns
The based table index
void rohc_comp_list_ipv6_free ( struct list_comp *const  comp)

Free one context for compressing lists of IPv6 extension headers.

Parameters
compThe context to destroy
void rohc_comp_list_ipv6_new ( struct list_comp *const  comp,
const size_t  list_trans_nr,
rohc_trace_callback2_t  trace_cb,
void *const  trace_cb_priv,
const int  profile_id 
)

Create one context for compressing lists of IPv6 extension headers.

Parameters
compThe context to create
list_trans_nrThe number of uncompressed transmissions (L)
trace_cbThe function to call for printing traces
trace_cb_privAn optional private context, may be NULL
profile_idThe ID of the associated decompression profile