FYI: https://godoc.org/github.com/google/gopacket
On Sat, Jun 17, 2017 at 9:00 AM, Michael Jones <michael.jo...@gmail.com> wrote: > Sorry to say that I don't have a direct answer for you. > > However, I happen to be doing some packet analysis at the moment--focused > first in the analysis part--and have recently started looking for helpful > frameworks/libraries into which my code can be embedded. What I found so > far is: > > https://github.com/google/gopacket > > > though there may be more to choose from as a starting point. Maybe this > will meet your needs. Maybe someone else can advise both is us! > > Michael > > On Sat, Jun 17, 2017 at 8:32 AM, <fusi.enrico.ma...@gmail.com> wrote: > >> Hi All >> >> anyone knows how to write an ethernet frame into a device, in a way the >> operating system thinks is to be received? >> >> Let me explain the issue: >> >> I am writing a software (for Linux only) which creates a tap device on >> machine A, reads the frames, encrypts and sends them via the network to the >> same software, listening on machine B , which writes the frame on its own >> tap device . >> Until reading the frame, sending, encrypting , receiving and decrypting, >> everything goes. >> >> (I'm using https://github.com/songgao/water , if you know something >> better, it would be WAY appreciated ) >> >> So the machine B reads the payload, does its job, and now I have a lovely >> ethernet frame, stored into a []byte variable. >> >> The next problem is now to write it to the operating system, in a way >> that the operating system behaves like it was received from the outside. >> >> I tried to use the "Write()" method implemented with the water library, >> but it simply doesn't works. >> >> What happens now is that , into this library the operation of write() is >> behaving as the frame was entering the device from the operating system, >> and not FOR the operating system, resulting the >> Read() thread to capture the frame again. >> >> So , my question is: >> >> anyone knows a library, or a way, to inject an ethernet frame into the OS >> as it was received from "outside"? >> >> >> many thanks. >> >> FEM >> >> -- >> 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. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Michael T. Jones > michael.jo...@gmail.com > -- Michael T. Jones michael.jo...@gmail.com -- 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. For more options, visit https://groups.google.com/d/optout.