ROHC compression/decompression library
Data Structures | Functions | Variables
d_tcp_opts_list.c File Reference

Handle the list of TCP options for the TCP decompression profile. More...

#include "d_tcp_opts_list.h"
#include "d_tcp_defines.h"
#include "protocols/tcp.h"
#include "rohc_bit_ops.h"
#include "rohc_utils.h"
#include "schemes/tcp_sack.h"
#include "config.h"
#include <string.h>
Include dependency graph for d_tcp_opts_list.c:

Data Structures

struct  d_tcp_opt_index
 
struct  d_tcp_opt
 

Functions

static int d_tcp_opt_list_parse_indexes (const struct rohc_decomp_ctxt *const context, const uint8_t ps, const uint8_t m, const uint8_t *const indexes, const size_t indexes_max_len, const bool want_all_items_present, struct d_tcp_opt_index opt_indexes[ROHC_TCP_OPTS_MAX])
 
static int d_tcp_opt_list_parse_items (const struct rohc_decomp_ctxt *const context, const bool is_dynamic_chain, const uint8_t m, const struct d_tcp_opt_index opt_indexes[ROHC_TCP_OPTS_MAX], const uint8_t *const items, const size_t items_max_len, struct d_tcp_opts_ctxt *const tcp_opts)
 
static int d_tcp_opt_list_parse_item (const struct rohc_decomp_ctxt *const context, const bool is_dynamic_chain, const struct d_tcp_opt_index opt_index, const uint8_t *const item, const size_t item_max_len, struct d_tcp_opt_ctxt opts_bits[MAX_TCP_OPTION_INDEX+1])
 
static size_t d_tcp_opt_list_get_index_len (const uint8_t ps)
 
static size_t d_tcp_opt_list_get_indexes_len (const uint8_t ps, const uint8_t m)
 
static bool tcp_opt_is_well_known (const uint8_t idx)
 Is the TCP option index a well-known index in the TCP profile. More...
 
