TCPHeader:
TYPE =
MACHINE
DEPENDENT
RECORD [
sourcePort (0): Port, -- source port number
dstnPort (1): Port, -- destination port number
seqNumber (2): Pair, -- sequence number
ackNumber (4): Pair, -- acknowledgement number
dataWordOffset (6: 0..3): INT [0..15], -- size of header in 32-bit words
unused (6: 4..9): INT [0..63] ← 0,
urg (6: 10..10): BOOL ← FALSE, -- control flags, urgent
ack (6: 11..11): BOOL ← FALSE, -- acknowledgement
psh (6: 12..12): BOOL ← FALSE, -- push
rst (6: 13..13): BOOL ← FALSE, -- reset
syn (6: 14..14): BOOL ← FALSE, -- syn (first packet on connection)
fin (6: 15..15): BOOL ← FALSE, -- fin (last packet on connection)
window (7): Basics.HWORD, -- window of packets to send
checksum (8): Basics.HWORD, -- for header and pseudo header
urgentPtr (9): Basics.HWORD ← [0,0] -- ptr to byte following urgent data
];
options are in CommDriver.BufferObject.spaceForOptions.