29 #ifndef ROHC_COMP_TCP_OPTS_LIST_H 30 #define ROHC_COMP_TCP_OPTS_LIST_H 66 #if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ 67 (defined(__GNUC__) && defined(__GNUC_MINOR__) && \ 68 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))) 70 "data in c_tcp_opt_ctxt should be aligned on 8 bytes");
72 "c_tcp_opt_ctxt length should be multiple of 8 bytes");
113 #if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ 114 (defined(__GNUC__) && defined(__GNUC_MINOR__) && \ 115 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))) 117 "ts_req in c_tcp_opts_ctxt_tmp should be aligned on 8 bytes");
119 "is_list_item_present in c_tcp_opts_ctxt_tmp should be aligned on 8 bytes");
121 "position2index in c_tcp_opts_ctxt_tmp should be aligned on 8 bytes");
123 "c_tcp_opts_ctxt_tmp length should be multiple of 8 bytes");
144 #if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ 145 (defined(__GNUC__) && defined(__GNUC_MINOR__) && \ 146 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))) 148 "structure in c_tcp_opts_ctxt should be aligned on 8 bytes");
150 "list in c_tcp_opts_ctxt should be aligned on 8 bytes");
151 _Static_assert((offsetof(
struct c_tcp_opts_ctxt, ts_req_wlsb) % 8) == 0,
152 "ts_req_wlsb in c_tcp_opts_ctxt should be aligned on 8 bytes");
153 _Static_assert((offsetof(
struct c_tcp_opts_ctxt, ts_reply_wlsb) % 8) == 0,
154 "ts_reply_wlsb in c_tcp_opts_ctxt should be aligned on 8 bytes");
156 "c_tcp_opts_ctxt length should be multiple of 8 bytes");
161 const uint8_t *
const opts,
162 const size_t data_offset,
164 __attribute__((warn_unused_result,
nonnull(1, 2, 4)));
170 const bool tcp_ack_num_changed)
171 __attribute__((
nonnull(1, 2, 3, 4)));
178 uint8_t *
const comp_opts,
179 const size_t comp_opts_max_len,
180 bool *
const no_item_needed)
181 __attribute__((warn_unused_result,
nonnull(1, 2, 4, 5, 6, 8)));
187 uint8_t *
const comp_opts,
188 const size_t comp_opts_max_len)
189 __attribute__((warn_unused_result,
nonnull(1, 2, 3, 4, 5)));
uint8_t unused[6]
Definition: c_tcp_opts_list.h:140
uint8_t unused
Definition: c_tcp_opts_list.h:104
uint8_t raw[ROHC_TCP_OPT_MAX_LEN]
Definition: c_tcp_opts_list.h:48
bool used
Definition: c_tcp_opts_list.h:57
#define ROHC_TCP_OPT_MAX_LEN
The maximum length of TCP options supported by the TCP profile.
Definition: rfc6846.h:58
The Selective Acknowlegment TCP option.
Definition: tcp.h:160
uint8_t structure[ROHC_TCP_OPTS_MAX]
Definition: c_tcp_opts_list.h:130
uint32_t ts_reply
Definition: c_tcp_opts_list.h:82
The ROHC compressor.
Definition: rohc_comp_internals.h:107
uint8_t opt_ts_present
Definition: c_tcp_opts_list.h:102
union c_tcp_opt_ctxt::@35 data
uint8_t position2index[ROHC_TCP_OPTS_MAX]
Definition: c_tcp_opts_list.h:88
struct c_tcp_opt_ctxt list[MAX_TCP_OPTION_INDEX+1]
Definition: c_tcp_opts_list.h:132
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.
Definition: c_tcp_opts_list.c:805
struct c_wlsb ts_reply_wlsb
Definition: c_tcp_opts_list.h:135
rohc_chain_t
The different chains used by the ROHCv1 TCP and ROHCv2 profiles.
Definition: rohc_internal.h:224
bool is_list_item_present[MAX_TCP_OPTION_INDEX+1]
Definition: c_tcp_opts_list.h:85
uint8_t dyn_trans_nr
Definition: c_tcp_opts_list.h:55
uint8_t ts_reply_bytes_nr
Definition: c_tcp_opts_list.h:107
Definition: c_tcp_opts_list.h:128
One W-LSB encoding object.
Definition: comp_wlsb.h:68
Internal structures for ROHC compression.
The ROHC compression context.
Definition: rohc_comp_internals.h:278
#define MAX_TCP_OPTION_INDEX
The largest index that may be used to identify one TCP option.
Definition: rfc6846.h:67
ROHC packets for the ROHCv1 IP/TCP profile defined in RFC6846.
uint8_t idx_max
Definition: c_tcp_opts_list.h:93
uint32_t ts_req
Definition: c_tcp_opts_list.h:80
uint8_t do_list_static_changed
Definition: c_tcp_opts_list.h:100
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.
Definition: c_tcp_opts_list.c:495
uint8_t nr
Definition: c_tcp_opts_list.h:91
The information collected about the packet headers.
Definition: uncomp_pkt_hdrs.h:102
uint8_t unused4[4]
Definition: c_tcp_opts_list.h:109
uint8_t do_list_struct_changed
Definition: c_tcp_opts_list.h:97
uint8_t type
Definition: c_tcp_opts_list.h:59
struct tcp_option_timestamp timestamp
Definition: c_tcp_opts_list.h:50
uint8_t opt_ts_do_transmit_item
Definition: c_tcp_opts_list.h:103
uint8_t age
Definition: c_tcp_opts_list.h:60
Definition: c_tcp_opts_list.h:77
uint8_t ts_req_bytes_nr
Definition: c_tcp_opts_list.h:106
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.
Definition: c_tcp_opts_list.c:953
struct c_wlsb ts_req_wlsb
Definition: c_tcp_opts_list.h:134
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.
Definition: c_tcp_opts_list.c:291
The compression context for one TCP option.
Definition: c_tcp_opts_list.h:43
uint8_t structure_nr
Definition: c_tcp_opts_list.h:131
uint8_t full_trans_nr
Definition: c_tcp_opts_list.h:53
#define ROHC_TCP_OPTS_MAX
The maximum of TCP options supported by the TCP profile.
Definition: tcp.h:124
uint8_t data_len
Definition: c_tcp_opts_list.h:62
sack_block_t sack_blocks[4]
Definition: c_tcp_opts_list.h:49
uint8_t structure_nr_trans
Definition: c_tcp_opts_list.h:139