Some ethernet packets have ethernet_type different than 0800 (IP). for example 0x8100 ( or 33024 in decimal) for 802.1Q.
In that case there are 4 more bytes after the ethernet header and then you have the IP header. Is there any way to move ahead that number of bytes when the ethernet_type != 0x0800 ?
with this line I get the ethernet type and could act upon the result:
ushort eth_type = (ushort)packet.Ethernet.EtherType;
but how can I "skip" those extra bytes so that I can get the actual IP header? I f I do this :
IpV4Datagram ip = packet.Ethernet.IpV4;
my IP header starts 4 bytes before it is supposed to, giving me errors when parsing the packets.
txs a lot