34#define TCP_HDR_OFFSET_MIN (0x05)
35#define TCP_HDR_OFFSET_MAX (0x0F)
42#define TCP_OPTION_KIND_EOL (0x00)
43#define TCP_OPTION_KIND_NOP (0x01)
44#define TCP_OPTION_KIND_MSS (0x02)
51#define TCP_OPTION_LENGTH_MIN (2U)
52#define TCP_OPTION_LENGTH_MSS (0x04)
58typedef struct __attribute__((packed)) {
72typedef struct __attribute__((packed)) {
Functions to work with different byte orders.
be_uint32_t network_uint32_t
A 32 bit integer in network byte order.
be_uint16_t network_uint16_t
A 16 bit integer in network byte order.
void tcp_hdr_print(tcp_hdr_t *hdr)
Print the given TCP header to STDOUT.
TCP option field helper structure.
uint8_t value[]
TCP options "Value" field.
uint8_t kind
TCP options "Kind" field.
uint8_t length
TCP options "Length" field.
network_uint16_t dst_port
Destination port, in network byte order.
network_uint16_t src_port
Source port, in network byte order.
network_uint32_t ack_num
Acknowledgement number, in network byte order.
network_uint16_t urgent_ptr
Urgent pointer, in network byte order.
network_uint32_t seq_num
Sequence number, in network byte order.
network_uint16_t window
Window, in network byte order.
network_uint16_t checksum
Checksum, in network byte order.
network_uint16_t off_ctl
Data Offset and control Bits in network byte order.