From 5418efa1e584538dd32589c274498de9ec412162 Mon Sep 17 00:00:00 2001 From: Cato Auestad Date: Fri, 1 May 2020 06:24:52 +0200 Subject: [PATCH] Added socket bits for Darwin --- lib/std/os/bits/darwin.zig | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/std/os/bits/darwin.zig b/lib/std/os/bits/darwin.zig index 3fa37fe0f5..2ea9ae2cfa 100644 --- a/lib/std/os/bits/darwin.zig +++ b/lib/std/os/bits/darwin.zig @@ -771,6 +771,28 @@ pub const IPPROTO_UDP = 17; pub const IPPROTO_IP = 0; pub const IPPROTO_IPV6 = 41; +pub const SOL_SOCKET = 0xffff; + +pub const SO_DEBUG = 0x0001; +pub const SO_ACCEPTCONN = 0x0002; +pub const SO_REUSEADDR = 0x0004; +pub const SO_KEEPALIVE = 0x0008; +pub const SO_DONTROUTE = 0x0010; +pub const SO_BROADCAST = 0x0020; +pub const SO_USELOOPBACK = 0x0040; +pub const SO_LINGER = 0x1080; +pub const SO_OOBINLINE = 0x0100; +pub const SO_REUSEPORT = 0x0200; +pub const SO_ACCEPTFILTER = 0x1000; +pub const SO_SNDBUF = 0x1001; +pub const SO_RCVBUF = 0x1002; +pub const SO_SNDLOWAT = 0x1003; +pub const SO_RCVLOWAT = 0x1004; +pub const SO_SNDTIMEO = 0x1005; +pub const SO_RCVTIMEO = 0x1006; +pub const SO_ERROR = 0x1007; +pub const SO_TYPE = 0x1008; + fn wstatus(x: u32) u32 { return x & 0o177; }