diff options
author | Rahat Mahmood <rahat@google.com> | 2019-06-06 16:59:21 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-06-06 17:00:27 -0700 |
commit | 315cf9a523d409dc6ddd5ce25f8f0315068ccc67 (patch) | |
tree | 81a47bd6250265ed662f18e081fe8a9618424561 /pkg/abi | |
parent | 6a4c0065642922c157511fa2cd3feea85cb7c44b (diff) |
Use common definition of SockType.
SockType isn't specific to unix domain sockets, and the current
definition basically mirrors the linux ABI's definition.
PiperOrigin-RevId: 251956740
Diffstat (limited to 'pkg/abi')
-rw-r--r-- | pkg/abi/linux/socket.go | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pkg/abi/linux/socket.go b/pkg/abi/linux/socket.go index 44bd69df6..a714ac86d 100644 --- a/pkg/abi/linux/socket.go +++ b/pkg/abi/linux/socket.go @@ -102,15 +102,19 @@ const ( SOL_NETLINK = 270 ) +// A SockType is a type (as opposed to family) of sockets. These are enumerated +// below as SOCK_* constants. +type SockType int + // Socket types, from linux/net.h. const ( - SOCK_STREAM = 1 - SOCK_DGRAM = 2 - SOCK_RAW = 3 - SOCK_RDM = 4 - SOCK_SEQPACKET = 5 - SOCK_DCCP = 6 - SOCK_PACKET = 10 + SOCK_STREAM SockType = 1 + SOCK_DGRAM = 2 + SOCK_RAW = 3 + SOCK_RDM = 4 + SOCK_SEQPACKET = 5 + SOCK_DCCP = 6 + SOCK_PACKET = 10 ) // SOCK_TYPE_MASK covers all of the above socket types. The remaining bits are |