You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that Windows has a WSARecvMsg which provides access to the underlying control messages:
For datagrams received by the WSARecvMsg function over IPv4, the Control member of the WSAMSG structure received will contain a WSABUF structure that contains a WSACMSGHDR structure. The cmsg_level member of this WSACMSGHDR structure would contain IPPROTO_IP, the cmsg_type member of this structure would contain IP_PKTINFO, and the cmsg_data member would contain an in_pktinfo structure used to store received IPv4 packet address information. The IPv4 address in the in_pktinfo structure is the IPv4 address from which the packet was received.
I couldn't find any mentions of WSARecvMsg in the golang source. Indeed, it appears that netFD.readMsg is unimplemented as-well on windows:
Both x/net/ipv4 and x/net/ipv6 return
EWINDOWS
and have "TODO: implement this" comments:https://github.com/golang/net/blob/master/ipv4/control_windows.go
https://github.com/golang/net/blob/master/ipv6/control_windows.go
It appears that Windows has a
WSARecvMsg
which provides access to the underlying control messages:I couldn't find any mentions of
WSARecvMsg
in the golang source. Indeed, it appears thatnetFD.readMsg
is unimplemented as-well on windows:go/src/net/fd_windows.go
Line 233 in 12c286c
So I guess the first step would be to add a syscall wrapper for
WSARecvMsg
and then implementnetFD.readMsg
on top of it?cc @mikioh
The text was updated successfully, but these errors were encountered: