TCP¶
Provides TCP header and helper functions.
-
TCP_HDR_OFFSET_MIN
¶ TCP offset value boundries.
1
(0x05)
-
TCP_HDR_OFFSET_MAX
¶ 1
(0x0F)
-
TCP_OPTION_KIND_EOL
¶ TCP Option “Kind”-field defines.
1
(0x00)
“End of List”-Option
-
TCP_OPTION_KIND_NOP
¶ “No Operatrion”-Option
1
(0x01)
-
TCP_OPTION_KIND_MSS
¶ “Maximum Segment Size”-Option
1
(0x02)
-
TCP_OPTION_LENGTH_MSS
¶ TCP option “length”-field values.
1
(0x04)
MSS Option Size always 4
-
void
tcp_hdr_print
(tcp_hdr_t * hdr)¶ Print the given TCP header to STDOUT.
Parameters
hdr: TCP header to print
-
struct
tcp_hdr_t
¶ TCP header definition.
-
byteorder.h::network_uint16_t
src_port
¶ Source port, in network byte order.
-
byteorder.h::network_uint16_t
dst_port
¶ Destination port, in network byte order.
-
byteorder.h::network_uint32_t
seq_num
¶ Dequence number, in network byte order.
-
byteorder.h::network_uint32_t
ack_num
¶ Acknowledgement number, in network byte order.
-
byteorder.h::network_uint16_t
off_ctl
¶ Data Offset and control Bits in network byte order.
-
byteorder.h::network_uint16_t
window
¶ Window, in network byte order.
-
byteorder.h::network_uint16_t
checksum
¶ Checksum, in network byte order.
-
byteorder.h::network_uint16_t
urgent_ptr
¶ Urgent pointer, in network byte order.
-