Loading...
Searching...
No Matches

Provides TCP header and helper functions. More...

Detailed Description

Provides TCP header and helper functions.

Files

file  tcp.h
 TCP header and helper functions.
 

Data Structures

struct  tcp_hdr_t
 TCP header definition. More...
 
struct  tcp_hdr_opt_t
 TCP option field helper structure. More...
 

Functions

void tcp_hdr_print (tcp_hdr_t *hdr)
 Print the given TCP header to STDOUT.
 
#define TCP_HDR_OFFSET_MIN   (0x05)
 TCP offset value boundaries.
 
#define TCP_HDR_OFFSET_MAX   (0x0F)
 Header offset maximum value.
 
#define TCP_OPTION_KIND_EOL   (0x00)
 TCP Option "Kind"-field defines.
 
#define TCP_OPTION_KIND_NOP   (0x01)
 "No Operation"-Option
 
#define TCP_OPTION_KIND_MSS   (0x02)
 "Maximum Segment Size"-Option
 
#define TCP_OPTION_LENGTH_MIN   (2U)
 TCP option "length"-field values.
 
#define TCP_OPTION_LENGTH_MSS   (0x04)
 MSS Option Size always 4.
 

Macro Definition Documentation

◆ TCP_HDR_OFFSET_MAX

#define TCP_HDR_OFFSET_MAX   (0x0F)

Header offset maximum value.

Definition at line 36 of file tcp.h.

◆ TCP_HDR_OFFSET_MIN

#define TCP_HDR_OFFSET_MIN   (0x05)

TCP offset value boundaries.

Header offset minimum value

Definition at line 35 of file tcp.h.

◆ TCP_OPTION_KIND_EOL

#define TCP_OPTION_KIND_EOL   (0x00)

TCP Option "Kind"-field defines.

"End of List"-Option

Definition at line 43 of file tcp.h.

◆ TCP_OPTION_KIND_MSS

#define TCP_OPTION_KIND_MSS   (0x02)

"Maximum Segment Size"-Option

Definition at line 45 of file tcp.h.

◆ TCP_OPTION_KIND_NOP

#define TCP_OPTION_KIND_NOP   (0x01)

"No Operation"-Option

Definition at line 44 of file tcp.h.

◆ TCP_OPTION_LENGTH_MIN

#define TCP_OPTION_LENGTH_MIN   (2U)

TCP option "length"-field values.

Minimum option field size in bytes

Definition at line 52 of file tcp.h.

◆ TCP_OPTION_LENGTH_MSS

#define TCP_OPTION_LENGTH_MSS   (0x04)

MSS Option Size always 4.

Definition at line 53 of file tcp.h.

Function Documentation

◆ tcp_hdr_print()

void tcp_hdr_print ( tcp_hdr_t hdr)

Print the given TCP header to STDOUT.

Parameters
[in]hdrTCP header to print