summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-13 19:02:24 +0000
committergVisor bot <gvisor-bot@google.com>2020-02-13 19:02:24 +0000
commit69e7dd7077f7ae0fc4f94a1759a03ff8162f7e8a (patch)
tree86eb415c695d90299bd4c7e0ed49cecd2b9037e5 /pkg/abi/linux
parentdc1144e4ef518f6a7fbe78ee438af856d8d105f9 (diff)
parent69bf39e8a47d3b4dcbbd04d2e8df476cdfab5e74 (diff)
Merge release-20200211.0-11-g69bf39e (automated)
Diffstat (limited to 'pkg/abi/linux')
-rw-r--r--pkg/abi/linux/socket.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/abi/linux/socket.go b/pkg/abi/linux/socket.go
index 766ee4014..4a14ef691 100644
--- a/pkg/abi/linux/socket.go
+++ b/pkg/abi/linux/socket.go
@@ -411,6 +411,15 @@ type ControlMessageCredentials struct {
GID uint32
}
+// A ControlMessageIPPacketInfo is IP_PKTINFO socket control message.
+//
+// ControlMessageIPPacketInfo represents struct in_pktinfo from linux/in.h.
+type ControlMessageIPPacketInfo struct {
+ NIC int32
+ LocalAddr InetAddr
+ DestinationAddr InetAddr
+}
+
// SizeOfControlMessageCredentials is the binary size of a
// ControlMessageCredentials struct.
var SizeOfControlMessageCredentials = int(binary.Size(ControlMessageCredentials{}))
@@ -431,6 +440,10 @@ const SizeOfControlMessageTOS = 1
// SizeOfControlMessageTClass is the size of an IPV6_TCLASS control message.
const SizeOfControlMessageTClass = 4
+// SizeOfControlMessageIPPacketInfo is the size of an IP_PKTINFO
+// control message.
+const SizeOfControlMessageIPPacketInfo = 12
+
// SCM_MAX_FD is the maximum number of FDs accepted in a single sendmsg call.
// From net/scm.h.
const SCM_MAX_FD = 253