Open justmumu opened 4 years ago
Hello @rasity ! You can use https://github.com/intel-go/nff-go/blob/master/examples/gopacketParserExample.go as a reference. You just need to specify the source and destination MAC addresses correctly. There are builtin types so you can do something like this:
DAddr: types.MACAddress{0x00, 0x40, 0x05, 0x40, 0xef, 0x24},
SAddr: types.MACAddress{0x00, 0x60, 0x08, 0x9f, 0xb1, 0xf3},
Hi,
First of all thank you for this amazing project. I am trying to use in my project. But i can't figure out how to generate packets with gopacket. Is this possible ?
I saw GeneratePacketFromByte function and I used with gopacket's bytes but I got error "wrong destination MAC address". I think somehow gopacket bytes is not suitable.
Example Code: