PageRenderTime 97ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/platform/shared/ruby/ext/socket/constants.h

https://github.com/manishasarkar/rhodes
C Header | 1027 lines | 779 code | 248 blank | 0 comment | 0 complexity | 9bb0a6370f26ac1e9c628a7301d622dc MD5 | raw file
  1. #define pseudo_AF_FTIP pseudo_AF_RTIP
  2. #ifdef SOCK_STREAM
  3. sock_define_const("SOCK_STREAM", SOCK_STREAM);
  4. #endif
  5. #ifdef SOCK_DGRAM
  6. sock_define_const("SOCK_DGRAM", SOCK_DGRAM);
  7. #endif
  8. #ifdef SOCK_RAW
  9. sock_define_const("SOCK_RAW", SOCK_RAW);
  10. #endif
  11. #ifdef SOCK_RDM
  12. sock_define_const("SOCK_RDM", SOCK_RDM);
  13. #endif
  14. #ifdef SOCK_SEQPACKET
  15. sock_define_const("SOCK_SEQPACKET", SOCK_SEQPACKET);
  16. #endif
  17. #ifdef SOCK_PACKET
  18. sock_define_const("SOCK_PACKET", SOCK_PACKET);
  19. #endif
  20. #ifdef AF_INET
  21. sock_define_const("AF_INET", AF_INET);
  22. #endif
  23. #ifdef PF_INET
  24. sock_define_const("PF_INET", PF_INET);
  25. #endif
  26. #ifdef AF_UNIX
  27. sock_define_const("AF_UNIX", AF_UNIX);
  28. #endif
  29. #ifdef PF_UNIX
  30. sock_define_const("PF_UNIX", PF_UNIX);
  31. #endif
  32. #ifdef AF_AX25
  33. sock_define_const("AF_AX25", AF_AX25);
  34. #endif
  35. #ifdef PF_AX25
  36. sock_define_const("PF_AX25", PF_AX25);
  37. #endif
  38. #ifdef AF_IPX
  39. sock_define_const("AF_IPX", AF_IPX);
  40. #endif
  41. #ifdef PF_IPX
  42. sock_define_const("PF_IPX", PF_IPX);
  43. #endif
  44. #ifdef AF_APPLETALK
  45. sock_define_const("AF_APPLETALK", AF_APPLETALK);
  46. #endif
  47. #ifdef PF_APPLETALK
  48. sock_define_const("PF_APPLETALK", PF_APPLETALK);
  49. #endif
  50. #ifdef AF_UNSPEC
  51. sock_define_const("AF_UNSPEC", AF_UNSPEC);
  52. #endif
  53. #ifdef PF_UNSPEC
  54. sock_define_const("PF_UNSPEC", PF_UNSPEC);
  55. #endif
  56. #ifdef AF_LOCAL
  57. sock_define_const("AF_LOCAL", AF_LOCAL);
  58. #endif
  59. #ifdef PF_LOCAL
  60. sock_define_const("PF_LOCAL", PF_LOCAL);
  61. #endif
  62. #ifdef AF_IMPLINK
  63. sock_define_const("AF_IMPLINK", AF_IMPLINK);
  64. #endif
  65. #ifdef PF_IMPLINK
  66. sock_define_const("PF_IMPLINK", PF_IMPLINK);
  67. #endif
  68. #ifdef AF_PUP
  69. sock_define_const("AF_PUP", AF_PUP);
  70. #endif
  71. #ifdef PF_PUP
  72. sock_define_const("PF_PUP", PF_PUP);
  73. #endif
  74. #ifdef AF_CHAOS
  75. sock_define_const("AF_CHAOS", AF_CHAOS);
  76. #endif
  77. #ifdef PF_CHAOS
  78. sock_define_const("PF_CHAOS", PF_CHAOS);
  79. #endif
  80. #ifdef AF_NS
  81. sock_define_const("AF_NS", AF_NS);
  82. #endif
  83. #ifdef PF_NS
  84. sock_define_const("PF_NS", PF_NS);
  85. #endif
  86. #ifdef AF_ISO
  87. sock_define_const("AF_ISO", AF_ISO);
  88. #endif
  89. #ifdef PF_ISO
  90. sock_define_const("PF_ISO", PF_ISO);
  91. #endif
  92. #ifdef AF_OSI
  93. sock_define_const("AF_OSI", AF_OSI);
  94. #endif
  95. #ifdef PF_OSI
  96. sock_define_const("PF_OSI", PF_OSI);
  97. #endif
  98. #ifdef AF_ECMA
  99. sock_define_const("AF_ECMA", AF_ECMA);
  100. #endif
  101. #ifdef PF_ECMA
  102. sock_define_const("PF_ECMA", PF_ECMA);
  103. #endif
  104. #ifdef AF_DATAKIT
  105. sock_define_const("AF_DATAKIT", AF_DATAKIT);
  106. #endif
  107. #ifdef PF_DATAKIT
  108. sock_define_const("PF_DATAKIT", PF_DATAKIT);
  109. #endif
  110. #ifdef AF_CCITT
  111. sock_define_const("AF_CCITT", AF_CCITT);
  112. #endif
  113. #ifdef PF_CCITT
  114. sock_define_const("PF_CCITT", PF_CCITT);
  115. #endif
  116. #ifdef AF_SNA
  117. sock_define_const("AF_SNA", AF_SNA);
  118. #endif
  119. #ifdef PF_SNA
  120. sock_define_const("PF_SNA", PF_SNA);
  121. #endif
  122. #ifdef AF_DEC
  123. sock_define_const("AF_DEC", AF_DEC);
  124. #endif
  125. #ifdef PF_DEC
  126. sock_define_const("PF_DEC", PF_DEC);
  127. #endif
  128. #ifdef AF_DLI
  129. sock_define_const("AF_DLI", AF_DLI);
  130. #endif
  131. #ifdef PF_DLI
  132. sock_define_const("PF_DLI", PF_DLI);
  133. #endif
  134. #ifdef AF_LAT
  135. sock_define_const("AF_LAT", AF_LAT);
  136. #endif
  137. #ifdef PF_LAT
  138. sock_define_const("PF_LAT", PF_LAT);
  139. #endif
  140. #ifdef AF_HYLINK
  141. sock_define_const("AF_HYLINK", AF_HYLINK);
  142. #endif
  143. #ifdef PF_HYLINK
  144. sock_define_const("PF_HYLINK", PF_HYLINK);
  145. #endif
  146. #ifdef AF_ROUTE
  147. sock_define_const("AF_ROUTE", AF_ROUTE);
  148. #endif
  149. #ifdef PF_ROUTE
  150. sock_define_const("PF_ROUTE", PF_ROUTE);
  151. #endif
  152. #ifdef AF_LINK
  153. sock_define_const("AF_LINK", AF_LINK);
  154. #endif
  155. #ifdef PF_LINK
  156. sock_define_const("PF_LINK", PF_LINK);
  157. #endif
  158. #ifdef AF_COIP
  159. sock_define_const("AF_COIP", AF_COIP);
  160. #endif
  161. #ifdef PF_COIP
  162. sock_define_const("PF_COIP", PF_COIP);
  163. #endif
  164. #ifdef AF_CNT
  165. sock_define_const("AF_CNT", AF_CNT);
  166. #endif
  167. #ifdef PF_CNT
  168. sock_define_const("PF_CNT", PF_CNT);
  169. #endif
  170. #ifdef AF_SIP
  171. sock_define_const("AF_SIP", AF_SIP);
  172. #endif
  173. #ifdef PF_SIP
  174. sock_define_const("PF_SIP", PF_SIP);
  175. #endif
  176. #ifdef AF_NDRV
  177. sock_define_const("AF_NDRV", AF_NDRV);
  178. #endif
  179. #ifdef PF_NDRV
  180. sock_define_const("PF_NDRV", PF_NDRV);
  181. #endif
  182. #ifdef AF_ISDN
  183. sock_define_const("AF_ISDN", AF_ISDN);
  184. #endif
  185. #ifdef PF_ISDN
  186. sock_define_const("PF_ISDN", PF_ISDN);
  187. #endif
  188. #ifdef AF_NATM
  189. sock_define_const("AF_NATM", AF_NATM);
  190. #endif
  191. #ifdef PF_NATM
  192. sock_define_const("PF_NATM", PF_NATM);
  193. #endif
  194. #ifdef AF_SYSTEM
  195. sock_define_const("AF_SYSTEM", AF_SYSTEM);
  196. #endif
  197. #ifdef PF_SYSTEM
  198. sock_define_const("PF_SYSTEM", PF_SYSTEM);
  199. #endif
  200. #ifdef AF_NETBIOS
  201. sock_define_const("AF_NETBIOS", AF_NETBIOS);
  202. #endif
  203. #ifdef PF_NETBIOS
  204. sock_define_const("PF_NETBIOS", PF_NETBIOS);
  205. #endif
  206. #ifdef AF_PPP
  207. sock_define_const("AF_PPP", AF_PPP);
  208. #endif
  209. #ifdef PF_PPP
  210. sock_define_const("PF_PPP", PF_PPP);
  211. #endif
  212. #ifdef AF_ATM
  213. sock_define_const("AF_ATM", AF_ATM);
  214. #endif
  215. #ifdef PF_ATM
  216. sock_define_const("PF_ATM", PF_ATM);
  217. #endif
  218. #ifdef AF_NETGRAPH
  219. sock_define_const("AF_NETGRAPH", AF_NETGRAPH);
  220. #endif
  221. #ifdef PF_NETGRAPH
  222. sock_define_const("PF_NETGRAPH", PF_NETGRAPH);
  223. #endif
  224. #ifdef AF_MAX
  225. sock_define_const("AF_MAX", AF_MAX);
  226. #endif
  227. #ifdef PF_MAX
  228. sock_define_const("PF_MAX", PF_MAX);
  229. #endif
  230. #ifdef AF_E164
  231. sock_define_const("AF_E164", AF_E164);
  232. #endif
  233. #ifdef PF_XTP
  234. sock_define_const("PF_XTP", PF_XTP);
  235. #endif
  236. #ifdef PF_RTIP
  237. sock_define_const("PF_RTIP", PF_RTIP);
  238. #endif
  239. #ifdef PF_PIP
  240. sock_define_const("PF_PIP", PF_PIP);
  241. #endif
  242. #ifdef PF_KEY
  243. sock_define_const("PF_KEY", PF_KEY);
  244. #endif
  245. #ifdef MSG_OOB
  246. sock_define_const("MSG_OOB", MSG_OOB);
  247. #endif
  248. #ifdef MSG_PEEK
  249. sock_define_const("MSG_PEEK", MSG_PEEK);
  250. #endif
  251. #ifdef MSG_DONTROUTE
  252. sock_define_const("MSG_DONTROUTE", MSG_DONTROUTE);
  253. #endif
  254. #ifdef MSG_EOR
  255. sock_define_const("MSG_EOR", MSG_EOR);
  256. #endif
  257. #ifdef MSG_TRUNC
  258. sock_define_const("MSG_TRUNC", MSG_TRUNC);
  259. #endif
  260. #ifdef MSG_CTRUNC
  261. sock_define_const("MSG_CTRUNC", MSG_CTRUNC);
  262. #endif
  263. #ifdef MSG_WAITALL
  264. sock_define_const("MSG_WAITALL", MSG_WAITALL);
  265. #endif
  266. #ifdef MSG_DONTWAIT
  267. sock_define_const("MSG_DONTWAIT", MSG_DONTWAIT);
  268. #endif
  269. #ifdef MSG_EOF
  270. sock_define_const("MSG_EOF", MSG_EOF);
  271. #endif
  272. #ifdef MSG_FLUSH
  273. sock_define_const("MSG_FLUSH", MSG_FLUSH);
  274. #endif
  275. #ifdef MSG_HOLD
  276. sock_define_const("MSG_HOLD", MSG_HOLD);
  277. #endif
  278. #ifdef MSG_SEND
  279. sock_define_const("MSG_SEND", MSG_SEND);
  280. #endif
  281. #ifdef MSG_HAVEMORE
  282. sock_define_const("MSG_HAVEMORE", MSG_HAVEMORE);
  283. #endif
  284. #ifdef MSG_RCVMORE
  285. sock_define_const("MSG_RCVMORE", MSG_RCVMORE);
  286. #endif
  287. #ifdef MSG_COMPAT
  288. sock_define_const("MSG_COMPAT", MSG_COMPAT);
  289. #endif
  290. #ifdef SOL_SOCKET
  291. sock_define_const("SOL_SOCKET", SOL_SOCKET);
  292. #endif
  293. #ifdef SOL_IP
  294. sock_define_const("SOL_IP", SOL_IP);
  295. #endif
  296. #ifdef SOL_IPX
  297. sock_define_const("SOL_IPX", SOL_IPX);
  298. #endif
  299. #ifdef SOL_AX25
  300. sock_define_const("SOL_AX25", SOL_AX25);
  301. #endif
  302. #ifdef SOL_ATALK
  303. sock_define_const("SOL_ATALK", SOL_ATALK);
  304. #endif
  305. #ifdef SOL_TCP
  306. sock_define_const("SOL_TCP", SOL_TCP);
  307. #endif
  308. #ifdef SOL_UDP
  309. sock_define_const("SOL_UDP", SOL_UDP);
  310. #endif
  311. #ifdef IPPROTO_IP
  312. sock_define_const("IPPROTO_IP", IPPROTO_IP);
  313. #else
  314. sock_define_const("IPPROTO_IP", 0);
  315. #endif
  316. #ifdef IPPROTO_ICMP
  317. sock_define_const("IPPROTO_ICMP", IPPROTO_ICMP);
  318. #else
  319. sock_define_const("IPPROTO_ICMP", 1);
  320. #endif
  321. #ifdef IPPROTO_IGMP
  322. sock_define_const("IPPROTO_IGMP", IPPROTO_IGMP);
  323. #endif
  324. #ifdef IPPROTO_GGP
  325. sock_define_const("IPPROTO_GGP", IPPROTO_GGP);
  326. #endif
  327. #ifdef IPPROTO_TCP
  328. sock_define_const("IPPROTO_TCP", IPPROTO_TCP);
  329. #else
  330. sock_define_const("IPPROTO_TCP", 6);
  331. #endif
  332. #ifdef IPPROTO_EGP
  333. sock_define_const("IPPROTO_EGP", IPPROTO_EGP);
  334. #endif
  335. #ifdef IPPROTO_PUP
  336. sock_define_const("IPPROTO_PUP", IPPROTO_PUP);
  337. #endif
  338. #ifdef IPPROTO_UDP
  339. sock_define_const("IPPROTO_UDP", IPPROTO_UDP);
  340. #else
  341. sock_define_const("IPPROTO_UDP", 17);
  342. #endif
  343. #ifdef IPPROTO_IDP
  344. sock_define_const("IPPROTO_IDP", IPPROTO_IDP);
  345. #endif
  346. #ifdef IPPROTO_HELLO
  347. sock_define_const("IPPROTO_HELLO", IPPROTO_HELLO);
  348. #endif
  349. #ifdef IPPROTO_ND
  350. sock_define_const("IPPROTO_ND", IPPROTO_ND);
  351. #endif
  352. #ifdef IPPROTO_TP
  353. sock_define_const("IPPROTO_TP", IPPROTO_TP);
  354. #endif
  355. #ifdef IPPROTO_XTP
  356. sock_define_const("IPPROTO_XTP", IPPROTO_XTP);
  357. #endif
  358. #ifdef IPPROTO_EON
  359. sock_define_const("IPPROTO_EON", IPPROTO_EON);
  360. #endif
  361. #ifdef IPPROTO_BIP
  362. sock_define_const("IPPROTO_BIP", IPPROTO_BIP);
  363. #endif
  364. #ifdef IPPROTO_RAW
  365. sock_define_const("IPPROTO_RAW", IPPROTO_RAW);
  366. #else
  367. sock_define_const("IPPROTO_RAW", 255);
  368. #endif
  369. #ifdef IPPROTO_MAX
  370. sock_define_const("IPPROTO_MAX", IPPROTO_MAX);
  371. #endif
  372. #ifdef IPPORT_RESERVED
  373. sock_define_const("IPPORT_RESERVED", IPPORT_RESERVED);
  374. #else
  375. sock_define_const("IPPORT_RESERVED", 1024);
  376. #endif
  377. #ifdef IPPORT_USERRESERVED
  378. sock_define_const("IPPORT_USERRESERVED", IPPORT_USERRESERVED);
  379. #else
  380. sock_define_const("IPPORT_USERRESERVED", 5000);
  381. #endif
  382. #ifdef INADDR_ANY
  383. sock_define_const("INADDR_ANY", INADDR_ANY);
  384. #else
  385. sock_define_const("INADDR_ANY", 0x00000000);
  386. #endif
  387. #ifdef INADDR_BROADCAST
  388. sock_define_const("INADDR_BROADCAST", INADDR_BROADCAST);
  389. #else
  390. sock_define_const("INADDR_BROADCAST", 0xffffffff);
  391. #endif
  392. #ifdef INADDR_LOOPBACK
  393. sock_define_const("INADDR_LOOPBACK", INADDR_LOOPBACK);
  394. #else
  395. sock_define_const("INADDR_LOOPBACK", 0x7F000001);
  396. #endif
  397. #ifdef INADDR_UNSPEC_GROUP
  398. sock_define_const("INADDR_UNSPEC_GROUP", INADDR_UNSPEC_GROUP);
  399. #else
  400. sock_define_const("INADDR_UNSPEC_GROUP", 0xe0000000);
  401. #endif
  402. #ifdef INADDR_ALLHOSTS_GROUP
  403. sock_define_const("INADDR_ALLHOSTS_GROUP", INADDR_ALLHOSTS_GROUP);
  404. #else
  405. sock_define_const("INADDR_ALLHOSTS_GROUP", 0xe0000001);
  406. #endif
  407. #ifdef INADDR_MAX_LOCAL_GROUP
  408. sock_define_const("INADDR_MAX_LOCAL_GROUP", INADDR_MAX_LOCAL_GROUP);
  409. #else
  410. sock_define_const("INADDR_MAX_LOCAL_GROUP", 0xe00000ff);
  411. #endif
  412. #ifdef INADDR_NONE
  413. sock_define_const("INADDR_NONE", INADDR_NONE);
  414. #else
  415. sock_define_const("INADDR_NONE", 0xffffffff);
  416. #endif
  417. #ifdef IP_OPTIONS
  418. sock_define_const("IP_OPTIONS", IP_OPTIONS);
  419. #endif
  420. #ifdef IP_HDRINCL
  421. sock_define_const("IP_HDRINCL", IP_HDRINCL);
  422. #endif
  423. #ifdef IP_TOS
  424. sock_define_const("IP_TOS", IP_TOS);
  425. #endif
  426. #ifdef IP_TTL
  427. sock_define_const("IP_TTL", IP_TTL);
  428. #endif
  429. #ifdef IP_RECVOPTS
  430. sock_define_const("IP_RECVOPTS", IP_RECVOPTS);
  431. #endif
  432. #ifdef IP_RECVRETOPTS
  433. sock_define_const("IP_RECVRETOPTS", IP_RECVRETOPTS);
  434. #endif
  435. #ifdef IP_RECVDSTADDR
  436. sock_define_const("IP_RECVDSTADDR", IP_RECVDSTADDR);
  437. #endif
  438. #ifdef IP_RETOPTS
  439. sock_define_const("IP_RETOPTS", IP_RETOPTS);
  440. #endif
  441. #ifdef IP_MULTICAST_IF
  442. sock_define_const("IP_MULTICAST_IF", IP_MULTICAST_IF);
  443. #endif
  444. #ifdef IP_MULTICAST_TTL
  445. sock_define_const("IP_MULTICAST_TTL", IP_MULTICAST_TTL);
  446. #endif
  447. #ifdef IP_MULTICAST_LOOP
  448. sock_define_const("IP_MULTICAST_LOOP", IP_MULTICAST_LOOP);
  449. #endif
  450. #ifdef IP_ADD_MEMBERSHIP
  451. sock_define_const("IP_ADD_MEMBERSHIP", IP_ADD_MEMBERSHIP);
  452. #endif
  453. #ifdef IP_DROP_MEMBERSHIP
  454. sock_define_const("IP_DROP_MEMBERSHIP", IP_DROP_MEMBERSHIP);
  455. #endif
  456. #ifdef IP_DEFAULT_MULTICAST_TTL
  457. sock_define_const("IP_DEFAULT_MULTICAST_TTL", IP_DEFAULT_MULTICAST_TTL);
  458. #endif
  459. #ifdef IP_DEFAULT_MULTICAST_LOOP
  460. sock_define_const("IP_DEFAULT_MULTICAST_LOOP", IP_DEFAULT_MULTICAST_LOOP);
  461. #endif
  462. #ifdef IP_MAX_MEMBERSHIPS
  463. sock_define_const("IP_MAX_MEMBERSHIPS", IP_MAX_MEMBERSHIPS);
  464. #endif
  465. #ifdef SO_DEBUG
  466. sock_define_const("SO_DEBUG", SO_DEBUG);
  467. #endif
  468. #ifdef SO_REUSEADDR
  469. sock_define_const("SO_REUSEADDR", SO_REUSEADDR);
  470. #endif
  471. #ifdef SO_REUSEPORT
  472. sock_define_const("SO_REUSEPORT", SO_REUSEPORT);
  473. #endif
  474. #ifdef SO_TYPE
  475. sock_define_const("SO_TYPE", SO_TYPE);
  476. #endif
  477. #ifdef SO_ERROR
  478. sock_define_const("SO_ERROR", SO_ERROR);
  479. #endif
  480. #ifdef SO_DONTROUTE
  481. sock_define_const("SO_DONTROUTE", SO_DONTROUTE);
  482. #endif
  483. #ifdef SO_BROADCAST
  484. sock_define_const("SO_BROADCAST", SO_BROADCAST);
  485. #endif
  486. #ifdef SO_SNDBUF
  487. sock_define_const("SO_SNDBUF", SO_SNDBUF);
  488. #endif
  489. #ifdef SO_RCVBUF
  490. sock_define_const("SO_RCVBUF", SO_RCVBUF);
  491. #endif
  492. #ifdef SO_KEEPALIVE
  493. sock_define_const("SO_KEEPALIVE", SO_KEEPALIVE);
  494. #endif
  495. #ifdef SO_OOBINLINE
  496. sock_define_const("SO_OOBINLINE", SO_OOBINLINE);
  497. #endif
  498. #ifdef SO_NO_CHECK
  499. sock_define_const("SO_NO_CHECK", SO_NO_CHECK);
  500. #endif
  501. #ifdef SO_PRIORITY
  502. sock_define_const("SO_PRIORITY", SO_PRIORITY);
  503. #endif
  504. #ifdef SO_LINGER
  505. sock_define_const("SO_LINGER", SO_LINGER);
  506. #endif
  507. #ifdef SO_PASSCRED
  508. sock_define_const("SO_PASSCRED", SO_PASSCRED);
  509. #endif
  510. #ifdef SO_PEERCRED
  511. sock_define_const("SO_PEERCRED", SO_PEERCRED);
  512. #endif
  513. #ifdef SO_RCVLOWAT
  514. sock_define_const("SO_RCVLOWAT", SO_RCVLOWAT);
  515. #endif
  516. #ifdef SO_SNDLOWAT
  517. sock_define_const("SO_SNDLOWAT", SO_SNDLOWAT);
  518. #endif
  519. #ifdef SO_RCVTIMEO
  520. sock_define_const("SO_RCVTIMEO", SO_RCVTIMEO);
  521. #endif
  522. #ifdef SO_SNDTIMEO
  523. sock_define_const("SO_SNDTIMEO", SO_SNDTIMEO);
  524. #endif
  525. #ifdef SO_ACCEPTCONN
  526. sock_define_const("SO_ACCEPTCONN", SO_ACCEPTCONN);
  527. #endif
  528. #ifdef SO_USELOOPBACK
  529. sock_define_const("SO_USELOOPBACK", SO_USELOOPBACK);
  530. #endif
  531. #ifdef SO_ACCEPTFILTER
  532. sock_define_const("SO_ACCEPTFILTER", SO_ACCEPTFILTER);
  533. #endif
  534. #ifdef SO_DONTTRUNC
  535. sock_define_const("SO_DONTTRUNC", SO_DONTTRUNC);
  536. #endif
  537. #ifdef SO_WANTMORE
  538. sock_define_const("SO_WANTMORE", SO_WANTMORE);
  539. #endif
  540. #ifdef SO_WANTOOBFLAG
  541. sock_define_const("SO_WANTOOBFLAG", SO_WANTOOBFLAG);
  542. #endif
  543. #ifdef SO_NREAD
  544. sock_define_const("SO_NREAD", SO_NREAD);
  545. #endif
  546. #ifdef SO_NKE
  547. sock_define_const("SO_NKE", SO_NKE);
  548. #endif
  549. #ifdef SO_NOSIGPIPE
  550. sock_define_const("SO_NOSIGPIPE", SO_NOSIGPIPE);
  551. #endif
  552. #ifdef SO_SECURITY_AUTHENTICATION
  553. sock_define_const("SO_SECURITY_AUTHENTICATION", SO_SECURITY_AUTHENTICATION);
  554. #endif
  555. #ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
  556. sock_define_const("SO_SECURITY_ENCRYPTION_TRANSPORT", SO_SECURITY_ENCRYPTION_TRANSPORT);
  557. #endif
  558. #ifdef SO_SECURITY_ENCRYPTION_NETWORK
  559. sock_define_const("SO_SECURITY_ENCRYPTION_NETWORK", SO_SECURITY_ENCRYPTION_NETWORK);
  560. #endif
  561. #ifdef SO_BINDTODEVICE
  562. sock_define_const("SO_BINDTODEVICE", SO_BINDTODEVICE);
  563. #endif
  564. #ifdef SO_ATTACH_FILTER
  565. sock_define_const("SO_ATTACH_FILTER", SO_ATTACH_FILTER);
  566. #endif
  567. #ifdef SO_DETACH_FILTER
  568. sock_define_const("SO_DETACH_FILTER", SO_DETACH_FILTER);
  569. #endif
  570. #ifdef SO_PEERNAME
  571. sock_define_const("SO_PEERNAME", SO_PEERNAME);
  572. #endif
  573. #ifdef SO_TIMESTAMP
  574. sock_define_const("SO_TIMESTAMP", SO_TIMESTAMP);
  575. #endif
  576. #ifdef SOPRI_INTERACTIVE
  577. sock_define_const("SOPRI_INTERACTIVE", SOPRI_INTERACTIVE);
  578. #endif
  579. #ifdef SOPRI_NORMAL
  580. sock_define_const("SOPRI_NORMAL", SOPRI_NORMAL);
  581. #endif
  582. #ifdef SOPRI_BACKGROUND
  583. sock_define_const("SOPRI_BACKGROUND", SOPRI_BACKGROUND);
  584. #endif
  585. #ifdef IPX_TYPE
  586. sock_define_const("IPX_TYPE", IPX_TYPE);
  587. #endif
  588. #ifdef TCP_NODELAY
  589. sock_define_const("TCP_NODELAY", TCP_NODELAY);
  590. #endif
  591. #ifdef TCP_MAXSEG
  592. sock_define_const("TCP_MAXSEG", TCP_MAXSEG);
  593. #endif
  594. #ifdef EAI_ADDRFAMILY
  595. sock_define_const("EAI_ADDRFAMILY", EAI_ADDRFAMILY);
  596. #endif
  597. #ifdef EAI_AGAIN
  598. sock_define_const("EAI_AGAIN", EAI_AGAIN);
  599. #endif
  600. #ifdef EAI_BADFLAGS
  601. sock_define_const("EAI_BADFLAGS", EAI_BADFLAGS);
  602. #endif
  603. #ifdef EAI_FAIL
  604. sock_define_const("EAI_FAIL", EAI_FAIL);
  605. #endif
  606. #ifdef EAI_FAMILY
  607. sock_define_const("EAI_FAMILY", EAI_FAMILY);
  608. #endif
  609. #ifdef EAI_MEMORY
  610. sock_define_const("EAI_MEMORY", EAI_MEMORY);
  611. #endif
  612. #ifdef EAI_NODATA
  613. sock_define_const("EAI_NODATA", EAI_NODATA);
  614. #endif
  615. #ifdef EAI_NONAME
  616. sock_define_const("EAI_NONAME", EAI_NONAME);
  617. #endif
  618. #ifdef EAI_SERVICE
  619. sock_define_const("EAI_SERVICE", EAI_SERVICE);
  620. #endif
  621. #ifdef EAI_SOCKTYPE
  622. sock_define_const("EAI_SOCKTYPE", EAI_SOCKTYPE);
  623. #endif
  624. #ifdef EAI_SYSTEM
  625. sock_define_const("EAI_SYSTEM", EAI_SYSTEM);
  626. #endif
  627. #ifdef EAI_BADHINTS
  628. sock_define_const("EAI_BADHINTS", EAI_BADHINTS);
  629. #endif
  630. #ifdef EAI_PROTOCOL
  631. sock_define_const("EAI_PROTOCOL", EAI_PROTOCOL);
  632. #endif
  633. #ifdef EAI_MAX
  634. sock_define_const("EAI_MAX", EAI_MAX);
  635. #endif
  636. #ifdef AI_PASSIVE
  637. sock_define_const("AI_PASSIVE", AI_PASSIVE);
  638. #endif
  639. #ifdef AI_CANONNAME
  640. sock_define_const("AI_CANONNAME", AI_CANONNAME);
  641. #endif
  642. #ifdef AI_NUMERICHOST
  643. sock_define_const("AI_NUMERICHOST", AI_NUMERICHOST);
  644. #endif
  645. #ifdef AI_MASK
  646. sock_define_const("AI_MASK", AI_MASK);
  647. #endif
  648. #ifdef AI_ALL
  649. sock_define_const("AI_ALL", AI_ALL);
  650. #endif
  651. #ifdef AI_V4MAPPED_CFG
  652. sock_define_const("AI_V4MAPPED_CFG", AI_V4MAPPED_CFG);
  653. #endif
  654. #ifdef AI_ADDRCONFIG
  655. sock_define_const("AI_ADDRCONFIG", AI_ADDRCONFIG);
  656. #endif
  657. #ifdef AI_V4MAPPED
  658. sock_define_const("AI_V4MAPPED", AI_V4MAPPED);
  659. #endif
  660. #ifdef AI_DEFAULT
  661. sock_define_const("AI_DEFAULT", AI_DEFAULT);
  662. #endif
  663. #ifdef NI_MAXHOST
  664. sock_define_const("NI_MAXHOST", NI_MAXHOST);
  665. #endif
  666. #ifdef NI_MAXSERV
  667. sock_define_const("NI_MAXSERV", NI_MAXSERV);
  668. #endif
  669. #ifdef NI_NOFQDN
  670. sock_define_const("NI_NOFQDN", NI_NOFQDN);
  671. #endif
  672. #ifdef NI_NUMERICHOST
  673. sock_define_const("NI_NUMERICHOST", NI_NUMERICHOST);
  674. #endif
  675. #ifdef NI_NAMEREQD
  676. sock_define_const("NI_NAMEREQD", NI_NAMEREQD);
  677. #endif
  678. #ifdef NI_NUMERICSERV
  679. sock_define_const("NI_NUMERICSERV", NI_NUMERICSERV);
  680. #endif
  681. #ifdef NI_DGRAM
  682. sock_define_const("NI_DGRAM", NI_DGRAM);
  683. #endif
  684. #ifdef SHUT_RD
  685. sock_define_const("SHUT_RD", SHUT_RD);
  686. #else
  687. sock_define_const("SHUT_RD", 0);
  688. #endif
  689. #ifdef SHUT_WR
  690. sock_define_const("SHUT_WR", SHUT_WR);
  691. #else
  692. sock_define_const("SHUT_WR", 1);
  693. #endif
  694. #ifdef SHUT_RDWR
  695. sock_define_const("SHUT_RDWR", SHUT_RDWR);
  696. #else
  697. sock_define_const("SHUT_RDWR", 2);
  698. #endif
  699. #ifdef IPV6_JOIN_GROUP
  700. sock_define_const("IPV6_JOIN_GROUP", IPV6_JOIN_GROUP);
  701. #endif
  702. #ifdef IPV6_LEAVE_GROUP
  703. sock_define_const("IPV6_LEAVE_GROUP", IPV6_LEAVE_GROUP);
  704. #endif
  705. #ifdef IPV6_MULTICAST_HOPS
  706. sock_define_const("IPV6_MULTICAST_HOPS", IPV6_MULTICAST_HOPS);
  707. #endif
  708. #ifdef IPV6_MULTICAST_IF
  709. sock_define_const("IPV6_MULTICAST_IF", IPV6_MULTICAST_IF);
  710. #endif
  711. #ifdef IPV6_MULTICAST_LOOP
  712. sock_define_const("IPV6_MULTICAST_LOOP", IPV6_MULTICAST_LOOP);
  713. #endif
  714. #ifdef IPV6_UNICAST_HOPS
  715. sock_define_const("IPV6_UNICAST_HOPS", IPV6_UNICAST_HOPS);
  716. #endif
  717. #ifdef IPV6_V6ONLY
  718. sock_define_const("IPV6_V6ONLY", IPV6_V6ONLY);
  719. #endif
  720. #ifdef IPV6_CHECKSUM
  721. sock_define_const("IPV6_CHECKSUM", IPV6_CHECKSUM);
  722. #endif
  723. #ifdef IPV6_DONTFRAG
  724. sock_define_const("IPV6_DONTFRAG", IPV6_DONTFRAG);
  725. #endif
  726. #ifdef IPV6_DSTOPTS
  727. sock_define_const("IPV6_DSTOPTS", IPV6_DSTOPTS);
  728. #endif
  729. #ifdef IPV6_HOPLIMIT
  730. sock_define_const("IPV6_HOPLIMIT", IPV6_HOPLIMIT);
  731. #endif
  732. #ifdef IPV6_HOPOPTS
  733. sock_define_const("IPV6_HOPOPTS", IPV6_HOPOPTS);
  734. #endif
  735. #ifdef IPV6_NEXTHOP
  736. sock_define_const("IPV6_NEXTHOP", IPV6_NEXTHOP);
  737. #endif
  738. #ifdef IPV6_PATHMTU
  739. sock_define_const("IPV6_PATHMTU", IPV6_PATHMTU);
  740. #endif
  741. #ifdef IPV6_PKTINFO
  742. sock_define_const("IPV6_PKTINFO", IPV6_PKTINFO);
  743. #endif
  744. #ifdef IPV6_RECVDSTOPTS
  745. sock_define_const("IPV6_RECVDSTOPTS", IPV6_RECVDSTOPTS);
  746. #endif
  747. #ifdef IPV6_RECVHOPLIMIT
  748. sock_define_const("IPV6_RECVHOPLIMIT", IPV6_RECVHOPLIMIT);
  749. #endif
  750. #ifdef IPV6_RECVHOPOPTS
  751. sock_define_const("IPV6_RECVHOPOPTS", IPV6_RECVHOPOPTS);
  752. #endif
  753. #ifdef IPV6_RECVPKTINFO
  754. sock_define_const("IPV6_RECVPKTINFO", IPV6_RECVPKTINFO);
  755. #endif
  756. #ifdef IPV6_RECVRTHDR
  757. sock_define_const("IPV6_RECVRTHDR", IPV6_RECVRTHDR);
  758. #endif
  759. #ifdef IPV6_RECVTCLASS
  760. sock_define_const("IPV6_RECVTCLASS", IPV6_RECVTCLASS);
  761. #endif
  762. #ifdef IPV6_RTHDR
  763. sock_define_const("IPV6_RTHDR", IPV6_RTHDR);
  764. #endif
  765. #ifdef IPV6_RTHDRDSTOPTS
  766. sock_define_const("IPV6_RTHDRDSTOPTS", IPV6_RTHDRDSTOPTS);
  767. #endif
  768. #ifdef IPV6_RTHDR_TYPE_0
  769. sock_define_const("IPV6_RTHDR_TYPE_0", IPV6_RTHDR_TYPE_0);
  770. #endif
  771. #ifdef IPV6_RECVPATHMTU
  772. sock_define_const("IPV6_RECVPATHMTU", IPV6_RECVPATHMTU);
  773. #endif
  774. #ifdef IPV6_TCLASS
  775. sock_define_const("IPV6_TCLASS", IPV6_TCLASS);
  776. #endif
  777. #ifdef IPV6_USE_MIN_MTU
  778. sock_define_const("IPV6_USE_MIN_MTU", IPV6_USE_MIN_MTU);
  779. #endif