xref: /php-src/ext/sockets/sockets_arginfo.h (revision 33ba1a4a)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 4fdd210a2de6f3b5df10caf5ac7fefa6aa71926c */
3 
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
5 	ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1)
6 	ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1)
7 	ZEND_ARG_TYPE_INFO(1, except, IS_ARRAY, 1)
8 	ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 1)
9 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0")
10 ZEND_END_ARG_INFO()
11 
12 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_socket_create_listen, 0, 1, Socket, MAY_BE_FALSE)
13 	ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0)
14 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, backlog, IS_LONG, 0, "SOMAXCONN")
15 ZEND_END_ARG_INFO()
16 
17 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_socket_accept, 0, 1, Socket, MAY_BE_FALSE)
18 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
19 ZEND_END_ARG_INFO()
20 
21 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_set_nonblock, 0, 1, _IS_BOOL, 0)
22 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
23 ZEND_END_ARG_INFO()
24 
25 #define arginfo_socket_set_block arginfo_socket_set_nonblock
26 
27 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_listen, 0, 1, _IS_BOOL, 0)
28 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
29 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, backlog, IS_LONG, 0, "0")
30 ZEND_END_ARG_INFO()
31 
32 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_close, 0, 1, IS_VOID, 0)
33 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
34 ZEND_END_ARG_INFO()
35 
36 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_write, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
37 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
38 	ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
39 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
40 ZEND_END_ARG_INFO()
41 
42 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_read, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
43 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
44 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
45 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PHP_BINARY_READ")
46 ZEND_END_ARG_INFO()
47 
48 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_getsockname, 0, 2, _IS_BOOL, 0)
49 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
50 	ZEND_ARG_INFO(1, address)
51 	ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, port, "null")
52 ZEND_END_ARG_INFO()
53 
54 #define arginfo_socket_getpeername arginfo_socket_getsockname
55 
56 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_socket_create, 0, 3, Socket, MAY_BE_FALSE)
57 	ZEND_ARG_TYPE_INFO(0, domain, IS_LONG, 0)
58 	ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
59 	ZEND_ARG_TYPE_INFO(0, protocol, IS_LONG, 0)
60 ZEND_END_ARG_INFO()
61 
62 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_connect, 0, 2, _IS_BOOL, 0)
63 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
64 	ZEND_ARG_TYPE_INFO(0, address, IS_STRING, 0)
65 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null")
66 ZEND_END_ARG_INFO()
67 
68 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_strerror, 0, 1, IS_STRING, 0)
69 	ZEND_ARG_TYPE_INFO(0, error_code, IS_LONG, 0)
70 ZEND_END_ARG_INFO()
71 
72 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_bind, 0, 2, _IS_BOOL, 0)
73 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
74 	ZEND_ARG_TYPE_INFO(0, address, IS_STRING, 0)
75 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "0")
76 ZEND_END_ARG_INFO()
77 
78 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_recv, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
79 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
80 	ZEND_ARG_INFO(1, data)
81 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
82 	ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
83 ZEND_END_ARG_INFO()
84 
85 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_send, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
86 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
87 	ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
88 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
89 	ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
90 ZEND_END_ARG_INFO()
91 
92 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_recvfrom, 0, 5, MAY_BE_LONG|MAY_BE_FALSE)
93 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
94 	ZEND_ARG_INFO(1, data)
95 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
96 	ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
97 	ZEND_ARG_INFO(1, address)
98 	ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, port, "null")
99 ZEND_END_ARG_INFO()
100 
101 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_sendto, 0, 5, MAY_BE_LONG|MAY_BE_FALSE)
102 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
103 	ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
104 	ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
105 	ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
106 	ZEND_ARG_TYPE_INFO(0, address, IS_STRING, 0)
107 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 1, "null")
108 ZEND_END_ARG_INFO()
109 
110 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_get_option, 0, 3, MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_FALSE)
111 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
112 	ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0)
113 	ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
114 ZEND_END_ARG_INFO()
115 
116 #define arginfo_socket_getopt arginfo_socket_get_option
117 
118 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_set_option, 0, 4, _IS_BOOL, 0)
119 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
120 	ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0)
121 	ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
122 	ZEND_ARG_INFO(0, value)
123 ZEND_END_ARG_INFO()
124 
125 #define arginfo_socket_setopt arginfo_socket_set_option
126 
127 #if defined(HAVE_SOCKETPAIR)
128 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_create_pair, 0, 4, _IS_BOOL, 0)
129 	ZEND_ARG_TYPE_INFO(0, domain, IS_LONG, 0)
130 	ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
131 	ZEND_ARG_TYPE_INFO(0, protocol, IS_LONG, 0)
132 	ZEND_ARG_INFO(1, pair)
133 ZEND_END_ARG_INFO()
134 #endif
135 
136 #if defined(HAVE_SHUTDOWN)
137 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_shutdown, 0, 1, _IS_BOOL, 0)
138 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
139 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "2")
140 ZEND_END_ARG_INFO()
141 #endif
142 
143 #if defined(HAVE_SOCKATMARK)
144 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_atmark, 0, 1, _IS_BOOL, 0)
145 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
146 ZEND_END_ARG_INFO()
147 #endif
148 
149 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_last_error, 0, 0, IS_LONG, 0)
150 	ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, socket, Socket, 1, "null")
151 ZEND_END_ARG_INFO()
152 
153 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_clear_error, 0, 0, IS_VOID, 0)
154 	ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, socket, Socket, 1, "null")
155 ZEND_END_ARG_INFO()
156 
157 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_socket_import_stream, 0, 1, Socket, MAY_BE_FALSE)
158 	ZEND_ARG_INFO(0, stream)
159 ZEND_END_ARG_INFO()
160 
161 ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_export_stream, 0, 0, 1)
162 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
163 ZEND_END_ARG_INFO()
164 
165 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_sendmsg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
166 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
167 	ZEND_ARG_TYPE_INFO(0, message, IS_ARRAY, 0)
168 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
169 ZEND_END_ARG_INFO()
170 
171 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_recvmsg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
172 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
173 	ZEND_ARG_TYPE_INFO(1, message, IS_ARRAY, 0)
174 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
175 ZEND_END_ARG_INFO()
176 
177 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_cmsg_space, 0, 2, IS_LONG, 1)
178 	ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0)
179 	ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
180 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, num, IS_LONG, 0, "0")
181 ZEND_END_ARG_INFO()
182 
183 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_addrinfo_lookup, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
184 	ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
185 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, service, IS_STRING, 1, "null")
186 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, hints, IS_ARRAY, 0, "[]")
187 ZEND_END_ARG_INFO()
188 
189 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_socket_addrinfo_connect, 0, 1, Socket, MAY_BE_FALSE)
190 	ZEND_ARG_OBJ_INFO(0, address, AddressInfo, 0)
191 ZEND_END_ARG_INFO()
192 
193 #define arginfo_socket_addrinfo_bind arginfo_socket_addrinfo_connect
194 
195 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_addrinfo_explain, 0, 1, IS_ARRAY, 0)
196 	ZEND_ARG_OBJ_INFO(0, address, AddressInfo, 0)
197 ZEND_END_ARG_INFO()
198 
199 #if defined(PHP_WIN32)
200 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_wsaprotocol_info_export, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
201 	ZEND_ARG_OBJ_INFO(0, socket, Socket, 0)
202 	ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0)
203 ZEND_END_ARG_INFO()
204 
205 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_socket_wsaprotocol_info_import, 0, 1, Socket, MAY_BE_FALSE)
206 	ZEND_ARG_TYPE_INFO(0, info_id, IS_STRING, 0)
207 ZEND_END_ARG_INFO()
208 
209 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_wsaprotocol_info_release, 0, 1, _IS_BOOL, 0)
210 	ZEND_ARG_TYPE_INFO(0, info_id, IS_STRING, 0)
211 ZEND_END_ARG_INFO()
212 #endif
213 
214 ZEND_FUNCTION(socket_select);
215 ZEND_FUNCTION(socket_create_listen);
216 ZEND_FUNCTION(socket_accept);
217 ZEND_FUNCTION(socket_set_nonblock);
218 ZEND_FUNCTION(socket_set_block);
219 ZEND_FUNCTION(socket_listen);
220 ZEND_FUNCTION(socket_close);
221 ZEND_FUNCTION(socket_write);
222 ZEND_FUNCTION(socket_read);
223 ZEND_FUNCTION(socket_getsockname);
224 ZEND_FUNCTION(socket_getpeername);
225 ZEND_FUNCTION(socket_create);
226 ZEND_FUNCTION(socket_connect);
227 ZEND_FUNCTION(socket_strerror);
228 ZEND_FUNCTION(socket_bind);
229 ZEND_FUNCTION(socket_recv);
230 ZEND_FUNCTION(socket_send);
231 ZEND_FUNCTION(socket_recvfrom);
232 ZEND_FUNCTION(socket_sendto);
233 ZEND_FUNCTION(socket_get_option);
234 ZEND_FUNCTION(socket_set_option);
235 #if defined(HAVE_SOCKETPAIR)
236 ZEND_FUNCTION(socket_create_pair);
237 #endif
238 #if defined(HAVE_SHUTDOWN)
239 ZEND_FUNCTION(socket_shutdown);
240 #endif
241 #if defined(HAVE_SOCKATMARK)
242 ZEND_FUNCTION(socket_atmark);
243 #endif
244 ZEND_FUNCTION(socket_last_error);
245 ZEND_FUNCTION(socket_clear_error);
246 ZEND_FUNCTION(socket_import_stream);
247 ZEND_FUNCTION(socket_export_stream);
248 ZEND_FUNCTION(socket_sendmsg);
249 ZEND_FUNCTION(socket_recvmsg);
250 ZEND_FUNCTION(socket_cmsg_space);
251 ZEND_FUNCTION(socket_addrinfo_lookup);
252 ZEND_FUNCTION(socket_addrinfo_connect);
253 ZEND_FUNCTION(socket_addrinfo_bind);
254 ZEND_FUNCTION(socket_addrinfo_explain);
255 #if defined(PHP_WIN32)
256 ZEND_FUNCTION(socket_wsaprotocol_info_export);
257 ZEND_FUNCTION(socket_wsaprotocol_info_import);
258 ZEND_FUNCTION(socket_wsaprotocol_info_release);
259 #endif
260 
261 static const zend_function_entry ext_functions[] = {
262 	ZEND_FE(socket_select, arginfo_socket_select)
263 	ZEND_FE(socket_create_listen, arginfo_socket_create_listen)
264 	ZEND_FE(socket_accept, arginfo_socket_accept)
265 	ZEND_FE(socket_set_nonblock, arginfo_socket_set_nonblock)
266 	ZEND_FE(socket_set_block, arginfo_socket_set_block)
267 	ZEND_FE(socket_listen, arginfo_socket_listen)
268 	ZEND_FE(socket_close, arginfo_socket_close)
269 	ZEND_FE(socket_write, arginfo_socket_write)
270 	ZEND_FE(socket_read, arginfo_socket_read)
271 	ZEND_FE(socket_getsockname, arginfo_socket_getsockname)
272 	ZEND_FE(socket_getpeername, arginfo_socket_getpeername)
273 	ZEND_FE(socket_create, arginfo_socket_create)
274 	ZEND_FE(socket_connect, arginfo_socket_connect)
275 	ZEND_FE(socket_strerror, arginfo_socket_strerror)
276 	ZEND_FE(socket_bind, arginfo_socket_bind)
277 	ZEND_FE(socket_recv, arginfo_socket_recv)
278 	ZEND_FE(socket_send, arginfo_socket_send)
279 	ZEND_FE(socket_recvfrom, arginfo_socket_recvfrom)
280 	ZEND_FE(socket_sendto, arginfo_socket_sendto)
281 	ZEND_FE(socket_get_option, arginfo_socket_get_option)
282 	ZEND_RAW_FENTRY("socket_getopt", zif_socket_get_option, arginfo_socket_getopt, 0, NULL, NULL)
283 	ZEND_FE(socket_set_option, arginfo_socket_set_option)
284 	ZEND_RAW_FENTRY("socket_setopt", zif_socket_set_option, arginfo_socket_setopt, 0, NULL, NULL)
285 #if defined(HAVE_SOCKETPAIR)
286 	ZEND_FE(socket_create_pair, arginfo_socket_create_pair)
287 #endif
288 #if defined(HAVE_SHUTDOWN)
289 	ZEND_FE(socket_shutdown, arginfo_socket_shutdown)
290 #endif
291 #if defined(HAVE_SOCKATMARK)
292 	ZEND_FE(socket_atmark, arginfo_socket_atmark)
293 #endif
294 	ZEND_FE(socket_last_error, arginfo_socket_last_error)
295 	ZEND_FE(socket_clear_error, arginfo_socket_clear_error)
296 	ZEND_FE(socket_import_stream, arginfo_socket_import_stream)
297 	ZEND_FE(socket_export_stream, arginfo_socket_export_stream)
298 	ZEND_FE(socket_sendmsg, arginfo_socket_sendmsg)
299 	ZEND_FE(socket_recvmsg, arginfo_socket_recvmsg)
300 	ZEND_FE(socket_cmsg_space, arginfo_socket_cmsg_space)
301 	ZEND_FE(socket_addrinfo_lookup, arginfo_socket_addrinfo_lookup)
302 	ZEND_FE(socket_addrinfo_connect, arginfo_socket_addrinfo_connect)
303 	ZEND_FE(socket_addrinfo_bind, arginfo_socket_addrinfo_bind)
304 	ZEND_FE(socket_addrinfo_explain, arginfo_socket_addrinfo_explain)
305 #if defined(PHP_WIN32)
306 	ZEND_FE(socket_wsaprotocol_info_export, arginfo_socket_wsaprotocol_info_export)
307 	ZEND_FE(socket_wsaprotocol_info_import, arginfo_socket_wsaprotocol_info_import)
308 	ZEND_FE(socket_wsaprotocol_info_release, arginfo_socket_wsaprotocol_info_release)
309 #endif
310 	ZEND_FE_END
311 };
312 
register_sockets_symbols(int module_number)313 static void register_sockets_symbols(int module_number)
314 {
315 	REGISTER_LONG_CONSTANT("AF_UNIX", AF_UNIX, CONST_PERSISTENT);
316 	REGISTER_LONG_CONSTANT("AF_INET", AF_INET, CONST_PERSISTENT);
317 #if defined(HAVE_IPV6)
318 	REGISTER_LONG_CONSTANT("AF_INET6", AF_INET6, CONST_PERSISTENT);
319 #endif
320 #if defined(AF_DIVERT)
321 	REGISTER_LONG_CONSTANT("AF_DIVERT", AF_DIVERT, CONST_PERSISTENT);
322 #endif
323 	REGISTER_LONG_CONSTANT("SOCK_STREAM", SOCK_STREAM, CONST_PERSISTENT);
324 	REGISTER_LONG_CONSTANT("SOCK_DGRAM", SOCK_DGRAM, CONST_PERSISTENT);
325 	REGISTER_LONG_CONSTANT("SOCK_RAW", SOCK_RAW, CONST_PERSISTENT);
326 	REGISTER_LONG_CONSTANT("SOCK_SEQPACKET", SOCK_SEQPACKET, CONST_PERSISTENT);
327 #if defined(SOCK_RDM)
328 	REGISTER_LONG_CONSTANT("SOCK_RDM", SOCK_RDM, CONST_PERSISTENT);
329 #endif
330 #if defined(SOCK_CONN_DGRAM)
331 	REGISTER_LONG_CONSTANT("SOCK_CONN_DGRAM", SOCK_CONN_DGRAM, CONST_PERSISTENT);
332 #endif
333 #if defined(SOCK_DCCP)
334 	REGISTER_LONG_CONSTANT("SOCK_DCCP", SOCK_DCCP, CONST_PERSISTENT);
335 #endif
336 #if defined(SOCK_CLOEXEC)
337 	REGISTER_LONG_CONSTANT("SOCK_CLOEXEC", SOCK_CLOEXEC, CONST_PERSISTENT);
338 #endif
339 #if defined(SOCK_NONBLOCK)
340 	REGISTER_LONG_CONSTANT("SOCK_NONBLOCK", SOCK_NONBLOCK, CONST_PERSISTENT);
341 #endif
342 	REGISTER_LONG_CONSTANT("MSG_OOB", MSG_OOB, CONST_PERSISTENT);
343 	REGISTER_LONG_CONSTANT("MSG_WAITALL", MSG_WAITALL, CONST_PERSISTENT);
344 	REGISTER_LONG_CONSTANT("MSG_CTRUNC", MSG_CTRUNC, CONST_PERSISTENT);
345 	REGISTER_LONG_CONSTANT("MSG_TRUNC", MSG_TRUNC, CONST_PERSISTENT);
346 	REGISTER_LONG_CONSTANT("MSG_PEEK", MSG_PEEK, CONST_PERSISTENT);
347 	REGISTER_LONG_CONSTANT("MSG_DONTROUTE", MSG_DONTROUTE, CONST_PERSISTENT);
348 #if defined(MSG_EOR)
349 	REGISTER_LONG_CONSTANT("MSG_EOR", MSG_EOR, CONST_PERSISTENT);
350 #endif
351 #if defined(MSG_EOF)
352 	REGISTER_LONG_CONSTANT("MSG_EOF", MSG_EOF, CONST_PERSISTENT);
353 #endif
354 #if defined(MSG_CONFIRM)
355 	REGISTER_LONG_CONSTANT("MSG_CONFIRM", MSG_CONFIRM, CONST_PERSISTENT);
356 #endif
357 #if defined(MSG_ERRQUEUE)
358 	REGISTER_LONG_CONSTANT("MSG_ERRQUEUE", MSG_ERRQUEUE, CONST_PERSISTENT);
359 #endif
360 #if defined(MSG_NOSIGNAL)
361 	REGISTER_LONG_CONSTANT("MSG_NOSIGNAL", MSG_NOSIGNAL, CONST_PERSISTENT);
362 #endif
363 #if defined(MSG_DONTWAIT)
364 	REGISTER_LONG_CONSTANT("MSG_DONTWAIT", MSG_DONTWAIT, CONST_PERSISTENT);
365 #endif
366 #if defined(MSG_MORE)
367 	REGISTER_LONG_CONSTANT("MSG_MORE", MSG_MORE, CONST_PERSISTENT);
368 #endif
369 #if defined(MSG_WAITFORONE)
370 	REGISTER_LONG_CONSTANT("MSG_WAITFORONE", MSG_WAITFORONE, CONST_PERSISTENT);
371 #endif
372 #if defined(MSG_CMSG_CLOEXEC)
373 	REGISTER_LONG_CONSTANT("MSG_CMSG_CLOEXEC", MSG_CMSG_CLOEXEC, CONST_PERSISTENT);
374 #endif
375 #if defined(MSG_ZEROCOPY)
376 	REGISTER_LONG_CONSTANT("MSG_ZEROCOPY", MSG_ZEROCOPY, CONST_PERSISTENT);
377 #endif
378 	REGISTER_LONG_CONSTANT("SO_DEBUG", SO_DEBUG, CONST_PERSISTENT);
379 	REGISTER_LONG_CONSTANT("SO_REUSEADDR", SO_REUSEADDR, CONST_PERSISTENT);
380 #if defined(SO_REUSEPORT)
381 	REGISTER_LONG_CONSTANT("SO_REUSEPORT", SO_REUSEPORT, CONST_PERSISTENT);
382 #endif
383 #if defined(SO_REUSEPORT_LB)
384 	REGISTER_LONG_CONSTANT("SO_REUSEPORT_LB", SO_REUSEPORT_LB, CONST_PERSISTENT);
385 #endif
386 	REGISTER_LONG_CONSTANT("SO_KEEPALIVE", SO_KEEPALIVE, CONST_PERSISTENT);
387 	REGISTER_LONG_CONSTANT("SO_DONTROUTE", SO_DONTROUTE, CONST_PERSISTENT);
388 	REGISTER_LONG_CONSTANT("SO_LINGER", SO_LINGER, CONST_PERSISTENT);
389 #if defined(SO_LINGER_SEC)
390 	REGISTER_LONG_CONSTANT("SO_LINGER_SEC", SO_LINGER_SEC, CONST_PERSISTENT);
391 #endif
392 	REGISTER_LONG_CONSTANT("SO_BROADCAST", SO_BROADCAST, CONST_PERSISTENT);
393 	REGISTER_LONG_CONSTANT("SO_OOBINLINE", SO_OOBINLINE, CONST_PERSISTENT);
394 	REGISTER_LONG_CONSTANT("SO_SNDBUF", SO_SNDBUF, CONST_PERSISTENT);
395 	REGISTER_LONG_CONSTANT("SO_RCVBUF", SO_RCVBUF, CONST_PERSISTENT);
396 	REGISTER_LONG_CONSTANT("SO_SNDLOWAT", SO_SNDLOWAT, CONST_PERSISTENT);
397 	REGISTER_LONG_CONSTANT("SO_RCVLOWAT", SO_RCVLOWAT, CONST_PERSISTENT);
398 	REGISTER_LONG_CONSTANT("SO_SNDTIMEO", SO_SNDTIMEO, CONST_PERSISTENT);
399 	REGISTER_LONG_CONSTANT("SO_RCVTIMEO", SO_RCVTIMEO, CONST_PERSISTENT);
400 	REGISTER_LONG_CONSTANT("SO_TYPE", SO_TYPE, CONST_PERSISTENT);
401 #if defined(SO_FAMILY)
402 	REGISTER_LONG_CONSTANT("SO_FAMILY", SO_FAMILY, CONST_PERSISTENT);
403 #endif
404 	REGISTER_LONG_CONSTANT("SO_ERROR", SO_ERROR, CONST_PERSISTENT);
405 #if defined(SO_BINDTODEVICE)
406 	REGISTER_LONG_CONSTANT("SO_BINDTODEVICE", SO_BINDTODEVICE, CONST_PERSISTENT);
407 #endif
408 #if defined(SO_BINDTOIFINDEX)
409 	REGISTER_LONG_CONSTANT("SO_BINDTOIFINDEX", SO_BINDTOIFINDEX, CONST_PERSISTENT);
410 #endif
411 #if defined(SO_USER_COOKIE)
412 	REGISTER_LONG_CONSTANT("SO_LABEL", SO_LABEL, CONST_PERSISTENT);
413 #endif
414 #if defined(SO_USER_COOKIE)
415 	REGISTER_LONG_CONSTANT("SO_PEERLABEL", SO_PEERLABEL, CONST_PERSISTENT);
416 #endif
417 #if defined(SO_USER_COOKIE)
418 	REGISTER_LONG_CONSTANT("SO_LISTENQLIMIT", SO_LISTENQLIMIT, CONST_PERSISTENT);
419 #endif
420 #if defined(SO_USER_COOKIE)
421 	REGISTER_LONG_CONSTANT("SO_LISTENQLEN", SO_LISTENQLEN, CONST_PERSISTENT);
422 #endif
423 #if defined(SO_USER_COOKIE)
424 	REGISTER_LONG_CONSTANT("SO_USER_COOKIE", SO_USER_COOKIE, CONST_PERSISTENT);
425 #endif
426 #if defined(SO_SETFIB)
427 	REGISTER_LONG_CONSTANT("SO_SETFIB", SO_SETFIB, CONST_PERSISTENT);
428 #endif
429 #if defined(SO_ACCEPTFILTER)
430 	REGISTER_LONG_CONSTANT("SO_ACCEPTFILTER", SO_ACCEPTFILTER, CONST_PERSISTENT);
431 #endif
432 #if defined(SO_RERROR)
433 	REGISTER_LONG_CONSTANT("SO_RERROR", SO_RERROR, CONST_PERSISTENT);
434 #endif
435 #if defined(SO_SOPLICE)
436 	REGISTER_LONG_CONSTANT("SO_SPLICE", SO_SPLICE, CONST_PERSISTENT);
437 #endif
438 #if defined(SO_ZEROIZE)
439 	REGISTER_LONG_CONSTANT("SO_ZEROIZE", SO_ZEROIZE, CONST_PERSISTENT);
440 #endif
441 #if defined(SOL_FILTER)
442 	REGISTER_LONG_CONSTANT("SOL_FILTER", SOL_FILTER, CONST_PERSISTENT);
443 #endif
444 #if defined(SOL_FILTER)
445 	REGISTER_LONG_CONSTANT("FIL_ATTACH", FIL_ATTACH, CONST_PERSISTENT);
446 #endif
447 #if defined(SOL_FILTER)
448 	REGISTER_LONG_CONSTANT("FIL_DETACH", FIL_DETACH, CONST_PERSISTENT);
449 #endif
450 #if defined(SO_DONTTRUNC)
451 	REGISTER_LONG_CONSTANT("SO_DONTTRUNC", SO_DONTTRUNC, CONST_PERSISTENT);
452 #endif
453 #if defined(SO_WANTMORE)
454 	REGISTER_LONG_CONSTANT("SO_WANTMORE", SO_WANTMORE, CONST_PERSISTENT);
455 #endif
456 	REGISTER_LONG_CONSTANT("SOL_SOCKET", SOL_SOCKET, CONST_PERSISTENT);
457 	REGISTER_LONG_CONSTANT("SOMAXCONN", SOMAXCONN, CONST_PERSISTENT);
458 #if defined(SO_MARK)
459 	REGISTER_LONG_CONSTANT("SO_MARK", SO_MARK, CONST_PERSISTENT);
460 #endif
461 #if defined(SO_RTABLE)
462 	REGISTER_LONG_CONSTANT("SO_RTABLE", SO_RTABLE, CONST_PERSISTENT);
463 #endif
464 #if defined(SO_INCOMING_CPU)
465 	REGISTER_LONG_CONSTANT("SO_INCOMING_CPU", SO_INCOMING_CPU, CONST_PERSISTENT);
466 #endif
467 #if defined(SO_MEMINFO)
468 	REGISTER_LONG_CONSTANT("SO_MEMINFO", SO_MEMINFO, CONST_PERSISTENT);
469 #endif
470 #if defined(SO_BPF_EXTENSIONS)
471 	REGISTER_LONG_CONSTANT("SO_BPF_EXTENSIONS", SO_BPF_EXTENSIONS, CONST_PERSISTENT);
472 #endif
473 #if defined(SO_EXCLBIND)
474 	REGISTER_LONG_CONSTANT("SO_EXCLBIND", SO_EXCLBIND, CONST_PERSISTENT);
475 #endif
476 #if defined(SKF_AD_OFF)
477 	REGISTER_LONG_CONSTANT("SKF_AD_OFF", SKF_AD_OFF, CONST_PERSISTENT);
478 #endif
479 #if defined(SKF_AD_PROTOCOL)
480 	REGISTER_LONG_CONSTANT("SKF_AD_PROTOCOL", SKF_AD_PROTOCOL, CONST_PERSISTENT);
481 #endif
482 #if defined(SKF_AD_PKTTYPE)
483 	REGISTER_LONG_CONSTANT("SKF_AD_PKTTYPE", SKF_AD_PKTTYPE, CONST_PERSISTENT);
484 #endif
485 #if defined(SKF_AD_IFINDEX)
486 	REGISTER_LONG_CONSTANT("SKF_AD_IFINDEX", SKF_AD_IFINDEX, CONST_PERSISTENT);
487 #endif
488 #if defined(SKF_AD_NLATTR)
489 	REGISTER_LONG_CONSTANT("SKF_AD_NLATTR", SKF_AD_NLATTR, CONST_PERSISTENT);
490 #endif
491 #if defined(SKF_AD_NLATTR_NEST)
492 	REGISTER_LONG_CONSTANT("SKF_AD_NLATTR_NEST", SKF_AD_NLATTR_NEST, CONST_PERSISTENT);
493 #endif
494 #if defined(SKF_AD_MARK)
495 	REGISTER_LONG_CONSTANT("SKF_AD_MARK", SKF_AD_MARK, CONST_PERSISTENT);
496 #endif
497 #if defined(SKF_AD_QUEUE)
498 	REGISTER_LONG_CONSTANT("SKF_AD_QUEUE", SKF_AD_QUEUE, CONST_PERSISTENT);
499 #endif
500 #if defined(SKF_AD_HATYPE)
501 	REGISTER_LONG_CONSTANT("SKF_AD_HATYPE", SKF_AD_HATYPE, CONST_PERSISTENT);
502 #endif
503 #if defined(SKF_AD_RXHASH)
504 	REGISTER_LONG_CONSTANT("SKF_AD_RXHASH", SKF_AD_RXHASH, CONST_PERSISTENT);
505 #endif
506 #if defined(SKF_AD_CPU)
507 	REGISTER_LONG_CONSTANT("SKF_AD_CPU", SKF_AD_CPU, CONST_PERSISTENT);
508 #endif
509 #if defined(SKF_AD_ALU_XOR_X)
510 	REGISTER_LONG_CONSTANT("SKF_AD_ALU_XOR_X", SKF_AD_ALU_XOR_X, CONST_PERSISTENT);
511 #endif
512 #if defined(SKF_AD_VLAN_TAG)
513 	REGISTER_LONG_CONSTANT("SKF_AD_VLAN_TAG", SKF_AD_VLAN_TAG, CONST_PERSISTENT);
514 #endif
515 #if defined(SKF_AD_VLAN_TAG_PRESENT)
516 	REGISTER_LONG_CONSTANT("SKF_AD_VLAN_TAG_PRESENT", SKF_AD_VLAN_TAG_PRESENT, CONST_PERSISTENT);
517 #endif
518 #if defined(SKF_AD_PAY_OFFSET)
519 	REGISTER_LONG_CONSTANT("SKF_AD_PAY_OFFSET", SKF_AD_PAY_OFFSET, CONST_PERSISTENT);
520 #endif
521 #if defined(SKF_AD_RANDOM)
522 	REGISTER_LONG_CONSTANT("SKF_AD_RANDOM", SKF_AD_RANDOM, CONST_PERSISTENT);
523 #endif
524 #if defined(SKF_AD_VLAN_TPID)
525 	REGISTER_LONG_CONSTANT("SKF_AD_VLAN_TPID", SKF_AD_VLAN_TPID, CONST_PERSISTENT);
526 #endif
527 #if defined(SKF_AD_MAX)
528 	REGISTER_LONG_CONSTANT("SKF_AD_MAX", SKF_AD_MAX, CONST_PERSISTENT);
529 #endif
530 #if defined(TCP_CONGESTION)
531 	REGISTER_LONG_CONSTANT("TCP_CONGESTION", TCP_CONGESTION, CONST_PERSISTENT);
532 #endif
533 #if defined(TCP_SYNCNT)
534 	REGISTER_LONG_CONSTANT("TCP_SYNCNT", TCP_SYNCNT, CONST_PERSISTENT);
535 #endif
536 #if defined(SO_ZEROCOPY)
537 	REGISTER_LONG_CONSTANT("SO_ZEROCOPY", SO_ZEROCOPY, CONST_PERSISTENT);
538 #endif
539 #if defined(TCP_NODELAY)
540 	REGISTER_LONG_CONSTANT("TCP_NODELAY", TCP_NODELAY, CONST_PERSISTENT);
541 #endif
542 #if defined(TCP_NOTSENT_LOWAT)
543 	REGISTER_LONG_CONSTANT("TCP_NOTSENT_LOWAT", TCP_NOTSENT_LOWAT, CONST_PERSISTENT);
544 #endif
545 #if defined(TCP_DEFER_ACCEPT)
546 	REGISTER_LONG_CONSTANT("TCP_DEFER_ACCEPT", TCP_DEFER_ACCEPT, CONST_PERSISTENT);
547 #endif
548 #if defined(TCP_KEEPALIVE)
549 	REGISTER_LONG_CONSTANT("TCP_KEEPALIVE", TCP_KEEPALIVE, CONST_PERSISTENT);
550 #endif
551 #if defined(TCP_KEEPIDLE)
552 	REGISTER_LONG_CONSTANT("TCP_KEEPIDLE", TCP_KEEPIDLE, CONST_PERSISTENT);
553 #endif
554 #if defined(TCP_KEEPIDLE)
555 	REGISTER_LONG_CONSTANT("TCP_KEEPINTVL", TCP_KEEPINTVL, CONST_PERSISTENT);
556 #endif
557 #if defined(TCP_KEEPIDLE)
558 	REGISTER_LONG_CONSTANT("TCP_KEEPCNT", TCP_KEEPCNT, CONST_PERSISTENT);
559 #endif
560 	REGISTER_LONG_CONSTANT("PHP_NORMAL_READ", PHP_NORMAL_READ, CONST_PERSISTENT);
561 	REGISTER_LONG_CONSTANT("PHP_BINARY_READ", PHP_BINARY_READ, CONST_PERSISTENT);
562 	REGISTER_LONG_CONSTANT("MCAST_JOIN_GROUP", PHP_MCAST_JOIN_GROUP, CONST_PERSISTENT);
563 	REGISTER_LONG_CONSTANT("MCAST_LEAVE_GROUP", PHP_MCAST_LEAVE_GROUP, CONST_PERSISTENT);
564 #if defined(HAS_MCAST_EXT)
565 	REGISTER_LONG_CONSTANT("MCAST_BLOCK_SOURCE", PHP_MCAST_BLOCK_SOURCE, CONST_PERSISTENT);
566 #endif
567 #if defined(HAS_MCAST_EXT)
568 	REGISTER_LONG_CONSTANT("MCAST_UNBLOCK_SOURCE", PHP_MCAST_UNBLOCK_SOURCE, CONST_PERSISTENT);
569 #endif
570 #if defined(HAS_MCAST_EXT)
571 	REGISTER_LONG_CONSTANT("MCAST_JOIN_SOURCE_GROUP", PHP_MCAST_JOIN_SOURCE_GROUP, CONST_PERSISTENT);
572 #endif
573 #if defined(HAS_MCAST_EXT)
574 	REGISTER_LONG_CONSTANT("MCAST_LEAVE_SOURCE_GROUP", PHP_MCAST_LEAVE_SOURCE_GROUP, CONST_PERSISTENT);
575 #endif
576 	REGISTER_LONG_CONSTANT("IP_MULTICAST_IF", IP_MULTICAST_IF, CONST_PERSISTENT);
577 	REGISTER_LONG_CONSTANT("IP_MULTICAST_TTL", IP_MULTICAST_TTL, CONST_PERSISTENT);
578 	REGISTER_LONG_CONSTANT("IP_MULTICAST_LOOP", IP_MULTICAST_LOOP, CONST_PERSISTENT);
579 #if defined(IP_BIND_ADDRESS_NO_PORT)
580 	REGISTER_LONG_CONSTANT("IP_BIND_ADDRESS_NO_PORT", IP_BIND_ADDRESS_NO_PORT, CONST_PERSISTENT);
581 #endif
582 #if defined(HAVE_IPV6)
583 	REGISTER_LONG_CONSTANT("IPV6_MULTICAST_IF", IPV6_MULTICAST_IF, CONST_PERSISTENT);
584 #endif
585 #if defined(HAVE_IPV6)
586 	REGISTER_LONG_CONSTANT("IPV6_MULTICAST_HOPS", IPV6_MULTICAST_HOPS, CONST_PERSISTENT);
587 #endif
588 #if defined(HAVE_IPV6)
589 	REGISTER_LONG_CONSTANT("IPV6_MULTICAST_LOOP", IPV6_MULTICAST_LOOP, CONST_PERSISTENT);
590 #endif
591 #if defined(IPV6_V6ONLY)
592 	REGISTER_LONG_CONSTANT("IPV6_V6ONLY", IPV6_V6ONLY, CONST_PERSISTENT);
593 #endif
594 #if defined(IP_PORTRANGE)
595 	REGISTER_LONG_CONSTANT("IP_PORTRANGE", IP_PORTRANGE, CONST_PERSISTENT);
596 #endif
597 #if defined(IP_PORTRANGE)
598 	REGISTER_LONG_CONSTANT("IP_PORTRANGE_DEFAULT", IP_PORTRANGE_DEFAULT, CONST_PERSISTENT);
599 #endif
600 #if defined(IP_PORTRANGE)
601 	REGISTER_LONG_CONSTANT("IP_PORTRANGE_HIGH", IP_PORTRANGE_HIGH, CONST_PERSISTENT);
602 #endif
603 #if defined(IP_PORTRANGE)
604 	REGISTER_LONG_CONSTANT("IP_PORTRANGE_LOW", IP_PORTRANGE_LOW, CONST_PERSISTENT);
605 #endif
606 #if defined(EPERM)
607 	REGISTER_LONG_CONSTANT("SOCKET_EPERM", EPERM, CONST_PERSISTENT);
608 #endif
609 #if defined(ENOENT)
610 	REGISTER_LONG_CONSTANT("SOCKET_ENOENT", ENOENT, CONST_PERSISTENT);
611 #endif
612 #if defined(PHP_SOCKET_EINTR)
613 	REGISTER_LONG_CONSTANT("SOCKET_EINTR", PHP_SOCKET_EINTR, CONST_PERSISTENT);
614 #endif
615 #if defined(EIO)
616 	REGISTER_LONG_CONSTANT("SOCKET_EIO", EIO, CONST_PERSISTENT);
617 #endif
618 #if defined(ENXIO)
619 	REGISTER_LONG_CONSTANT("SOCKET_ENXIO", ENXIO, CONST_PERSISTENT);
620 #endif
621 #if defined(E2BIG)
622 	REGISTER_LONG_CONSTANT("SOCKET_E2BIG", E2BIG, CONST_PERSISTENT);
623 #endif
624 #if defined(PHP_SOCKET_EBADF)
625 	REGISTER_LONG_CONSTANT("SOCKET_EBADF", PHP_SOCKET_EBADF, CONST_PERSISTENT);
626 #endif
627 #if defined(EAGAIN)
628 	REGISTER_LONG_CONSTANT("SOCKET_EAGAIN", EAGAIN, CONST_PERSISTENT);
629 #endif
630 #if defined(ENOMEM)
631 	REGISTER_LONG_CONSTANT("SOCKET_ENOMEM", ENOMEM, CONST_PERSISTENT);
632 #endif
633 #if defined(PHP_SOCKET_EACCES)
634 	REGISTER_LONG_CONSTANT("SOCKET_EACCES", PHP_SOCKET_EACCES, CONST_PERSISTENT);
635 #endif
636 #if defined(PHP_SOCKET_EFAULT)
637 	REGISTER_LONG_CONSTANT("SOCKET_EFAULT", PHP_SOCKET_EFAULT, CONST_PERSISTENT);
638 #endif
639 #if defined(ENOTBLK)
640 	REGISTER_LONG_CONSTANT("SOCKET_ENOTBLK", ENOTBLK, CONST_PERSISTENT);
641 #endif
642 #if defined(EBUSY)
643 	REGISTER_LONG_CONSTANT("SOCKET_EBUSY", EBUSY, CONST_PERSISTENT);
644 #endif
645 #if defined(EEXIST)
646 	REGISTER_LONG_CONSTANT("SOCKET_EEXIST", EEXIST, CONST_PERSISTENT);
647 #endif
648 #if defined(EXDEV)
649 	REGISTER_LONG_CONSTANT("SOCKET_EXDEV", EXDEV, CONST_PERSISTENT);
650 #endif
651 #if defined(ENODEV)
652 	REGISTER_LONG_CONSTANT("SOCKET_ENODEV", ENODEV, CONST_PERSISTENT);
653 #endif
654 #if defined(ENOTDIR)
655 	REGISTER_LONG_CONSTANT("SOCKET_ENOTDIR", ENOTDIR, CONST_PERSISTENT);
656 #endif
657 #if defined(EISDIR)
658 	REGISTER_LONG_CONSTANT("SOCKET_EISDIR", EISDIR, CONST_PERSISTENT);
659 #endif
660 #if defined(PHP_SOCKET_EINVAL)
661 	REGISTER_LONG_CONSTANT("SOCKET_EINVAL", PHP_SOCKET_EINVAL, CONST_PERSISTENT);
662 #endif
663 #if defined(PHP_SOCKET_ENFILE)
664 	REGISTER_LONG_CONSTANT("SOCKET_ENFILE", PHP_SOCKET_ENFILE, CONST_PERSISTENT);
665 #endif
666 #if defined(PHP_SOCKET_EMFILE)
667 	REGISTER_LONG_CONSTANT("SOCKET_EMFILE", PHP_SOCKET_EMFILE, CONST_PERSISTENT);
668 #endif
669 #if defined(ENOTTY)
670 	REGISTER_LONG_CONSTANT("SOCKET_ENOTTY", ENOTTY, CONST_PERSISTENT);
671 #endif
672 #if defined(ENOSPC)
673 	REGISTER_LONG_CONSTANT("SOCKET_ENOSPC", ENOSPC, CONST_PERSISTENT);
674 #endif
675 #if defined(ESPIPE)
676 	REGISTER_LONG_CONSTANT("SOCKET_ESPIPE", ESPIPE, CONST_PERSISTENT);
677 #endif
678 #if defined(EROFS)
679 	REGISTER_LONG_CONSTANT("SOCKET_EROFS", EROFS, CONST_PERSISTENT);
680 #endif
681 #if defined(EMLINK)
682 	REGISTER_LONG_CONSTANT("SOCKET_EMLINK", EMLINK, CONST_PERSISTENT);
683 #endif
684 #if defined(EPIPE)
685 	REGISTER_LONG_CONSTANT("SOCKET_EPIPE", EPIPE, CONST_PERSISTENT);
686 #endif
687 #if defined(PHP_SOCKET_ENAMETOOLONG)
688 	REGISTER_LONG_CONSTANT("SOCKET_ENAMETOOLONG", PHP_SOCKET_ENAMETOOLONG, CONST_PERSISTENT);
689 #endif
690 #if defined(ENOLCK)
691 	REGISTER_LONG_CONSTANT("SOCKET_ENOLCK", ENOLCK, CONST_PERSISTENT);
692 #endif
693 #if defined(ENOSYS)
694 	REGISTER_LONG_CONSTANT("SOCKET_ENOSYS", ENOSYS, CONST_PERSISTENT);
695 #endif
696 #if defined(PHP_SOCKET_ENOTEMPTY)
697 	REGISTER_LONG_CONSTANT("SOCKET_ENOTEMPTY", PHP_SOCKET_ENOTEMPTY, CONST_PERSISTENT);
698 #endif
699 #if defined(PHP_SOCKET_ELOOP)
700 	REGISTER_LONG_CONSTANT("SOCKET_ELOOP", PHP_SOCKET_ELOOP, CONST_PERSISTENT);
701 #endif
702 #if defined(PHP_SOCKET_EWOULDBLOCK)
703 	REGISTER_LONG_CONSTANT("SOCKET_EWOULDBLOCK", PHP_SOCKET_EWOULDBLOCK, CONST_PERSISTENT);
704 #endif
705 #if defined(ENOMSG)
706 	REGISTER_LONG_CONSTANT("SOCKET_ENOMSG", ENOMSG, CONST_PERSISTENT);
707 #endif
708 #if defined(EIDRM)
709 	REGISTER_LONG_CONSTANT("SOCKET_EIDRM", EIDRM, CONST_PERSISTENT);
710 #endif
711 #if defined(ECHRNG)
712 	REGISTER_LONG_CONSTANT("SOCKET_ECHRNG", ECHRNG, CONST_PERSISTENT);
713 #endif
714 #if defined(EL2NSYNC)
715 	REGISTER_LONG_CONSTANT("SOCKET_EL2NSYNC", EL2NSYNC, CONST_PERSISTENT);
716 #endif
717 #if defined(EL3HLT)
718 	REGISTER_LONG_CONSTANT("SOCKET_EL3HLT", EL3HLT, CONST_PERSISTENT);
719 #endif
720 #if defined(EL3RST)
721 	REGISTER_LONG_CONSTANT("SOCKET_EL3RST", EL3RST, CONST_PERSISTENT);
722 #endif
723 #if defined(ELNRNG)
724 	REGISTER_LONG_CONSTANT("SOCKET_ELNRNG", ELNRNG, CONST_PERSISTENT);
725 #endif
726 #if defined(EUNATCH)
727 	REGISTER_LONG_CONSTANT("SOCKET_EUNATCH", EUNATCH, CONST_PERSISTENT);
728 #endif
729 #if defined(ENOCSI)
730 	REGISTER_LONG_CONSTANT("SOCKET_ENOCSI", ENOCSI, CONST_PERSISTENT);
731 #endif
732 #if defined(EL2HLT)
733 	REGISTER_LONG_CONSTANT("SOCKET_EL2HLT", EL2HLT, CONST_PERSISTENT);
734 #endif
735 #if defined(EBADE)
736 	REGISTER_LONG_CONSTANT("SOCKET_EBADE", EBADE, CONST_PERSISTENT);
737 #endif
738 #if defined(EBADR)
739 	REGISTER_LONG_CONSTANT("SOCKET_EBADR", EBADR, CONST_PERSISTENT);
740 #endif
741 #if defined(EXFULL)
742 	REGISTER_LONG_CONSTANT("SOCKET_EXFULL", EXFULL, CONST_PERSISTENT);
743 #endif
744 #if defined(ENOANO)
745 	REGISTER_LONG_CONSTANT("SOCKET_ENOANO", ENOANO, CONST_PERSISTENT);
746 #endif
747 #if defined(EBADRQC)
748 	REGISTER_LONG_CONSTANT("SOCKET_EBADRQC", EBADRQC, CONST_PERSISTENT);
749 #endif
750 #if defined(EBADSLT)
751 	REGISTER_LONG_CONSTANT("SOCKET_EBADSLT", EBADSLT, CONST_PERSISTENT);
752 #endif
753 #if defined(ENOSTR)
754 	REGISTER_LONG_CONSTANT("SOCKET_ENOSTR", ENOSTR, CONST_PERSISTENT);
755 #endif
756 #if defined(ENODATA)
757 	REGISTER_LONG_CONSTANT("SOCKET_ENODATA", ENODATA, CONST_PERSISTENT);
758 #endif
759 #if defined(ETIME)
760 	REGISTER_LONG_CONSTANT("SOCKET_ETIME", ETIME, CONST_PERSISTENT);
761 #endif
762 #if defined(ENOSR)
763 	REGISTER_LONG_CONSTANT("SOCKET_ENOSR", ENOSR, CONST_PERSISTENT);
764 #endif
765 #if defined(ENONET)
766 	REGISTER_LONG_CONSTANT("SOCKET_ENONET", ENONET, CONST_PERSISTENT);
767 #endif
768 #if defined(PHP_SOCKET_EREMOTE)
769 	REGISTER_LONG_CONSTANT("SOCKET_EREMOTE", PHP_SOCKET_EREMOTE, CONST_PERSISTENT);
770 #endif
771 #if defined(ENOLINK)
772 	REGISTER_LONG_CONSTANT("SOCKET_ENOLINK", ENOLINK, CONST_PERSISTENT);
773 #endif
774 #if defined(EADV)
775 	REGISTER_LONG_CONSTANT("SOCKET_EADV", EADV, CONST_PERSISTENT);
776 #endif
777 #if defined(ESRMNT)
778 	REGISTER_LONG_CONSTANT("SOCKET_ESRMNT", ESRMNT, CONST_PERSISTENT);
779 #endif
780 #if defined(ECOMM)
781 	REGISTER_LONG_CONSTANT("SOCKET_ECOMM", ECOMM, CONST_PERSISTENT);
782 #endif
783 #if defined(EPROTO)
784 	REGISTER_LONG_CONSTANT("SOCKET_EPROTO", EPROTO, CONST_PERSISTENT);
785 #endif
786 #if defined(EMULTIHOP)
787 	REGISTER_LONG_CONSTANT("SOCKET_EMULTIHOP", EMULTIHOP, CONST_PERSISTENT);
788 #endif
789 #if defined(EBADMSG)
790 	REGISTER_LONG_CONSTANT("SOCKET_EBADMSG", EBADMSG, CONST_PERSISTENT);
791 #endif
792 #if defined(ENOTUNIQ)
793 	REGISTER_LONG_CONSTANT("SOCKET_ENOTUNIQ", ENOTUNIQ, CONST_PERSISTENT);
794 #endif
795 #if defined(EBADFD)
796 	REGISTER_LONG_CONSTANT("SOCKET_EBADFD", EBADFD, CONST_PERSISTENT);
797 #endif
798 #if defined(EREMCHG)
799 	REGISTER_LONG_CONSTANT("SOCKET_EREMCHG", EREMCHG, CONST_PERSISTENT);
800 #endif
801 #if defined(ERESTART)
802 	REGISTER_LONG_CONSTANT("SOCKET_ERESTART", ERESTART, CONST_PERSISTENT);
803 #endif
804 #if defined(ESTRPIPE)
805 	REGISTER_LONG_CONSTANT("SOCKET_ESTRPIPE", ESTRPIPE, CONST_PERSISTENT);
806 #endif
807 #if defined(PHP_SOCKET_EUSERS)
808 	REGISTER_LONG_CONSTANT("SOCKET_EUSERS", PHP_SOCKET_EUSERS, CONST_PERSISTENT);
809 #endif
810 #if defined(PHP_SOCKET_ENOTSOCK)
811 	REGISTER_LONG_CONSTANT("SOCKET_ENOTSOCK", PHP_SOCKET_ENOTSOCK, CONST_PERSISTENT);
812 #endif
813 #if defined(PHP_SOCKET_EDESTADDRREQ)
814 	REGISTER_LONG_CONSTANT("SOCKET_EDESTADDRREQ", PHP_SOCKET_EDESTADDRREQ, CONST_PERSISTENT);
815 #endif
816 #if defined(PHP_SOCKET_EMSGSIZE)
817 	REGISTER_LONG_CONSTANT("SOCKET_EMSGSIZE", PHP_SOCKET_EMSGSIZE, CONST_PERSISTENT);
818 #endif
819 #if defined(PHP_SOCKET_EPROTOTYPE)
820 	REGISTER_LONG_CONSTANT("SOCKET_EPROTOTYPE", PHP_SOCKET_EPROTOTYPE, CONST_PERSISTENT);
821 #endif
822 #if defined(PHP_SOCKET_ENOPROTOOPT)
823 	REGISTER_LONG_CONSTANT("SOCKET_ENOPROTOOPT", PHP_SOCKET_ENOPROTOOPT, CONST_PERSISTENT);
824 #endif
825 #if defined(PHP_SOCKET_EPROTONOSUPPORT)
826 	REGISTER_LONG_CONSTANT("SOCKET_EPROTONOSUPPORT", PHP_SOCKET_EPROTONOSUPPORT, CONST_PERSISTENT);
827 #endif
828 #if defined(PHP_SOCKET_ESOCKTNOSUPPORT)
829 	REGISTER_LONG_CONSTANT("SOCKET_ESOCKTNOSUPPORT", PHP_SOCKET_ESOCKTNOSUPPORT, CONST_PERSISTENT);
830 #endif
831 #if defined(PHP_SOCKET_EOPNOTSUPP)
832 	REGISTER_LONG_CONSTANT("SOCKET_EOPNOTSUPP", PHP_SOCKET_EOPNOTSUPP, CONST_PERSISTENT);
833 #endif
834 #if defined(PHP_SOCKET_EPFNOSUPPORT)
835 	REGISTER_LONG_CONSTANT("SOCKET_EPFNOSUPPORT", PHP_SOCKET_EPFNOSUPPORT, CONST_PERSISTENT);
836 #endif
837 #if defined(PHP_SOCKET_EAFNOSUPPORT)
838 	REGISTER_LONG_CONSTANT("SOCKET_EAFNOSUPPORT", PHP_SOCKET_EAFNOSUPPORT, CONST_PERSISTENT);
839 #endif
840 #if defined(PHP_SOCKET_EADDRINUSE)
841 	REGISTER_LONG_CONSTANT("SOCKET_EADDRINUSE", PHP_SOCKET_EADDRINUSE, CONST_PERSISTENT);
842 #endif
843 #if defined(PHP_SOCKET_EADDRNOTAVAIL)
844 	REGISTER_LONG_CONSTANT("SOCKET_EADDRNOTAVAIL", PHP_SOCKET_EADDRNOTAVAIL, CONST_PERSISTENT);
845 #endif
846 #if defined(PHP_SOCKET_ENETDOWN)
847 	REGISTER_LONG_CONSTANT("SOCKET_ENETDOWN", PHP_SOCKET_ENETDOWN, CONST_PERSISTENT);
848 #endif
849 #if defined(PHP_SOCKET_ENETUNREACH)
850 	REGISTER_LONG_CONSTANT("SOCKET_ENETUNREACH", PHP_SOCKET_ENETUNREACH, CONST_PERSISTENT);
851 #endif
852 #if defined(PHP_SOCKET_ENETRESET)
853 	REGISTER_LONG_CONSTANT("SOCKET_ENETRESET", PHP_SOCKET_ENETRESET, CONST_PERSISTENT);
854 #endif
855 #if defined(PHP_SOCKET_ECONNABORTED)
856 	REGISTER_LONG_CONSTANT("SOCKET_ECONNABORTED", PHP_SOCKET_ECONNABORTED, CONST_PERSISTENT);
857 #endif
858 #if defined(PHP_SOCKET_ECONNRESET)
859 	REGISTER_LONG_CONSTANT("SOCKET_ECONNRESET", PHP_SOCKET_ECONNRESET, CONST_PERSISTENT);
860 #endif
861 #if defined(PHP_SOCKET_ENOBUFS)
862 	REGISTER_LONG_CONSTANT("SOCKET_ENOBUFS", PHP_SOCKET_ENOBUFS, CONST_PERSISTENT);
863 #endif
864 #if defined(PHP_SOCKET_EISCONN)
865 	REGISTER_LONG_CONSTANT("SOCKET_EISCONN", PHP_SOCKET_EISCONN, CONST_PERSISTENT);
866 #endif
867 #if defined(PHP_SOCKET_ENOTCONN)
868 	REGISTER_LONG_CONSTANT("SOCKET_ENOTCONN", PHP_SOCKET_ENOTCONN, CONST_PERSISTENT);
869 #endif
870 #if defined(PHP_SOCKET_ESHUTDOWN)
871 	REGISTER_LONG_CONSTANT("SOCKET_ESHUTDOWN", PHP_SOCKET_ESHUTDOWN, CONST_PERSISTENT);
872 #endif
873 #if defined(PHP_SOCKET_ETOOMANYREFS)
874 	REGISTER_LONG_CONSTANT("SOCKET_ETOOMANYREFS", PHP_SOCKET_ETOOMANYREFS, CONST_PERSISTENT);
875 #endif
876 #if defined(PHP_SOCKET_ETIMEDOUT)
877 	REGISTER_LONG_CONSTANT("SOCKET_ETIMEDOUT", PHP_SOCKET_ETIMEDOUT, CONST_PERSISTENT);
878 #endif
879 #if defined(PHP_SOCKET_ECONNREFUSED)
880 	REGISTER_LONG_CONSTANT("SOCKET_ECONNREFUSED", PHP_SOCKET_ECONNREFUSED, CONST_PERSISTENT);
881 #endif
882 #if defined(PHP_SOCKET_EHOSTDOWN)
883 	REGISTER_LONG_CONSTANT("SOCKET_EHOSTDOWN", PHP_SOCKET_EHOSTDOWN, CONST_PERSISTENT);
884 #endif
885 #if defined(PHP_SOCKET_EHOSTUNREACH)
886 	REGISTER_LONG_CONSTANT("SOCKET_EHOSTUNREACH", PHP_SOCKET_EHOSTUNREACH, CONST_PERSISTENT);
887 #endif
888 #if defined(PHP_SOCKET_EALREADY)
889 	REGISTER_LONG_CONSTANT("SOCKET_EALREADY", PHP_SOCKET_EALREADY, CONST_PERSISTENT);
890 #endif
891 #if defined(PHP_SOCKET_EINPROGRESS)
892 	REGISTER_LONG_CONSTANT("SOCKET_EINPROGRESS", PHP_SOCKET_EINPROGRESS, CONST_PERSISTENT);
893 #endif
894 #if defined(EISNAM)
895 	REGISTER_LONG_CONSTANT("SOCKET_EISNAM", EISNAM, CONST_PERSISTENT);
896 #endif
897 #if defined(EREMOTEIO)
898 	REGISTER_LONG_CONSTANT("SOCKET_EREMOTEIO", EREMOTEIO, CONST_PERSISTENT);
899 #endif
900 #if defined(PHP_SOCKET_EDQUOT)
901 	REGISTER_LONG_CONSTANT("SOCKET_EDQUOT", PHP_SOCKET_EDQUOT, CONST_PERSISTENT);
902 #endif
903 #if defined(ENOMEDIUM)
904 	REGISTER_LONG_CONSTANT("SOCKET_ENOMEDIUM", ENOMEDIUM, CONST_PERSISTENT);
905 #endif
906 #if defined(EMEDIUMTYPE)
907 	REGISTER_LONG_CONSTANT("SOCKET_EMEDIUMTYPE", EMEDIUMTYPE, CONST_PERSISTENT);
908 #endif
909 #if defined(PHP_WIN32)
910 	REGISTER_LONG_CONSTANT("SOCKET_ESTALE", WSAESTALE, CONST_PERSISTENT);
911 #endif
912 #if defined(PHP_WIN32)
913 	REGISTER_LONG_CONSTANT("SOCKET_EDISCON", WSAEDISCON, CONST_PERSISTENT);
914 #endif
915 #if defined(PHP_WIN32)
916 	REGISTER_LONG_CONSTANT("SOCKET_SYSNOTREADY", WSASYSNOTREADY, CONST_PERSISTENT);
917 #endif
918 #if defined(PHP_WIN32)
919 	REGISTER_LONG_CONSTANT("SOCKET_VERNOTSUPPORTED", WSAVERNOTSUPPORTED, CONST_PERSISTENT);
920 #endif
921 #if defined(PHP_WIN32)
922 	REGISTER_LONG_CONSTANT("SOCKET_NOTINITIALISED", WSANOTINITIALISED, CONST_PERSISTENT);
923 #endif
924 #if defined(PHP_WIN32)
925 	REGISTER_LONG_CONSTANT("SOCKET_HOST_NOT_FOUND", WSAHOST_NOT_FOUND, CONST_PERSISTENT);
926 #endif
927 #if defined(PHP_WIN32)
928 	REGISTER_LONG_CONSTANT("SOCKET_TRY_AGAIN", WSATRY_AGAIN, CONST_PERSISTENT);
929 #endif
930 #if defined(PHP_WIN32)
931 	REGISTER_LONG_CONSTANT("SOCKET_NO_RECOVERY", WSANO_RECOVERY, CONST_PERSISTENT);
932 #endif
933 #if defined(PHP_WIN32)
934 	REGISTER_LONG_CONSTANT("SOCKET_NO_DATA", WSANO_DATA, CONST_PERSISTENT);
935 #endif
936 #if defined(PHP_WIN32)
937 	REGISTER_LONG_CONSTANT("SOCKET_NO_ADDRESS", WSANO_ADDRESS, CONST_PERSISTENT);
938 #endif
939 	REGISTER_LONG_CONSTANT("IPPROTO_IP", IPPROTO_IP, CONST_PERSISTENT);
940 #if defined(HAVE_IPV6)
941 	REGISTER_LONG_CONSTANT("IPPROTO_IPV6", IPPROTO_IPV6, CONST_PERSISTENT);
942 #endif
943 	REGISTER_LONG_CONSTANT("SOL_TCP", IPPROTO_TCP, CONST_PERSISTENT);
944 	REGISTER_LONG_CONSTANT("SOL_UDP", IPPROTO_UDP, CONST_PERSISTENT);
945 #if defined(IPPROTO_UDPLITE)
946 	REGISTER_LONG_CONSTANT("SOL_UDPLITE", IPPROTO_UDPLITE, CONST_PERSISTENT);
947 #endif
948 #if defined(IPPROTO_ICMP) || defined(PHP_WIN32)
949 	REGISTER_LONG_CONSTANT("IPPROTO_ICMP", IPPROTO_ICMP, CONST_PERSISTENT);
950 #endif
951 #if defined(IPPROTO_ICMPV6) || defined(PHP_WIN32)
952 	REGISTER_LONG_CONSTANT("IPPROTO_ICMPV6", IPPROTO_ICMPV6, CONST_PERSISTENT);
953 #endif
954 #if defined(HAVE_IPV6)
955 	REGISTER_LONG_CONSTANT("IPV6_UNICAST_HOPS", IPV6_UNICAST_HOPS, CONST_PERSISTENT);
956 #endif
957 	REGISTER_LONG_CONSTANT("AI_PASSIVE", AI_PASSIVE, CONST_PERSISTENT);
958 	REGISTER_LONG_CONSTANT("AI_CANONNAME", AI_CANONNAME, CONST_PERSISTENT);
959 	REGISTER_LONG_CONSTANT("AI_NUMERICHOST", AI_NUMERICHOST, CONST_PERSISTENT);
960 #if defined(AI_V4MAPPED)
961 	REGISTER_LONG_CONSTANT("AI_V4MAPPED", AI_V4MAPPED, CONST_PERSISTENT);
962 #endif
963 #if defined(AI_ALL)
964 	REGISTER_LONG_CONSTANT("AI_ALL", AI_ALL, CONST_PERSISTENT);
965 #endif
966 	REGISTER_LONG_CONSTANT("AI_ADDRCONFIG", AI_ADDRCONFIG, CONST_PERSISTENT);
967 #if defined(AI_IDN)
968 	REGISTER_LONG_CONSTANT("AI_IDN", AI_IDN, CONST_PERSISTENT);
969 #endif
970 #if defined(AI_IDN)
971 	REGISTER_LONG_CONSTANT("AI_CANONIDN", AI_CANONIDN, CONST_PERSISTENT);
972 #endif
973 #if defined(AI_NUMERICSERV)
974 	REGISTER_LONG_CONSTANT("AI_NUMERICSERV", AI_NUMERICSERV, CONST_PERSISTENT);
975 #endif
976 #if defined(SOL_LOCAL)
977 	REGISTER_LONG_CONSTANT("SOL_LOCAL", SOL_LOCAL, CONST_PERSISTENT);
978 #endif
979 #if (defined(IPV6_RECVPKTINFO) && defined(HAVE_IPV6))
980 	REGISTER_LONG_CONSTANT("IPV6_RECVPKTINFO", IPV6_RECVPKTINFO, CONST_PERSISTENT);
981 #endif
982 #if (defined(IPV6_RECVPKTINFO) && defined(HAVE_IPV6))
983 	REGISTER_LONG_CONSTANT("IPV6_PKTINFO", IPV6_PKTINFO, CONST_PERSISTENT);
984 #endif
985 #if (defined(IPV6_RECVHOPLIMIT) && defined(HAVE_IPV6))
986 	REGISTER_LONG_CONSTANT("IPV6_RECVHOPLIMIT", IPV6_RECVHOPLIMIT, CONST_PERSISTENT);
987 #endif
988 #if (defined(IPV6_RECVHOPLIMIT) && defined(HAVE_IPV6))
989 	REGISTER_LONG_CONSTANT("IPV6_HOPLIMIT", IPV6_HOPLIMIT, CONST_PERSISTENT);
990 #endif
991 #if (defined(IPV6_RECVTCLASS) && defined(HAVE_IPV6))
992 	REGISTER_LONG_CONSTANT("IPV6_RECVTCLASS", IPV6_RECVTCLASS, CONST_PERSISTENT);
993 #endif
994 #if (defined(IPV6_RECVTCLASS) && defined(HAVE_IPV6))
995 	REGISTER_LONG_CONSTANT("IPV6_TCLASS", IPV6_TCLASS, CONST_PERSISTENT);
996 #endif
997 #if defined(SCM_RIGHTS)
998 	REGISTER_LONG_CONSTANT("SCM_RIGHTS", SCM_RIGHTS, CONST_PERSISTENT);
999 #endif
1000 #if defined(SO_PASSCRED) && defined(SCM_CREDENTIALS)
1001 	REGISTER_LONG_CONSTANT("SCM_CREDENTIALS", SCM_CREDENTIALS, CONST_PERSISTENT);
1002 #endif
1003 #if defined(SO_PASSCRED) && !(defined(SCM_CREDENTIALS))
1004 	REGISTER_LONG_CONSTANT("SCM_CREDS", SCM_CREDS, CONST_PERSISTENT);
1005 #endif
1006 #if defined(SO_PASSCRED)
1007 	REGISTER_LONG_CONSTANT("SO_PASSCRED", SO_PASSCRED, CONST_PERSISTENT);
1008 #endif
1009 #if defined(LOCAL_CREDS_PERSISTENT)
1010 	REGISTER_LONG_CONSTANT("SCM_CREDS2", SCM_CREDS2, CONST_PERSISTENT);
1011 #endif
1012 #if defined(LOCAL_CREDS_PERSISTENT)
1013 	REGISTER_LONG_CONSTANT("LOCAL_CREDS_PERSISTENT", LOCAL_CREDS_PERSISTENT, CONST_PERSISTENT);
1014 #endif
1015 #if (!defined(LOCAL_CREDS_PERSISTENT) && defined(LOCAL_CREDS))
1016 	REGISTER_LONG_CONSTANT("SCM_CREDS", SCM_CREDS, CONST_PERSISTENT);
1017 #endif
1018 #if (!defined(LOCAL_CREDS_PERSISTENT) && defined(LOCAL_CREDS))
1019 	REGISTER_LONG_CONSTANT("LOCAL_CREDS", LOCAL_CREDS, CONST_PERSISTENT);
1020 #endif
1021 #if defined(SO_ATTACH_REUSEPORT_CBPF)
1022 	REGISTER_LONG_CONSTANT("SO_ATTACH_REUSEPORT_CBPF", SO_ATTACH_REUSEPORT_CBPF, CONST_PERSISTENT);
1023 #endif
1024 #if defined(SO_DETACH_FILTER)
1025 	REGISTER_LONG_CONSTANT("SO_DETACH_FILTER", SO_DETACH_FILTER, CONST_PERSISTENT);
1026 #endif
1027 #if defined(SO_DETACH_BPF)
1028 	REGISTER_LONG_CONSTANT("SO_DETACH_BPF", SO_DETACH_BPF, CONST_PERSISTENT);
1029 #endif
1030 #if defined(SO_EXCLUSIVEADDRUSE)
1031 	REGISTER_LONG_CONSTANT("SO_EXCLUSIVEADDRUSE", SO_EXCLUSIVEADDRUSE, CONST_PERSISTENT);
1032 #endif
1033 #if defined(SO_NOSIGPIPE)
1034 	REGISTER_LONG_CONSTANT("SO_NOSIGPIPE", SO_NOSIGPIPE, CONST_PERSISTENT);
1035 #endif
1036 #if defined(TCP_QUICKACK)
1037 	REGISTER_LONG_CONSTANT("TCP_QUICKACK", TCP_QUICKACK, CONST_PERSISTENT);
1038 #endif
1039 #if defined(TCP_REPAIR)
1040 	REGISTER_LONG_CONSTANT("TCP_REPAIR", TCP_REPAIR, CONST_PERSISTENT);
1041 #endif
1042 #if defined(IP_DONTFRAG)
1043 	REGISTER_LONG_CONSTANT("IP_DONTFRAG", IP_DONTFRAG, CONST_PERSISTENT);
1044 #endif
1045 #if defined(IP_MTU_DISCOVER)
1046 	REGISTER_LONG_CONSTANT("IP_MTU_DISCOVER", IP_MTU_DISCOVER, CONST_PERSISTENT);
1047 #endif
1048 #if defined(IP_PMTUDISC_DO)
1049 	REGISTER_LONG_CONSTANT("IP_PMTUDISC_DO", IP_PMTUDISC_DO, CONST_PERSISTENT);
1050 #endif
1051 #if defined(IP_PMTUDISC_DONT)
1052 	REGISTER_LONG_CONSTANT("IP_PMTUDISC_DONT", IP_PMTUDISC_DONT, CONST_PERSISTENT);
1053 #endif
1054 #if defined(IP_PMTUDISC_WANT)
1055 	REGISTER_LONG_CONSTANT("IP_PMTUDISC_WANT", IP_PMTUDISC_WANT, CONST_PERSISTENT);
1056 #endif
1057 #if defined(IP_PMTUDISC_PROBE)
1058 	REGISTER_LONG_CONSTANT("IP_PMTUDISC_PROBE", IP_PMTUDISC_PROBE, CONST_PERSISTENT);
1059 #endif
1060 #if defined(IP_PMTUDISC_INTERFACE)
1061 	REGISTER_LONG_CONSTANT("IP_PMTUDISC_INTERFACE", IP_PMTUDISC_INTERFACE, CONST_PERSISTENT);
1062 #endif
1063 #if defined(IP_PMTUDISC_OMIT)
1064 	REGISTER_LONG_CONSTANT("IP_PMTUDISC_OMIT", IP_PMTUDISC_OMIT, CONST_PERSISTENT);
1065 #endif
1066 #if defined(UDPLITE_SEND_CSCOV)
1067 	REGISTER_LONG_CONSTANT("UDPLITE_SEND_CSCOV", UDPLITE_SEND_CSCOV, CONST_PERSISTENT);
1068 #endif
1069 #if defined(UDPLITE_RECV_CSCOV)
1070 	REGISTER_LONG_CONSTANT("UDPLITE_RECV_CSCOV", UDPLITE_RECV_CSCOV, CONST_PERSISTENT);
1071 #endif
1072 }
1073 
register_class_Socket(void)1074 static zend_class_entry *register_class_Socket(void)
1075 {
1076 	zend_class_entry ce, *class_entry;
1077 
1078 	INIT_CLASS_ENTRY(ce, "Socket", NULL);
1079 	class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE);
1080 
1081 	return class_entry;
1082 }
1083 
register_class_AddressInfo(void)1084 static zend_class_entry *register_class_AddressInfo(void)
1085 {
1086 	zend_class_entry ce, *class_entry;
1087 
1088 	INIT_CLASS_ENTRY(ce, "AddressInfo", NULL);
1089 	class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE);
1090 
1091 	return class_entry;
1092 }
1093