This is a low-level network debugging utility that utilizes raw packet i/o to construct and deconstruct tcp, udp, ipv4, arp, and icmp packets over ethernet.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

TCP_SegmentHeader Struct Reference

TCP_SegmentHeader Struct Reference

TCP Segment memory map. More...

#include <tcp.h>

Data Fields

u16 source_port
 Source port (1-65535)
u16 destination_port
 Destination port (1-65535)
u32 sequence_number
 TCP Sequence number (initial one if SYN set)
u32 acknowledge_number
 TCP Acknowledge number (valid if ACK set)
unsigned data_offset_bytes_div4:4
 Length of this header (20) divided by 4 (should be 5)
unsigned unused_0:4
 Unused, should be zero.
unsigned fin:1
 connection FINished (no more data from sender)
unsigned syn:1
 SYNchronize sequence numbers.
unsigned rst:1
 ReSeT the connection.
unsigned psh:1
 PuSH to receiving application.
unsigned ack:1
 ACKnowledge fiend is significant.
unsigned urg:1
 URGent field is significant.
unsigned ece:1
 ECn Echo.
unsigned cwr:1
 Congestion Window Reduced.
u16 window_size
 TCP Maxumum window size (8192 is good)
u16 checksum
 TCP checksum (computed with pseudo header)
u16 urgent_pointer
 Urgent pointer (valid if URG set)
unsigned char data []
 Memory map for data if no options are set.

Detailed Description

TCP Segment memory map.

Definition at line 17 of file tcp.h.


Field Documentation

unsigned ack

ACKnowledge fiend is significant.

Definition at line 30 of file tcp.h.

TCP Acknowledge number (valid if ACK set)

Definition at line 21 of file tcp.h.

TCP checksum (computed with pseudo header)

Definition at line 36 of file tcp.h.

unsigned cwr

Congestion Window Reduced.

Definition at line 33 of file tcp.h.

unsigned char data[]

Memory map for data if no options are set.

Definition at line 40 of file tcp.h.

Length of this header (20) divided by 4 (should be 5)

Definition at line 23 of file tcp.h.

Destination port (1-65535)

Definition at line 19 of file tcp.h.

unsigned ece

ECn Echo.

Definition at line 32 of file tcp.h.

unsigned fin

connection FINished (no more data from sender)

Definition at line 26 of file tcp.h.

unsigned psh

PuSH to receiving application.

Definition at line 29 of file tcp.h.

unsigned rst

ReSeT the connection.

Definition at line 28 of file tcp.h.

TCP Sequence number (initial one if SYN set)

Definition at line 20 of file tcp.h.

Source port (1-65535)

Definition at line 18 of file tcp.h.

unsigned syn

SYNchronize sequence numbers.

Definition at line 27 of file tcp.h.

unsigned unused_0

Unused, should be zero.

Definition at line 24 of file tcp.h.

unsigned urg

URGent field is significant.

Definition at line 31 of file tcp.h.

Urgent pointer (valid if URG set)

Definition at line 37 of file tcp.h.

TCP Maxumum window size (8192 is good)

Definition at line 35 of file tcp.h.