Hello

I'm facing a very confusing issue. I'm working on a sockets program and am faced with the following issue.

The value returned from the call to recvfrom is 84 bytes. However the value in ip_len is 64 bytes!!!!! The difference in 20 bytes seems to be the IP header length.

The very confusing issue is that a capture using tcpdump shows the following output

Code:
0x0000:  4500 0054 c6fb 0000 3601 bd7c d183 249f
0x0010:  0a00 000f 0000 5fce 1557 0001 d0f2 94e5
0x0020:  8abc af41 0809 0a0b 0c0d 0e0f 1011 1213
0x0030:  1415 1617 1819 1a1b 1c1d 1e1f 2021 2223
0x0040:  2425 2627 2829 2a2b 2c2d 2e2f 3031 3233
0x0050:  3435 3637
Where as printing the packet in userspace shows the following output

Code:
0x0000:  4500 4000 C6FB 0000 3601 BD7C D183 249F 
0x0010:  0A00 000F 0000 5FCE 1557 0001 D0F2 94E5 
0x0020:  8ABC AF41 0809 0A0B 0C0D 0E0F 1011 1213 
0x0030:  1415 1617 1819 1A1B 1C1D 1E1F 2021 2223 
0x0040:  2425 2627 2829 2A2B 2C2D 2E2F 3031 3233 
0x0050:  3435 3637
The packets are IDENTICAL except for the 2 red bolded bytes

Can someone please tell me what is going on

Thanks

Cheers