Gopacket to /net/

Hey,

As far as I know https://golang.org/pkg/net/ enables access to TCP sockets for receiving and sending data, but doesn’t enable deeper access for the incoming SYN packets for example, which initiate the TCP sessions.

Libraries like gopacket offer easy access to all requests and layers, so accessing the SYN packets is possible.

My question is how can I use gopacket or any other library (perhaps https://godoc.org/golang.org/x/net/ipv4?) in order to be able to access SYN packets, while still returning a regular net.conn, of the same type as described in the second code snippet in /pkg/net/ (so handleConnection would continue to function without “feeling the difference”)?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.