1 ! Copyright (C) 2005, 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
8 CONSTANT: MAXPATHLEN 1024
10 CONSTANT: O_RDONLY HEX: 0000
11 CONSTANT: O_WRONLY HEX: 0001
12 CONSTANT: O_RDWR HEX: 0002
13 CONSTANT: O_CREAT HEX: 0040
14 CONSTANT: O_EXCL HEX: 0080
15 CONSTANT: O_NOCTTY HEX: 0100
16 CONSTANT: O_TRUNC HEX: 0200
17 CONSTANT: O_APPEND HEX: 0400
18 CONSTANT: O_NONBLOCK HEX: 0800
20 ALIAS: O_NDELAY O_NONBLOCK
22 CONSTANT: SOL_SOCKET 1
24 CONSTANT: FD_SETSIZE 1024
26 CONSTANT: SO_REUSEADDR 2
27 CONSTANT: SO_OOBINLINE 10
28 CONSTANT: SO_SNDTIMEO HEX: 15
29 CONSTANT: SO_RCVTIMEO HEX: 14
32 CONSTANT: FD_CLOEXEC 1
41 { "socklen_t" "addrlen" }
43 { "char*" "canonname" }
44 { "addrinfo*" "next" } ;
49 { "in_addr_t" "addr" }
50 { "longlong" "unused" } ;
52 C-STRUCT: sockaddr-in6
56 { { "uchar" 16 } "addr" }
57 { "uint" "scopeid" } ;
59 CONSTANT: max-un-path 108
63 { { "char" max-un-path } "path" } ;
65 CONSTANT: SOCK_STREAM 1
66 CONSTANT: SOCK_DGRAM 2
73 ALIAS: PF_UNSPEC AF_UNSPEC
74 ALIAS: PF_UNIX AF_UNIX
75 ALIAS: PF_INET AF_INET
76 ALIAS: PF_INET6 AF_INET6
78 CONSTANT: IPPROTO_TCP 6
79 CONSTANT: IPPROTO_UDP 17
81 CONSTANT: AI_PASSIVE 1
89 { "char*" "pw_passwd" }
92 { "char*" "pw_gecos" }
94 { "char*" "pw_shell" } ;
99 { "ushort" "d_reclen" }
101 { { "char" 256 } "d_name" } ;
138 CONSTANT: ENAMETOOLONG 36
141 CONSTANT: ENOTEMPTY 39
143 ALIAS: EWOULDBLOCK EAGAIN
147 CONSTANT: EL2NSYNC 45
160 ALIAS: EDEADLOCK EDEADLK
174 CONSTANT: EMULTIHOP 72
177 CONSTANT: EOVERFLOW 75
178 CONSTANT: ENOTUNIQ 76
185 CONSTANT: ELIBEXEC 83
187 CONSTANT: ERESTART 85
188 CONSTANT: ESTRPIPE 86
190 CONSTANT: ENOTSOCK 88
191 CONSTANT: EDESTADDRREQ 89
192 CONSTANT: EMSGSIZE 90
193 CONSTANT: EPROTOTYPE 91
194 CONSTANT: ENOPROTOOPT 92
195 CONSTANT: EPROTONOSUPPORT 93
196 CONSTANT: ESOCKTNOSUPPORT 94
197 CONSTANT: EOPNOTSUPP 95
198 CONSTANT: EPFNOSUPPORT 96
199 CONSTANT: EAFNOSUPPORT 97
200 CONSTANT: EADDRINUSE 98
201 CONSTANT: EADDRNOTAVAIL 99
202 CONSTANT: ENETDOWN 100
203 CONSTANT: ENETUNREACH 101
204 CONSTANT: ENETRESET 102
205 CONSTANT: ECONNABORTED 103
206 CONSTANT: ECONNRESET 104
207 CONSTANT: ENOBUFS 105
208 CONSTANT: EISCONN 106
209 CONSTANT: ENOTCONN 107
210 CONSTANT: ESHUTDOWN 108
211 CONSTANT: ETOOMANYREFS 109
212 CONSTANT: ETIMEDOUT 110
213 CONSTANT: ECONNREFUSED 111
214 CONSTANT: EHOSTDOWN 112
215 CONSTANT: EHOSTUNREACH 113
216 CONSTANT: EALREADY 114
217 CONSTANT: EINPROGRESS 115
219 CONSTANT: EUCLEAN 117
220 CONSTANT: ENOTNAM 118
221 CONSTANT: ENAVAIL 119
223 CONSTANT: EREMOTEIO 121
225 CONSTANT: ENOMEDIUM 123
226 CONSTANT: EMEDIUMTYPE 124
227 CONSTANT: ECANCELED 125
229 CONSTANT: EKEYEXPIRED 127
230 CONSTANT: EKEYREVOKED 128
231 CONSTANT: EKEYREJECTED 129
232 CONSTANT: EOWNERDEAD 130
233 CONSTANT: ENOTRECOVERABLE 131