windows: add cmsghdr and pktinfo structures

- CMSGHDR from ws2def.h, corresponds to Cmsghdr in unix
- IN_PKTINFO from ws2ipdef.h, corresponds to InetPktinfo in unix
- IN6_PKTINFO from ws2ipdef.h, corresponds to Inet6Pktinfo in unix
This commit is contained in:
database64128
2025-03-15 16:31:27 +08:00
parent 7401cce313
commit 7377c793c6

View File

@@ -1157,6 +1157,22 @@ type WSAMsg struct {
Flags uint32
}
type WSACMSGHDR struct {
Len uintptr
Level int32
Type int32
}
type IN_PKTINFO struct {
Addr [4]byte
Ifindex uint32
}
type IN6_PKTINFO struct {
Addr [16]byte
Ifindex uint32
}
// Flags for WSASocket
const (
WSA_FLAG_OVERLAPPED = 0x01