From 133700007a8495c7d8df53801b1d34345d6c5cf8 Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Thu, 18 Apr 2019 11:50:26 -0700 Subject: Only emit unimplemented syscall events for unsupported values. Only emit unimplemented syscall events for setting SO_OOBINLINE and SO_LINGER when attempting to set unsupported values. PiperOrigin-RevId: 244229675 Change-Id: Icc4562af8f733dd75a90404621711f01a32a9fc1 --- pkg/abi/linux/socket.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'pkg/abi') diff --git a/pkg/abi/linux/socket.go b/pkg/abi/linux/socket.go index 906776525..6fa4e7c3e 100644 --- a/pkg/abi/linux/socket.go +++ b/pkg/abi/linux/socket.go @@ -247,6 +247,15 @@ type SockAddrUnix struct { Path [UnixPathMax]int8 } +// Linger is struct linger, from include/linux/socket.h. +type Linger struct { + OnOff int32 + Linger int32 +} + +// SizeOfLinger is the binary size of a Linger struct. +const SizeOfLinger = 8 + // TCPInfo is a collection of TCP statistics. // // From uapi/linux/tcp.h. @@ -322,8 +331,8 @@ type TCPInfo struct { SndBufLimited uint64 } -// SizeOfTCPInfo is the binary size of a TCPInfo struct (104 bytes). -var SizeOfTCPInfo = binary.Size(TCPInfo{}) +// SizeOfTCPInfo is the binary size of a TCPInfo struct. +const SizeOfTCPInfo = 104 // Control message types, from linux/socket.h. const ( -- cgit v1.2.3