ROHC compression/decompression library
Functions
list_ipv6.c File Reference

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

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

Functions

static int get_index_ipv6_table (const uint8_t next_header_type)
 Get the index for the given IPv6 extension type.
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.
void rohc_comp_list_ipv6_new (struct list_comp *const comp, const size_t list_trans_nr, rohc_trace_callback_t trace_cb, rohc_trace_callback2_t trace_cb2, void *const trace_cb_priv, const int profile_id)
 Create one context for compressing lists of IPv6 extension headers.
void rohc_comp_list_ipv6_free (struct list_comp *const comp)
 Free one context for compressing lists of IPv6 extension headers.

Detailed Description

ROHC list compression of IPv6 extension headers.

Author:
Didier Barvaux <didier@barvaux.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) [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 get_index_ipv6_table if you update the list.

Parameters:
next_header_typeThe Next Header type to get an index for
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_callback_t  trace_cb,
rohc_trace_callback2_t  trace_cb2,
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 old function to call for printing traces
trace_cb2The new function to call for printing traces
trace_cb_privAn optional private context, may be NULL
profile_idThe ID of the associated decompression profile