static int d_tcp_parse_nop_list_item (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static int d_tcp_parse_nop_irreg (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, const uint8_t opt_index, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static bool d_tcp_build_nop (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const struct d_tcp_opt_ctxt *const tcp_opt, struct rohc_buf *const uncomp_packet, size_t *const opt_len)
 
static int d_tcp_parse_eol_list_item (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static int d_tcp_parse_eol_irreg (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, const uint8_t opt_index, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static bool d_tcp_build_eol (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const struct d_tcp_opt_ctxt *const tcp_opt, struct rohc_buf *const uncomp_packet, size_t *const opt_len)
 
static int d_tcp_parse_mss_list_item (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static int d_tcp_parse_mss_irreg (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, const uint8_t opt_index, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static bool d_tcp_build_mss (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const struct d_tcp_opt_ctxt *const tcp_opt, struct rohc_buf *const uncomp_packet, size_t *const opt_len)
 
static int d_tcp_parse_ws_list_item (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static int d_tcp_parse_ws_irreg (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, const uint8_t opt_index, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static bool d_tcp_build_ws (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const struct d_tcp_opt_ctxt *const tcp_opt, struct rohc_buf *const uncomp_packet, size_t *const opt_len)
 
static int d_tcp_parse_ts_list_item (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static int d_tcp_parse_ts_irreg (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, const uint8_t opt_index, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static bool d_tcp_build_ts (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const struct d_tcp_opt_ctxt *const tcp_opt, struct rohc_buf *const uncomp_packet, size_t *const opt_len)
 
static int d_tcp_parse_sack_perm_list_item (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static int d_tcp_parse_sack_perm_irreg (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, const uint8_t opt_index, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static bool d_tcp_build_sack_perm (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const struct d_tcp_opt_ctxt *const tcp_opt, struct rohc_buf *const uncomp_packet, size_t *const opt_len)
 
static int d_tcp_parse_sack_list_item (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static int d_tcp_parse_sack_irreg (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, const uint8_t opt_index, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static bool d_tcp_build_sack (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const struct d_tcp_opt_ctxt *const tcp_opt, struct rohc_buf *const uncomp_packet, size_t *const opt_len)
 
static int d_tcp_parse_generic_list_item (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static int d_tcp_parse_generic_irreg (const struct rohc_decomp_ctxt *const context, const uint8_t *const data, const size_t data_len, const uint8_t opt_index, struct d_tcp_opt_ctxt *const opt_ctxt)
 
static bool d_tcp_build_generic (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const struct d_tcp_opt_ctxt *const tcp_opt, struct rohc_buf *const uncomp_packet, size_t *const opt_len)
 
int d_tcp_parse_tcp_opts_list_item (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const bool is_dynamic_chain, struct d_tcp_opts_ctxt *const tcp_opts)
 
int d_tcp_parse_tcp_opts_irreg (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct d_tcp_opts_ctxt *const tcp_opts)
 
bool d_tcp_build_tcp_opts (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, struct rohc_buf *const uncomp_packet, size_t *const opts_len)
 

Variables

static struct d_tcp_opt d_tcp_opts [MAX_TCP_OPTION_INDEX+1]
 

Detailed Description

Handle the list of TCP options for the TCP decompression profile.

Author
FWX rohc_.nosp@m.team.nosp@m.@dial.nosp@m.ine..nosp@m.fr
Didier Barvaux didie.nosp@m.r@ba.nosp@m.rvaux.nosp@m..org
Didier Barvaux didie.nosp@m.r.ba.nosp@m.rvaux.nosp@m.@tou.nosp@m.louse.nosp@m..viv.nosp@m.eris..nosp@m.com

Function Documentation

◆ d_tcp_build_eol()

static bool d_tcp_build_eol ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
const struct d_tcp_opt_ctxt *const  tcp_opt,
struct rohc_buf *const  uncomp_packet,
size_t *const  opt_len 
)
static

◆ d_tcp_build_generic()

static bool d_tcp_build_generic ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
const struct d_tcp_opt_ctxt *const  tcp_opt,
struct rohc_buf *const  uncomp_packet,
size_t *const  opt_len 
)
static

◆ d_tcp_build_mss()

static bool d_tcp_build_mss ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
const struct d_tcp_opt_ctxt *const  tcp_opt,
struct rohc_buf *const  uncomp_packet,
size_t *const  opt_len 
)
static

◆ d_tcp_build_nop()

static bool d_tcp_build_nop ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
const struct d_tcp_opt_ctxt *const  tcp_opt,
struct rohc_buf *const  uncomp_packet,
size_t *const  opt_len 
)
static

◆ d_tcp_build_sack()

static bool d_tcp_build_sack ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
const struct d_tcp_opt_ctxt *const  tcp_opt,
struct rohc_buf *const  uncomp_packet,
size_t *const  opt_len 
)
static

◆ d_tcp_build_sack_perm()

static bool d_tcp_build_sack_perm ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
const struct d_tcp_opt_ctxt *const  tcp_opt,
struct rohc_buf *const  uncomp_packet,
size_t *const  opt_len 
)
static

◆ d_tcp_build_tcp_opts()

bool d_tcp_build_tcp_opts ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
struct rohc_buf *const  uncomp_packet,
size_t *const  opts_len 
)

◆ d_tcp_build_ts()

static bool d_tcp_build_ts ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
const struct d_tcp_opt_ctxt *const  tcp_opt,
struct rohc_buf *const  uncomp_packet,
size_t *const  opt_len 
)
static

◆ d_tcp_build_ws()

static bool d_tcp_build_ws ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
const struct d_tcp_opt_ctxt *const  tcp_opt,
struct rohc_buf *const  uncomp_packet,
size_t *const  opt_len 
)
static

◆ d_tcp_opt_list_get_index_len()

static size_t d_tcp_opt_list_get_index_len ( const uint8_t  ps)
static

◆ d_tcp_opt_list_get_indexes_len()

static size_t d_tcp_opt_list_get_indexes_len ( const uint8_t  ps,
const uint8_t  m 
)
static

◆ d_tcp_opt_list_parse_indexes()

static int d_tcp_opt_list_parse_indexes ( const struct rohc_decomp_ctxt *const  context,
const uint8_t  ps,
const uint8_t  m,
const uint8_t *const  indexes,
const size_t  indexes_max_len,
const bool  want_all_items_present,
struct d_tcp_opt_index  opt_indexes[ROHC_TCP_OPTS_MAX] 
)
static

◆ d_tcp_opt_list_parse_item()

static int d_tcp_opt_list_parse_item ( const struct rohc_decomp_ctxt *const  context,
const bool  is_dynamic_chain,
const struct d_tcp_opt_index  opt_index,
const uint8_t *const  item,
const size_t  item_max_len,
struct d_tcp_opt_ctxt  opts_bits[MAX_TCP_OPTION_INDEX+1] 
)
static

◆ d_tcp_opt_list_parse_items()

static int d_tcp_opt_list_parse_items ( const struct rohc_decomp_ctxt *const  context,
const bool  is_dynamic_chain,
const uint8_t  m,
const struct d_tcp_opt_index  opt_indexes[ROHC_TCP_OPTS_MAX],
const uint8_t *const  items,
const size_t  items_max_len,
struct d_tcp_opts_ctxt *const  tcp_opts 
)
static

◆ d_tcp_parse_eol_irreg()

static int d_tcp_parse_eol_irreg ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
const uint8_t  opt_index,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_eol_list_item()

static int d_tcp_parse_eol_list_item ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_generic_irreg()

static int d_tcp_parse_generic_irreg ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
const uint8_t  opt_index,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_generic_list_item()

static int d_tcp_parse_generic_list_item ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_mss_irreg()

static int d_tcp_parse_mss_irreg ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
const uint8_t  opt_index,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_mss_list_item()

static int d_tcp_parse_mss_list_item ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_nop_irreg()

static int d_tcp_parse_nop_irreg ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
const uint8_t  opt_index,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_nop_list_item()

static int d_tcp_parse_nop_list_item ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_sack_irreg()

static int d_tcp_parse_sack_irreg ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
const uint8_t  opt_index,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_sack_list_item()

static int d_tcp_parse_sack_list_item ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_sack_perm_irreg()

static int d_tcp_parse_sack_perm_irreg ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
const uint8_t  opt_index,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_sack_perm_list_item()

static int d_tcp_parse_sack_perm_list_item ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_tcp_opts_irreg()

int d_tcp_parse_tcp_opts_irreg ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct d_tcp_opts_ctxt *const  tcp_opts 
)

◆ d_tcp_parse_tcp_opts_list_item()

int d_tcp_parse_tcp_opts_list_item ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
const bool  is_dynamic_chain,
struct d_tcp_opts_ctxt *const  tcp_opts 
)

◆ d_tcp_parse_ts_irreg()

static int d_tcp_parse_ts_irreg ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
const uint8_t  opt_index,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_ts_list_item()

static int d_tcp_parse_ts_list_item ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_ws_irreg()

static int d_tcp_parse_ws_irreg ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
const uint8_t  opt_index,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ d_tcp_parse_ws_list_item()

static int d_tcp_parse_ws_list_item ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  data,
const size_t  data_len,
struct d_tcp_opt_ctxt *const  opt_ctxt 
)
static

◆ tcp_opt_is_well_known()

static bool tcp_opt_is_well_known ( const uint8_t  idx)
static

Is the TCP option index a well-known index in the TCP profile.

Parameters
idxThe index of the TCP option
Returns
true if the index is a well-known index

Variable Documentation

◆ d_tcp_opts

struct d_tcp_opt d_tcp_opts[MAX_TCP_OPTION_INDEX+1]
static