How to determine the size of data without size of the packet transport header?
I encountered some unobvious behavior:
- For outbound ICMP packet, pInMetaValues->transportHeaderSize is 8 and dataLength=NET_BUFFER_DATA_LENGTH(NET_BUFFER_LIST_FIRST_NB(netBufferList))) includes both transport header size and data size (32+8=40 for default ping.exe request)
- For inbound ICMP packet, pInMetaValues->transportHeaderSize is 0 but dataLength is also 40 (includes transport header size)
- For outbound UDP packet, pInMetaValues->transportHeaderSize is 8, and dataLength includes transport header size
- For inbound UDP packet, pInMetaValues->transportHeaderSize is 8, and dataLength doesn't include transport header size
Is this a WFP bug?
How to determine the real data size of a packet?