Type AF [src]
Members
- @"802" (Constant)
- ALG (Constant)
- APPLETALK (Constant)
- APPLETALK (Constant)
- APPLETALK (Constant)
- APPLETALK (Constant)
- APPLETALK (Constant)
- APPLETALK (Constant)
- APPLETALK (Constant)
- APPLETALK (Constant)
- ARP (Constant)
- ARP (Constant)
- ASH (Constant)
- ATM (Constant)
- ATM (Constant)
- ATMPVC (Constant)
- ATMSVC (Constant)
- AX25 (Constant)
- BLUETOOTH (Constant)
- BLUETOOTH (Constant)
- BLUETOOTH (Constant)
- BLUETOOTH (Constant)
- BLUETOOTH (Constant)
- BLUETOOTH (Constant)
- BRIDGE (Constant)
- CAIF (Constant)
- CAN (Constant)
- CAN (Constant)
- CCITT (Constant)
- CCITT (Constant)
- CCITT (Constant)
- CCITT (Constant)
- CCITT (Constant)
- CHAOS (Constant)
- CHAOS (Constant)
- CHAOS (Constant)
- CHAOS (Constant)
- CHAOS (Constant)
- CNT (Constant)
- CNT (Constant)
- CNT (Constant)
- CNT (Constant)
- COIP (Constant)
- COIP (Constant)
- COIP (Constant)
- COIP (Constant)
- DATAKIT (Constant)
- DATAKIT (Constant)
- DATAKIT (Constant)
- DATAKIT (Constant)
- DATAKIT (Constant)
- DECnet (Constant)
- DECnet (Constant)
- DECnet (Constant)
- DECnet (Constant)
- DECnet (Constant)
- DLI (Constant)
- DLI (Constant)
- DLI (Constant)
- DLI (Constant)
- DLI (Constant)
- DLI (Constant)
- E164 (Constant)
- E164 (Constant)
- E164 (Constant)
- ECMA (Constant)
- ECMA (Constant)
- ECMA (Constant)
- ECMA (Constant)
- ECMA (Constant)
- ECONET (Constant)
- ETHER (Constant)
- FILE (Constant)
- FILE (Constant)
- GOSIP (Constant)
- HYLINK (Constant)
- HYLINK (Constant)
- HYLINK (Constant)
- HYLINK (Constant)
- HYLINK (Constant)
- IEEE80211 (Constant)
- IEEE80211 (Constant)
- IEEE802154 (Constant)
- IMPLINK (Constant)
- IMPLINK (Constant)
- IMPLINK (Constant)
- IMPLINK (Constant)
- IMPLINK (Constant)
- INET (Constant)
- INET (Constant)
- INET (Constant)
- INET (Constant)
- INET (Constant)
- INET (Constant)
- INET (Constant)
- INET (Constant)
- INET (Constant)
- INET_OFFLOAD (Constant)
- INET_SDP (Constant)
- INET6 (Constant)
- INET6 (Constant)
- INET6 (Constant)
- INET6 (Constant)
- INET6 (Constant)
- INET6 (Constant)
- INET6 (Constant)
- INET6 (Constant)
- INET6 (Constant)
- INET6_SDP (Constant)
- IPX (Constant)
- IPX (Constant)
- IPX (Constant)
- IPX (Constant)
- IPX (Constant)
- IPX (Constant)
- IPX (Constant)
- IRDA (Constant)
- ISDN (Constant)
- ISDN (Constant)
- ISDN (Constant)
- ISDN (Constant)
- ISDN (Constant)
- ISDN (Constant)
- ISO (Constant)
- ISO (Constant)
- ISO (Constant)
- ISO (Constant)
- IUCV (Constant)
- KCM (Constant)
- KEY (Constant)
- KEY (Constant)
- KEY (Constant)
- KEY (Constant)
- LAT (Constant)
- LAT (Constant)
- LAT (Constant)
- LAT (Constant)
- LAT (Constant)
- LINK (Constant)
- LINK (Constant)
- LINK (Constant)
- LINK (Constant)
- LINK (Constant)
- LINK (Constant)
- LLC (Constant)
- LOCAL (Constant)
- LOCAL (Constant)
- LOCAL (Constant)
- LOCAL (Constant)
- LOCAL (Constant)
- LOCAL (Constant)
- LOCAL (Constant)
- LOCAL (Constant)
- LOCAL (Constant)
- LX_NETLINK (Constant)
- MAX (Constant)
- MAX (Constant)
- MAX (Constant)
- MAX (Constant)
- MAX (Constant)
- MAX (Constant)
- MAX (Constant)
- MAX (Constant)
- MAX (Constant)
- MPLS (Constant)
- MPLS (Constant)
- MPLS (Constant)
- NATM (Constant)
- NATM (Constant)
- NATM (Constant)
- NATM (Constant)
- NBS (Constant)
- NCA (Constant)
- NETBEUI (Constant)
- NETBIOS (Constant)
- NETBIOS (Constant)
- NETBIOS (Constant)
- NETGRAPH (Constant)
- NETGRAPH (Constant)
- NETLINK (Constant)
- NETROM (Constant)
- NFC (Constant)
- NIT (Constant)
- NOTIFY (Constant)
- NS (Constant)
- NS (Constant)
- NS (Constant)
- OROUTE (Constant)
- OSI (Constant)
- OSI (Constant)
- OSI (Constant)
- OSI (Constant)
- OSI (Constant)
- OSINET (Constant)
- PACKET (Constant)
- PACKET (Constant)
- PHONET (Constant)
- PIP (Constant)
- POLICY (Constant)
- PPP (Constant)
- PPPOX (Constant)
- pseudo_HDRCMPLT (Constant)
- pseudo_KEY (Constant)
- pseudo_PIP (Constant)
- pseudo_RTIP (Constant)
- pseudo_XTP (Constant)
- PUP (Constant)
- PUP (Constant)
- PUP (Constant)
- PUP (Constant)
- PUP (Constant)
- QIPCRTR (Constant)
- RDS (Constant)
- ROSE (Constant)
- ROUTE (Constant)
- ROUTE (Constant)
- ROUTE (Constant)
- ROUTE (Constant)
- ROUTE (Constant)
- ROUTE (Constant)
- ROUTE (Constant)
- ROUTE (Constant)
- RTIP (Constant)
- RXRPC (Constant)
- SCLUSTER (Constant)
- SECURITY (Constant)
- SIP (Constant)
- SIP (Constant)
- SIP (Constant)
- SLOW (Constant)
- SNA (Constant)
- SNA (Constant)
- SNA (Constant)
- SNA (Constant)
- SNA (Constant)
- SNA (Constant)
- SNA (Constant)
- SYS_CONTROL (Constant)
- SYSTEM (Constant)
- TIPC (Constant)
- TRILL (Constant)
- UNIX (Constant)
- UNIX (Constant)
- UNIX (Constant)
- UNIX (Constant)
- UNIX (Constant)
- UNIX (Constant)
- UNIX (Constant)
- UNIX (Constant)
- UNIX (Constant)
- UNSPEC (Constant)
- UNSPEC (Constant)
- UNSPEC (Constant)
- UNSPEC (Constant)
- UNSPEC (Constant)
- UNSPEC (Constant)
- UNSPEC (Constant)
- UNSPEC (Constant)
- UNSPEC (Constant)
- VSOCK (Constant)
- WANPIPE (Constant)
- X25 (Constant)
- X25 (Constant)
- XTP (Constant)
Source
pub const AF = if (builtin.abi.isAndroid()) struct {
pub const UNSPEC = 0;
pub const UNIX = 1;
pub const LOCAL = 1;
pub const INET = 2;
pub const AX25 = 3;
pub const IPX = 4;
pub const APPLETALK = 5;
pub const NETROM = 6;
pub const BRIDGE = 7;
pub const ATMPVC = 8;
pub const X25 = 9;
pub const INET6 = 10;
pub const ROSE = 11;
pub const DECnet = 12;
pub const NETBEUI = 13;
pub const SECURITY = 14;
pub const KEY = 15;
pub const NETLINK = 16;
pub const ROUTE = NETLINK;
pub const PACKET = 17;
pub const ASH = 18;
pub const ECONET = 19;
pub const ATMSVC = 20;
pub const RDS = 21;
pub const SNA = 22;
pub const IRDA = 23;
pub const PPPOX = 24;
pub const WANPIPE = 25;
pub const LLC = 26;
pub const CAN = 29;
pub const TIPC = 30;
pub const BLUETOOTH = 31;
pub const IUCV = 32;
pub const RXRPC = 33;
pub const ISDN = 34;
pub const PHONET = 35;
pub const IEEE802154 = 36;
pub const CAIF = 37;
pub const ALG = 38;
pub const NFC = 39;
pub const VSOCK = 40;
pub const KCM = 41;
pub const QIPCRTR = 42;
pub const MAX = 43;
} else switch (native_os) {
.linux, .emscripten => linux.AF,
.windows => ws2_32.AF,
.macos, .ios, .tvos, .watchos, .visionos => struct {
pub const UNSPEC = 0;
pub const LOCAL = 1;
pub const UNIX = LOCAL;
pub const INET = 2;
pub const SYS_CONTROL = 2;
pub const IMPLINK = 3;
pub const PUP = 4;
pub const CHAOS = 5;
pub const NS = 6;
pub const ISO = 7;
pub const OSI = ISO;
pub const ECMA = 8;
pub const DATAKIT = 9;
pub const CCITT = 10;
pub const SNA = 11;
pub const DECnet = 12;
pub const DLI = 13;
pub const LAT = 14;
pub const HYLINK = 15;
pub const APPLETALK = 16;
pub const ROUTE = 17;
pub const LINK = 18;
pub const XTP = 19;
pub const COIP = 20;
pub const CNT = 21;
pub const RTIP = 22;
pub const IPX = 23;
pub const SIP = 24;
pub const PIP = 25;
pub const ISDN = 28;
pub const E164 = ISDN;
pub const KEY = 29;
pub const INET6 = 30;
pub const NATM = 31;
pub const SYSTEM = 32;
pub const NETBIOS = 33;
pub const PPP = 34;
pub const MAX = 40;
},
.freebsd => struct {
pub const UNSPEC = 0;
pub const UNIX = 1;
pub const LOCAL = UNIX;
pub const FILE = LOCAL;
pub const INET = 2;
pub const IMPLINK = 3;
pub const PUP = 4;
pub const CHAOS = 5;
pub const NETBIOS = 6;
pub const ISO = 7;
pub const OSI = ISO;
pub const ECMA = 8;
pub const DATAKIT = 9;
pub const CCITT = 10;
pub const SNA = 11;
pub const DECnet = 12;
pub const DLI = 13;
pub const LAT = 14;
pub const HYLINK = 15;
pub const APPLETALK = 16;
pub const ROUTE = 17;
pub const LINK = 18;
pub const pseudo_XTP = 19;
pub const COIP = 20;
pub const CNT = 21;
pub const pseudo_RTIP = 22;
pub const IPX = 23;
pub const SIP = 24;
pub const pseudo_PIP = 25;
pub const ISDN = 26;
pub const E164 = ISDN;
pub const pseudo_KEY = 27;
pub const INET6 = 28;
pub const NATM = 29;
pub const ATM = 30;
pub const pseudo_HDRCMPLT = 31;
pub const NETGRAPH = 32;
pub const SLOW = 33;
pub const SCLUSTER = 34;
pub const ARP = 35;
pub const BLUETOOTH = 36;
pub const IEEE80211 = 37;
pub const INET_SDP = 40;
pub const INET6_SDP = 42;
pub const MAX = 42;
},
.solaris, .illumos => struct {
pub const UNSPEC = 0;
pub const UNIX = 1;
pub const LOCAL = UNIX;
pub const FILE = UNIX;
pub const INET = 2;
pub const IMPLINK = 3;
pub const PUP = 4;
pub const CHAOS = 5;
pub const NS = 6;
pub const NBS = 7;
pub const ECMA = 8;
pub const DATAKIT = 9;
pub const CCITT = 10;
pub const SNA = 11;
pub const DECnet = 12;
pub const DLI = 13;
pub const LAT = 14;
pub const HYLINK = 15;
pub const APPLETALK = 16;
pub const NIT = 17;
pub const @"802" = 18;
pub const OSI = 19;
pub const X25 = 20;
pub const OSINET = 21;
pub const GOSIP = 22;
pub const IPX = 23;
pub const ROUTE = 24;
pub const LINK = 25;
pub const INET6 = 26;
pub const KEY = 27;
pub const NCA = 28;
pub const POLICY = 29;
pub const INET_OFFLOAD = 30;
pub const TRILL = 31;
pub const PACKET = 32;
pub const LX_NETLINK = 33;
pub const MAX = 33;
},
.netbsd => struct {
pub const UNSPEC = 0;
pub const LOCAL = 1;
pub const UNIX = LOCAL;
pub const INET = 2;
pub const IMPLINK = 3;
pub const PUP = 4;
pub const CHAOS = 5;
pub const NS = 6;
pub const ISO = 7;
pub const OSI = ISO;
pub const ECMA = 8;
pub const DATAKIT = 9;
pub const CCITT = 10;
pub const SNA = 11;
pub const DECnet = 12;
pub const DLI = 13;
pub const LAT = 14;
pub const HYLINK = 15;
pub const APPLETALK = 16;
pub const OROUTE = 17;
pub const LINK = 18;
pub const COIP = 20;
pub const CNT = 21;
pub const IPX = 23;
pub const INET6 = 24;
pub const ISDN = 26;
pub const E164 = ISDN;
pub const NATM = 27;
pub const ARP = 28;
pub const BLUETOOTH = 31;
pub const IEEE80211 = 32;
pub const MPLS = 33;
pub const ROUTE = 34;
pub const CAN = 35;
pub const ETHER = 36;
pub const MAX = 37;
},
.dragonfly => struct {
pub const UNSPEC = 0;
pub const OSI = ISO;
pub const UNIX = LOCAL;
pub const LOCAL = 1;
pub const INET = 2;
pub const IMPLINK = 3;
pub const PUP = 4;
pub const CHAOS = 5;
pub const NETBIOS = 6;
pub const ISO = 7;
pub const ECMA = 8;
pub const DATAKIT = 9;
pub const CCITT = 10;
pub const SNA = 11;
pub const DLI = 13;
pub const LAT = 14;
pub const HYLINK = 15;
pub const APPLETALK = 16;
pub const ROUTE = 17;
pub const LINK = 18;
pub const COIP = 20;
pub const CNT = 21;
pub const IPX = 23;
pub const SIP = 24;
pub const ISDN = 26;
pub const INET6 = 28;
pub const NATM = 29;
pub const ATM = 30;
pub const NETGRAPH = 32;
pub const BLUETOOTH = 33;
pub const MPLS = 34;
pub const MAX = 36;
},
.haiku => struct {
pub const UNSPEC = 0;
pub const INET = 1;
pub const APPLETALK = 2;
pub const ROUTE = 3;
pub const LINK = 4;
pub const INET6 = 5;
pub const DLI = 6;
pub const IPX = 7;
pub const NOTIFY = 8;
pub const LOCAL = 9;
pub const UNIX = LOCAL;
pub const BLUETOOTH = 10;
pub const MAX = 11;
},
.openbsd => struct {
pub const UNSPEC = 0;
pub const UNIX = 1;
pub const LOCAL = UNIX;
pub const INET = 2;
pub const APPLETALK = 16;
pub const INET6 = 24;
pub const KEY = 30;
pub const ROUTE = 17;
pub const SNA = 11;
pub const MPLS = 33;
pub const BLUETOOTH = 32;
pub const ISDN = 26;
pub const MAX = 36;
},
// https://github.com/SerenityOS/serenity/blob/ac44ec5ebc707f9dd0c3d4759a1e17e91db5d74f/Kernel/API/POSIX/sys/socket.h#L17-L22
.serenity => struct {
pub const UNSPEC = 0;
pub const LOCAL = 1;
pub const UNIX = LOCAL;
pub const INET = 2;
pub const INET6 = 3;
pub const MAX = 4;
},
else => void,
}