[Winpcap-users] question regarding retrieving ip_len
Ramiro Polla
ramiro86 at hotmail.com
Wed Jul 5 14:08:07 GMT 2006
Hello,
ip_len = (ih->ver_ihl & 0xf) * 4;
Look here http://www.freesoft.org/CIE/Course/Section3/7.htm
The (& 0xf) is there to only get the four bits of ih->ver_ihl, and (* 4) is there so that we get the header length in bytes, not in 32bit words.
Bye,
Ramiro Polla
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060705/f165ad80/attachment.htm
More information about the Winpcap-users
mailing list