ROHC compression/decompression library
|
TCP header description. More...
#include <stdint.h>
#include "config.h"
Go to the source code of this file.
Data Structures | |
struct | ipv6_opt |
Define the IPv6 option header. More... | |
struct | ip_opt_static |
Define the static part of IPv6 option header. More... | |
struct | ip_opt_dynamic |
Define the dynamic part of IPv6 option header. More... | |
struct | ip_dest_opt |
Define the IPv6 Destination options header. More... | |
struct | ip_dest_opt_static |
Define the static part of IPv6 Destination option header. More... | |
struct | ip_dest_opt_dynamic |
Define the dynamic part of IPv6 Destination option header. More... | |
struct | ip_hop_opt |
Define the IPv6 Hop-by-Hop option header. More... | |
struct | ip_hop_opt_static |
Define the static part of IPv6 Hop-by-Hop option header. More... | |
struct | ip_hop_opt_dynamic |
Define the dynamic part of IPv6 Hop-by-Hop option header. More... | |
struct | ip_rout_opt |
Define the IPv6 Routing option header. More... | |
struct | ip_rout_opt_static |
Define the static part of IPv6 Routing option header. More... | |
struct | ip_gre_opt |
Define the IPv6 GRE option header. More... | |
struct | ip_gre_opt_static |
Define the static part of IPv6 GRE option header. More... | |
struct | ip_mime_opt |
Define the IPv6 MIME option header. More... | |
struct | ip_mime_opt_static |
Define the static part of IPv6 MIME option header. More... | |
struct | ip_ah_opt |
Define the IPv6 Authentication option header. More... | |
struct | ip_ah_opt_static |
Define the static part of IPv6 Authentication option header. More... | |
struct | ip_ah_opt_dynamic |
Define the dynamic part of IPv6 Authentication option header. More... | |
struct | base_header_ip_vx |
Define the common IP v4/v6 header. More... | |
struct | base_header_ip_v4 |
Define the IPv4 header. More... | |
struct | base_header_ip_v6 |
Define the IP v6 header. More... | |
struct | ipv4_static |
Define the IP v4 static part. More... | |
struct | ipv4_dynamic1 |
Define the IP v4 dynamic part without ip_id. More... | |
struct | ipv4_dynamic2 |
Define the IP v4 dynamic part with ip_id field. More... | |
struct | ipv4_replicate |
Define the IP v4 replicate part. More... | |
struct | ipv6_static1 |
Define the IP v6 static part, null flow_label encoded with 1 bit. More... | |
struct | ipv6_static2 |
Define the IP v6 static part, flow_label encoded with 1+20 bits. More... | |
struct | ipv6_dynamic |
Define the IP v6 dynamic part. More... | |
struct | ipv6_replicate1 |
Define the IP v6 replicate part, flow_label encoded with 5 bits. More... | |
struct | ipv6_replicate2 |
Define the IP v6 replicate part, flow_label encoded with 21 bits. More... | |
struct | ipv6_extension |
Define the IP v6 extension. More... | |
struct | sack_block_t |
Define the Selective Acknowlegment TCP option. More... | |
struct | tcphdr |
Define the TCP header. More... | |
struct | tcp_option_timestamp |
struct | tcp_static |
Define the TCP static part. More... | |
struct | tcp_dynamic |
Define the TCP dynamic part. More... | |
struct | tcp_replicate |
Define the TCP replicate part. More... | |
struct | co_common |
Define the Common compressed packet format. More... | |
struct | rnd_1 |
Define the rnd_1 compressed packet format. More... | |
struct | rnd_2 |
Define the rnd_2 compressed packet format. More... | |
struct | rnd_3 |
Define the rnd_3 compressed packet format. More... | |
struct | rnd_4 |
Define the rnd_4 compressed packet format. More... | |
struct | rnd_5 |
Define the rnd_5 compressed packet format. More... | |
struct | rnd_6 |
Define the rnd_6 compressed packet format. More... | |
struct | rnd_7 |
Define the rnd_7 compressed packet format. More... | |
struct | rnd_8 |
Define the rnd_8 compressed packet format. More... | |
struct | seq_1 |
Define the seq_1 compressed packet format. More... | |
struct | seq_2 |
Define the seq_2 compressed packet format. More... | |
struct | seq_3 |
Define the seq_3 compressed packet format. More... | |
struct | seq_4 |
Define the seq_4 compressed packet format. More... | |
struct | seq_5 |
Define the seq_5 compressed packet format. More... | |
struct | seq_6 |
Define the seq_6 compressed packet format. More... | |
struct | seq_7 |
Define the seq_7 compressed packet format. More... | |
struct | seq_8 |
Define the seq_8 compressed packet format. More... | |
union | base_header_ip_t |
Define union of different header pointers. More... | |
Defines | |
#define | ROHC_PACKET_TYPE_IR 0xFD |
#define | ROHC_PACKET_TYPE_IR_DYN 0xF8 |
#define | DSCP_V6(ptr) (((ptr)->dscp1 << 2) | (ptr)->dscp2) |
#define | FLOW_LABEL_V6(ptr) (((ptr->flow_label1) << 16) | ptr->flow_label2) |
#define | MAX_TCP_OPTION_INDEX 15U |
#define | ROHC_TCP_OPTS_MAX 15U |
The maximum of TCP options. | |
#define | RSF_RST_ONLY 0x04 |
Define the RSF flags. | |
#define | RSF_SYN_ONLY 0x02 |
#define | RSF_FIN_ONLY 0x01 |
#define | RSF_NONE 0x00 |
#define | TCP_OPT_EOL 0 |
Define the TCP options. | |
#define | TCP_OPT_NOP 1 |
#define | TCP_OPT_MAXSEG 2 |
#define | TCP_OLEN_MAXSEG 4 |
#define | TCP_OPT_WINDOW 3 |
#define | TCP_OLEN_WINDOW 3 |
#define | TCP_OPT_SACK_PERMITTED 4 /* Experimental */ |
#define | TCP_OLEN_SACK_PERMITTED 2 |
#define | TCP_OPT_SACK 5 /* Experimental */ |
#define | TCP_OPT_TIMESTAMP 8 |
#define | TCP_OLEN_TIMESTAMP 10 |
#define | TCP_OLEN_TSTAMP_APPA (TCP_OLEN_TIMESTAMP + 2) /* appendix A */ |
#define | TCP_OPT_TSTAMP_HDR (TCP_OPT_NOP << 24 | TCP_OPT_NOP << 16 | TCP_OPT_TIMESTAMP << 8 | TCP_OLEN_TIMESTAMP) |
#define | TCP_INDEX_NOP 0 |
#define | TCP_INDEX_EOL 1 |
#define | TCP_INDEX_MAXSEG 2 |
#define | TCP_INDEX_WINDOW 3 |
#define | TCP_INDEX_TIMESTAMP 4 |
#define | TCP_INDEX_SACK_PERMITTED 5 |
#define | TCP_INDEX_SACK 6 |
Typedefs | |
typedef struct ipv6_opt | ipv6_opt_t |
Define the IPv6 option header. | |
typedef struct ip_opt_static | ip_opt_static_t |
Define the static part of IPv6 option header. | |
typedef struct ip_opt_dynamic | ip_opt_dynamic_t |
Define the dynamic part of IPv6 option header. | |
typedef struct ip_dest_opt | ip_dest_opt_t |
Define the IPv6 Destination options header. | |
typedef struct ip_dest_opt_static | ip_dest_opt_static_t |
Define the static part of IPv6 Destination option header. | |
typedef struct ip_dest_opt_dynamic | ip_dest_opt_dynamic_t |
Define the dynamic part of IPv6 Destination option header. | |
typedef struct ip_hop_opt | ip_hop_opt_t |
Define the IPv6 Hop-by-Hop option header. | |
typedef struct ip_hop_opt_static | ip_hop_opt_static_t |
Define the static part of IPv6 Hop-by-Hop option header. | |
typedef struct ip_hop_opt_dynamic | ip_hop_opt_dynamic_t |
Define the dynamic part of IPv6 Hop-by-Hop option header. | |
typedef struct ip_rout_opt | ip_rout_opt_t |
Define the IPv6 Routing option header. | |
typedef struct ip_rout_opt_static | ip_rout_opt_static_t |
Define the static part of IPv6 Routing option header. | |
typedef struct ip_gre_opt | ip_gre_opt_t |
Define the IPv6 GRE option header. | |
typedef struct ip_gre_opt_static | ip_gre_opt_static_t |
Define the static part of IPv6 GRE option header. | |
typedef struct ip_mime_opt | ip_mime_opt_t |
Define the IPv6 MIME option header. | |
typedef struct ip_mime_opt_static | ip_mime_opt_static_t |
Define the static part of IPv6 MIME option header. | |
typedef struct ip_ah_opt | ip_ah_opt_t |
Define the IPv6 Authentication option header. | |
typedef struct ip_ah_opt_static | ip_ah_opt_static_t |
Define the static part of IPv6 Authentication option header. | |
typedef struct ip_ah_opt_dynamic | ip_ah_opt_dynamic_t |
Define the dynamic part of IPv6 Authentication option header. | |
typedef struct base_header_ip_vx | base_header_ip_vx_t |
Define the common IP v4/v6 header. | |
typedef struct base_header_ip_v4 | base_header_ip_v4_t |
Define the IPv4 header. | |
typedef struct base_header_ip_v6 | base_header_ip_v6_t |
Define the IP v6 header. | |
typedef struct ipv4_static | ipv4_static_t |
Define the IP v4 static part. | |
typedef struct ipv4_dynamic1 | ipv4_dynamic1_t |
Define the IP v4 dynamic part without ip_id. | |
typedef struct ipv4_dynamic2 | ipv4_dynamic2_t |
Define the IP v4 dynamic part with ip_id field. | |
typedef struct ipv4_replicate | ipv4_replicate_t |
Define the IP v4 replicate part. | |
typedef struct ipv6_static1 | ipv6_static1_t |
Define the IP v6 static part, null flow_label encoded with 1 bit. | |
typedef struct ipv6_static2 | ipv6_static2_t |
Define the IP v6 static part, flow_label encoded with 1+20 bits. | |
typedef struct ipv6_dynamic | ipv6_dynamic_t |
Define the IP v6 dynamic part. | |
typedef struct ipv6_replicate1 | ipv6_replicate1_t |
Define the IP v6 replicate part, flow_label encoded with 5 bits. | |
typedef struct ipv6_replicate2 | ipv6_replicate2_t |
Define the IP v6 replicate part, flow_label encoded with 21 bits. | |
typedef struct ipv6_extension | ipv6_extension_t |
Define the IP v6 extension. | |
typedef struct tcphdr | tcphdr_t |
Define the TCP header. | |
typedef struct tcp_static | tcp_static_t |
Define the TCP static part. | |
typedef struct tcp_dynamic | tcp_dynamic_t |
Define the TCP dynamic part. | |
typedef struct tcp_replicate | tcp_replicate_t |
Define the TCP replicate part. | |
typedef struct co_common | co_common_t |
Define the Common compressed packet format. | |
typedef struct rnd_1 | rnd_1_t |
Define the rnd_1 compressed packet format. | |
typedef struct rnd_2 | rnd_2_t |
Define the rnd_2 compressed packet format. | |
typedef struct rnd_3 | rnd_3_t |
Define the rnd_3 compressed packet format. | |
typedef struct rnd_4 | rnd_4_t |
Define the rnd_4 compressed packet format. | |
typedef struct rnd_5 | rnd_5_t |
Define the rnd_5 compressed packet format. | |
typedef struct rnd_6 | rnd_6_t |
Define the rnd_6 compressed packet format. | |
typedef struct rnd_7 | rnd_7_t |
Define the rnd_7 compressed packet format. | |
typedef struct rnd_8 | rnd_8_t |
Define the rnd_8 compressed packet format. | |
typedef struct seq_1 | seq_1_t |
Define the seq_1 compressed packet format. | |
typedef struct seq_2 | seq_2_t |
Define the seq_2 compressed packet format. | |
typedef struct seq_3 | seq_3_t |
Define the seq_3 compressed packet format. | |
typedef struct seq_4 | seq_4_t |
Define the seq_4 compressed packet format. | |
typedef struct seq_5 | seq_5_t |
Define the seq_5 compressed packet format. | |
typedef struct seq_6 | seq_6_t |
Define the seq_6 compressed packet format. | |
typedef struct seq_7 | seq_7_t |
Define the seq_7 compressed packet format. | |
typedef struct seq_8 | seq_8_t |
Define the seq_8 compressed packet format. | |
Enumerations | |
enum | tcp_ip_id_behavior_t { IP_ID_BEHAVIOR_SEQ = 0, IP_ID_BEHAVIOR_SEQ_SWAP = 1, IP_ID_BEHAVIOR_RAND = 2, IP_ID_BEHAVIOR_ZERO = 3 } |
TCP header description.
#define DSCP_V6 | ( | ptr | ) | (((ptr)->dscp1 << 2) | (ptr)->dscp2) |
#define FLOW_LABEL_V6 | ( | ptr | ) | (((ptr->flow_label1) << 16) | ptr->flow_label2) |
#define MAX_TCP_OPTION_INDEX 15U |
The largest index that may be used to identify one TCP option
#define ROHC_PACKET_TYPE_IR 0xFD |
#define ROHC_PACKET_TYPE_IR_DYN 0xF8 |
#define ROHC_TCP_OPTS_MAX 15U |
The maximum of TCP options.
One TCP header may contain up to 40 bytes of options, so it may contain up 40 1-byte options, so the ROHC (de)compressors should expect such TCP packets. However the m field in the compressed list of TCP options (see RFC 6846, section 6.3.3 for more details) cannot be larger than 15, so restrict the number of TCP options that value. One TCP packet with more than 15 TCP options will be compressed with the IP-only profile.
#define RSF_FIN_ONLY 0x01 |
#define RSF_NONE 0x00 |
#define RSF_RST_ONLY 0x04 |
Define the RSF flags.
#define RSF_SYN_ONLY 0x02 |
#define TCP_INDEX_EOL 1 |
#define TCP_INDEX_MAXSEG 2 |
#define TCP_INDEX_NOP 0 |
#define TCP_INDEX_SACK 6 |
#define TCP_INDEX_SACK_PERMITTED 5 |
#define TCP_INDEX_TIMESTAMP 4 |
#define TCP_INDEX_WINDOW 3 |
#define TCP_OLEN_MAXSEG 4 |
#define TCP_OLEN_SACK_PERMITTED 2 |
#define TCP_OLEN_TIMESTAMP 10 |
#define TCP_OLEN_TSTAMP_APPA (TCP_OLEN_TIMESTAMP + 2) /* appendix A */ |
#define TCP_OLEN_WINDOW 3 |
#define TCP_OPT_EOL 0 |
Define the TCP options.
#define TCP_OPT_MAXSEG 2 |
#define TCP_OPT_NOP 1 |
#define TCP_OPT_SACK 5 /* Experimental */ |
#define TCP_OPT_SACK_PERMITTED 4 /* Experimental */ |
#define TCP_OPT_TIMESTAMP 8 |
#define TCP_OPT_TSTAMP_HDR (TCP_OPT_NOP << 24 | TCP_OPT_NOP << 16 | TCP_OPT_TIMESTAMP << 8 | TCP_OLEN_TIMESTAMP) |
#define TCP_OPT_WINDOW 3 |
typedef struct base_header_ip_v4 base_header_ip_v4_t |
Define the IPv4 header.
See RFC4996 page 77
typedef struct base_header_ip_v6 base_header_ip_v6_t |
Define the IP v6 header.
See RFC4996 page 78
typedef struct base_header_ip_vx base_header_ip_vx_t |
Define the common IP v4/v6 header.
typedef struct co_common co_common_t |
Define the Common compressed packet format.
See RFC4996 page 80/81
typedef struct ip_ah_opt_dynamic ip_ah_opt_dynamic_t |
Define the dynamic part of IPv6 Authentication option header.
typedef struct ip_ah_opt_static ip_ah_opt_static_t |
Define the static part of IPv6 Authentication option header.
typedef struct ip_ah_opt ip_ah_opt_t |
Define the IPv6 Authentication option header.
typedef struct ip_dest_opt_dynamic ip_dest_opt_dynamic_t |
Define the dynamic part of IPv6 Destination option header.
typedef struct ip_dest_opt_static ip_dest_opt_static_t |
Define the static part of IPv6 Destination option header.
typedef struct ip_dest_opt ip_dest_opt_t |
Define the IPv6 Destination options header.
typedef struct ip_gre_opt_static ip_gre_opt_static_t |
Define the static part of IPv6 GRE option header.
typedef struct ip_gre_opt ip_gre_opt_t |
Define the IPv6 GRE option header.
See RFC5225 page 55
typedef struct ip_hop_opt_dynamic ip_hop_opt_dynamic_t |
Define the dynamic part of IPv6 Hop-by-Hop option header.
typedef struct ip_hop_opt_static ip_hop_opt_static_t |
Define the static part of IPv6 Hop-by-Hop option header.
typedef struct ip_hop_opt ip_hop_opt_t |
Define the IPv6 Hop-by-Hop option header.
typedef struct ip_mime_opt_static ip_mime_opt_static_t |
Define the static part of IPv6 MIME option header.
typedef struct ip_mime_opt ip_mime_opt_t |
Define the IPv6 MIME option header.
typedef struct ip_opt_dynamic ip_opt_dynamic_t |
Define the dynamic part of IPv6 option header.
typedef struct ip_opt_static ip_opt_static_t |
Define the static part of IPv6 option header.
typedef struct ip_rout_opt_static ip_rout_opt_static_t |
Define the static part of IPv6 Routing option header.
typedef struct ip_rout_opt ip_rout_opt_t |
Define the IPv6 Routing option header.
typedef struct ipv4_dynamic1 ipv4_dynamic1_t |
Define the IP v4 dynamic part without ip_id.
See RFC4996 page 62
typedef struct ipv4_dynamic2 ipv4_dynamic2_t |
Define the IP v4 dynamic part with ip_id field.
See RFC4996 page 62
typedef struct ipv4_replicate ipv4_replicate_t |
Define the IP v4 replicate part.
See RFC4996 page 63
typedef struct ipv4_static ipv4_static_t |
Define the IP v4 static part.
See RFC4996 page 62
typedef struct ipv6_dynamic ipv6_dynamic_t |
Define the IP v6 dynamic part.
See RFC4996 page 59
typedef struct ipv6_extension ipv6_extension_t |
Define the IP v6 extension.
typedef struct ipv6_opt ipv6_opt_t |
Define the IPv6 option header.
typedef struct ipv6_replicate1 ipv6_replicate1_t |
Define the IP v6 replicate part, flow_label encoded with 5 bits.
See RFC4996 page 59
typedef struct ipv6_replicate2 ipv6_replicate2_t |
Define the IP v6 replicate part, flow_label encoded with 21 bits.
See RFC4996 page 59
typedef struct ipv6_static1 ipv6_static1_t |
Define the IP v6 static part, null flow_label encoded with 1 bit.
See RFC4996 page 58
typedef struct ipv6_static2 ipv6_static2_t |
Define the IP v6 static part, flow_label encoded with 1+20 bits.
See RFC4996 page 59
Define the rnd_1 compressed packet format.
Send LSBs of sequence number See RFC4996 page 81
Define the rnd_2 compressed packet format.
Send scaled sequence number LSBs See RFC4996 page 81
Define the rnd_3 compressed packet format.
Send acknowlegment number LSBs See RFC4996 page 81
Define the rnd_4 compressed packet format.
Send acknowlegment number scaled See RFC4996 page 81
Define the rnd_5 compressed packet format.
Send ACK and sequence number See RFC4996 page 82
Define the rnd_6 compressed packet format.
Send both ACK and scaled sequence number LSBs See RFC4996 page 82
Define the rnd_7 compressed packet format.
Send ACK and window See RFC4996 page 82
Define the rnd_8 compressed packet format.
Can send LSBs of TTL, RSF flags, change ECN behavior and options list See RFC4996 page 82
Define the seq_1 compressed packet format.
Send LSBs of sequence number See RFC4996 page 83
Define the seq_2 compressed packet format.
Send scaled sequence number LSBs See RFC4996 page 83
Define the seq_3 compressed packet format.
Send acknowledgment number LSBs See RFC4996 page 83
Define the seq_4 compressed packet format.
Send scaled acknowledgment number scaled See RFC4996 page 84
Define the seq_5 compressed packet format.
Send ACK and sequence number See RFC4996 page 84
Define the seq_6 compressed packet format.
Send both ACK and scaled sequence number LSBs See RFC4996 page 84
Define the seq_7 compressed packet format.
Send ACK and window See RFC4996 page 85
Define the seq_8 compressed packet format.
Can send LSBs of TTL, RSF flags, change ECN behavior, and options list See RFC4996 page 85
typedef struct tcp_dynamic tcp_dynamic_t |
Define the TCP dynamic part.
See RFC4996 page 73/74
typedef struct tcp_replicate tcp_replicate_t |
Define the TCP replicate part.
See RFC4996 page 74/75
typedef struct tcp_static tcp_static_t |
Define the TCP static part.
See RFC4996 page 73/74
enum tcp_ip_id_behavior_t |