Hi Folks,

I have a go program that reads some network packets from an interface (not
using pcap).

Some of packets has 802.1Q encapsulation and some of them has not. I’m
searching a way to figure out index of IP layer dynamically from whole
packet.(gopacket.Packet.Bytes())

e.g. IP layer starts from 18. byte on packets has 802.1q encapsulation, and
14. bytes for other ones.

Is there a clear way to figure out the start index of IP layer?

Thanks..
-- 
Saygılarımla,

Hakan SARIMAN

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CANVPHrsfK%2BMK3E-KbG10Mboih4JUF1do%2BjVsBDN1_j%2B9-KSeXQ%40mail.gmail.com.

Reply via email to