4

I have an IP packet with x bytes of custom header coming in on an interface. Is there a way to tell tcpdump or tshark to ignore the first x bytes and decode and display the IP packet? Any pointers would be helpful; I don't want to write a custom discector

Michael Mrozek
  • 91,316
  • 38
  • 238
  • 232
Mike Ryan
  • 41
  • 2

1 Answers1

2

Wireshark's editcap has a "chop" feature (-C) which can top and tail packets for exactly this purpose.

You can do it real-time like this:

 tcpdump -w - [...filter...] | editcap -F libpcap -C 16 - - | tcpdump -nlvvv -r -
mr.spuratic
  • 9,721
  • 26
  • 41