1 /** 2 * D header file for GNU/Linux. 3 * 4 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 5 * Authors: Paul O'Neil 6 */ 7 module core.sys.linux.sys.socket; 8 9 public import core.sys.posix.sys.socket; 10 11 version (linux): 12 extern(C): 13 @nogc: 14 nothrow: 15 16 enum 17 { 18 // Protocol families. 19 PF_UNSPEC = 0, 20 PF_LOCAL = 1, 21 PF_UNIX = PF_LOCAL, 22 PF_FILE = PF_LOCAL, 23 PF_INET = 2, 24 PF_AX25 = 3, 25 PF_NETROM = 6, 26 PF_BRIDGE = 7, 27 PF_ATMPVC = 8, 28 PF_X25 = 9, 29 PF_INET6 = 10, 30 PF_ROSE = 11, 31 PF_DECnet = 12, 32 PF_NETBEUI = 13, 33 PF_SECURITY = 14, 34 PF_KEY = 15, 35 PF_NETLINK = 16, 36 PF_ROUTE = PF_NETLINK, 37 PF_PACKET = 17, 38 PF_ASH = 18, 39 PF_ECONET = 19, 40 PF_ATMSVC = 20, 41 PF_RDS = 21, 42 PF_SNA = 22, 43 PF_IRDA = 23, 44 PF_PPPOX = 24, 45 PF_WANPIPE = 25, 46 PF_LLC = 26, 47 PF_IB = 27, 48 PF_MPLS = 28, 49 PF_CAN = 29, 50 PF_TIPC = 30, 51 PF_BLUETOOTH = 31, 52 PF_IUCV = 32, 53 PF_RXRPC = 33, 54 PF_ISDN = 34, 55 PF_PHONET = 35, 56 PF_IEEE802154 = 36, 57 PF_CAIF = 37, 58 PF_ALG = 38, 59 PF_NFC = 39, 60 PF_VSOCK = 40, 61 PF_KCM = 41, 62 PF_QIPCRTR = 42, 63 PF_SMC = 43, 64 PF_MAX = 44, 65 66 // Address families. 67 AF_LOCAL = PF_LOCAL, 68 AF_FILE = AF_LOCAL, 69 AF_AX25 = PF_AX25, 70 AF_NETROM = PF_NETROM, 71 AF_BRIDGE = PF_BRIDGE, 72 AF_ATMPVC = PF_ATMPVC, 73 AF_X25 = PF_X25, 74 AF_ROSE = PF_ROSE, 75 AF_DECnet = PF_DECnet, 76 AF_NETBEUI = PF_NETBEUI, 77 AF_SECURITY = PF_SECURITY, 78 AF_KEY = PF_KEY, 79 AF_NETLINK = PF_NETLINK, 80 AF_ROUTE = PF_ROUTE, 81 AF_PACKET = PF_PACKET, 82 AF_ASH = PF_ASH, 83 AF_ECONET = PF_ECONET, 84 AF_ATMSVC = PF_ATMSVC, 85 AF_RDS = PF_RDS, 86 AF_SNA = PF_SNA, 87 AF_IRDA = PF_IRDA, 88 AF_PPPOX = PF_PPPOX, 89 AF_WANPIPE = PF_WANPIPE, 90 AF_LLC = PF_LLC, 91 AF_IB = PF_IB, 92 AF_MPLS = PF_MPLS, 93 AF_CAN = PF_CAN, 94 AF_TIPC = PF_TIPC, 95 AF_BLUETOOTH = PF_BLUETOOTH, 96 AF_IUCV = PF_IUCV, 97 AF_RXRPC = PF_RXRPC, 98 AF_ISDN = PF_ISDN, 99 AF_PHONET = PF_PHONET, 100 AF_IEEE802154 = PF_IEEE802154, 101 AF_CAIF = PF_CAIF, 102 AF_ALG = PF_ALG, 103 AF_NFC = PF_NFC, 104 AF_VSOCK = PF_VSOCK, 105 AF_KCM = PF_KCM, 106 AF_QIPCRTR = PF_QIPCRTR, 107 AF_SMC = PF_SMC, 108 AF_MAX = PF_MAX, 109 } 110 111 // For getsockopt() and setsockopt() 112 enum 113 { 114 SO_SECURITY_AUTHENTICATION = 22, 115 SO_SECURITY_ENCRYPTION_TRANSPORT = 23, 116 SO_SECURITY_ENCRYPTION_NETWORK = 24, 117 118 SO_BINDTODEVICE = 25, 119 120 SO_ATTACH_FILTER = 26, 121 SO_DETACH_FILTER = 27, 122 SO_GET_FILTER = SO_ATTACH_FILTER, 123 124 SO_PEERNAME = 28, 125 SO_TIMESTAMP = 29, 126 SCM_TIMESTAMP = SO_TIMESTAMP, 127 128 SO_PASSSEC = 34, 129 SO_TIMESTAMPNS = 35, 130 SCM_TIMESTAMPNS = SO_TIMESTAMPNS, 131 SO_MARK = 36, 132 SO_TIMESTAMPING = 37, 133 SCM_TIMESTAMPING = SO_TIMESTAMPING, 134 SO_RXQ_OVFL = 40, 135 SO_WIFI_STATUS = 41, 136 SCM_WIFI_STATUS = SO_WIFI_STATUS, 137 SO_PEEK_OFF = 42, 138 SO_NOFCS = 43, 139 SO_LOCK_FILTER = 44, 140 SO_SELECT_ERR_QUEUE = 45, 141 SO_BUSY_POLL = 46, 142 SO_MAX_PACING_RATE = 47, 143 SO_BPF_EXTENSIONS = 48, 144 SO_INCOMING_CPU = 49, 145 SO_ATTACH_BPF = 50, 146 SO_DETACH_BPF = SO_DETACH_FILTER, 147 SO_ATTACH_REUSEPORT_CBPF = 51, 148 SO_ATTACH_REUSEPORT_EBPF = 52, 149 SO_CNX_ADVICE = 53, 150 SCM_TIMESTAMPING_OPT_STATS = 54, 151 SO_MEMINFO = 55, 152 SO_INCOMING_NAPI_ID = 56, 153 SO_COOKIE = 57, 154 SCM_TIMESTAMPING_PKTINFO = 58, 155 SO_PEERGROUPS = 59, 156 SO_ZEROCOPY = 60, 157 } 158 159 enum : uint 160 { 161 MSG_TRYHARD = 0x04, 162 MSG_PROXY = 0x10, 163 MSG_DONTWAIT = 0x40, 164 MSG_FIN = 0x200, 165 MSG_SYN = 0x400, 166 MSG_CONFIRM = 0x800, 167 MSG_RST = 0x1000, 168 MSG_ERRQUEUE = 0x2000, 169 MSG_MORE = 0x8000, 170 MSG_WAITFORONE = 0x10000, 171 MSG_BATCH = 0x40000, 172 MSG_ZEROCOPY = 0x4000000, 173 MSG_FASTOPEN = 0x20000000, 174 MSG_CMSG_CLOEXEC = 0x40000000 175 }