ROHC compression/decompression library
|
Handle the list of TCP options for the TCP ompression profile. More...
Go to the source code of this file.
Data Structures | |
struct | c_tcp_opt_ctxt |
The compression context for one TCP option. More... | |
struct | c_tcp_opts_ctxt_tmp |
struct | c_tcp_opts_ctxt |
Macros | |
#define | MAX_TCP_OPT_SIZE 40U |
Functions | |
bool | rohc_comp_tcp_are_options_acceptable (const struct rohc_comp *const comp, const uint8_t *const opts, const size_t data_offset) |
Whether TCP options are acceptable for TCP profile or not. More... | |
bool | tcp_detect_options_changes (struct rohc_comp_ctxt *const context, const struct tcphdr *const tcp, struct c_tcp_opts_ctxt *const opts_ctxt, size_t *const opts_len) |
Parse the uncompressed TCP options for changes. More... | |
int | c_tcp_code_tcp_opts_list_item (const struct rohc_comp_ctxt *const context, const struct tcphdr *const tcp, const uint16_t msn, const rohc_tcp_chain_t chain_type, struct c_tcp_opts_ctxt *const opts_ctxt, uint8_t *const comp_opts, const size_t comp_opts_max_len, bool *const no_item_needed) |
Build the list of TCP options items. More... | |
int | c_tcp_code_tcp_opts_irreg (const struct rohc_comp_ctxt *const context, const struct tcphdr *const tcp, const uint16_t msn, struct c_tcp_opts_ctxt *const opts_ctxt, uint8_t *const comp_opts, const size_t comp_opts_max_len) |
Build the list of TCP options for the irregular chain. More... | |
Handle the list of TCP options for the TCP ompression profile.
#define MAX_TCP_OPT_SIZE 40U |
The maximum size (in bytes) of one TCP option
int c_tcp_code_tcp_opts_irreg | ( | const struct rohc_comp_ctxt *const | context, |
const struct tcphdr *const | tcp, | ||
const uint16_t | msn, | ||
struct c_tcp_opts_ctxt *const | opts_ctxt, | ||
uint8_t *const | comp_opts, | ||
const size_t | comp_opts_max_len | ||
) |
Build the list of TCP options for the irregular chain.
All the CO packets contains an irregular chain.
context | The compression context | |
tcp | The TCP header | |
msn | The Master Sequence Number (MSN) of the packet to compress | |
[in,out] | opts_ctxt | The compression context for TCP options |
[out] | comp_opts | The compressed TCP options |
comp_opts_max_len | The max remaining length in the ROHC buffer |
int c_tcp_code_tcp_opts_list_item | ( | const struct rohc_comp_ctxt *const | context, |
const struct tcphdr *const | tcp, | ||
const uint16_t | msn, | ||
const rohc_tcp_chain_t | chain_type, | ||
struct c_tcp_opts_ctxt *const | opts_ctxt, | ||
uint8_t *const | comp_opts, | ||
const size_t | comp_opts_max_len, | ||
bool *const | no_item_needed | ||
) |
Build the list of TCP options items.
The list of TCP options is used in:
context | The compression context | |
tcp | The TCP header | |
msn | The Master Sequence Number (MSN) of the packet to compress | |
chain_type | The TCP chain for which the list of items is | |
[in,out] | opts_ctxt | The compression context for TCP options |
[out] | comp_opts | The compressed TCP options |
comp_opts_max_len | The max remaining length in the ROHC buffer | |
[out] | no_item_needed | Whether no item was needed at all |
bool rohc_comp_tcp_are_options_acceptable | ( | const struct rohc_comp *const | comp, |
const uint8_t *const | opts, | ||
const size_t | data_offset | ||
) |
Whether TCP options are acceptable for TCP profile or not.
TCP options are acceptable for the TCP profile if:
The following well-known TCP options shall have expected lengthes:
comp | The ROHC compressor |
opts | The beginning of the TCP options |
data_offset | The length (in 32-bit words) of the full TCP header |
bool tcp_detect_options_changes | ( | struct rohc_comp_ctxt *const | context, |
const struct tcphdr *const | tcp, | ||
struct c_tcp_opts_ctxt *const | opts_ctxt, | ||
size_t *const | opts_len | ||
) |
Parse the uncompressed TCP options for changes.
context | The compression context | |
tcp | The TCP header | |
[in,out] | opts_ctxt | The compression context for TCP options |
[out] | opts_len | The length (in bytes) of the TCP options |