1 ;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*-
3 ;; adapted from constants.lisp in the sb-bsd-sockets contrib module
4 ;; many docstrings here are Copyright (C) 2001-2003 by
5 ;; the Institute of Electrical and Electronics Engineers, Inc and The Open Group
8 ("sys/types.h" "inttypes.h" "sys/socket.h" "unistd.h" "sys/un.h"
9 "netinet/in.h" "netinet/in_systm.h" "netinet/ip.h" "sys/ioctl.h"
10 "net/if.h" "netdb.h" "errno.h" "netinet/tcp.h" "fcntl.h" "limits.h"
11 "sys/uio.h" "arpa/inet.h" "sys/select.h" "time.h"
12 #+linux
"netpacket/packet.h" #+linux
"net/ethernet.h"
13 #+linux
"asm/types.h" #+linux
"linux/netlink.h" #+linux
"linux/rtnetlink.h")
20 (:integer SC-AIO-LISTIO-MAX
"_SC_AIO_LISTIO_MAX")
21 (:integer SC-AIO-MAX
"_SC_AIO_MAX")
22 (:integer SC-AIO-PRIO-DELTA-MAX
"_SC_AIO_PRIO_DELTA_MAX")
23 (:integer SC-ARG-MAX
"_SC_ARG_MAX")
24 (:integer SC-ATEXIT-MAX
"_SC_ATEXIT_MAX")
25 (:integer SC-BC-BASE-MAX
"_SC_BC_BASE_MAX")
26 (:integer SC-BC-DIM-MAX
"_SC_BC_DIM_MAX")
27 (:integer SC-BC-SCALE-MAX
"_SC_BC_SCALE_MAX")
28 (:integer SC-BC-STRING-MAX
"_SC_BC_STRING_MAX")
29 (:integer SC-CHILD-MAX
"_SC_CHILD_MAX")
30 (:integer SC-CLK-TCK
"_SC_CLK_TCK")
31 (:integer SC-COLL-WEIGHTS-MAX
"_SC_COLL_WEIGHTS_MAX")
32 (:integer SC-DELAYTIMER-MAX
"_SC_DELAYTIMER_MAX")
33 (:integer SC-EXPR-NEST-MAX
"_SC_EXPR_NEST_MAX")
34 (:integer SC-HOST-NAME-MAX
"_SC_HOST_NAME_MAX")
35 (:integer SC-IOV-MAX
"_SC_IOV_MAX")
36 (:integer SC-LINE-MAX
"_SC_LINE_MAX")
37 (:integer SC-LOGIN-NAME-MAX
"_SC_LOGIN_NAME_MAX")
38 (:integer SC-NGROUPS-MAX
"_SC_NGROUPS_MAX")
39 (:integer SC-GETGR-R-SIZE-MAX
"_SC_GETGR_R_SIZE_MAX")
40 (:integer SC-GETPW-R-SIZE-MAX
"_SC_GETPW_R_SIZE_MAX")
41 (:integer SC-MQ-OPEN-MAX
"_SC_MQ_OPEN_MAX")
42 (:integer SC-MQ-PRIO-MAX
"_SC_MQ_PRIO_MAX")
43 (:integer SC-OPEN-MAX
"_SC_OPEN_MAX")
44 (:integer SC-ADVISORY-INFO
"_SC_ADVISORY_INFO")
45 (:integer SC-BARRIERS
"_SC_BARRIERS")
46 (:integer SC-ASYNCHRONOUS-IO
"_SC_ASYNCHRONOUS_IO")
47 (:integer SC-CLOCK-SELECTION
"_SC_CLOCK_SELECTION")
48 (:integer SC-CPUTIME
"_SC_CPUTIME")
49 (:integer SC-FILE-LOCKING
"_SC_FILE_LOCKING")
50 (:integer SC-FSYNC
"_SC_FSYNC")
51 (:integer SC-IPV6
"_SC_IPV6")
52 (:integer SC-JOB-CONTROL
"_SC_JOB_CONTROL")
53 (:integer SC-MAPPED-FILES
"_SC_MAPPED_FILES")
54 (:integer SC-MEMLOCK
"_SC_MEMLOCK")
55 (:integer SC-MEMLOCK-RANGE
"_SC_MEMLOCK_RANGE")
56 (:integer SC-MEMORY-PROTECTION
"_SC_MEMORY_PROTECTION")
57 (:integer SC-MESSAGE-PASSING
"_SC_MESSAGE_PASSING")
58 (:integer SC-MONOTONIC-CLOCK
"_SC_MONOTONIC_CLOCK")
59 (:integer SC-MULTI-PROCESS
"_SC_MULTI_PROCESS")
60 (:integer SC-PRIORITIZED-IO
"_SC_PRIORITIZED_IO")
61 (:integer SC-PRIORITY-SCHEDULING
"_SC_PRIORITY_SCHEDULING")
62 (:integer SC-RAW-SOCKETS
"_SC_RAW_SOCKETS")
63 (:integer SC-READER-WRITER-LOCKS
"_SC_READER_WRITER_LOCKS")
64 (:integer SC-REALTIME-SIGNALS
"_SC_REALTIME_SIGNALS")
65 (:integer SC-REGEXP
"_SC_REGEXP")
66 (:integer SC-SAVED-IDS
"_SC_SAVED_IDS")
67 (:integer SC-SEMAPHORES
"_SC_SEMAPHORES")
68 (:integer SC-SHARED-MEMORY-OBJECTS
"_SC_SHARED_MEMORY_OBJECTS")
69 (:integer SC-SHELL
"_SC_SHELL")
70 (:integer SC-SPAWN
"_SC_SPAWN")
71 (:integer SC-SPIN-LOCKS
"_SC_SPIN_LOCKS")
72 (:integer SC-SPORADIC-SERVER
"_SC_SPORADIC_SERVER")
73 (:integer SC-SYMLOOP-MAX
"_SC_SYMLOOP_MAX")
74 (:integer SC-SYNCHRONIZED-IO
"_SC_SYNCHRONIZED_IO")
75 (:integer SC-THREAD-ATTR-STACKADDR
"_SC_THREAD_ATTR_STACKADDR")
76 (:integer SC-THREAD-ATTR-STACKSIZE
"_SC_THREAD_ATTR_STACKSIZE")
77 (:integer SC-THREAD-CPUTIME
"_SC_THREAD_CPUTIME")
78 (:integer SC-THREAD-PRIO-INHERIT
"_SC_THREAD_PRIO_INHERIT")
79 (:integer SC-THREAD-PRIO-PROTECT
"_SC_THREAD_PRIO_PROTECT")
80 (:integer SC-THREAD-PRIORITY-SCHEDULING
"_SC_THREAD_PRIORITY_SCHEDULING")
81 (:integer SC-THREAD-PROCESS-SHARED
"_SC_THREAD_PROCESS_SHARED")
82 (:integer SC-THREAD-SAFE-FUNCTIONS
"_SC_THREAD_SAFE_FUNCTIONS")
83 (:integer SC-THREAD-SPORADIC-SERVER
"_SC_THREAD_SPORADIC_SERVER")
84 (:integer SC-THREADS
"_SC_THREADS")
85 (:integer SC-TIMEOUTS
"_SC_TIMEOUTS")
86 (:integer SC-TIMERS
"_SC_TIMERS")
87 (:integer SC-TRACE
"_SC_TRACE")
88 (:integer SC-TRACE-EVENT-FILTER
"_SC_TRACE_EVENT_FILTER")
89 (:integer SC-TRACE-INHERIT
"_SC_TRACE_INHERIT")
90 (:integer SC-TRACE-LOG
"_SC_TRACE_LOG")
91 (:integer SC-TYPED-MEMORY-OBJECTS
"_SC_TYPED_MEMORY_OBJECTS")
92 (:integer SC-VERSION
"_SC_VERSION")
93 (:integer SC-V6-ILP32-OFF32
"_SC_V6_ILP32_OFF32")
94 (:integer SC-V6-ILP32-OFFBIG
"_SC_V6_ILP32_OFFBIG")
95 (:integer SC-V6-LP64-OFF64
"_SC_V6_LP64_OFF64")
96 (:integer SC-V6-LPBIG-OFFBIG
"_SC_V6_LPBIG_OFFBIG")
97 (:integer SC-2-C-BIND
"_SC_2_C_BIND")
98 (:integer SC-2-C-DEV
"_SC_2_C_DEV")
99 (:integer SC-2-C-VERSION
"_SC_2_C_VERSION")
100 (:integer SC-2-CHAR-TERM
"_SC_2_CHAR_TERM")
101 (:integer SC-2-FORT-DEV
"_SC_2_FORT_DEV")
102 (:integer SC-2-FORT-RUN
"_SC_2_FORT_RUN")
103 (:integer SC-2-LOCALEDEF
"_SC_2_LOCALEDEF")
104 (:integer SC-2-PBS
"_SC_2_PBS")
105 (:integer SC-2-PBS-ACCOUNTING
"_SC_2_PBS_ACCOUNTING")
106 (:integer SC-2-PBS-CHECKPOINT
"_SC_2_PBS_CHECKPOINT")
107 (:integer SC-2-PBS-LOCATE
"_SC_2_PBS_LOCATE")
108 (:integer SC-2-PBS-MESSAGE
"_SC_2_PBS_MESSAGE")
109 (:integer SC-2-PBS-TRACK
"_SC_2_PBS_TRACK")
110 (:integer SC-2-SW-DEV
"_SC_2_SW_DEV")
111 (:integer SC-2-UPE
"_SC_2_UPE")
112 (:integer SC-2-VERSION
"_SC_2_VERSION")
113 (:integer SC-REGEX-VERSION
"_SC_REGEX_VERSION")
114 (:integer SC-PAGE-SIZE
"_SC_PAGE_SIZE")
115 (:integer SC-PAGESIZE
"_SC_PAGESIZE")
116 (:integer SC-THREAD-DESTRUCTOR-ITERATIONS
"_SC_THREAD_DESTRUCTOR_ITERATIONS")
117 (:integer SC-THREAD-KEYS-MAX
"_SC_THREAD_KEYS_MAX")
118 (:integer SC-THREAD-STACK-MIN
"_SC_THREAD_STACK_MIN")
119 (:integer SC-THREAD-THREADS-MAX
"_SC_THREAD_THREADS_MAX")
120 (:integer SC-RE-DUP-MAX
"_SC_RE_DUP_MAX")
121 (:integer SC-RTSIG-MAX
"_SC_RTSIG_MAX")
122 (:integer SC-SEM-NSEMS-MAX
"_SC_SEM_NSEMS_MAX")
123 (:integer SC-SEM-VALUE-MAX
"_SC_SEM_VALUE_MAX")
124 (:integer SC-SIGQUEUE-MAX
"_SC_SIGQUEUE_MAX")
125 (:integer SC-STREAM-MAX
"_SC_STREAM_MAX")
126 (:integer SC-SYMLOOP-MAX
"_SC_SYMLOOP_MAX")
127 (:integer SC-TIMER-MAX
"_SC_TIMER_MAX")
128 (:integer SC-TTY-NAME-MAX
"_SC_TTY_NAME_MAX")
129 (:integer SC-TZNAME-MAX
"_SC_TZNAME_MAX")
130 (:integer SC-XBS5-ILP32-OFF32
"_SC_XBS5_ILP32_OFF32")
131 (:integer SC-XBS5-ILP32-OFFBIG
"_SC_XBS5_ILP32_OFFBIG")
132 (:integer SC-XBS5-LP64-OFF64
"_SC_XBS5_LP64_OFF64")
133 (:integer SC-XBS5-LPBIG-OFFBIG
"_SC_XBS5_LPBIG_OFFBIG")
134 (:integer SC-XOPEN-CRYPT
"_SC_XOPEN_CRYPT")
135 (:integer SC-XOPEN-ENH-I18N
"_SC_XOPEN_ENH_I18N")
136 (:integer SC-XOPEN-LEGACY
"_SC_XOPEN_LEGACY")
137 (:integer SC-XOPEN-REALTIME
"_SC_XOPEN_REALTIME")
138 (:integer SC-XOPEN-REALTIME-THREADS
"_SC_XOPEN_REALTIME_THREADS")
139 (:integer SC-XOPEN-SHM
"_SC_XOPEN_SHM")
140 (:integer SC-XOPEN-STREAMS
"_SC_XOPEN_STREAMS")
141 (:integer SC-XOPEN-UNIX
"_SC_XOPEN_UNIX")
142 (:integer SC-XOPEN-VERSION
"_SC_XOPEN_VERSION")
143 (:integer SC-XOPEN-XCU-VERSION
"_SC_XOPEN_XCU_VERSION")
148 (:type size-t
"size_t")
149 (:type ssize-t
"ssize_t")
150 (:type off-t
"off_t")
151 (:type pid-t
"pid_t")
152 (:type uid-t
"uid_t")
153 (:type gid-t
"gid_t")
158 (:type uint8-t
"uint8_t")
159 (:type uint16-t
"uint16_t")
160 (:type uint32-t
"uint32_t")
165 (:structure iovec
("struct iovec"
166 ((* t
) base
"void *" "iov_base")
167 (size-t len
"size_t" "iov_len")))
168 #+freebsd
(:integer iov-max
"IOV_MAX")
169 #+linux
(:integer uio-maxiov
"UIO_MAXIOV")
174 (:type socklen-t
"socklen_t")
175 (:type sa-family-t
"sa_family_t")
176 (:structure sockaddr
("struct sockaddr"
177 #+freebsd
(uint8-t len
"unsigned char" "sa_len")
178 (sa-family-t family
"sa_family_t" "sa_family")
179 ((array (unsigned 8)) data
"char" "sa_data")))
180 (:structure sockaddr-storage
("struct sockaddr_storage"
181 #+freebsd
(uint8-t len
"unsigned char" "ss_len")
182 (sa-family-t family
"sa_family_t" "ss_family")))
184 (:integer msg-ctrunc
"MSG_CTRUNC") ; recvmsg
185 (:integer msg-dontroute
"MSG_DONTROUTE") ; sendmsg
186 (:integer msg-eor
"MSG_EOR") ; recvmsg sendmsg
187 (:integer msg-oob
"MSG_OOB") ; recvmsg sendmsg
188 (:integer msg-peek
"MSG_PEEK") ; recvmsg
189 (:integer msg-trunc
"MSG_TRUNC") ; recvmsg
190 (:integer msg-waitall
"MSG_WAITALL") ; recvmsg
191 (:integer msg-dontwait
"MSG_DONTWAIT") ; recvmsg sendmsg
192 (:integer msg-nosignal
"MSG_NOSIGNAL") ; sendmsg
193 #+linux
(:integer msg-errqueue
"MSG_ERRQUEUE") ; recvmsg
194 #+linux
(:integer msg-more
"MSG_MORE") ; sendmsg
195 #+linux
(:integer msg-confirm
"MSG_CONFIRM") ; sendmsg sendmsg
196 #+linux
(:integer msg-proxy
"MSG_PROXY") ;
197 #+linux
(:integer msg-fin
"MSG_FIN") ;
198 #+linux
(:integer msg-syn
"MSG_SYN") ;
199 #+freebsd
(:integer msg-eof
"MSG_EOF") ;
200 #+freebsd
(:integer msg-nbio
"MSG_NBIO") ;
201 #+freebsd
(:integer msg-compat
"MSG_COMPAT") ;
202 (:structure msghdr
("struct msghdr"
203 (c-string-pointer name
"void *" "msg_name")
204 (socklen-t namelen
"socklen_t" "msg_namelen")
205 ((* (struct iovec
)) iov
"struct iovec" "msg_iov")
206 (size-t iovlen
"size_t" "msg_iovlen")
207 ((* t
) control
"void *" "msg_control")
208 (socklen-t controllen
"socklen_t" "msg_controllen")
209 (int flags
"int" "msg_flags")))
211 (:integer sol-socket
"SOL_SOCKET")
212 #+linux
(:integer sol-tcp
"SOL_TCP")
213 #+linux
(:integer sol-ip
"SOL_IP")
214 #+linux
(:integer sol-raw
"SOL_RAW")
216 (:structure cmsghdr
("struct cmsghdr"
217 (socklen-t len
"socklen_t" "cmsg_len")
218 (int level
"int" "cmsg_level")
219 (int type
"int" "cmsg_type")))
221 (:integer scm-rights
"SCM_RIGHTS")
222 #+linux
(:integer scm-credentials
"SCM_CREDENTIALS")
223 #+linux
(:structure ucred
("struct ucred"
224 (pid-t pid
"pid_t" "pid")
225 (uid-t uid
"uid_t" "uid")
226 (gid-t gid
"gid_t" "gid")))
228 (:structure linger
("struct linger"
229 (int onoff
"int" "l_onoff")
230 (int linger
"int" "l_linger")))
234 (:integer af-unspec
"AF_UNSPEC")
235 (:integer af-local
"AF_UNIX")
236 (:integer af-unix
"AF_UNIX")
237 (:integer af-inet
"AF_INET")
238 (:integer af-inet6
"AF_INET6")
239 (:integer af-route
"AF_ROUTE")
240 (:integer af-key
#+linux
"AF_KEY"
242 #+linux
(:integer af-netlink
"AF_NETLINK")
243 #+linux
(:integer af-packet
"AF_PACKET")
246 (:integer sock-stream
"SOCK_STREAM")
247 (:integer sock-dgram
"SOCK_DGRAM")
248 (:integer sock-seqpacket
"SOCK_SEQPACKET")
249 (:integer sock-raw
"SOCK_RAW")
250 #+linux
(:integer sock-rdm
"SOCK_RDM")
252 (:integer somaxconn
"SOMAXCONN")
254 (:integer so-acceptconn
"SO_ACCEPTCONN") ; get
255 #+linux
(:integer so-bsdcompat
"SO_BSDCOMPAT") ; set
256 #+linux
(:integer so-bindtodevice
"SO_BINDTODEVICE") ; set
257 (:integer so-broadcast
"SO_BROADCAST") ; get set
258 (:integer so-debug
"SO_DEBUG") ; get set
259 (:integer so-dontroute
"SO_DONTROUTE") ; get set
260 (:integer so-error
"SO_ERROR") ; get
261 (:integer so-keepalive
"SO_KEEPALIVE") ; get set
262 (:integer so-linger
"SO_LINGER") ; get set
263 (:integer so-oobinline
"SO_OOBINLINE") ; get set
264 #+linux
(:integer so-passcred
"SO_PASSCRED") ; get set
265 #+linux
(:integer so-peercred
"SO_PEERCRED") ; get
266 #+linux
(:integer so-priority
"SO_PRIORITY") ; get set
267 (:integer so-rcvbuf
"SO_RCVBUF") ; get set
268 #+linux
(:integer so-rcvbufforce
"SO_RCVBUFFORCE") ; get set
269 (:integer so-rcvlowat
"SO_RCVLOWAT") ; get set
270 (:integer so-rcvtimeo
"SO_RCVTIMEO") ; get set
271 (:integer so-reuseaddr
"SO_REUSEADDR") ; get set
272 (:integer so-sndbuf
"SO_SNDBUF") ; get set
273 #+linux
(:integer so-sndbufforce
"SO_SNDBUFFORCE") ; get set
274 (:integer so-sndlowat
"SO_SNDLOWAT") ; get set
275 (:integer so-sndtimeo
"SO_SNDTIMEO") ; get set
276 (:integer so-timestamp
"SO_TIMESTAMP") ; get set
277 (:integer so-type
"SO_TYPE") ; get
278 #+freebsd
(:integer so-useloopback
"SO_USELOOPBACK")
279 #+freebsd
(:integer so-reuseport
"SO_REUSEPORT")
280 #+freebsd
(:integer so-nosigpipe
"SO_NOSIGPIPE")
281 #+freebsd
(:integer so-acceptfilter
"SO_ACCEPTFILTER")
282 #+freebsd
(:integer so-bintime
"SO_BINTIME")
283 #+freebsd
(:integer so-label
"SO_LABEL")
284 #+freebsd
(:integer so-peerlabel
"SO_PEERLABEL")
285 #+freebsd
(:integer so-listenqlimit
"SO_LISTENQLIMIT")
286 #+freebsd
(:integer so-listenqlen
"SO_LISTENQLEN")
287 #+freebsd
(:integer so-listenincqlen
"SO_LISTENINCQLEN")
289 (:integer shut-rd
"SHUT_RD")
290 (:integer shut-wr
"SHUT_WR")
291 (:integer shut-rdwr
"SHUT_RDWR")
296 (:structure sockaddr-un
("struct sockaddr_un"
297 #+freebsd
(uint8-t len
"unsigned char" "sun_len")
298 (sa-family-t family
"sa_family_t" "sun_family")
299 ((array (unsigned 8)) path
"char" "sun_path")))
301 #+freebsd
(:integer local-peercred
"LOCAL_PEERCRED")
302 #+freebsd
(:integer local-creds
"LOCAL_CREDS")
303 #+freebsd
(:integer local-connwait
"LOCAL_CONNWAIT")
308 (:type in-port-t
"in_port_t")
309 (:type in-addr-t
"in_addr_t")
311 (:structure sockaddr-in
("struct sockaddr_in"
312 #+freebsd
(uint8-t len
"uint8_t" "sin_len")
313 (sa-family-t family
"sa_family_t" "sin_family")
314 (in-port-t port
"in_port_t" "sin_port")
315 (in-addr-t addr
"struct in_addr" "sin_addr")))
317 (:structure in6-addr
("struct in6_addr"
318 ((union nil
(addr8 (array uint8-t
16))
319 (addr16 (array uint16-t
8))
320 (addr32 (array uint32-t
4)))
321 in6-u
"union" #+linux
"in6_u"
322 #+freebsd
"__u6_addr")))
324 (:structure sockaddr-in6
("struct sockaddr_in6"
325 #+freebsd
(uint8-t len
"uint8_t" "sin6_len")
326 (sa-family-t family
"sa_family_t" "sin6_family")
327 (in-port-t port
"in_port_t" "sin6_port")
328 (uint32-t flowinfo
"uint32_t" "sin6_flowinfo")
329 ((struct in6-addr
) addr
"struct in6_addr" "sin6_addr")
330 (uint32-t scope-id
"uint32_t" "sin6_scope_id")))
332 ;; (:structure ip-mreq ("struct ip_mreq"
333 ;; (in-addr-t imr-multiaddr "struct in_addr" "imr_multiaddr")
334 ;; (in-addr-t imr-interface "struct in_addr" "imr_interface")))
335 ;; (:structure ip-mreq-source ("struct ip_mreq_source"
336 ;; (in-addr-t imr-multiaddr "struct in_addr" "imr_multiaddr")
337 ;; (in-addr-t imr-interface "struct in_addr" "imr_interface")
338 ;; (in-addr-t imr-sourceaddr "struct in_addr" "imr_sourceaddr")))
339 ;; (:structure ipv6-mreq ("struct ipv6_mreq"
340 ;; ((array (unsigned 8)) ipv6mr-multiaddr "struct in6_addr" "ipv6mr_multiaddr")
341 ;; (unsigned ipv6mr-interface "unsigned" "ipv6mr_interface")))
343 (:integer inaddr-any
"INADDR_ANY")
344 (:integer inaddr-broadcast
"INADDR_BROADCAST")
345 (:integer inaddr-none
"INADDR_NONE")
346 (:integer in-loopbacknet
"IN_LOOPBACKNET")
347 (:integer inaddr-loopback
"INADDR_LOOPBACK")
348 (:integer inaddr-unspec-group
"INADDR_UNSPEC_GROUP")
349 (:integer inaddr-allhosts-group
"INADDR_ALLHOSTS_GROUP")
350 (:integer inaddr-allrtrs-group
"INADDR_ALLRTRS_GROUP")
351 (:integer inaddr-max-local-group
"INADDR_MAX_LOCAL_GROUP")
353 (:integer ipproto-ip
"IPPROTO_IP")
354 (:integer ipproto-ipv6
"IPPROTO_IPV6")
355 (:integer ipproto-icmp
"IPPROTO_ICMP")
356 (:integer ipproto-icmpv6
"IPPROTO_ICMPV6")
357 (:integer ipproto-raw
"IPPROTO_RAW")
358 (:integer ipproto-tcp
"IPPROTO_TCP")
359 (:integer ipproto-udp
"IPPROTO_UDP")
360 (:integer ipproto-sctp
"IPPROTO_SCTP")
362 (:integer inet-addrstrlen
"INET_ADDRSTRLEN")
363 (:integer inet6-addrstrlen
"INET6_ADDRSTRLEN")
365 (:integer ipv6-join-group
"IPV6_JOIN_GROUP")
366 (:integer ipv6-leave-group
"IPV6_LEAVE_GROUP")
367 (:integer ipv6-multicast-hops
"IPV6_MULTICAST_HOPS")
368 (:integer ipv6-multicast-if
"IPV6_MULTICAST_IF")
369 (:integer ipv6-multicast-loop
"IPV6_MULTICAST_LOOP")
370 (:integer ipv6-unicast-hops
"IPV6_UNICAST_HOPS")
371 (:integer ipv6-v6only
"IPV6_V6ONLY")
374 ;; from netinet/tcp.h
376 (:integer tcp-nodelay
"TCP_NODELAY")
377 (:integer tcp-maxseg
"TCP_MAXSEG")
378 #+linux
(:integer tcp-cork
"TCP_CORK")
379 #+linux
(:integer tcp-keepidle
"TCP_KEEPIDLE")
380 #+linux
(:integer tcp-keepintvl
"TCP_KEEPINTVL")
381 #+linux
(:integer tcp-keepcnt
"TCP_KEEPCNT")
382 #+linux
(:integer tcp-syncnt
"TCP_SYNCNT")
383 #+linux
(:integer tcp-linger2
"TCP_LINGER2")
384 #+linux
(:integer tcp-defer-accept
"TCP_DEFER_ACCEPT")
385 #+linux
(:integer tcp-window-clamp
"TCP_WINDOW_CLAMP")
386 (:integer tcp-info
"TCP_INFO")
387 #+linux
(:integer tcp-quickack
"TCP_QUICKACK")
390 (:enum connstates
((tcp-established "TCP_ESTABLISHED")
391 (tcp-syn-sent "TCP_SYN_SENT")
392 (tcp-syn-recv "TCP_SYN_RECV")
393 (tcp-fin-wait1 "TCP_FIN_WAIT1")
394 (tcp-fin-wait2 "TCP_FIN_WAIT2")
395 (tcp-time-wait "TCP_TIME_WAIT")
396 (tcp-close "TCP_CLOSE")
397 (tcp-close-wait "TCP_CLOSE_WAIT")
398 (tcp-last-ack "TCP_LAST_ACK")
399 (tcp-listen "TCP_LISTEN")
400 (tcp-closing "TCP_CLOSING")))
407 (:integer ipport-reserved
"IPPORT_RESERVED")
409 (:structure addrinfo
("struct addrinfo"
410 (int flags
"int" "ai_flags")
411 (int family
"int" "ai_family")
412 (int type
"int" "ai_socktype")
413 (int protocol
"int" "ai_protocol")
414 (socklen-t addrlen
"socklen_t" "ai_addrlen")
415 ((* (struct sockaddr
)) addr
"struct sockaddr *" "ai_addr")
416 (c-string-pointer canonname
"char *" "ai_canonname")
417 ((* (struct addrinfo
)) next
"struct addrinfo *" "ai_next")))
420 (:integer ai-passive
"AI_PASSIVE")
421 (:integer ai-canonname
"AI_CANONNAME")
422 (:integer ai-numerichost
"AI_NUMERICHOST")
423 (:integer ai-numericserv
"AI_NUMERICSERV")
424 (:integer ai-v4mapped
"AI_V4MAPPED")
425 (:integer ai-all
"AI_ALL")
426 (:integer ai-addrconfig
"AI_ADDRCONFIG")
427 #+linux
(:integer ai-idn
"AI_IDN")
428 #+linux
(:integer ai-canonidn
"AI_CANONIDN")
429 #+linux
(:integer ai-idn_allow_unassigned
"AI_IDN_ALLOW_UNASSIGNED")
430 #+linux
(:integer ai-idn_use_std3_ascii_rules
"AI_IDN_USE_STD3_ASCII_RULES")
432 (:integer ni-maxhost
"NI_MAXHOST")
433 (:integer ni-maxserv
"NI_MAXSERV")
436 (:integer ni-nofqdn
"NI_NOFQDN")
437 (:integer ni-numerichost
"NI_NUMERICHOST")
438 (:integer ni-namereqd
"NI_NAMEREQD")
439 (:integer ni-numericserv
"NI_NUMERICSERV")
440 (:integer ni-numericscope
"NI_NUMERICSCOPE")
441 (:integer ni-dgram
"NI_DGRAM")
442 #+linux
(:integer ni-canonidn
"NI_CANONIDN")
443 #+linux
(:integer ni-idn_allow_unassigned
"NI_IDN_ALLOW_UNASSIGNED")
444 #+linux
(:integer ni-idn_use_std3_ascii_rules
"NI_IDN_USE_STD3_ASCII_RULES")
447 (:integer netdb-success
"NETDB_SUCCESS")
448 (:integer netdb-internal
"NETDB_INTERNAL")
449 #+linux
(:integer eai-addrfamily
"EAI_ADDRFAMILY" "The specified network host does not have any network addresses in the requested address family.")
450 (:integer eai-again
"EAI_AGAIN" "The name could not be resolved at this time. Future attempts may succeed.")
451 (:integer eai-badflags
"EAI_BADFLAGS" "The flags had an invalid value.")
452 (:integer eai-fail
"EAI_FAIL" "A non-recoverable error occurred.")
453 (:integer eai-family
"EAI_FAMILY" "The address family was not recognized or the address length was invalid for the specified family.")
454 (:integer eai-memory
"EAI_MEMORY" "There was a memory allocation failure.")
455 (:integer eai-noname
"EAI_NONAME" "The name does not resolve for the supplied parameters. NI-NAMEREQD is set and the host's name cannot be located, or both nodename and servname were null.")
456 (:integer eai-service
"EAI_SERVICE" "The service passed was not recognized for the specified socket type.")
457 (:integer eai-socktype
"EAI_SOCKTYPE" "The intended socket type was not recognized.")
458 (:integer eai-system
"EAI_SYSTEM" "A system error occurred. The error code can be found in errno")
459 #+linux
(:integer eai-overflow
"EAI_OVERFLOW" "An argument buffer overflowed.")
460 #+freebsd
(:integer eai-badhints
"EAI_BADHINTS")
461 #+freebsd
(:integer eai-protocol
"EAI_PROTOCOL")
462 #+freebsd
(:integer eai-max
"EAI_MAX")
463 #+linux
(:integer eai-inprogress
"EAI_INPROGRESS" "Processing request in progress.")
464 #+linux
(:integer eai-canceled
"EAI_CANCELED" "Request canceled.")
465 #+linux
(:integer eai-notcanceled
"EAI_NOTCANCELED" "Request not canceled.")
466 #+linux
(:integer eai-alldone
"EAI_ALLDONE" "All requests done.")
467 #+linux
(:integer eai-intr
"EAI_INTR" "Interrupted by a signal.")
468 #+linux
(:integer eai-idn_encode
"EAI_IDN_ENCODE" "IDN encoding failed.")
470 (:structure protoent
("struct protoent"
471 (c-string-pointer name
"char *" "p_name")
472 ((* c-string
) aliases
"char **" "p_aliases")
473 (int proto
"int" "p_proto")))
478 (:structure if-nameindex
("struct if_nameindex"
479 (unsigned index
"unsigned" "if_index")
480 (c-string-pointer name
"char *" "if_name")))
481 (:integer ifnamesize
"IF_NAMESIZE")
482 (:integer ifnamsiz
"IFNAMSIZ")
488 (:type suseconds-t
"suseconds_t")
493 (:type time-t
"time_t")
494 (:structure timeval
("struct timeval"
495 (time-t tv-sec
"time_t" "tv_sec")
496 (suseconds-t tv-usec
"suseconds_t" "tv_usec")))