ROHC compression/decompression library
d_tcp_defines.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012,2013,2014 Didier Barvaux
3  * Copyright 2013,2014 Viveris Technologies
4  * Copyright 2012 WBX
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /**
22  * @file d_tcp_defines.h
23  * @brief Main definitions for the TCP decompression profile
24  * @author FWX <rohc_team@dialine.fr>
25  * @author Didier Barvaux <didier@barvaux.org>
26  * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
27  */
28 
29 #ifndef ROHC_DECOMP_TCP_DEFINES_H
30 #define ROHC_DECOMP_TCP_DEFINES_H
31 
32 #include "ip.h"
33 #include "interval.h"
34 #include "protocols/tcp.h"
35 #include "schemes/decomp_wlsb.h"
36 #include "schemes/tcp_ts.h"
37 #include "schemes/tcp_sack.h"
38 
39 #include <stdint.h>
40 
41 /**
42  * @brief Define the IPv6 option context for Destination, Hop-by-Hop
43  * and Routing option
44  */
45 typedef struct __attribute__((packed))
46 {
47  size_t data_len;
48  uint8_t data[IPV6_OPT_CTXT_LEN_MAX];
49 
51 
52 
53 /**
54  * @brief Define the IPv6 option context for GRE option
55  */
56 typedef struct __attribute__((packed)) ipv6_gre_option_context
57 {
58  uint8_t c_flag:1;
59  uint8_t k_flag:1;
60  uint8_t s_flag:1;
61  uint8_t protocol:1;
62  uint8_t padding:4;
63 
64  uint32_t key; // if k_flag set
65  uint32_t sequence_number; // if s_flag set
66 
68 
69 
70 /**
71  * @brief Define the IPv6 option context for MIME option
72  */
73 typedef struct __attribute__((packed)) ipv6_mime_option_context
74 {
75  uint8_t s_bit:1;
76  uint8_t res_bits:7;
77  uint32_t orig_dest;
78  uint32_t orig_src; // if s_bit set
79 
81 
82 
83 /**
84  * @brief Define the IPv6 option context for AH option
85  */
86 typedef struct __attribute__((packed)) ipv6_ah_option_context
87 {
88  uint32_t spi;
89  uint32_t sequence_number;
90  uint32_t auth_data[1];
92 
93 
94 /** The decompression context for one IP extension header */
95 typedef struct
96 {
97  size_t len; /**< The length (in bytes) of the extension header */
98  uint8_t proto; /**< The protocol of the extension header */
99  uint8_t nh_proto; /**< The protocol of the next header */
100 
101  union
102  {
103  ipv6_generic_option_context_t generic; /**< IPv6 generic extension header */
104  ipv6_gre_option_context_t gre; /**< IPv6 GRE extension header */
105  ipv6_mime_option_context_t mime; /**< IPv6 MIME extension header */
106  ipv6_ah_option_context_t ah; /**< IPv6 AH extension header */
107  };
108 
110 
111 
112 /**
113  * @brief Define the common IP header context to IPv4 and IPv6.
114  */
115 typedef struct __attribute__((packed)) ipvx_context
116 {
117  uint8_t version:4;
118  uint8_t unused:4;
119 
120  uint8_t dscp:6;
121  uint8_t ip_ecn_flags:2;
122 
123  uint8_t next_header;
124 
125  uint8_t ttl_hopl;
126 
127  uint8_t ip_id_behavior;
128 
130 
131 
132 /**
133  * @brief Define the IPv4 header context.
134  */
135 typedef struct __attribute__((packed)) ipv4_context
136 {
137  uint8_t version:4;
138  uint8_t df:1;
139  uint8_t unused:3;
140 
141  uint8_t dscp:6;
142  uint8_t ip_ecn_flags:2;
143 
144  uint8_t protocol;
145 
146  uint8_t ttl_hopl;
147 
148  uint8_t ip_id_behavior;
149  uint16_t ip_id;
150 
151  uint32_t src_addr;
152  uint32_t dst_addr;
153 
155 
156 
157 /**
158  * @brief Define the IPv6 header context.
159  */
160 typedef struct __attribute__((packed)) ipv6_context
161 {
162  uint8_t version:4;
163  uint8_t unused:4;
164 
165  uint8_t dscp:6;
166  uint8_t ip_ecn_flags:2;
167 
168  uint8_t next_header;
169 
170  uint8_t ttl_hopl;
171 
172  uint8_t ip_id_behavior;
173 
174  uint32_t flow_label:20; /**< IPv6 Flow Label */
175 
176  uint32_t src_addr[4];
177  uint32_t dest_addr[4];
178 
180 
181 
182 /**
183  * @brief Define union of IP contexts
184  */
185 typedef struct
186 {
187  ip_version version;
188  union
189  {
190  ipvx_context_t vx;
191  ipv4_context_t v4;
192  ipv6_context_t v6;
193  } ctxt;
194 
195  size_t opts_nr;
196  size_t opts_len;
198 
199 } ip_context_t;
200 
201 
202 /** The decompression context for one TCP option */
203 struct d_tcp_opt_ctxt /* TODO: doxygen */
204 {
205  bool used;
206  uint8_t type;
207  union
208  {
209  struct
210  {
211  bool is_static;
212  uint8_t len;
213  } eol;
214  struct
215  {
216  bool is_static;
217  uint16_t value;
218  } mss;
219  struct
220  {
221  bool is_static;
222  uint8_t value;
223  } ws;
224  struct
225  {
226  struct rohc_lsb_field32 req; /**< The context for the TS request field */
227  struct rohc_lsb_field32 rep; /**< The context for the TS reply field */
228  } ts;
229  struct d_tcp_opt_sack sack; /* TODO: ptr inside is not needed */
230  struct
231  {
232  enum
233  {
237  } type;
238  uint8_t load_len;
239 #define ROHC_TCP_OPT_HDR_LEN 2U
240 #define ROHC_TCP_OPT_MAX_LEN 0xffU
241 #define ROHC_TCP_OPT_GENERIC_DATA_MAX_LEN \
242  (ROHC_TCP_OPT_MAX_LEN - ROHC_TCP_OPT_HDR_LEN)
244  } generic;
245  } data;
246 };
247 
248 
249 /** The decompression context for TCP options */
251 {
252  /** The number of options in the list of TCP options */
253  size_t nr;
254 
255  /** The structure of the list of TCP options */
256  uint8_t structure[ROHC_TCP_OPTS_MAX];
257  /** Whether the TCP options are expected in the dynamic part? */
258  bool expected_dynamic[ROHC_TCP_OPTS_MAX];
259  /** The TCP options that were found or not */
260  bool found[ROHC_TCP_OPTS_MAX];
261 
262  /** The bits of TCP options extracted from the dynamic chain, the tail of
263  * co_common/seq_8/rnd_8 packets, or the irregular chain */
265 };
266 
267 
268 /** Define the TCP part of the decompression profile context */
270 {
271  /** The LSB decoding context of MSN */
272  struct rohc_lsb_decode msn_lsb_ctxt;
273 
274  /** The LSB decoding context of innermost IP-ID */
275  struct rohc_lsb_decode ip_id_lsb_ctxt;
276  /** The LSB decoding context of innermost TTL/HL */
277  struct rohc_lsb_decode ttl_hl_lsb_ctxt;
278 
279  /* TCP static part */
280  uint16_t tcp_src_port; /**< The TCP source port */
281  uint16_t tcp_dst_port; /**< The TCP dest port */
282 
283  uint32_t seq_num_residue;
284  struct rohc_lsb_decode seq_lsb_ctxt;
285  struct rohc_lsb_decode seq_scaled_lsb_ctxt;
286 
287  uint16_t ack_stride;
288  uint16_t ack_num_residue;
289  struct rohc_lsb_decode ack_lsb_ctxt;
290  struct rohc_lsb_decode ack_scaled_lsb_ctxt;
291 
292  /* TCP flags */
293  uint8_t res_flags:4; /**< The TCP reserved flags */
294  bool ecn_used; /**< Whether ECN flag is used */
295  uint8_t ecn_flags:2; /**< The TCP ECN flags */
296  bool urg_flag; /**< The TCP URG flag */
297  bool ack_flag; /**< The TCP ACK flag */
298  uint8_t rsf_flags:3; /**< The TCP RSF flag */
299 
300  /** The LSB decoding context of TCP window */
301  struct rohc_lsb_decode window_lsb_ctxt;
302 
303  /** The URG pointer */
304  uint16_t urg_ptr;
305 
306  /** The decoded values of TCP options */
307  struct d_tcp_opts_ctxt tcp_opts;
308  /* TCP TS option */
309  struct rohc_lsb_decode opt_ts_req_lsb_ctxt;
310  struct rohc_lsb_decode opt_ts_rep_lsb_ctxt;
311  /* TCP SACK option */
312  struct d_tcp_opt_sack opt_sack_blocks; /**< The TCP SACK blocks */
313 
316 };
317 
318 
319 /** The outer or inner IP bits extracted from ROHC headers */
321 {
322  uint8_t version:4; /**< The version bits found in static chain of IR header */
323 
324  uint8_t dscp_bits:6; /**< The IP DSCP bits */
325  size_t dscp_bits_nr; /**< The number of IP DSCP bits */
326  uint8_t ecn_flags_bits:2; /**< The IP ECN flag bits */
327  size_t ecn_flags_bits_nr; /**< The number of IP ECN flag bits */
328 
329  uint8_t id_behavior:2; /**< The IP-ID behavior bits */
330  size_t id_behavior_nr; /**< The number of IP-ID behavior bits */
331  struct rohc_lsb_field16 id; /**< The IP-ID bits */
332 
333  uint8_t df:1; /**< The DF bits found in dynamic chain of IR/IR-DYN
334  header or in extension header */
335  size_t df_nr; /**< The number of DF bits found */
336 
337  struct rohc_lsb_field8 ttl_hl; /**< The IP TTL/HL bits */
338  uint8_t proto; /**< The protocol/next header bits found static chain
339  of IR header or in extension header */
340  size_t proto_nr; /**< The number of protocol/next header bits */
341 
342  uint32_t flowid:20; /**< The IPv6 flow ID bits found in static chain of
343  IR header */
344  size_t flowid_nr; /**< The number of flow label bits */
345 
346  uint8_t saddr[16]; /**< The source address bits found in static chain of
347  IR header */
348  size_t saddr_nr; /**< The number of source address bits */
349 
350  uint8_t daddr[16]; /**< The destination address bits found in static
351  chain of IR header */
352  size_t daddr_nr; /**< The number of source address bits */
353 
354  /** The parsed IP extension headers */
356  size_t opts_nr; /**< The number of parsed IP extension headers */
357  size_t opts_len; /**< The length of the parsed IP extension headers */
358 };
359 
360 
361 /** The bits extracted from ROHC TCP header */
363 {
364  /** Whether Context Replication (CR) is used */
366  /** The base context for Context Replication (CR) */
368 
369  /** The extracted bits related to the IP headers */
371  size_t ip_nr; /**< The number of parsed IP headers */
372 
373  /** The extracted bits of the Master Sequence Number (MSN) of the packet */
374  struct rohc_lsb_field16 msn;
375 
376  /** Whether TTL/HL of outer IP headers is included in the dynamic chain */
378  /** Whether TTL/HL of outer IP headers is included in the irregular chain */
380 
381  /* TCP header */
382  uint16_t src_port; /**< The TCP source port bits found in static chain */
383  size_t src_port_nr; /**< The number of TCP source port bits */
384  uint16_t dst_port; /**< The TCP destination port bits in static chain */
385  size_t dst_port_nr; /**< The number of TCP destination port bits */
386  struct rohc_lsb_field32 seq; /**< The TCP sequence number bits */
387  struct rohc_lsb_field32 seq_scaled; /**< The TCP scaled sequence number bits */
388  struct rohc_lsb_field32 ack; /**< The TCP acknowledgment number bits */
389  struct rohc_lsb_field16 ack_stride; /**< The TCP ACK stride bits */
390  struct rohc_lsb_field32 ack_scaled; /**< The TCP scaled ACK number bits */
391  uint8_t ecn_used_bits; /**< The TCP ECN used flag bits */
392  size_t ecn_used_bits_nr; /**< The number of ECN used flag bits */
393  uint8_t res_flags_bits; /**< The TCP reserved flag bits */
394  size_t res_flags_bits_nr; /**< The number of TCP reserved flag bits */
395  uint8_t ecn_flags_bits; /**< The TCP ECN flag bits */
396  size_t ecn_flags_bits_nr; /**< The number of TCP ECN flag bits */
397  uint8_t urg_flag_bits; /**< The TCP URG flag bits */
398  size_t urg_flag_bits_nr; /**< The number of TCP URG flag bits */
399  uint8_t ack_flag_bits; /**< The TCP ACK flag bits */
400  size_t ack_flag_bits_nr; /**< The number of TCP ACK flag bits */
401  uint8_t psh_flag_bits; /**< The TCP PSH flag bits */
402  size_t psh_flag_bits_nr; /**< The number of TCP PSG flag bits */
403  uint8_t rsf_flags_bits; /**< The TCP RSF flag bits */
404  size_t rsf_flags_bits_nr; /**< The number of TCP RSF flag bits */
405  struct rohc_lsb_field16 window; /**< The TCP window bits */
406  uint16_t tcp_check; /**< The TCP checksum bits found in dynamic chain of
407  IR/IR-DYN header or in irregular chain of CO header */
408  struct rohc_lsb_field16 urg_ptr; /**< The TCP Urgent pointer bits */
409 
410  /** The bits of TCP options extracted from the dynamic chain, the tail of
411  * co_common/seq_8/rnd_8 packets, or the irregular chain */
412  struct d_tcp_opts_ctxt tcp_opts;
413 };
414 
415 
416 /** The IP values decoded from the extracted ROHC bits */
418 {
419  uint8_t version:4; /**< The decoded version field */
420  uint8_t ecn_flags:2; /**< The decoded ECN flags */
421  uint8_t dscp:6; /**< The decoded DSCP field */
422  tcp_ip_id_behavior_t id_behavior; /**< The decoded IP-ID behavior (Ipv4 only) */
423  uint16_t id; /**< The decoded IP-ID field (IPv4 only) */
424  uint8_t df:1; /**< The decoded DF field (IPv4 only) */
425  uint8_t ttl; /**< The decoded TTL/HL field */
426  uint8_t proto; /**< The decoded protocol/NH field */
427  uint8_t nbo:1; /**< The decoded NBO field (IPv4 only) */
428  uint8_t rnd:1; /**< The decoded RND field (IPv4 only) */
429  uint8_t sid:1; /**< The decoded SID field (IPv4 only) */
430  uint32_t flowid:20; /**< The decoded flow ID field (IPv6 only) */
431  uint8_t saddr[16]; /**< The decoded source address field */
432  uint8_t daddr[16]; /**< The decoded destination address field */
433 
434  /** The decoded IP extension headers */
436  size_t opts_nr; /**< The number of decoded IP extension headers */
437  size_t opts_len; /**< The length of the decoded IP extension headers */
438 };
439 
440 
441 /** The values decoded from the bits extracted from ROHC TCP header */
443 {
444  /** Whether Context Replication (CR) is used */
446  /** The base context for Context Replication (CR) */
448 
449  /** The decoded values related to the IP headers */
451  size_t ip_nr; /**< The number of the decoded IP headers */
452 
453  /** The Master Sequence Number (MSN) of the packet */
454  uint16_t msn;
455 
456  /** Whether TTL/HL of outer IP headers is included in the dynamic chain */
458  /** Whether TTL/HL of outer IP headers is included in the irregular chain */
460 
461  /* TCP source & destination ports */
462  uint16_t src_port; /**< The TCP source port */
463  uint16_t dst_port; /**< The TCP destination port */
464 
465  /* TCP sequence & acknowledgment numbers */
466  uint32_t seq_num; /**< The TCP sequence number */
467  uint32_t seq_num_scaled; /**< The scaled TCP sequence number */
468  uint32_t seq_num_residue; /**< The residue of the scaled TCP sequence number */
469  uint32_t ack_num; /**< The TCP acknowledgment number */
470  uint32_t ack_num_scaled; /**< The scaled TCP acknowledgment number */
471  uint16_t ack_num_residue; /**< The residue of the scaled TCP ACK number */
472  uint16_t ack_stride; /**< The ACK stride */
473 
474  /* TCP flags */
475  bool ecn_used; /**< Whether the TCP ECN flags are used */
476  uint8_t res_flags:4; /**< The TCP reserved flags */
477  uint8_t ecn_flags:2; /**< The TCP ECN flags */
478  bool urg_flag; /**< The TCP URG flag */
479  bool ack_flag; /**< The TCP ACK flag */
480  bool psh_flag; /**< The TCP PSH flag */
481  uint8_t rsf_flags:3; /**< The TCP RSF flags */
482 
483  /* TCP window, checksum and Urgent pointer */
484  uint16_t window; /**< The TCP window */
485  uint16_t tcp_check; /**< The TCP checksum */
486  uint16_t urg_ptr; /**< The TCP Urgent pointer */
487 
488  /** The decoded values of TCP options */
489  struct d_tcp_opts_ctxt tcp_opts;
490  /* TCP TS option */
491  uint32_t opt_ts_req; /**< The echo request value of the TCP TS option */
492  uint32_t opt_ts_rep; /**< The echo reply value of the TCP TS option */
493  /* TCP SACK option */
494  struct d_tcp_opt_sack opt_sack_blocks; /**< The TCP SACK blocks */
495 };
496 
497 #endif /* ROHC_DECOMP_TCP_DEFINES_H */
498 
size_t data_len
Definition: d_tcp_defines.h:47
uint8_t urg_flag_bits
Definition: d_tcp_defines.h:397
uint8_t len
Definition: d_tcp_defines.h:212
size_t flowid_nr
Definition: d_tcp_defines.h:344
uint32_t ack_num
Definition: d_tcp_defines.h:469
struct ipv6_context ipv6_context_t
Define the IPv6 header context.
size_t urg_flag_bits_nr
Definition: d_tcp_defines.h:398
uint32_t sequence_number
Definition: d_tcp_defines.h:65
uint8_t rsf_flags
Definition: d_tcp_defines.h:481
bool ecn_used
Definition: d_tcp_defines.h:294
uint8_t rsf_flags_bits
Definition: d_tcp_defines.h:403
uint8_t c_flag
Definition: d_tcp_defines.h:58
size_t src_port_nr
Definition: d_tcp_defines.h:383
rohc_cid_t cr_base_cid
Definition: d_tcp_defines.h:447
uint8_t k_flag
Definition: d_tcp_defines.h:59
size_t rohc_cid_t
Definition: rohc.h:193
Definition: d_tcp_defines.h:442
uint8_t ack_flag_bits
Definition: d_tcp_defines.h:399
bool ack_flag
Definition: d_tcp_defines.h:479
size_t opts_len
Definition: d_tcp_defines.h:357
size_t res_flags_bits_nr
Definition: d_tcp_defines.h:394
uint16_t tcp_check
Definition: d_tcp_defines.h:485
bool urg_flag
Definition: d_tcp_defines.h:296
uint8_t dscp_bits
Definition: d_tcp_defines.h:324
Define the IPv6 option context for MIME option.
Definition: d_tcp_defines.h:73
size_t ecn_used_bits_nr
Definition: d_tcp_defines.h:392
uint32_t orig_src
Definition: d_tcp_defines.h:78
uint16_t msn
Definition: d_tcp_defines.h:454
uint32_t flowid
Definition: d_tcp_defines.h:342
bool used
Definition: d_tcp_defines.h:205
size_t len
Definition: d_tcp_defines.h:97
uint32_t opt_ts_rep
Definition: d_tcp_defines.h:492
tcp_ip_id_behavior_t id_behavior
Definition: d_tcp_defines.h:422
uint16_t dst_port
Definition: d_tcp_defines.h:463
uint16_t urg_ptr
Definition: d_tcp_defines.h:304
uint8_t proto
Definition: d_tcp_defines.h:338
size_t daddr_nr
Definition: d_tcp_defines.h:352
uint8_t ttl
Definition: d_tcp_defines.h:425
uint16_t tcp_check
Definition: d_tcp_defines.h:406
uint8_t ecn_flags_bits
Definition: d_tcp_defines.h:395
bool ttl_dyn_chain_flag
Definition: d_tcp_defines.h:377
Definition: decomp_wlsb.h:77
uint8_t proto
Definition: d_tcp_defines.h:426
Define the IPv6 option context for Destination, Hop-by-Hop and Routing option.
Definition: d_tcp_defines.h:45
size_t opts_nr
Definition: d_tcp_defines.h:436
size_t dscp_bits_nr
Definition: d_tcp_defines.h:325
bool urg_flag
Definition: d_tcp_defines.h:478
size_t ecn_flags_bits_nr
Definition: d_tcp_defines.h:327
size_t proto_nr
Definition: d_tcp_defines.h:340
uint16_t window
Definition: d_tcp_defines.h:484
size_t ecn_flags_bits_nr
Definition: d_tcp_defines.h:396
bool ttl_dyn_chain_flag
Definition: d_tcp_defines.h:457
uint8_t psh_flag_bits
Definition: d_tcp_defines.h:401
Definition: d_tcp_defines.h:320
struct ipv6_gre_option_context ipv6_gre_option_context_t
Define the IPv6 option context for GRE option.
uint8_t ecn_used_bits
Definition: d_tcp_defines.h:391
uint8_t value
Definition: d_tcp_defines.h:222
uint8_t res_flags
Definition: d_tcp_defines.h:476
uint8_t dscp
Definition: d_tcp_defines.h:421
bool do_ctxt_replication
Definition: d_tcp_defines.h:365
uint8_t ecn_flags
Definition: d_tcp_defines.h:477
uint8_t df
Definition: d_tcp_defines.h:333
#define ROHC_TCP_OPT_GENERIC_DATA_MAX_LEN
Definition: d_tcp_defines.h:241
uint16_t dst_port
Definition: d_tcp_defines.h:384
Definition: decomp/schemes/tcp_sack.h:38
Define the common IP header context to IPv4 and IPv6.
Definition: c_tcp_defines.h:127
size_t df_nr
Definition: d_tcp_defines.h:335
The Least Significant Bits (LSB) decoding object.
Definition: decomp_wlsb.h:57
uint16_t value
Definition: d_tcp_defines.h:217
Definition: d_tcp_defines.h:234
uint16_t src_port
Definition: d_tcp_defines.h:382
Definition: c_tcp_defines.h:172
uint16_t src_port
Definition: d_tcp_defines.h:462
size_t dst_port_nr
Definition: d_tcp_defines.h:385
Definition: decomp_wlsb.h:86
#define IPV6_OPT_CTXT_LEN_MAX
Definition: ipv6.h:154
Define the IPv6 option context for AH option.
Definition: d_tcp_defines.h:86
struct ipv6_generic_option_context ipv6_generic_option_context_t
Define the IPv6 generic option context.
uint8_t df
Definition: d_tcp_defines.h:424
size_t rsf_flags_bits_nr
Definition: d_tcp_defines.h:404
bool psh_flag
Definition: d_tcp_defines.h:480
bool do_ctxt_replication
Definition: d_tcp_defines.h:445
size_t ip_nr
Definition: d_tcp_defines.h:451
uint8_t s_bit
Definition: d_tcp_defines.h:75
uint32_t seq_num_residue
Definition: d_tcp_defines.h:468
bool is_static
Definition: d_tcp_defines.h:211
Define the IPv6 header context.
Definition: c_tcp_defines.h:184
uint16_t ack_stride
Definition: d_tcp_defines.h:287
bool ttl_irreg_chain_flag
Definition: d_tcp_defines.h:459
bool ack_flag
Definition: d_tcp_defines.h:297
Definition: d_tcp_defines.h:203
uint32_t sequence_number
Definition: d_tcp_defines.h:89
Window-based Least Significant Bits (W-LSB) decoding.
size_t ack_flag_bits_nr
Definition: d_tcp_defines.h:400
size_t ip_contexts_nr
Definition: d_tcp_defines.h:314
struct ipv4_context ipv4_context_t
Define the IPv4 header context.
Define the IPv4 header context.
Definition: c_tcp_defines.h:148
#define ROHC_TCP_MAX_IP_HDRS
The maximum number of IP headers supported by the TCP profile.
Definition: tcp.h:58
size_t id_behavior_nr
Definition: d_tcp_defines.h:330
Definition: d_tcp_defines.h:269
uint8_t load_len
Definition: d_tcp_defines.h:238
uint16_t ack_num_residue
Definition: d_tcp_defines.h:471
#define MAX_TCP_OPTION_INDEX
The largest index that may be used to identify one TCP option.
Definition: tcp.h:76
uint32_t seq_num_scaled
Definition: d_tcp_defines.h:467
struct ipv6_mime_option_context ipv6_mime_option_context_t
Define the IPv6 option context for MIME option.
struct ipvx_context ipvx_context_t
Define the common IP header context to IPv4 and IPv6.
uint32_t key
Definition: d_tcp_defines.h:64
uint8_t rsf_flags
Definition: d_tcp_defines.h:298
uint16_t ack_num_residue
Definition: d_tcp_defines.h:288
uint8_t version
Definition: d_tcp_defines.h:419
Define the IPv6 option context for GRE option.
Definition: d_tcp_defines.h:56
uint32_t opt_ts_req
Definition: d_tcp_defines.h:491
uint16_t ack_stride
Definition: d_tcp_defines.h:472
uint8_t res_flags
Definition: d_tcp_defines.h:293
uint8_t version
Definition: d_tcp_defines.h:322
Definition: decomp_wlsb.h:68
Definition: d_tcp_defines.h:417
size_t opts_len
Definition: d_tcp_defines.h:437
uint8_t ecn_flags
Definition: d_tcp_defines.h:295
uint8_t nh_proto
Definition: d_tcp_defines.h:99
rohc_cid_t cr_base_cid
Definition: d_tcp_defines.h:367
uint8_t type
Definition: d_tcp_defines.h:206
uint32_t ack_num_scaled
Definition: d_tcp_defines.h:470
ipv6_gre_option_context_t gre
Definition: d_tcp_defines.h:104
ip_version
IP version.
Definition: ip.h:49
uint8_t rnd
Definition: d_tcp_defines.h:428
uint8_t protocol
Definition: d_tcp_defines.h:61
uint32_t spi
Definition: d_tcp_defines.h:88
uint8_t ecn_flags_bits
Definition: d_tcp_defines.h:326
Define union of IP contexts.
Definition: c_tcp_defines.h:210
uint8_t id_behavior
Definition: d_tcp_defines.h:329
uint8_t padding
Definition: d_tcp_defines.h:62
ipv6_ah_option_context_t ah
Definition: d_tcp_defines.h:106
uint16_t tcp_src_port
Definition: d_tcp_defines.h:280
tcp_ip_id_behavior_t
Definition: tcp.h:259
uint8_t s_flag
Definition: d_tcp_defines.h:60
uint16_t urg_ptr
Definition: d_tcp_defines.h:486
size_t opts_nr
Definition: d_tcp_defines.h:356
size_t opts_len
Definition: d_tcp_defines.h:196
uint32_t orig_dest
Definition: d_tcp_defines.h:77
#define ROHC_TCP_OPTS_MAX
The maximum of TCP options supported by the TCP profile.
Definition: tcp.h:102
Definition: d_tcp_defines.h:250
Definition: d_tcp_defines.h:236
size_t ip_nr
Definition: d_tcp_defines.h:371
uint8_t res_bits
Definition: d_tcp_defines.h:76
TCP header description.
#define ROHC_TCP_MAX_IP_EXT_HDRS
The maximum number of IP extension header supported by the TCP profile.
Definition: tcp.h:67
bool ttl_irreg_chain_flag
Definition: d_tcp_defines.h:379
ipv6_mime_option_context_t mime
Definition: d_tcp_defines.h:105
uint8_t nbo
Definition: d_tcp_defines.h:427
uint8_t proto
Definition: d_tcp_defines.h:98
uint16_t ip_id
Definition: d_tcp_defines.h:149
uint16_t id
Definition: d_tcp_defines.h:423
size_t psh_flag_bits_nr
Definition: d_tcp_defines.h:402
uint32_t seq_num
Definition: d_tcp_defines.h:466
size_t saddr_nr
Definition: d_tcp_defines.h:348
size_t nr
Definition: d_tcp_defines.h:253
uint8_t ecn_flags
Definition: d_tcp_defines.h:420
struct ipv6_ah_option_context ipv6_ah_option_context_t
Define the IPv6 option context for AH option.
uint32_t seq_num_residue
Definition: d_tcp_defines.h:283
Definition: d_tcp_defines.h:362
uint8_t res_flags_bits
Definition: d_tcp_defines.h:393
uint32_t flowid
Definition: d_tcp_defines.h:430
bool ecn_used
Definition: d_tcp_defines.h:475
uint16_t tcp_dst_port
Definition: d_tcp_defines.h:281
uint8_t sid
Definition: d_tcp_defines.h:429
Compute the interpretation interval for LSB and W-LSB encoding.
Definition: d_tcp_defines.h:235