diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2021-09-19 13:13:29 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-19 13:15:28 -0700 |
commit | 89a0011c100d778cd8a0cc5e1b14996461c66629 (patch) | |
tree | 1d0f46608413b025a5bb5632841b13129d1ca1e5 /pkg/tcpip/tcpip.go | |
parent | 09477db2bc0535c93a09442c6b5216497b3bc7db (diff) |
Support IPV6_RECVPKTINFO on UDP sockets
PiperOrigin-RevId: 397631833
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r-- | pkg/tcpip/tcpip.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index a9ce148b9..c5e896295 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -451,6 +451,12 @@ type ControlMessages struct { // PacketInfo holds interface and address data on an incoming packet. PacketInfo IPPacketInfo + // HasIPv6PacketInfo indicates whether IPv6PacketInfo is set. + HasIPv6PacketInfo bool + + // IPv6PacketInfo holds interface and address data on an incoming packet. + IPv6PacketInfo IPv6PacketInfo + // HasOriginalDestinationAddress indicates whether OriginalDstAddress is // set. HasOriginalDstAddress bool @@ -1164,6 +1170,14 @@ type IPPacketInfo struct { DestinationAddr Address } +// IPv6PacketInfo is the message structure for IPV6_PKTINFO. +// +// +stateify savable +type IPv6PacketInfo struct { + Addr Address + NIC NICID +} + // SendBufferSizeOption is used by stack.(Stack*).Option/SetOption to // get/set the default, min and max send buffer sizes. type SendBufferSizeOption struct { |