tcpdump mailing list archives

Re: IP Header Size is always 5


From: Florian Weimer <fw () deneb enyo de>
Date: Wed, 01 Apr 2009 19:21:26 +0200

* Shameem Ahamed:

ipHeader=(struct ip*)(packet+ETHER_SIZE);

You should declare ipHeader on the stack, and memcpy into it from the
packet buffer.  You're likely running into an alignment issue.
Dealing with IP options will require some extra care.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: