github.com/database64128/shadowsocks-go@v1.10.2-0.20240315062903-143a773533f1/conn/conn_notdarwinlinuxwindows.go (about) 1 //go:build !darwin && !linux && !windows 2 3 package conn 4 5 import "net/netip" 6 7 // SocketControlMessageBufferSize specifies the buffer size for receiving socket control messages. 8 const SocketControlMessageBufferSize = 0 9 10 // ParsePktinfoCmsg parses a single socket control message of type IP_PKTINFO or IPV6_PKTINFO, 11 // and returns the IP address and index of the network interface the packet was received from, 12 // or an error. 13 // 14 // This function is only implemented for Linux, macOS and Windows. On other platforms, this is a no-op. 15 func ParsePktinfoCmsg(cmsg []byte) (netip.Addr, uint32, error) { 16 return netip.Addr{}, 0, nil 17 }