|
ROHC compression/decompression library
|
Handle the list of TCP options for the TCP ompression profile. More...
#include "rohc_comp_internals.h"#include "protocols/tcp.h"#include "protocols/rfc6846.h"#include <stdint.h>#include <stddef.h>

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 |
Functions | |
| bool | rohc_comp_tcp_are_options_acceptable (const struct rohc_comp *const comp, const uint8_t *const opts, const size_t data_offset, struct rohc_pkt_hdrs *const uncomp_pkt_hdrs) |
| Whether TCP options are acceptable for TCP profile or not. More... | |
| void | tcp_detect_options_changes (struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct c_tcp_opts_ctxt *const opts_ctxt, struct c_tcp_opts_ctxt_tmp *const tmp, const bool tcp_ack_num_changed) |
| 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 rohc_pkt_hdrs *const uncomp_pkt_hdrs, const rohc_chain_t chain_type, struct c_tcp_opts_ctxt *const opts_ctxt, struct c_tcp_opts_ctxt_tmp *const tmp, 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 rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct c_tcp_opts_ctxt *const opts_ctxt, const struct c_tcp_opts_ctxt_tmp *const tmp, 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.
| int c_tcp_code_tcp_opts_irreg | ( | const struct rohc_comp_ctxt *const | context, |
| const struct rohc_pkt_hdrs *const | uncomp_pkt_hdrs, | ||
| struct c_tcp_opts_ctxt *const | opts_ctxt, | ||
| const struct c_tcp_opts_ctxt_tmp *const | tmp, | ||
| 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 | |
| uncomp_pkt_hdrs | The uncompressed headers to encode | |
| [in,out] | opts_ctxt | The compression context for TCP options |
| tmp | The temporary state for compressed 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 rohc_pkt_hdrs *const | uncomp_pkt_hdrs, | ||
| const rohc_chain_t | chain_type, | ||
| struct c_tcp_opts_ctxt *const | opts_ctxt, | ||
| struct c_tcp_opts_ctxt_tmp *const | tmp, | ||
| 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 | |
| uncomp_pkt_hdrs | The uncompressed headers to encode | |
| chain_type | The TCP chain for which the list of items is | |
| [in,out] | opts_ctxt | The compression context for TCP options |
| tmp | The temporary state for compressed 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, | ||
| struct rohc_pkt_hdrs *const | uncomp_pkt_hdrs | ||
| ) |
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 lengths:
| comp | The ROHC compressor | |
| opts | The beginning of the TCP options | |
| data_offset | The length (in 32-bit words) of the full TCP header | |
| [out] | uncomp_pkt_hdrs | The parsed uncompressed headers |
| void tcp_detect_options_changes | ( | struct rohc_comp_ctxt *const | context, |
| const struct rohc_pkt_hdrs *const | uncomp_pkt_hdrs, | ||
| struct c_tcp_opts_ctxt *const | opts_ctxt, | ||
| struct c_tcp_opts_ctxt_tmp *const | tmp, | ||
| const bool | tcp_ack_num_changed | ||
| ) |
Parse the uncompressed TCP options for changes.
| context | The compression context | |
| uncomp_pkt_hdrs | The uncompressed headers to encode | |
| [in,out] | opts_ctxt | The compression context for TCP options |
| tmp | The temporary state for compressed TCP options | |
| tcp_ack_num_changed | Whether the TCP ACK number changed or not |
1.8.14