decomp_list_ipv6.c File Reference

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

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

Functions

static bool check_ip6_item (const struct list_decomp *const decomp, const size_t index_table)
 Check if the item is correct in IPv6 table.
static int get_ip6_ext_size (const uint8_t *data, const size_t data_len)
 Get the size (in bytes) of the extension.
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.
static bool create_ip6_item (const uint8_t *const data, const size_t length, const size_t index_table, struct list_decomp *const decomp)
 Create an IPv6 item extension list.
static size_t rohc_build_ip6_extension (const struct list_decomp *const decomp, const uint8_t ip_nh_type, uint8_t *const dest)
 Build an extension list in IPv6 header.
void rohc_decomp_list_ipv6_new (struct list_decomp *const decomp, rohc_trace_callback2_t trace_cb, void *const trace_cb_priv, const int profile_id)
 Create one context for decompressing lists of IPv6 extension headers.
void rohc_decomp_list_ipv6_free (struct list_decomp *const decomp)
 Free one context for decompressing lists of IPv6 extension headers.

Detailed Description

ROHC list decompression of IPv6 extension headers.

Author:
Didier Barvaux <didier@barvaux.org>

Function Documentation

static bool check_ip6_item ( const struct list_decomp *const   decomp,
const size_t  index_table 
) [static]

Check if the item is correct in IPv6 table.

Parameters:
decomp The list decompressor
index_table The index of the item to check the presence
Returns:
true if item is found, false if not
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:
item The IPv6 item to compare
ext_type The IPv6 Next Header type
ext_data The IPv6 extension context
ext_len The length (in bytes) of the IPv6 extension context
Returns:
true if the two items are equal, false if they are different
static bool create_ip6_item ( const uint8_t *const   data,
const size_t  length,
const size_t  index_table,
struct list_decomp *const   decomp 
) [static]

Create an IPv6 item extension list.

Parameters:
data The data in the item
length The length of the item
index_table The index of the item in based table
decomp The list decompressor
Returns:
true in case of success, false otherwise
static int get_ip6_ext_size ( const uint8_t *  data,
const size_t  data_len 
) [static]

Get the size (in bytes) of the extension.

Parameters:
data The extension data
data_len The length (in bytes) of the extension data
Returns:
The size of the extension in case of success, -1 otherwise
static size_t rohc_build_ip6_extension ( const struct list_decomp *const   decomp,
const uint8_t  ip_nh_type,
uint8_t *const   dest 
) [static]

Build an extension list in IPv6 header.

Parameters:
decomp The list decompressor
ip_nh_type The Next Header value of the base IPv6 header
dest The buffer to store the IPv6 header
Returns:
The size of the list
void rohc_decomp_list_ipv6_free ( struct list_decomp *const   decomp  ) 

Free one context for decompressing lists of IPv6 extension headers.

Parameters:
decomp The context to destroy
void rohc_decomp_list_ipv6_new ( struct list_decomp *const   decomp,
rohc_trace_callback2_t  trace_cb,
void *const   trace_cb_priv,
const int  profile_id 
)

Create one context for decompressing lists of IPv6 extension headers.

Parameters:
decomp The context to create
trace_cb The function to call for printing traces
trace_cb_priv An optional private context, may be NULL
profile_id The ID of the associated decompression profile

Generated on 4 Jul 2018 for ROHC compression/decompression library by  doxygen 1.6.1