Here's my tcpdump
filter (ip[8]
is the IP ttl field and icmp[0]=11
corresponds to time-exceeded ICMP messages):
(ip and ip[8]=2 and src host $myIPAddress) or (icmp and dst host $myIPAddress and icmp[0]=11)
And here's what I found in the capture file:
>>> p.show()
###[ Ethernet ]###
dst = 00:15:f2:e3:90:e9
src = 00:11:43:e5:48:10
type = 0x800
###[ IP ]###
version = 4L
ihl = 5L
tos = 0xc0
len = 56
id = 19126
flags =
frag = 0L
ttl = 254
proto = icmp
chksum = 0xa697
src = 127.0.0.1
dst = 127.0.0.1
\options \
Why did I capture an ICMP localhost packet? What's the purpose of such packet anyway? And, most importantly, why didn't it get rejected by the above filter?