Header Offset Shortcuts

 

Field Length(bits) Tcpdump Filter
IP Header Length  4 ip[0] & 0x0f
IP Packet Length 16 ip[2:2]
IP TTL 8 ip[8]
IP Protocol 8 ip[9]
IP Address Source 32 ip[12:4]
IP Address Destination 32 ip[16:4]
IP Fragmentation flag = 3 and Offset = 13 ip[6:2] & 0x2000 = 0x2000 or ip[6:2] & 0x1fff !=0x0000
TCP Source Port 16 tcp[0:2]
TCP Destination Port 16 tcp[2:2]
TCP Header Length 4 tcp[12] & 0xf0
TCP Flags 8 tcp[13]
TCP Window Size 16 tcp[14:2]
ICMP Type 8 icmp[0]
ICMP Code 8 icmp[1]
Back to Capture Filters Back to Basic Filters

Valid HTML 4.01! Viewable With Any Browser Creative Commons License