Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# ext/socket/constdefs.c

Go to the documentation of this file.

    00001 /* autogenerated file */
    00002
    00003 static st_table *rsock_intern_family_hash;
    00004 static st_table *rsock_intern_family_noprefix_hash;
    00005 static st_table *rsock_intern_protocol_family_hash;
    00006 static st_table *rsock_intern_socktype_hash;
    00007 static st_table *rsock_intern_ipproto_hash;
    00008 static st_table *rsock_intern_iplevel_hash;
    00009 static st_table *rsock_intern_so_optname_hash;
    00010 static st_table *rsock_intern_ip_optname_hash;
    00011 static st_table *rsock_intern_ipv6_optname_hash;
    00012 static st_table *rsock_intern_tcp_optname_hash;
    00013 static st_table *rsock_intern_udp_optname_hash;
    00014 static st_table *rsock_intern_scm_optname_hash;
    00015 static st_table *rsock_intern_local_optname_hash;
    00016
    00017 /*
    00018  * Document-module: ::Socket::Constants
    00019  *
    00020  * Socket::Constants provides socket related constants.
    00021  * Following lists possible constants.
    00022  * If underlying platform doesn't define a constant,
    00023  * the corresponding Ruby constant is not defined.
    00024  *
    00025  */
    00026 static void
    00027 init_constants(void)
    00028 {
    00029     rb_mSockConst = rb_define_module_under(rb_cSocket, "Constants");
    00030
    00031 #if defined(SOCK_STREAM)
    00032     /* SOCK_STREAM: */
    00033     rb_define_const(rb_cSocket, "SOCK_STREAM", INT2NUM(SOCK_STREAM));
    00034     /* SOCK_STREAM: */
    00035     rb_define_const(rb_mSockConst, "SOCK_STREAM", INT2NUM(SOCK_STREAM));
    00036 #endif
    00037 #if defined(SOCK_DGRAM)
    00038     /* SOCK_DGRAM: */
    00039     rb_define_const(rb_cSocket, "SOCK_DGRAM", INT2NUM(SOCK_DGRAM));
    00040     /* SOCK_DGRAM: */
    00041     rb_define_const(rb_mSockConst, "SOCK_DGRAM", INT2NUM(SOCK_DGRAM));
    00042 #endif
    00043 #if defined(SOCK_RAW)
    00044     /* SOCK_RAW: */
    00045     rb_define_const(rb_cSocket, "SOCK_RAW", INT2NUM(SOCK_RAW));
    00046     /* SOCK_RAW: */
    00047     rb_define_const(rb_mSockConst, "SOCK_RAW", INT2NUM(SOCK_RAW));
    00048 #endif
    00049 #if defined(SOCK_RDM)
    00050     /* SOCK_RDM: */
    00051     rb_define_const(rb_cSocket, "SOCK_RDM", INT2NUM(SOCK_RDM));
    00052     /* SOCK_RDM: */
    00053     rb_define_const(rb_mSockConst, "SOCK_RDM", INT2NUM(SOCK_RDM));
    00054 #endif
    00055 #if defined(SOCK_SEQPACKET)
    00056     /* SOCK_SEQPACKET: */
    00057     rb_define_const(rb_cSocket, "SOCK_SEQPACKET", INT2NUM(SOCK_SEQPACKET));
    00058     /* SOCK_SEQPACKET: */
    00059     rb_define_const(rb_mSockConst, "SOCK_SEQPACKET", INT2NUM(SOCK_SEQPACKET));
    00060 #endif
    00061 #if defined(SOCK_PACKET)
    00062     /* SOCK_PACKET: */
    00063     rb_define_const(rb_cSocket, "SOCK_PACKET", INT2NUM(SOCK_PACKET));
    00064     /* SOCK_PACKET: */
    00065     rb_define_const(rb_mSockConst, "SOCK_PACKET", INT2NUM(SOCK_PACKET));
    00066 #endif
    00067 #if defined(AF_UNSPEC)
    00068     /* AF_UNSPEC: */
    00069     rb_define_const(rb_cSocket, "AF_UNSPEC", INT2NUM(AF_UNSPEC));
    00070     /* AF_UNSPEC: */
    00071     rb_define_const(rb_mSockConst, "AF_UNSPEC", INT2NUM(AF_UNSPEC));
    00072 #endif
    00073 #if defined(PF_UNSPEC)
    00074     /* PF_UNSPEC: */
    00075     rb_define_const(rb_cSocket, "PF_UNSPEC", INT2NUM(PF_UNSPEC));
    00076     /* PF_UNSPEC: */
    00077     rb_define_const(rb_mSockConst, "PF_UNSPEC", INT2NUM(PF_UNSPEC));
    00078 #endif
    00079 #if defined(AF_INET)
    00080     /* AF_INET: */
    00081     rb_define_const(rb_cSocket, "AF_INET", INT2NUM(AF_INET));
    00082     /* AF_INET: */
    00083     rb_define_const(rb_mSockConst, "AF_INET", INT2NUM(AF_INET));
    00084 #endif
    00085 #if defined(PF_INET)
    00086     /* PF_INET: */
    00087     rb_define_const(rb_cSocket, "PF_INET", INT2NUM(PF_INET));
    00088     /* PF_INET: */
    00089     rb_define_const(rb_mSockConst, "PF_INET", INT2NUM(PF_INET));
    00090 #endif
    00091 #if defined(INET6)
    00092 #if defined(AF_INET6)
    00093     /* AF_INET6: */
    00094     rb_define_const(rb_cSocket, "AF_INET6", INT2NUM(AF_INET6));
    00095     /* AF_INET6: */
    00096     rb_define_const(rb_mSockConst, "AF_INET6", INT2NUM(AF_INET6));
    00097 #endif
    00098 #endif
    00099 #if defined(INET6)
    00100 #if defined(PF_INET6)
    00101     /* PF_INET6: */
    00102     rb_define_const(rb_cSocket, "PF_INET6", INT2NUM(PF_INET6));
    00103     /* PF_INET6: */
    00104     rb_define_const(rb_mSockConst, "PF_INET6", INT2NUM(PF_INET6));
    00105 #endif
    00106 #endif
    00107 #if defined(AF_UNIX)
    00108     /* AF_UNIX: */
    00109     rb_define_const(rb_cSocket, "AF_UNIX", INT2NUM(AF_UNIX));
    00110     /* AF_UNIX: */
    00111     rb_define_const(rb_mSockConst, "AF_UNIX", INT2NUM(AF_UNIX));
    00112 #endif
    00113 #if defined(PF_UNIX)
    00114     /* PF_UNIX: */
    00115     rb_define_const(rb_cSocket, "PF_UNIX", INT2NUM(PF_UNIX));
    00116     /* PF_UNIX: */
    00117     rb_define_const(rb_mSockConst, "PF_UNIX", INT2NUM(PF_UNIX));
    00118 #endif
    00119 #if defined(AF_AX25)
    00120     /* AF_AX25: */
    00121     rb_define_const(rb_cSocket, "AF_AX25", INT2NUM(AF_AX25));
    00122     /* AF_AX25: */
    00123     rb_define_const(rb_mSockConst, "AF_AX25", INT2NUM(AF_AX25));
    00124 #endif
    00125 #if defined(PF_AX25)
    00126     /* PF_AX25: */
    00127     rb_define_const(rb_cSocket, "PF_AX25", INT2NUM(PF_AX25));
    00128     /* PF_AX25: */
    00129     rb_define_const(rb_mSockConst, "PF_AX25", INT2NUM(PF_AX25));
    00130 #endif
    00131 #if defined(AF_IPX)
    00132     /* AF_IPX: */
    00133     rb_define_const(rb_cSocket, "AF_IPX", INT2NUM(AF_IPX));
    00134     /* AF_IPX: */
    00135     rb_define_const(rb_mSockConst, "AF_IPX", INT2NUM(AF_IPX));
    00136 #endif
    00137 #if defined(PF_IPX)
    00138     /* PF_IPX: */
    00139     rb_define_const(rb_cSocket, "PF_IPX", INT2NUM(PF_IPX));
    00140     /* PF_IPX: */
    00141     rb_define_const(rb_mSockConst, "PF_IPX", INT2NUM(PF_IPX));
    00142 #endif
    00143 #if defined(AF_APPLETALK)
    00144     /* AF_APPLETALK: */
    00145     rb_define_const(rb_cSocket, "AF_APPLETALK", INT2NUM(AF_APPLETALK));
    00146     /* AF_APPLETALK: */
    00147     rb_define_const(rb_mSockConst, "AF_APPLETALK", INT2NUM(AF_APPLETALK));
    00148 #endif
    00149 #if defined(PF_APPLETALK)
    00150     /* PF_APPLETALK: */
    00151     rb_define_const(rb_cSocket, "PF_APPLETALK", INT2NUM(PF_APPLETALK));
    00152     /* PF_APPLETALK: */
    00153     rb_define_const(rb_mSockConst, "PF_APPLETALK", INT2NUM(PF_APPLETALK));
    00154 #endif
    00155 #if defined(AF_LOCAL)
    00156     /* AF_LOCAL: */
    00157     rb_define_const(rb_cSocket, "AF_LOCAL", INT2NUM(AF_LOCAL));
    00158     /* AF_LOCAL: */
    00159     rb_define_const(rb_mSockConst, "AF_LOCAL", INT2NUM(AF_LOCAL));
    00160 #endif
    00161 #if defined(PF_LOCAL)
    00162     /* PF_LOCAL: */
    00163     rb_define_const(rb_cSocket, "PF_LOCAL", INT2NUM(PF_LOCAL));
    00164     /* PF_LOCAL: */
    00165     rb_define_const(rb_mSockConst, "PF_LOCAL", INT2NUM(PF_LOCAL));
    00166 #endif
    00167 #if defined(AF_IMPLINK)
    00168     /* AF_IMPLINK: */
    00169     rb_define_const(rb_cSocket, "AF_IMPLINK", INT2NUM(AF_IMPLINK));
    00170     /* AF_IMPLINK: */
    00171     rb_define_const(rb_mSockConst, "AF_IMPLINK", INT2NUM(AF_IMPLINK));
    00172 #endif
    00173 #if defined(PF_IMPLINK)
    00174     /* PF_IMPLINK: */
    00175     rb_define_const(rb_cSocket, "PF_IMPLINK", INT2NUM(PF_IMPLINK));
    00176     /* PF_IMPLINK: */
    00177     rb_define_const(rb_mSockConst, "PF_IMPLINK", INT2NUM(PF_IMPLINK));
    00178 #endif
    00179 #if defined(AF_PUP)
    00180     /* AF_PUP: */
    00181     rb_define_const(rb_cSocket, "AF_PUP", INT2NUM(AF_PUP));
    00182     /* AF_PUP: */
    00183     rb_define_const(rb_mSockConst, "AF_PUP", INT2NUM(AF_PUP));
    00184 #endif
    00185 #if defined(PF_PUP)
    00186     /* PF_PUP: */
    00187     rb_define_const(rb_cSocket, "PF_PUP", INT2NUM(PF_PUP));
    00188     /* PF_PUP: */
    00189     rb_define_const(rb_mSockConst, "PF_PUP", INT2NUM(PF_PUP));
    00190 #endif
    00191 #if defined(AF_CHAOS)
    00192     /* AF_CHAOS: */
    00193     rb_define_const(rb_cSocket, "AF_CHAOS", INT2NUM(AF_CHAOS));
    00194     /* AF_CHAOS: */
    00195     rb_define_const(rb_mSockConst, "AF_CHAOS", INT2NUM(AF_CHAOS));
    00196 #endif
    00197 #if defined(PF_CHAOS)
    00198     /* PF_CHAOS: */
    00199     rb_define_const(rb_cSocket, "PF_CHAOS", INT2NUM(PF_CHAOS));
    00200     /* PF_CHAOS: */
    00201     rb_define_const(rb_mSockConst, "PF_CHAOS", INT2NUM(PF_CHAOS));
    00202 #endif
    00203 #if defined(AF_NS)
    00204     /* AF_NS: */
    00205     rb_define_const(rb_cSocket, "AF_NS", INT2NUM(AF_NS));
    00206     /* AF_NS: */
    00207     rb_define_const(rb_mSockConst, "AF_NS", INT2NUM(AF_NS));
    00208 #endif
    00209 #if defined(PF_NS)
    00210     /* PF_NS: */
    00211     rb_define_const(rb_cSocket, "PF_NS", INT2NUM(PF_NS));
    00212     /* PF_NS: */
    00213     rb_define_const(rb_mSockConst, "PF_NS", INT2NUM(PF_NS));
    00214 #endif
    00215 #if defined(AF_ISO)
    00216     /* AF_ISO: */
    00217     rb_define_const(rb_cSocket, "AF_ISO", INT2NUM(AF_ISO));
    00218     /* AF_ISO: */
    00219     rb_define_const(rb_mSockConst, "AF_ISO", INT2NUM(AF_ISO));
    00220 #endif
    00221 #if defined(PF_ISO)
    00222     /* PF_ISO: */
    00223     rb_define_const(rb_cSocket, "PF_ISO", INT2NUM(PF_ISO));
    00224     /* PF_ISO: */
    00225     rb_define_const(rb_mSockConst, "PF_ISO", INT2NUM(PF_ISO));
    00226 #endif
    00227 #if defined(AF_OSI)
    00228     /* AF_OSI: */
    00229     rb_define_const(rb_cSocket, "AF_OSI", INT2NUM(AF_OSI));
    00230     /* AF_OSI: */
    00231     rb_define_const(rb_mSockConst, "AF_OSI", INT2NUM(AF_OSI));
    00232 #endif
    00233 #if defined(PF_OSI)
    00234     /* PF_OSI: */
    00235     rb_define_const(rb_cSocket, "PF_OSI", INT2NUM(PF_OSI));
    00236     /* PF_OSI: */
    00237     rb_define_const(rb_mSockConst, "PF_OSI", INT2NUM(PF_OSI));
    00238 #endif
    00239 #if defined(AF_ECMA)
    00240     /* AF_ECMA: */
    00241     rb_define_const(rb_cSocket, "AF_ECMA", INT2NUM(AF_ECMA));
    00242     /* AF_ECMA: */
    00243     rb_define_const(rb_mSockConst, "AF_ECMA", INT2NUM(AF_ECMA));
    00244 #endif
    00245 #if defined(PF_ECMA)
    00246     /* PF_ECMA: */
    00247     rb_define_const(rb_cSocket, "PF_ECMA", INT2NUM(PF_ECMA));
    00248     /* PF_ECMA: */
    00249     rb_define_const(rb_mSockConst, "PF_ECMA", INT2NUM(PF_ECMA));
    00250 #endif
    00251 #if defined(AF_DATAKIT)
    00252     /* AF_DATAKIT: */
    00253     rb_define_const(rb_cSocket, "AF_DATAKIT", INT2NUM(AF_DATAKIT));
    00254     /* AF_DATAKIT: */
    00255     rb_define_const(rb_mSockConst, "AF_DATAKIT", INT2NUM(AF_DATAKIT));
    00256 #endif
    00257 #if defined(PF_DATAKIT)
    00258     /* PF_DATAKIT: */
    00259     rb_define_const(rb_cSocket, "PF_DATAKIT", INT2NUM(PF_DATAKIT));
    00260     /* PF_DATAKIT: */
    00261     rb_define_const(rb_mSockConst, "PF_DATAKIT", INT2NUM(PF_DATAKIT));
    00262 #endif
    00263 #if defined(AF_CCITT)
    00264     /* AF_CCITT: */
    00265     rb_define_const(rb_cSocket, "AF_CCITT", INT2NUM(AF_CCITT));
    00266     /* AF_CCITT: */
    00267     rb_define_const(rb_mSockConst, "AF_CCITT", INT2NUM(AF_CCITT));
    00268 #endif
    00269 #if defined(PF_CCITT)
    00270     /* PF_CCITT: */
    00271     rb_define_const(rb_cSocket, "PF_CCITT", INT2NUM(PF_CCITT));
    00272     /* PF_CCITT: */
    00273     rb_define_const(rb_mSockConst, "PF_CCITT", INT2NUM(PF_CCITT));
    00274 #endif
    00275 #if defined(AF_SNA)
    00276     /* AF_SNA: */
    00277     rb_define_const(rb_cSocket, "AF_SNA", INT2NUM(AF_SNA));
    00278     /* AF_SNA: */
    00279     rb_define_const(rb_mSockConst, "AF_SNA", INT2NUM(AF_SNA));
    00280 #endif
    00281 #if defined(PF_SNA)
    00282     /* PF_SNA: */
    00283     rb_define_const(rb_cSocket, "PF_SNA", INT2NUM(PF_SNA));
    00284     /* PF_SNA: */
    00285     rb_define_const(rb_mSockConst, "PF_SNA", INT2NUM(PF_SNA));
    00286 #endif
    00287 #if defined(AF_DEC)
    00288     /* AF_DEC: */
    00289     rb_define_const(rb_cSocket, "AF_DEC", INT2NUM(AF_DEC));
    00290     /* AF_DEC: */
    00291     rb_define_const(rb_mSockConst, "AF_DEC", INT2NUM(AF_DEC));
    00292 #endif
    00293 #if defined(PF_DEC)
    00294     /* PF_DEC: */
    00295     rb_define_const(rb_cSocket, "PF_DEC", INT2NUM(PF_DEC));
    00296     /* PF_DEC: */
    00297     rb_define_const(rb_mSockConst, "PF_DEC", INT2NUM(PF_DEC));
    00298 #endif
    00299 #if defined(AF_DLI)
    00300     /* AF_DLI: */
    00301     rb_define_const(rb_cSocket, "AF_DLI", INT2NUM(AF_DLI));
    00302     /* AF_DLI: */
    00303     rb_define_const(rb_mSockConst, "AF_DLI", INT2NUM(AF_DLI));
    00304 #endif
    00305 #if defined(PF_DLI)
    00306     /* PF_DLI: */
    00307     rb_define_const(rb_cSocket, "PF_DLI", INT2NUM(PF_DLI));
    00308     /* PF_DLI: */
    00309     rb_define_const(rb_mSockConst, "PF_DLI", INT2NUM(PF_DLI));
    00310 #endif
    00311 #if defined(AF_LAT)
    00312     /* AF_LAT: */
    00313     rb_define_const(rb_cSocket, "AF_LAT", INT2NUM(AF_LAT));
    00314     /* AF_LAT: */
    00315     rb_define_const(rb_mSockConst, "AF_LAT", INT2NUM(AF_LAT));
    00316 #endif
    00317 #if defined(PF_LAT)
    00318     /* PF_LAT: */
    00319     rb_define_const(rb_cSocket, "PF_LAT", INT2NUM(PF_LAT));
    00320     /* PF_LAT: */
    00321     rb_define_const(rb_mSockConst, "PF_LAT", INT2NUM(PF_LAT));
    00322 #endif
    00323 #if defined(AF_HYLINK)
    00324     /* AF_HYLINK: */
    00325     rb_define_const(rb_cSocket, "AF_HYLINK", INT2NUM(AF_HYLINK));
    00326     /* AF_HYLINK: */
    00327     rb_define_const(rb_mSockConst, "AF_HYLINK", INT2NUM(AF_HYLINK));
    00328 #endif
    00329 #if defined(PF_HYLINK)
    00330     /* PF_HYLINK: */
    00331     rb_define_const(rb_cSocket, "PF_HYLINK", INT2NUM(PF_HYLINK));
    00332     /* PF_HYLINK: */
    00333     rb_define_const(rb_mSockConst, "PF_HYLINK", INT2NUM(PF_HYLINK));
    00334 #endif
    00335 #if defined(AF_ROUTE)
    00336     /* AF_ROUTE: */
    00337     rb_define_const(rb_cSocket, "AF_ROUTE", INT2NUM(AF_ROUTE));
    00338     /* AF_ROUTE: */
    00339     rb_define_const(rb_mSockConst, "AF_ROUTE", INT2NUM(AF_ROUTE));
    00340 #endif
    00341 #if defined(PF_ROUTE)
    00342     /* PF_ROUTE: */
    00343     rb_define_const(rb_cSocket, "PF_ROUTE", INT2NUM(PF_ROUTE));
    00344     /* PF_ROUTE: */
    00345     rb_define_const(rb_mSockConst, "PF_ROUTE", INT2NUM(PF_ROUTE));
    00346 #endif
    00347 #if defined(AF_LINK)
    00348     /* AF_LINK: */
    00349     rb_define_const(rb_cSocket, "AF_LINK", INT2NUM(AF_LINK));
    00350     /* AF_LINK: */
    00351     rb_define_const(rb_mSockConst, "AF_LINK", INT2NUM(AF_LINK));
    00352 #endif
    00353 #if defined(PF_LINK)
    00354     /* PF_LINK: */
    00355     rb_define_const(rb_cSocket, "PF_LINK", INT2NUM(PF_LINK));
    00356     /* PF_LINK: */
    00357     rb_define_const(rb_mSockConst, "PF_LINK", INT2NUM(PF_LINK));
    00358 #endif
    00359 #if defined(AF_COIP)
    00360     /* AF_COIP: */
    00361     rb_define_const(rb_cSocket, "AF_COIP", INT2NUM(AF_COIP));
    00362     /* AF_COIP: */
    00363     rb_define_const(rb_mSockConst, "AF_COIP", INT2NUM(AF_COIP));
    00364 #endif
    00365 #if defined(PF_COIP)
    00366     /* PF_COIP: */
    00367     rb_define_const(rb_cSocket, "PF_COIP", INT2NUM(PF_COIP));
    00368     /* PF_COIP: */
    00369     rb_define_const(rb_mSockConst, "PF_COIP", INT2NUM(PF_COIP));
    00370 #endif
    00371 #if defined(AF_CNT)
    00372     /* AF_CNT: */
    00373     rb_define_const(rb_cSocket, "AF_CNT", INT2NUM(AF_CNT));
    00374     /* AF_CNT: */
    00375     rb_define_const(rb_mSockConst, "AF_CNT", INT2NUM(AF_CNT));
    00376 #endif
    00377 #if defined(PF_CNT)
    00378     /* PF_CNT: */
    00379     rb_define_const(rb_cSocket, "PF_CNT", INT2NUM(PF_CNT));
    00380     /* PF_CNT: */
    00381     rb_define_const(rb_mSockConst, "PF_CNT", INT2NUM(PF_CNT));
    00382 #endif
    00383 #if defined(AF_SIP)
    00384     /* AF_SIP: */
    00385     rb_define_const(rb_cSocket, "AF_SIP", INT2NUM(AF_SIP));
    00386     /* AF_SIP: */
    00387     rb_define_const(rb_mSockConst, "AF_SIP", INT2NUM(AF_SIP));
    00388 #endif
    00389 #if defined(PF_SIP)
    00390     /* PF_SIP: */
    00391     rb_define_const(rb_cSocket, "PF_SIP", INT2NUM(PF_SIP));
    00392     /* PF_SIP: */
    00393     rb_define_const(rb_mSockConst, "PF_SIP", INT2NUM(PF_SIP));
    00394 #endif
    00395 #if defined(AF_NDRV)
    00396     /* AF_NDRV: */
    00397     rb_define_const(rb_cSocket, "AF_NDRV", INT2NUM(AF_NDRV));
    00398     /* AF_NDRV: */
    00399     rb_define_const(rb_mSockConst, "AF_NDRV", INT2NUM(AF_NDRV));
    00400 #endif
    00401 #if defined(PF_NDRV)
    00402     /* PF_NDRV: */
    00403     rb_define_const(rb_cSocket, "PF_NDRV", INT2NUM(PF_NDRV));
    00404     /* PF_NDRV: */
    00405     rb_define_const(rb_mSockConst, "PF_NDRV", INT2NUM(PF_NDRV));
    00406 #endif
    00407 #if defined(AF_ISDN)
    00408     /* AF_ISDN: */
    00409     rb_define_const(rb_cSocket, "AF_ISDN", INT2NUM(AF_ISDN));
    00410     /* AF_ISDN: */
    00411     rb_define_const(rb_mSockConst, "AF_ISDN", INT2NUM(AF_ISDN));
    00412 #endif
    00413 #if defined(PF_ISDN)
    00414     /* PF_ISDN: */
    00415     rb_define_const(rb_cSocket, "PF_ISDN", INT2NUM(PF_ISDN));
    00416     /* PF_ISDN: */
    00417     rb_define_const(rb_mSockConst, "PF_ISDN", INT2NUM(PF_ISDN));
    00418 #endif
    00419 #if defined(AF_NATM)
    00420     /* AF_NATM: */
    00421     rb_define_const(rb_cSocket, "AF_NATM", INT2NUM(AF_NATM));
    00422     /* AF_NATM: */
    00423     rb_define_const(rb_mSockConst, "AF_NATM", INT2NUM(AF_NATM));
    00424 #endif
    00425 #if defined(PF_NATM)
    00426     /* PF_NATM: */
    00427     rb_define_const(rb_cSocket, "PF_NATM", INT2NUM(PF_NATM));
    00428     /* PF_NATM: */
    00429     rb_define_const(rb_mSockConst, "PF_NATM", INT2NUM(PF_NATM));
    00430 #endif
    00431 #if defined(AF_SYSTEM)
    00432     /* AF_SYSTEM: */
    00433     rb_define_const(rb_cSocket, "AF_SYSTEM", INT2NUM(AF_SYSTEM));
    00434     /* AF_SYSTEM: */
    00435     rb_define_const(rb_mSockConst, "AF_SYSTEM", INT2NUM(AF_SYSTEM));
    00436 #endif
    00437 #if defined(PF_SYSTEM)
    00438     /* PF_SYSTEM: */
    00439     rb_define_const(rb_cSocket, "PF_SYSTEM", INT2NUM(PF_SYSTEM));
    00440     /* PF_SYSTEM: */
    00441     rb_define_const(rb_mSockConst, "PF_SYSTEM", INT2NUM(PF_SYSTEM));
    00442 #endif
    00443 #if defined(AF_NETBIOS)
    00444     /* AF_NETBIOS: */
    00445     rb_define_const(rb_cSocket, "AF_NETBIOS", INT2NUM(AF_NETBIOS));
    00446     /* AF_NETBIOS: */
    00447     rb_define_const(rb_mSockConst, "AF_NETBIOS", INT2NUM(AF_NETBIOS));
    00448 #endif
    00449 #if defined(PF_NETBIOS)
    00450     /* PF_NETBIOS: */
    00451     rb_define_const(rb_cSocket, "PF_NETBIOS", INT2NUM(PF_NETBIOS));
    00452     /* PF_NETBIOS: */
    00453     rb_define_const(rb_mSockConst, "PF_NETBIOS", INT2NUM(PF_NETBIOS));
    00454 #endif
    00455 #if defined(AF_PPP)
    00456     /* AF_PPP: */
    00457     rb_define_const(rb_cSocket, "AF_PPP", INT2NUM(AF_PPP));
    00458     /* AF_PPP: */
    00459     rb_define_const(rb_mSockConst, "AF_PPP", INT2NUM(AF_PPP));
    00460 #endif
    00461 #if defined(PF_PPP)
    00462     /* PF_PPP: */
    00463     rb_define_const(rb_cSocket, "PF_PPP", INT2NUM(PF_PPP));
    00464     /* PF_PPP: */
    00465     rb_define_const(rb_mSockConst, "PF_PPP", INT2NUM(PF_PPP));
    00466 #endif
    00467 #if defined(AF_ATM)
    00468     /* AF_ATM: */
    00469     rb_define_const(rb_cSocket, "AF_ATM", INT2NUM(AF_ATM));
    00470     /* AF_ATM: */
    00471     rb_define_const(rb_mSockConst, "AF_ATM", INT2NUM(AF_ATM));
    00472 #endif
    00473 #if defined(PF_ATM)
    00474     /* PF_ATM: */
    00475     rb_define_const(rb_cSocket, "PF_ATM", INT2NUM(PF_ATM));
    00476     /* PF_ATM: */
    00477     rb_define_const(rb_mSockConst, "PF_ATM", INT2NUM(PF_ATM));
    00478 #endif
    00479 #if defined(AF_NETGRAPH)
    00480     /* AF_NETGRAPH: */
    00481     rb_define_const(rb_cSocket, "AF_NETGRAPH", INT2NUM(AF_NETGRAPH));
    00482     /* AF_NETGRAPH: */
    00483     rb_define_const(rb_mSockConst, "AF_NETGRAPH", INT2NUM(AF_NETGRAPH));
    00484 #endif
    00485 #if defined(PF_NETGRAPH)
    00486     /* PF_NETGRAPH: */
    00487     rb_define_const(rb_cSocket, "PF_NETGRAPH", INT2NUM(PF_NETGRAPH));
    00488     /* PF_NETGRAPH: */
    00489     rb_define_const(rb_mSockConst, "PF_NETGRAPH", INT2NUM(PF_NETGRAPH));
    00490 #endif
    00491 #if defined(AF_MAX)
    00492     /* AF_MAX: */
    00493     rb_define_const(rb_cSocket, "AF_MAX", INT2NUM(AF_MAX));
    00494     /* AF_MAX: */
    00495     rb_define_const(rb_mSockConst, "AF_MAX", INT2NUM(AF_MAX));
    00496 #endif
    00497 #if defined(PF_MAX)
    00498     /* PF_MAX: */
    00499     rb_define_const(rb_cSocket, "PF_MAX", INT2NUM(PF_MAX));
    00500     /* PF_MAX: */
    00501     rb_define_const(rb_mSockConst, "PF_MAX", INT2NUM(PF_MAX));
    00502 #endif
    00503 #if defined(AF_PACKET)
    00504     /* AF_PACKET: */
    00505     rb_define_const(rb_cSocket, "AF_PACKET", INT2NUM(AF_PACKET));
    00506     /* AF_PACKET: */
    00507     rb_define_const(rb_mSockConst, "AF_PACKET", INT2NUM(AF_PACKET));
    00508 #endif
    00509 #if defined(PF_PACKET)
    00510     /* PF_PACKET: */
    00511     rb_define_const(rb_cSocket, "PF_PACKET", INT2NUM(PF_PACKET));
    00512     /* PF_PACKET: */
    00513     rb_define_const(rb_mSockConst, "PF_PACKET", INT2NUM(PF_PACKET));
    00514 #endif
    00515 #if defined(AF_E164)
    00516     /* AF_E164: */
    00517     rb_define_const(rb_cSocket, "AF_E164", INT2NUM(AF_E164));
    00518     /* AF_E164: */
    00519     rb_define_const(rb_mSockConst, "AF_E164", INT2NUM(AF_E164));
    00520 #endif
    00521 #if defined(PF_XTP)
    00522     /* PF_XTP: */
    00523     rb_define_const(rb_cSocket, "PF_XTP", INT2NUM(PF_XTP));
    00524     /* PF_XTP: */
    00525     rb_define_const(rb_mSockConst, "PF_XTP", INT2NUM(PF_XTP));
    00526 #endif
    00527 #if defined(PF_RTIP)
    00528     /* PF_RTIP: */
    00529     rb_define_const(rb_cSocket, "PF_RTIP", INT2NUM(PF_RTIP));
    00530     /* PF_RTIP: */
    00531     rb_define_const(rb_mSockConst, "PF_RTIP", INT2NUM(PF_RTIP));
    00532 #endif
    00533 #if defined(PF_PIP)
    00534     /* PF_PIP: */
    00535     rb_define_const(rb_cSocket, "PF_PIP", INT2NUM(PF_PIP));
    00536     /* PF_PIP: */
    00537     rb_define_const(rb_mSockConst, "PF_PIP", INT2NUM(PF_PIP));
    00538 #endif
    00539 #if defined(PF_KEY)
    00540     /* PF_KEY: */
    00541     rb_define_const(rb_cSocket, "PF_KEY", INT2NUM(PF_KEY));
    00542     /* PF_KEY: */
    00543     rb_define_const(rb_mSockConst, "PF_KEY", INT2NUM(PF_KEY));
    00544 #endif
    00545 #if defined(MSG_OOB)
    00546     /* MSG_OOB: */
    00547     rb_define_const(rb_cSocket, "MSG_OOB", INT2NUM(MSG_OOB));
    00548     /* MSG_OOB: */
    00549     rb_define_const(rb_mSockConst, "MSG_OOB", INT2NUM(MSG_OOB));
    00550 #endif
    00551 #if defined(MSG_PEEK)
    00552     /* MSG_PEEK: */
    00553     rb_define_const(rb_cSocket, "MSG_PEEK", INT2NUM(MSG_PEEK));
    00554     /* MSG_PEEK: */
    00555     rb_define_const(rb_mSockConst, "MSG_PEEK", INT2NUM(MSG_PEEK));
    00556 #endif
    00557 #if defined(MSG_DONTROUTE)
    00558     /* MSG_DONTROUTE: */
    00559     rb_define_const(rb_cSocket, "MSG_DONTROUTE", INT2NUM(MSG_DONTROUTE));
    00560     /* MSG_DONTROUTE: */
    00561     rb_define_const(rb_mSockConst, "MSG_DONTROUTE", INT2NUM(MSG_DONTROUTE));
    00562 #endif
    00563 #if defined(MSG_EOR)
    00564     /* MSG_EOR: */
    00565     rb_define_const(rb_cSocket, "MSG_EOR", INT2NUM(MSG_EOR));
    00566     /* MSG_EOR: */
    00567     rb_define_const(rb_mSockConst, "MSG_EOR", INT2NUM(MSG_EOR));
    00568 #endif
    00569 #if defined(MSG_TRUNC)
    00570     /* MSG_TRUNC: */
    00571     rb_define_const(rb_cSocket, "MSG_TRUNC", INT2NUM(MSG_TRUNC));
    00572     /* MSG_TRUNC: */
    00573     rb_define_const(rb_mSockConst, "MSG_TRUNC", INT2NUM(MSG_TRUNC));
    00574 #endif
    00575 #if defined(MSG_CTRUNC)
    00576     /* MSG_CTRUNC: */
    00577     rb_define_const(rb_cSocket, "MSG_CTRUNC", INT2NUM(MSG_CTRUNC));
    00578     /* MSG_CTRUNC: */
    00579     rb_define_const(rb_mSockConst, "MSG_CTRUNC", INT2NUM(MSG_CTRUNC));
    00580 #endif
    00581 #if defined(MSG_WAITALL)
    00582     /* MSG_WAITALL: */
    00583     rb_define_const(rb_cSocket, "MSG_WAITALL", INT2NUM(MSG_WAITALL));
    00584     /* MSG_WAITALL: */
    00585     rb_define_const(rb_mSockConst, "MSG_WAITALL", INT2NUM(MSG_WAITALL));
    00586 #endif
    00587 #if defined(MSG_DONTWAIT)
    00588     /* MSG_DONTWAIT: */
    00589     rb_define_const(rb_cSocket, "MSG_DONTWAIT", INT2NUM(MSG_DONTWAIT));
    00590     /* MSG_DONTWAIT: */
    00591     rb_define_const(rb_mSockConst, "MSG_DONTWAIT", INT2NUM(MSG_DONTWAIT));
    00592 #endif
    00593 #if defined(MSG_EOF)
    00594     /* MSG_EOF: */
    00595     rb_define_const(rb_cSocket, "MSG_EOF", INT2NUM(MSG_EOF));
    00596     /* MSG_EOF: */
    00597     rb_define_const(rb_mSockConst, "MSG_EOF", INT2NUM(MSG_EOF));
    00598 #endif
    00599 #if defined(MSG_FLUSH)
    00600     /* MSG_FLUSH: */
    00601     rb_define_const(rb_cSocket, "MSG_FLUSH", INT2NUM(MSG_FLUSH));
    00602     /* MSG_FLUSH: */
    00603     rb_define_const(rb_mSockConst, "MSG_FLUSH", INT2NUM(MSG_FLUSH));
    00604 #endif
    00605 #if defined(MSG_HOLD)
    00606     /* MSG_HOLD: */
    00607     rb_define_const(rb_cSocket, "MSG_HOLD", INT2NUM(MSG_HOLD));
    00608     /* MSG_HOLD: */
    00609     rb_define_const(rb_mSockConst, "MSG_HOLD", INT2NUM(MSG_HOLD));
    00610 #endif
    00611 #if defined(MSG_SEND)
    00612     /* MSG_SEND: */
    00613     rb_define_const(rb_cSocket, "MSG_SEND", INT2NUM(MSG_SEND));
    00614     /* MSG_SEND: */
    00615     rb_define_const(rb_mSockConst, "MSG_SEND", INT2NUM(MSG_SEND));
    00616 #endif
    00617 #if defined(MSG_HAVEMORE)
    00618     /* MSG_HAVEMORE: */
    00619     rb_define_const(rb_cSocket, "MSG_HAVEMORE", INT2NUM(MSG_HAVEMORE));
    00620     /* MSG_HAVEMORE: */
    00621     rb_define_const(rb_mSockConst, "MSG_HAVEMORE", INT2NUM(MSG_HAVEMORE));
    00622 #endif
    00623 #if defined(MSG_RCVMORE)
    00624     /* MSG_RCVMORE: */
    00625     rb_define_const(rb_cSocket, "MSG_RCVMORE", INT2NUM(MSG_RCVMORE));
    00626     /* MSG_RCVMORE: */
    00627     rb_define_const(rb_mSockConst, "MSG_RCVMORE", INT2NUM(MSG_RCVMORE));
    00628 #endif
    00629 #if defined(MSG_COMPAT)
    00630     /* MSG_COMPAT: */
    00631     rb_define_const(rb_cSocket, "MSG_COMPAT", INT2NUM(MSG_COMPAT));
    00632     /* MSG_COMPAT: */
    00633     rb_define_const(rb_mSockConst, "MSG_COMPAT", INT2NUM(MSG_COMPAT));
    00634 #endif
    00635 #if defined(MSG_PROXY)
    00636     /* MSG_PROXY: */
    00637     rb_define_const(rb_cSocket, "MSG_PROXY", INT2NUM(MSG_PROXY));
    00638     /* MSG_PROXY: */
    00639     rb_define_const(rb_mSockConst, "MSG_PROXY", INT2NUM(MSG_PROXY));
    00640 #endif
    00641 #if defined(MSG_FIN)
    00642     /* MSG_FIN: */
    00643     rb_define_const(rb_cSocket, "MSG_FIN", INT2NUM(MSG_FIN));
    00644     /* MSG_FIN: */
    00645     rb_define_const(rb_mSockConst, "MSG_FIN", INT2NUM(MSG_FIN));
    00646 #endif
    00647 #if defined(MSG_SYN)
    00648     /* MSG_SYN: */
    00649     rb_define_const(rb_cSocket, "MSG_SYN", INT2NUM(MSG_SYN));
    00650     /* MSG_SYN: */
    00651     rb_define_const(rb_mSockConst, "MSG_SYN", INT2NUM(MSG_SYN));
    00652 #endif
    00653 #if defined(MSG_CONFIRM)
    00654     /* MSG_CONFIRM: */
    00655     rb_define_const(rb_cSocket, "MSG_CONFIRM", INT2NUM(MSG_CONFIRM));
    00656     /* MSG_CONFIRM: */
    00657     rb_define_const(rb_mSockConst, "MSG_CONFIRM", INT2NUM(MSG_CONFIRM));
    00658 #endif
    00659 #if defined(MSG_RST)
    00660     /* MSG_RST: */
    00661     rb_define_const(rb_cSocket, "MSG_RST", INT2NUM(MSG_RST));
    00662     /* MSG_RST: */
    00663     rb_define_const(rb_mSockConst, "MSG_RST", INT2NUM(MSG_RST));
    00664 #endif
    00665 #if defined(MSG_ERRQUEUE)
    00666     /* MSG_ERRQUEUE: */
    00667     rb_define_const(rb_cSocket, "MSG_ERRQUEUE", INT2NUM(MSG_ERRQUEUE));
    00668     /* MSG_ERRQUEUE: */
    00669     rb_define_const(rb_mSockConst, "MSG_ERRQUEUE", INT2NUM(MSG_ERRQUEUE));
    00670 #endif
    00671 #if defined(MSG_NOSIGNAL)
    00672     /* MSG_NOSIGNAL: */
    00673     rb_define_const(rb_cSocket, "MSG_NOSIGNAL", INT2NUM(MSG_NOSIGNAL));
    00674     /* MSG_NOSIGNAL: */
    00675     rb_define_const(rb_mSockConst, "MSG_NOSIGNAL", INT2NUM(MSG_NOSIGNAL));
    00676 #endif
    00677 #if defined(MSG_MORE)
    00678     /* MSG_MORE: */
    00679     rb_define_const(rb_cSocket, "MSG_MORE", INT2NUM(MSG_MORE));
    00680     /* MSG_MORE: */
    00681     rb_define_const(rb_mSockConst, "MSG_MORE", INT2NUM(MSG_MORE));
    00682 #endif
    00683 #if defined(SOL_SOCKET)
    00684     /* SOL_SOCKET: */
    00685     rb_define_const(rb_cSocket, "SOL_SOCKET", INT2NUM(SOL_SOCKET));
    00686     /* SOL_SOCKET: */
    00687     rb_define_const(rb_mSockConst, "SOL_SOCKET", INT2NUM(SOL_SOCKET));
    00688 #endif
    00689 #if defined(SOL_IP)
    00690     /* SOL_IP: */
    00691     rb_define_const(rb_cSocket, "SOL_IP", INT2NUM(SOL_IP));
    00692     /* SOL_IP: */
    00693     rb_define_const(rb_mSockConst, "SOL_IP", INT2NUM(SOL_IP));
    00694 #endif
    00695 #if defined(SOL_IPX)
    00696     /* SOL_IPX: */
    00697     rb_define_const(rb_cSocket, "SOL_IPX", INT2NUM(SOL_IPX));
    00698     /* SOL_IPX: */
    00699     rb_define_const(rb_mSockConst, "SOL_IPX", INT2NUM(SOL_IPX));
    00700 #endif
    00701 #if defined(SOL_AX25)
    00702     /* SOL_AX25: */
    00703     rb_define_const(rb_cSocket, "SOL_AX25", INT2NUM(SOL_AX25));
    00704     /* SOL_AX25: */
    00705     rb_define_const(rb_mSockConst, "SOL_AX25", INT2NUM(SOL_AX25));
    00706 #endif
    00707 #if defined(SOL_ATALK)
    00708     /* SOL_ATALK: */
    00709     rb_define_const(rb_cSocket, "SOL_ATALK", INT2NUM(SOL_ATALK));
    00710     /* SOL_ATALK: */
    00711     rb_define_const(rb_mSockConst, "SOL_ATALK", INT2NUM(SOL_ATALK));
    00712 #endif
    00713 #if defined(SOL_TCP)
    00714     /* SOL_TCP: */
    00715     rb_define_const(rb_cSocket, "SOL_TCP", INT2NUM(SOL_TCP));
    00716     /* SOL_TCP: */
    00717     rb_define_const(rb_mSockConst, "SOL_TCP", INT2NUM(SOL_TCP));
    00718 #endif
    00719 #if defined(SOL_UDP)
    00720     /* SOL_UDP: */
    00721     rb_define_const(rb_cSocket, "SOL_UDP", INT2NUM(SOL_UDP));
    00722     /* SOL_UDP: */
    00723     rb_define_const(rb_mSockConst, "SOL_UDP", INT2NUM(SOL_UDP));
    00724 #endif
    00725 #if defined(IPPROTO_IP)
    00726     /* IPPROTO_IP: */
    00727     rb_define_const(rb_cSocket, "IPPROTO_IP", INT2NUM(IPPROTO_IP));
    00728     /* IPPROTO_IP: */
    00729     rb_define_const(rb_mSockConst, "IPPROTO_IP", INT2NUM(IPPROTO_IP));
    00730 #endif
    00731 #if defined(IPPROTO_ICMP)
    00732     /* IPPROTO_ICMP: */
    00733     rb_define_const(rb_cSocket, "IPPROTO_ICMP", INT2NUM(IPPROTO_ICMP));
    00734     /* IPPROTO_ICMP: */
    00735     rb_define_const(rb_mSockConst, "IPPROTO_ICMP", INT2NUM(IPPROTO_ICMP));
    00736 #endif
    00737 #if defined(IPPROTO_IGMP)
    00738     /* IPPROTO_IGMP: */
    00739     rb_define_const(rb_cSocket, "IPPROTO_IGMP", INT2NUM(IPPROTO_IGMP));
    00740     /* IPPROTO_IGMP: */
    00741     rb_define_const(rb_mSockConst, "IPPROTO_IGMP", INT2NUM(IPPROTO_IGMP));
    00742 #endif
    00743 #if defined(IPPROTO_GGP)
    00744     /* IPPROTO_GGP: */
    00745     rb_define_const(rb_cSocket, "IPPROTO_GGP", INT2NUM(IPPROTO_GGP));
    00746     /* IPPROTO_GGP: */
    00747     rb_define_const(rb_mSockConst, "IPPROTO_GGP", INT2NUM(IPPROTO_GGP));
    00748 #endif
    00749 #if defined(IPPROTO_TCP)
    00750     /* IPPROTO_TCP: */
    00751     rb_define_const(rb_cSocket, "IPPROTO_TCP", INT2NUM(IPPROTO_TCP));
    00752     /* IPPROTO_TCP: */
    00753     rb_define_const(rb_mSockConst, "IPPROTO_TCP", INT2NUM(IPPROTO_TCP));
    00754 #endif
    00755 #if defined(IPPROTO_EGP)
    00756     /* IPPROTO_EGP: */
    00757     rb_define_const(rb_cSocket, "IPPROTO_EGP", INT2NUM(IPPROTO_EGP));
    00758     /* IPPROTO_EGP: */
    00759     rb_define_const(rb_mSockConst, "IPPROTO_EGP", INT2NUM(IPPROTO_EGP));
    00760 #endif
    00761 #if defined(IPPROTO_PUP)
    00762     /* IPPROTO_PUP: */
    00763     rb_define_const(rb_cSocket, "IPPROTO_PUP", INT2NUM(IPPROTO_PUP));
    00764     /* IPPROTO_PUP: */
    00765     rb_define_const(rb_mSockConst, "IPPROTO_PUP", INT2NUM(IPPROTO_PUP));
    00766 #endif
    00767 #if defined(IPPROTO_UDP)
    00768     /* IPPROTO_UDP: */
    00769     rb_define_const(rb_cSocket, "IPPROTO_UDP", INT2NUM(IPPROTO_UDP));
    00770     /* IPPROTO_UDP: */
    00771     rb_define_const(rb_mSockConst, "IPPROTO_UDP", INT2NUM(IPPROTO_UDP));
    00772 #endif
    00773 #if defined(IPPROTO_IDP)
    00774     /* IPPROTO_IDP: */
    00775     rb_define_const(rb_cSocket, "IPPROTO_IDP", INT2NUM(IPPROTO_IDP));
    00776     /* IPPROTO_IDP: */
    00777     rb_define_const(rb_mSockConst, "IPPROTO_IDP", INT2NUM(IPPROTO_IDP));
    00778 #endif
    00779 #if defined(IPPROTO_HELLO)
    00780     /* IPPROTO_HELLO: */
    00781     rb_define_const(rb_cSocket, "IPPROTO_HELLO", INT2NUM(IPPROTO_HELLO));
    00782     /* IPPROTO_HELLO: */
    00783     rb_define_const(rb_mSockConst, "IPPROTO_HELLO", INT2NUM(IPPROTO_HELLO));
    00784 #endif
    00785 #if defined(IPPROTO_ND)
    00786     /* IPPROTO_ND: */
    00787     rb_define_const(rb_cSocket, "IPPROTO_ND", INT2NUM(IPPROTO_ND));
    00788     /* IPPROTO_ND: */
    00789     rb_define_const(rb_mSockConst, "IPPROTO_ND", INT2NUM(IPPROTO_ND));
    00790 #endif
    00791 #if defined(IPPROTO_TP)
    00792     /* IPPROTO_TP: */
    00793     rb_define_const(rb_cSocket, "IPPROTO_TP", INT2NUM(IPPROTO_TP));
    00794     /* IPPROTO_TP: */
    00795     rb_define_const(rb_mSockConst, "IPPROTO_TP", INT2NUM(IPPROTO_TP));
    00796 #endif
    00797 #if defined(IPPROTO_XTP)
    00798     /* IPPROTO_XTP: */
    00799     rb_define_const(rb_cSocket, "IPPROTO_XTP", INT2NUM(IPPROTO_XTP));
    00800     /* IPPROTO_XTP: */
    00801     rb_define_const(rb_mSockConst, "IPPROTO_XTP", INT2NUM(IPPROTO_XTP));
    00802 #endif
    00803 #if defined(IPPROTO_EON)
    00804     /* IPPROTO_EON: */
    00805     rb_define_const(rb_cSocket, "IPPROTO_EON", INT2NUM(IPPROTO_EON));
    00806     /* IPPROTO_EON: */
    00807     rb_define_const(rb_mSockConst, "IPPROTO_EON", INT2NUM(IPPROTO_EON));
    00808 #endif
    00809 #if defined(IPPROTO_BIP)
    00810     /* IPPROTO_BIP: */
    00811     rb_define_const(rb_cSocket, "IPPROTO_BIP", INT2NUM(IPPROTO_BIP));
    00812     /* IPPROTO_BIP: */
    00813     rb_define_const(rb_mSockConst, "IPPROTO_BIP", INT2NUM(IPPROTO_BIP));
    00814 #endif
    00815 #if defined(IPPROTO_AH)
    00816     /* IPPROTO_AH: */
    00817     rb_define_const(rb_cSocket, "IPPROTO_AH", INT2NUM(IPPROTO_AH));
    00818     /* IPPROTO_AH: */
    00819     rb_define_const(rb_mSockConst, "IPPROTO_AH", INT2NUM(IPPROTO_AH));
    00820 #endif
    00821 #if defined(IPPROTO_DSTOPTS)
    00822     /* IPPROTO_DSTOPTS: */
    00823     rb_define_const(rb_cSocket, "IPPROTO_DSTOPTS", INT2NUM(IPPROTO_DSTOPTS));
    00824     /* IPPROTO_DSTOPTS: */
    00825     rb_define_const(rb_mSockConst, "IPPROTO_DSTOPTS", INT2NUM(IPPROTO_DSTOPTS));
    00826 #endif
    00827 #if defined(IPPROTO_ESP)
    00828     /* IPPROTO_ESP: */
    00829     rb_define_const(rb_cSocket, "IPPROTO_ESP", INT2NUM(IPPROTO_ESP));
    00830     /* IPPROTO_ESP: */
    00831     rb_define_const(rb_mSockConst, "IPPROTO_ESP", INT2NUM(IPPROTO_ESP));
    00832 #endif
    00833 #if defined(IPPROTO_FRAGMENT)
    00834     /* IPPROTO_FRAGMENT: */
    00835     rb_define_const(rb_cSocket, "IPPROTO_FRAGMENT", INT2NUM(IPPROTO_FRAGMENT));
    00836     /* IPPROTO_FRAGMENT: */
    00837     rb_define_const(rb_mSockConst, "IPPROTO_FRAGMENT", INT2NUM(IPPROTO_FRAGMENT));
    00838 #endif
    00839 #if defined(IPPROTO_HOPOPTS)
    00840     /* IPPROTO_HOPOPTS: */
    00841     rb_define_const(rb_cSocket, "IPPROTO_HOPOPTS", INT2NUM(IPPROTO_HOPOPTS));
    00842     /* IPPROTO_HOPOPTS: */
    00843     rb_define_const(rb_mSockConst, "IPPROTO_HOPOPTS", INT2NUM(IPPROTO_HOPOPTS));
    00844 #endif
    00845 #if defined(IPPROTO_ICMPV6)
    00846     /* IPPROTO_ICMPV6: */
    00847     rb_define_const(rb_cSocket, "IPPROTO_ICMPV6", INT2NUM(IPPROTO_ICMPV6));
    00848     /* IPPROTO_ICMPV6: */
    00849     rb_define_const(rb_mSockConst, "IPPROTO_ICMPV6", INT2NUM(IPPROTO_ICMPV6));
    00850 #endif
    00851 #if defined(IPPROTO_IPV6)
    00852     /* IPPROTO_IPV6: */
    00853     rb_define_const(rb_cSocket, "IPPROTO_IPV6", INT2NUM(IPPROTO_IPV6));
    00854     /* IPPROTO_IPV6: */
    00855     rb_define_const(rb_mSockConst, "IPPROTO_IPV6", INT2NUM(IPPROTO_IPV6));
    00856 #endif
    00857 #if defined(IPPROTO_NONE)
    00858     /* IPPROTO_NONE: */
    00859     rb_define_const(rb_cSocket, "IPPROTO_NONE", INT2NUM(IPPROTO_NONE));
    00860     /* IPPROTO_NONE: */
    00861     rb_define_const(rb_mSockConst, "IPPROTO_NONE", INT2NUM(IPPROTO_NONE));
    00862 #endif
    00863 #if defined(IPPROTO_ROUTING)
    00864     /* IPPROTO_ROUTING: */
    00865     rb_define_const(rb_cSocket, "IPPROTO_ROUTING", INT2NUM(IPPROTO_ROUTING));
    00866     /* IPPROTO_ROUTING: */
    00867     rb_define_const(rb_mSockConst, "IPPROTO_ROUTING", INT2NUM(IPPROTO_ROUTING));
    00868 #endif
    00869 #if defined(IPPROTO_RAW)
    00870     /* IPPROTO_RAW: */
    00871     rb_define_const(rb_cSocket, "IPPROTO_RAW", INT2NUM(IPPROTO_RAW));
    00872     /* IPPROTO_RAW: */
    00873     rb_define_const(rb_mSockConst, "IPPROTO_RAW", INT2NUM(IPPROTO_RAW));
    00874 #endif
    00875 #if defined(IPPROTO_MAX)
    00876     /* IPPROTO_MAX: */
    00877     rb_define_const(rb_cSocket, "IPPROTO_MAX", INT2NUM(IPPROTO_MAX));
    00878     /* IPPROTO_MAX: */
    00879     rb_define_const(rb_mSockConst, "IPPROTO_MAX", INT2NUM(IPPROTO_MAX));
    00880 #endif
    00881 #if defined(IPPORT_RESERVED)
    00882     /* IPPORT_RESERVED: */
    00883     rb_define_const(rb_cSocket, "IPPORT_RESERVED", INT2NUM(IPPORT_RESERVED));
    00884     /* IPPORT_RESERVED: */
    00885     rb_define_const(rb_mSockConst, "IPPORT_RESERVED", INT2NUM(IPPORT_RESERVED));
    00886 #endif
    00887 #if defined(IPPORT_USERRESERVED)
    00888     /* IPPORT_USERRESERVED: */
    00889     rb_define_const(rb_cSocket, "IPPORT_USERRESERVED", INT2NUM(IPPORT_USERRESERVED));
    00890     /* IPPORT_USERRESERVED: */
    00891     rb_define_const(rb_mSockConst, "IPPORT_USERRESERVED", INT2NUM(IPPORT_USERRESERVED));
    00892 #endif
    00893 #if defined(INADDR_ANY)
    00894     /* INADDR_ANY: */
    00895     rb_define_const(rb_cSocket, "INADDR_ANY", UINT2NUM(INADDR_ANY));
    00896     /* INADDR_ANY: */
    00897     rb_define_const(rb_mSockConst, "INADDR_ANY", UINT2NUM(INADDR_ANY));
    00898 #endif
    00899 #if defined(INADDR_BROADCAST)
    00900     /* INADDR_BROADCAST: */
    00901     rb_define_const(rb_cSocket, "INADDR_BROADCAST", UINT2NUM(INADDR_BROADCAST));
    00902     /* INADDR_BROADCAST: */
    00903     rb_define_const(rb_mSockConst, "INADDR_BROADCAST", UINT2NUM(INADDR_BROADCAST));
    00904 #endif
    00905 #if defined(INADDR_LOOPBACK)
    00906     /* INADDR_LOOPBACK: */
    00907     rb_define_const(rb_cSocket, "INADDR_LOOPBACK", UINT2NUM(INADDR_LOOPBACK));
    00908     /* INADDR_LOOPBACK: */
    00909     rb_define_const(rb_mSockConst, "INADDR_LOOPBACK", UINT2NUM(INADDR_LOOPBACK));
    00910 #endif
    00911 #if defined(INADDR_UNSPEC_GROUP)
    00912     /* INADDR_UNSPEC_GROUP: */
    00913     rb_define_const(rb_cSocket, "INADDR_UNSPEC_GROUP", UINT2NUM(INADDR_UNSPEC_GROUP));
    00914     /* INADDR_UNSPEC_GROUP: */
    00915     rb_define_const(rb_mSockConst, "INADDR_UNSPEC_GROUP", UINT2NUM(INADDR_UNSPEC_GROUP));
    00916 #endif
    00917 #if defined(INADDR_ALLHOSTS_GROUP)
    00918     /* INADDR_ALLHOSTS_GROUP: */
    00919     rb_define_const(rb_cSocket, "INADDR_ALLHOSTS_GROUP", UINT2NUM(INADDR_ALLHOSTS_GROUP));
    00920     /* INADDR_ALLHOSTS_GROUP: */
    00921     rb_define_const(rb_mSockConst, "INADDR_ALLHOSTS_GROUP", UINT2NUM(INADDR_ALLHOSTS_GROUP));
    00922 #endif
    00923 #if defined(INADDR_MAX_LOCAL_GROUP)
    00924     /* INADDR_MAX_LOCAL_GROUP: */
    00925     rb_define_const(rb_cSocket, "INADDR_MAX_LOCAL_GROUP", UINT2NUM(INADDR_MAX_LOCAL_GROUP));
    00926     /* INADDR_MAX_LOCAL_GROUP: */
    00927     rb_define_const(rb_mSockConst, "INADDR_MAX_LOCAL_GROUP", UINT2NUM(INADDR_MAX_LOCAL_GROUP));
    00928 #endif
    00929 #if defined(INADDR_NONE)
    00930     /* INADDR_NONE: */
    00931     rb_define_const(rb_cSocket, "INADDR_NONE", UINT2NUM(INADDR_NONE));
    00932     /* INADDR_NONE: */
    00933     rb_define_const(rb_mSockConst, "INADDR_NONE", UINT2NUM(INADDR_NONE));
    00934 #endif
    00935 #if defined(IP_OPTIONS)
    00936     /* IP_OPTIONS: */
    00937     rb_define_const(rb_cSocket, "IP_OPTIONS", INT2NUM(IP_OPTIONS));
    00938     /* IP_OPTIONS: */
    00939     rb_define_const(rb_mSockConst, "IP_OPTIONS", INT2NUM(IP_OPTIONS));
    00940 #endif
    00941 #if defined(IP_HDRINCL)
    00942     /* IP_HDRINCL: */
    00943     rb_define_const(rb_cSocket, "IP_HDRINCL", INT2NUM(IP_HDRINCL));
    00944     /* IP_HDRINCL: */
    00945     rb_define_const(rb_mSockConst, "IP_HDRINCL", INT2NUM(IP_HDRINCL));
    00946 #endif
    00947 #if defined(IP_TOS)
    00948     /* IP_TOS: */
    00949     rb_define_const(rb_cSocket, "IP_TOS", INT2NUM(IP_TOS));
    00950     /* IP_TOS: */
    00951     rb_define_const(rb_mSockConst, "IP_TOS", INT2NUM(IP_TOS));
    00952 #endif
    00953 #if defined(IP_TTL)
    00954     /* IP_TTL: */
    00955     rb_define_const(rb_cSocket, "IP_TTL", INT2NUM(IP_TTL));
    00956     /* IP_TTL: */
    00957     rb_define_const(rb_mSockConst, "IP_TTL", INT2NUM(IP_TTL));
    00958 #endif
    00959 #if defined(IP_RECVOPTS)
    00960     /* IP_RECVOPTS: */
    00961     rb_define_const(rb_cSocket, "IP_RECVOPTS", INT2NUM(IP_RECVOPTS));
    00962     /* IP_RECVOPTS: */
    00963     rb_define_const(rb_mSockConst, "IP_RECVOPTS", INT2NUM(IP_RECVOPTS));
    00964 #endif
    00965 #if defined(IP_RECVRETOPTS)
    00966     /* IP_RECVRETOPTS: */
    00967     rb_define_const(rb_cSocket, "IP_RECVRETOPTS", INT2NUM(IP_RECVRETOPTS));
    00968     /* IP_RECVRETOPTS: */
    00969     rb_define_const(rb_mSockConst, "IP_RECVRETOPTS", INT2NUM(IP_RECVRETOPTS));
    00970 #endif
    00971 #if defined(IP_RECVDSTADDR)
    00972     /* IP_RECVDSTADDR: */
    00973     rb_define_const(rb_cSocket, "IP_RECVDSTADDR", INT2NUM(IP_RECVDSTADDR));
    00974     /* IP_RECVDSTADDR: */
    00975     rb_define_const(rb_mSockConst, "IP_RECVDSTADDR", INT2NUM(IP_RECVDSTADDR));
    00976 #endif
    00977 #if defined(IP_RETOPTS)
    00978     /* IP_RETOPTS: */
    00979     rb_define_const(rb_cSocket, "IP_RETOPTS", INT2NUM(IP_RETOPTS));
    00980     /* IP_RETOPTS: */
    00981     rb_define_const(rb_mSockConst, "IP_RETOPTS", INT2NUM(IP_RETOPTS));
    00982 #endif
    00983 #if defined(IP_MINTTL)
    00984     /* IP_MINTTL: */
    00985     rb_define_const(rb_cSocket, "IP_MINTTL", INT2NUM(IP_MINTTL));
    00986     /* IP_MINTTL: */
    00987     rb_define_const(rb_mSockConst, "IP_MINTTL", INT2NUM(IP_MINTTL));
    00988 #endif
    00989 #if defined(IP_DONTFRAG)
    00990     /* IP_DONTFRAG: */
    00991     rb_define_const(rb_cSocket, "IP_DONTFRAG", INT2NUM(IP_DONTFRAG));
    00992     /* IP_DONTFRAG: */
    00993     rb_define_const(rb_mSockConst, "IP_DONTFRAG", INT2NUM(IP_DONTFRAG));
    00994 #endif
    00995 #if defined(IP_SENDSRCADDR)
    00996     /* IP_SENDSRCADDR: */
    00997     rb_define_const(rb_cSocket, "IP_SENDSRCADDR", INT2NUM(IP_SENDSRCADDR));
    00998     /* IP_SENDSRCADDR: */
    00999     rb_define_const(rb_mSockConst, "IP_SENDSRCADDR", INT2NUM(IP_SENDSRCADDR));
    01000 #endif
    01001 #if defined(IP_ONESBCAST)
    01002     /* IP_ONESBCAST: */
    01003     rb_define_const(rb_cSocket, "IP_ONESBCAST", INT2NUM(IP_ONESBCAST));
    01004     /* IP_ONESBCAST: */
    01005     rb_define_const(rb_mSockConst, "IP_ONESBCAST", INT2NUM(IP_ONESBCAST));
    01006 #endif
    01007 #if defined(IP_RECVTTL)
    01008     /* IP_RECVTTL: */
    01009     rb_define_const(rb_cSocket, "IP_RECVTTL", INT2NUM(IP_RECVTTL));
    01010     /* IP_RECVTTL: */
    01011     rb_define_const(rb_mSockConst, "IP_RECVTTL", INT2NUM(IP_RECVTTL));
    01012 #endif
    01013 #if defined(IP_RECVIF)
    01014     /* IP_RECVIF: */
    01015     rb_define_const(rb_cSocket, "IP_RECVIF", INT2NUM(IP_RECVIF));
    01016     /* IP_RECVIF: */
    01017     rb_define_const(rb_mSockConst, "IP_RECVIF", INT2NUM(IP_RECVIF));
    01018 #endif
    01019 #if defined(IP_RECVSLLA)
    01020     /* IP_RECVSLLA: */
    01021     rb_define_const(rb_cSocket, "IP_RECVSLLA", INT2NUM(IP_RECVSLLA));
    01022     /* IP_RECVSLLA: */
    01023     rb_define_const(rb_mSockConst, "IP_RECVSLLA", INT2NUM(IP_RECVSLLA));
    01024 #endif
    01025 #if defined(IP_PORTRANGE)
    01026     /* IP_PORTRANGE: */
    01027     rb_define_const(rb_cSocket, "IP_PORTRANGE", INT2NUM(IP_PORTRANGE));
    01028     /* IP_PORTRANGE: */
    01029     rb_define_const(rb_mSockConst, "IP_PORTRANGE", INT2NUM(IP_PORTRANGE));
    01030 #endif
    01031 #if defined(IP_MULTICAST_IF)
    01032     /* IP_MULTICAST_IF: */
    01033     rb_define_const(rb_cSocket, "IP_MULTICAST_IF", INT2NUM(IP_MULTICAST_IF));
    01034     /* IP_MULTICAST_IF: */
    01035     rb_define_const(rb_mSockConst, "IP_MULTICAST_IF", INT2NUM(IP_MULTICAST_IF));
    01036 #endif
    01037 #if defined(IP_MULTICAST_TTL)
    01038     /* IP_MULTICAST_TTL: */
    01039     rb_define_const(rb_cSocket, "IP_MULTICAST_TTL", INT2NUM(IP_MULTICAST_TTL));
    01040     /* IP_MULTICAST_TTL: */
    01041     rb_define_const(rb_mSockConst, "IP_MULTICAST_TTL", INT2NUM(IP_MULTICAST_TTL));
    01042 #endif
    01043 #if defined(IP_MULTICAST_LOOP)
    01044     /* IP_MULTICAST_LOOP: */
    01045     rb_define_const(rb_cSocket, "IP_MULTICAST_LOOP", INT2NUM(IP_MULTICAST_LOOP));
    01046     /* IP_MULTICAST_LOOP: */
    01047     rb_define_const(rb_mSockConst, "IP_MULTICAST_LOOP", INT2NUM(IP_MULTICAST_LOOP));
    01048 #endif
    01049 #if defined(IP_ADD_MEMBERSHIP)
    01050     /* IP_ADD_MEMBERSHIP: */
    01051     rb_define_const(rb_cSocket, "IP_ADD_MEMBERSHIP", INT2NUM(IP_ADD_MEMBERSHIP));
    01052     /* IP_ADD_MEMBERSHIP: */
    01053     rb_define_const(rb_mSockConst, "IP_ADD_MEMBERSHIP", INT2NUM(IP_ADD_MEMBERSHIP));
    01054 #endif
    01055 #if defined(IP_DROP_MEMBERSHIP)
    01056     /* IP_DROP_MEMBERSHIP: */
    01057     rb_define_const(rb_cSocket, "IP_DROP_MEMBERSHIP", INT2NUM(IP_DROP_MEMBERSHIP));
    01058     /* IP_DROP_MEMBERSHIP: */
    01059     rb_define_const(rb_mSockConst, "IP_DROP_MEMBERSHIP", INT2NUM(IP_DROP_MEMBERSHIP));
    01060 #endif
    01061 #if defined(IP_DEFAULT_MULTICAST_TTL)
    01062     /* IP_DEFAULT_MULTICAST_TTL: */
    01063     rb_define_const(rb_cSocket, "IP_DEFAULT_MULTICAST_TTL", INT2NUM(IP_DEFAULT_MULTICAST_TTL));
    01064     /* IP_DEFAULT_MULTICAST_TTL: */
    01065     rb_define_const(rb_mSockConst, "IP_DEFAULT_MULTICAST_TTL", INT2NUM(IP_DEFAULT_MULTICAST_TTL));
    01066 #endif
    01067 #if defined(IP_DEFAULT_MULTICAST_LOOP)
    01068     /* IP_DEFAULT_MULTICAST_LOOP: */
    01069     rb_define_const(rb_cSocket, "IP_DEFAULT_MULTICAST_LOOP", INT2NUM(IP_DEFAULT_MULTICAST_LOOP));
    01070     /* IP_DEFAULT_MULTICAST_LOOP: */
    01071     rb_define_const(rb_mSockConst, "IP_DEFAULT_MULTICAST_LOOP", INT2NUM(IP_DEFAULT_MULTICAST_LOOP));
    01072 #endif
    01073 #if defined(IP_MAX_MEMBERSHIPS)
    01074     /* IP_MAX_MEMBERSHIPS: */
    01075     rb_define_const(rb_cSocket, "IP_MAX_MEMBERSHIPS", INT2NUM(IP_MAX_MEMBERSHIPS));
    01076     /* IP_MAX_MEMBERSHIPS: */
    01077     rb_define_const(rb_mSockConst, "IP_MAX_MEMBERSHIPS", INT2NUM(IP_MAX_MEMBERSHIPS));
    01078 #endif
    01079 #if defined(IP_ROUTER_ALERT)
    01080     /* IP_ROUTER_ALERT: */
    01081     rb_define_const(rb_cSocket, "IP_ROUTER_ALERT", INT2NUM(IP_ROUTER_ALERT));
    01082     /* IP_ROUTER_ALERT: */
    01083     rb_define_const(rb_mSockConst, "IP_ROUTER_ALERT", INT2NUM(IP_ROUTER_ALERT));
    01084 #endif
    01085 #if defined(IP_PKTINFO)
    01086     /* IP_PKTINFO: */
    01087     rb_define_const(rb_cSocket, "IP_PKTINFO", INT2NUM(IP_PKTINFO));
    01088     /* IP_PKTINFO: */
    01089     rb_define_const(rb_mSockConst, "IP_PKTINFO", INT2NUM(IP_PKTINFO));
    01090 #endif
    01091 #if defined(IP_PKTOPTIONS)
    01092     /* IP_PKTOPTIONS: */
    01093     rb_define_const(rb_cSocket, "IP_PKTOPTIONS", INT2NUM(IP_PKTOPTIONS));
    01094     /* IP_PKTOPTIONS: */
    01095     rb_define_const(rb_mSockConst, "IP_PKTOPTIONS", INT2NUM(IP_PKTOPTIONS));
    01096 #endif
    01097 #if defined(IP_MTU_DISCOVER)
    01098     /* IP_MTU_DISCOVER: */
    01099     rb_define_const(rb_cSocket, "IP_MTU_DISCOVER", INT2NUM(IP_MTU_DISCOVER));
    01100     /* IP_MTU_DISCOVER: */
    01101     rb_define_const(rb_mSockConst, "IP_MTU_DISCOVER", INT2NUM(IP_MTU_DISCOVER));
    01102 #endif
    01103 #if defined(IP_RECVERR)
    01104     /* IP_RECVERR: */
    01105     rb_define_const(rb_cSocket, "IP_RECVERR", INT2NUM(IP_RECVERR));
    01106     /* IP_RECVERR: */
    01107     rb_define_const(rb_mSockConst, "IP_RECVERR", INT2NUM(IP_RECVERR));
    01108 #endif
    01109 #if defined(IP_RECVTOS)
    01110     /* IP_RECVTOS: */
    01111     rb_define_const(rb_cSocket, "IP_RECVTOS", INT2NUM(IP_RECVTOS));
    01112     /* IP_RECVTOS: */
    01113     rb_define_const(rb_mSockConst, "IP_RECVTOS", INT2NUM(IP_RECVTOS));
    01114 #endif
    01115 #if defined(IP_MTU)
    01116     /* IP_MTU: */
    01117     rb_define_const(rb_cSocket, "IP_MTU", INT2NUM(IP_MTU));
    01118     /* IP_MTU: */
    01119     rb_define_const(rb_mSockConst, "IP_MTU", INT2NUM(IP_MTU));
    01120 #endif
    01121 #if defined(IP_FREEBIND)
    01122     /* IP_FREEBIND: */
    01123     rb_define_const(rb_cSocket, "IP_FREEBIND", INT2NUM(IP_FREEBIND));
    01124     /* IP_FREEBIND: */
    01125     rb_define_const(rb_mSockConst, "IP_FREEBIND", INT2NUM(IP_FREEBIND));
    01126 #endif
    01127 #if defined(IP_IPSEC_POLICY)
    01128     /* IP_IPSEC_POLICY: */
    01129     rb_define_const(rb_cSocket, "IP_IPSEC_POLICY", INT2NUM(IP_IPSEC_POLICY));
    01130     /* IP_IPSEC_POLICY: */
    01131     rb_define_const(rb_mSockConst, "IP_IPSEC_POLICY", INT2NUM(IP_IPSEC_POLICY));
    01132 #endif
    01133 #if defined(IP_XFRM_POLICY)
    01134     /* IP_XFRM_POLICY: */
    01135     rb_define_const(rb_cSocket, "IP_XFRM_POLICY", INT2NUM(IP_XFRM_POLICY));
    01136     /* IP_XFRM_POLICY: */
    01137     rb_define_const(rb_mSockConst, "IP_XFRM_POLICY", INT2NUM(IP_XFRM_POLICY));
    01138 #endif
    01139 #if defined(IP_PASSSEC)
    01140     /* IP_PASSSEC: */
    01141     rb_define_const(rb_cSocket, "IP_PASSSEC", INT2NUM(IP_PASSSEC));
    01142     /* IP_PASSSEC: */
    01143     rb_define_const(rb_mSockConst, "IP_PASSSEC", INT2NUM(IP_PASSSEC));
    01144 #endif
    01145 #if defined(IP_PMTUDISC_DONT)
    01146     /* IP_PMTUDISC_DONT: */
    01147     rb_define_const(rb_cSocket, "IP_PMTUDISC_DONT", INT2NUM(IP_PMTUDISC_DONT));
    01148     /* IP_PMTUDISC_DONT: */
    01149     rb_define_const(rb_mSockConst, "IP_PMTUDISC_DONT", INT2NUM(IP_PMTUDISC_DONT));
    01150 #endif
    01151 #if defined(IP_PMTUDISC_WANT)
    01152     /* IP_PMTUDISC_WANT: */
    01153     rb_define_const(rb_cSocket, "IP_PMTUDISC_WANT", INT2NUM(IP_PMTUDISC_WANT));
    01154     /* IP_PMTUDISC_WANT: */
    01155     rb_define_const(rb_mSockConst, "IP_PMTUDISC_WANT", INT2NUM(IP_PMTUDISC_WANT));
    01156 #endif
    01157 #if defined(IP_PMTUDISC_DO)
    01158     /* IP_PMTUDISC_DO: */
    01159     rb_define_const(rb_cSocket, "IP_PMTUDISC_DO", INT2NUM(IP_PMTUDISC_DO));
    01160     /* IP_PMTUDISC_DO: */
    01161     rb_define_const(rb_mSockConst, "IP_PMTUDISC_DO", INT2NUM(IP_PMTUDISC_DO));
    01162 #endif
    01163 #if defined(IP_UNBLOCK_SOURCE)
    01164     /* IP_UNBLOCK_SOURCE: */
    01165     rb_define_const(rb_cSocket, "IP_UNBLOCK_SOURCE", INT2NUM(IP_UNBLOCK_SOURCE));
    01166     /* IP_UNBLOCK_SOURCE: */
    01167     rb_define_const(rb_mSockConst, "IP_UNBLOCK_SOURCE", INT2NUM(IP_UNBLOCK_SOURCE));
    01168 #endif
    01169 #if defined(IP_BLOCK_SOURCE)
    01170     /* IP_BLOCK_SOURCE: */
    01171     rb_define_const(rb_cSocket, "IP_BLOCK_SOURCE", INT2NUM(IP_BLOCK_SOURCE));
    01172     /* IP_BLOCK_SOURCE: */
    01173     rb_define_const(rb_mSockConst, "IP_BLOCK_SOURCE", INT2NUM(IP_BLOCK_SOURCE));
    01174 #endif
    01175 #if defined(IP_ADD_SOURCE_MEMBERSHIP)
    01176     /* IP_ADD_SOURCE_MEMBERSHIP: */
    01177     rb_define_const(rb_cSocket, "IP_ADD_SOURCE_MEMBERSHIP", INT2NUM(IP_ADD_SOURCE_MEMBERSHIP));
    01178     /* IP_ADD_SOURCE_MEMBERSHIP: */
    01179     rb_define_const(rb_mSockConst, "IP_ADD_SOURCE_MEMBERSHIP", INT2NUM(IP_ADD_SOURCE_MEMBERSHIP));
    01180 #endif
    01181 #if defined(IP_DROP_SOURCE_MEMBERSHIP)
    01182     /* IP_DROP_SOURCE_MEMBERSHIP: */
    01183     rb_define_const(rb_cSocket, "IP_DROP_SOURCE_MEMBERSHIP", INT2NUM(IP_DROP_SOURCE_MEMBERSHIP));
    01184     /* IP_DROP_SOURCE_MEMBERSHIP: */
    01185     rb_define_const(rb_mSockConst, "IP_DROP_SOURCE_MEMBERSHIP", INT2NUM(IP_DROP_SOURCE_MEMBERSHIP));
    01186 #endif
    01187 #if defined(IP_MSFILTER)
    01188     /* IP_MSFILTER: */
    01189     rb_define_const(rb_cSocket, "IP_MSFILTER", INT2NUM(IP_MSFILTER));
    01190     /* IP_MSFILTER: */
    01191     rb_define_const(rb_mSockConst, "IP_MSFILTER", INT2NUM(IP_MSFILTER));
    01192 #endif
    01193 #if defined(MCAST_JOIN_GROUP)
    01194     /* MCAST_JOIN_GROUP: */
    01195     rb_define_const(rb_cSocket, "MCAST_JOIN_GROUP", INT2NUM(MCAST_JOIN_GROUP));
    01196     /* MCAST_JOIN_GROUP: */
    01197     rb_define_const(rb_mSockConst, "MCAST_JOIN_GROUP", INT2NUM(MCAST_JOIN_GROUP));
    01198 #endif
    01199 #if defined(MCAST_BLOCK_SOURCE)
    01200     /* MCAST_BLOCK_SOURCE: */
    01201     rb_define_const(rb_cSocket, "MCAST_BLOCK_SOURCE", INT2NUM(MCAST_BLOCK_SOURCE));
    01202     /* MCAST_BLOCK_SOURCE: */
    01203     rb_define_const(rb_mSockConst, "MCAST_BLOCK_SOURCE", INT2NUM(MCAST_BLOCK_SOURCE));
    01204 #endif
    01205 #if defined(MCAST_UNBLOCK_SOURCE)
    01206     /* MCAST_UNBLOCK_SOURCE: */
    01207     rb_define_const(rb_cSocket, "MCAST_UNBLOCK_SOURCE", INT2NUM(MCAST_UNBLOCK_SOURCE));
    01208     /* MCAST_UNBLOCK_SOURCE: */
    01209     rb_define_const(rb_mSockConst, "MCAST_UNBLOCK_SOURCE", INT2NUM(MCAST_UNBLOCK_SOURCE));
    01210 #endif
    01211 #if defined(MCAST_LEAVE_GROUP)
    01212     /* MCAST_LEAVE_GROUP: */
    01213     rb_define_const(rb_cSocket, "MCAST_LEAVE_GROUP", INT2NUM(MCAST_LEAVE_GROUP));
    01214     /* MCAST_LEAVE_GROUP: */
    01215     rb_define_const(rb_mSockConst, "MCAST_LEAVE_GROUP", INT2NUM(MCAST_LEAVE_GROUP));
    01216 #endif
    01217 #if defined(MCAST_JOIN_SOURCE_GROUP)
    01218     /* MCAST_JOIN_SOURCE_GROUP: */
    01219     rb_define_const(rb_cSocket, "MCAST_JOIN_SOURCE_GROUP", INT2NUM(MCAST_JOIN_SOURCE_GROUP));
    01220     /* MCAST_JOIN_SOURCE_GROUP: */
    01221     rb_define_const(rb_mSockConst, "MCAST_JOIN_SOURCE_GROUP", INT2NUM(MCAST_JOIN_SOURCE_GROUP));
    01222 #endif
    01223 #if defined(MCAST_LEAVE_SOURCE_GROUP)
    01224     /* MCAST_LEAVE_SOURCE_GROUP: */
    01225     rb_define_const(rb_cSocket, "MCAST_LEAVE_SOURCE_GROUP", INT2NUM(MCAST_LEAVE_SOURCE_GROUP));
    01226     /* MCAST_LEAVE_SOURCE_GROUP: */
    01227     rb_define_const(rb_mSockConst, "MCAST_LEAVE_SOURCE_GROUP", INT2NUM(MCAST_LEAVE_SOURCE_GROUP));
    01228 #endif
    01229 #if defined(MCAST_MSFILTER)
    01230     /* MCAST_MSFILTER: */
    01231     rb_define_const(rb_cSocket, "MCAST_MSFILTER", INT2NUM(MCAST_MSFILTER));
    01232     /* MCAST_MSFILTER: */
    01233     rb_define_const(rb_mSockConst, "MCAST_MSFILTER", INT2NUM(MCAST_MSFILTER));
    01234 #endif
    01235 #if defined(MCAST_EXCLUDE)
    01236     /* MCAST_EXCLUDE: */
    01237     rb_define_const(rb_cSocket, "MCAST_EXCLUDE", INT2NUM(MCAST_EXCLUDE));
    01238     /* MCAST_EXCLUDE: */
    01239     rb_define_const(rb_mSockConst, "MCAST_EXCLUDE", INT2NUM(MCAST_EXCLUDE));
    01240 #endif
    01241 #if defined(MCAST_INCLUDE)
    01242     /* MCAST_INCLUDE: */
    01243     rb_define_const(rb_cSocket, "MCAST_INCLUDE", INT2NUM(MCAST_INCLUDE));
    01244     /* MCAST_INCLUDE: */
    01245     rb_define_const(rb_mSockConst, "MCAST_INCLUDE", INT2NUM(MCAST_INCLUDE));
    01246 #endif
    01247 #if defined(SO_DEBUG)
    01248     /* SO_DEBUG: */
    01249     rb_define_const(rb_cSocket, "SO_DEBUG", INT2NUM(SO_DEBUG));
    01250     /* SO_DEBUG: */
    01251     rb_define_const(rb_mSockConst, "SO_DEBUG", INT2NUM(SO_DEBUG));
    01252 #endif
    01253 #if defined(SO_REUSEADDR)
    01254     /* SO_REUSEADDR: */
    01255     rb_define_const(rb_cSocket, "SO_REUSEADDR", INT2NUM(SO_REUSEADDR));
    01256     /* SO_REUSEADDR: */
    01257     rb_define_const(rb_mSockConst, "SO_REUSEADDR", INT2NUM(SO_REUSEADDR));
    01258 #endif
    01259 #if defined(SO_REUSEPORT)
    01260     /* SO_REUSEPORT: */
    01261     rb_define_const(rb_cSocket, "SO_REUSEPORT", INT2NUM(SO_REUSEPORT));
    01262     /* SO_REUSEPORT: */
    01263     rb_define_const(rb_mSockConst, "SO_REUSEPORT", INT2NUM(SO_REUSEPORT));
    01264 #endif
    01265 #if defined(SO_TYPE)
    01266     /* SO_TYPE: */
    01267     rb_define_const(rb_cSocket, "SO_TYPE", INT2NUM(SO_TYPE));
    01268     /* SO_TYPE: */
    01269     rb_define_const(rb_mSockConst, "SO_TYPE", INT2NUM(SO_TYPE));
    01270 #endif
    01271 #if defined(SO_ERROR)
    01272     /* SO_ERROR: */
    01273     rb_define_const(rb_cSocket, "SO_ERROR", INT2NUM(SO_ERROR));
    01274     /* SO_ERROR: */
    01275     rb_define_const(rb_mSockConst, "SO_ERROR", INT2NUM(SO_ERROR));
    01276 #endif
    01277 #if defined(SO_DONTROUTE)
    01278     /* SO_DONTROUTE: */
    01279     rb_define_const(rb_cSocket, "SO_DONTROUTE", INT2NUM(SO_DONTROUTE));
    01280     /* SO_DONTROUTE: */
    01281     rb_define_const(rb_mSockConst, "SO_DONTROUTE", INT2NUM(SO_DONTROUTE));
    01282 #endif
    01283 #if defined(SO_BROADCAST)
    01284     /* SO_BROADCAST: */
    01285     rb_define_const(rb_cSocket, "SO_BROADCAST", INT2NUM(SO_BROADCAST));
    01286     /* SO_BROADCAST: */
    01287     rb_define_const(rb_mSockConst, "SO_BROADCAST", INT2NUM(SO_BROADCAST));
    01288 #endif
    01289 #if defined(SO_SNDBUF)
    01290     /* SO_SNDBUF: */
    01291     rb_define_const(rb_cSocket, "SO_SNDBUF", INT2NUM(SO_SNDBUF));
    01292     /* SO_SNDBUF: */
    01293     rb_define_const(rb_mSockConst, "SO_SNDBUF", INT2NUM(SO_SNDBUF));
    01294 #endif
    01295 #if defined(SO_RCVBUF)
    01296     /* SO_RCVBUF: */
    01297     rb_define_const(rb_cSocket, "SO_RCVBUF", INT2NUM(SO_RCVBUF));
    01298     /* SO_RCVBUF: */
    01299     rb_define_const(rb_mSockConst, "SO_RCVBUF", INT2NUM(SO_RCVBUF));
    01300 #endif
    01301 #if defined(SO_KEEPALIVE)
    01302     /* SO_KEEPALIVE: */
    01303     rb_define_const(rb_cSocket, "SO_KEEPALIVE", INT2NUM(SO_KEEPALIVE));
    01304     /* SO_KEEPALIVE: */
    01305     rb_define_const(rb_mSockConst, "SO_KEEPALIVE", INT2NUM(SO_KEEPALIVE));
    01306 #endif
    01307 #if defined(SO_OOBINLINE)
    01308     /* SO_OOBINLINE: */
    01309     rb_define_const(rb_cSocket, "SO_OOBINLINE", INT2NUM(SO_OOBINLINE));
    01310     /* SO_OOBINLINE: */
    01311     rb_define_const(rb_mSockConst, "SO_OOBINLINE", INT2NUM(SO_OOBINLINE));
    01312 #endif
    01313 #if defined(SO_NO_CHECK)
    01314     /* SO_NO_CHECK: */
    01315     rb_define_const(rb_cSocket, "SO_NO_CHECK", INT2NUM(SO_NO_CHECK));
    01316     /* SO_NO_CHECK: */
    01317     rb_define_const(rb_mSockConst, "SO_NO_CHECK", INT2NUM(SO_NO_CHECK));
    01318 #endif
    01319 #if defined(SO_PRIORITY)
    01320     /* SO_PRIORITY: */
    01321     rb_define_const(rb_cSocket, "SO_PRIORITY", INT2NUM(SO_PRIORITY));
    01322     /* SO_PRIORITY: */
    01323     rb_define_const(rb_mSockConst, "SO_PRIORITY", INT2NUM(SO_PRIORITY));
    01324 #endif
    01325 #if defined(SO_LINGER)
    01326     /* SO_LINGER: */
    01327     rb_define_const(rb_cSocket, "SO_LINGER", INT2NUM(SO_LINGER));
    01328     /* SO_LINGER: */
    01329     rb_define_const(rb_mSockConst, "SO_LINGER", INT2NUM(SO_LINGER));
    01330 #endif
    01331 #if defined(SO_PASSCRED)
    01332     /* SO_PASSCRED: */
    01333     rb_define_const(rb_cSocket, "SO_PASSCRED", INT2NUM(SO_PASSCRED));
    01334     /* SO_PASSCRED: */
    01335     rb_define_const(rb_mSockConst, "SO_PASSCRED", INT2NUM(SO_PASSCRED));
    01336 #endif
    01337 #if defined(SO_PEERCRED)
    01338     /* SO_PEERCRED: */
    01339     rb_define_const(rb_cSocket, "SO_PEERCRED", INT2NUM(SO_PEERCRED));
    01340     /* SO_PEERCRED: */
    01341     rb_define_const(rb_mSockConst, "SO_PEERCRED", INT2NUM(SO_PEERCRED));
    01342 #endif
    01343 #if defined(SO_RCVLOWAT)
    01344     /* SO_RCVLOWAT: */
    01345     rb_define_const(rb_cSocket, "SO_RCVLOWAT", INT2NUM(SO_RCVLOWAT));
    01346     /* SO_RCVLOWAT: */
    01347     rb_define_const(rb_mSockConst, "SO_RCVLOWAT", INT2NUM(SO_RCVLOWAT));
    01348 #endif
    01349 #if defined(SO_SNDLOWAT)
    01350     /* SO_SNDLOWAT: */
    01351     rb_define_const(rb_cSocket, "SO_SNDLOWAT", INT2NUM(SO_SNDLOWAT));
    01352     /* SO_SNDLOWAT: */
    01353     rb_define_const(rb_mSockConst, "SO_SNDLOWAT", INT2NUM(SO_SNDLOWAT));
    01354 #endif
    01355 #if defined(SO_RCVTIMEO)
    01356     /* SO_RCVTIMEO: */
    01357     rb_define_const(rb_cSocket, "SO_RCVTIMEO", INT2NUM(SO_RCVTIMEO));
    01358     /* SO_RCVTIMEO: */
    01359     rb_define_const(rb_mSockConst, "SO_RCVTIMEO", INT2NUM(SO_RCVTIMEO));
    01360 #endif
    01361 #if defined(SO_SNDTIMEO)
    01362     /* SO_SNDTIMEO: */
    01363     rb_define_const(rb_cSocket, "SO_SNDTIMEO", INT2NUM(SO_SNDTIMEO));
    01364     /* SO_SNDTIMEO: */
    01365     rb_define_const(rb_mSockConst, "SO_SNDTIMEO", INT2NUM(SO_SNDTIMEO));
    01366 #endif
    01367 #if defined(SO_ACCEPTCONN)
    01368     /* SO_ACCEPTCONN: */
    01369     rb_define_const(rb_cSocket, "SO_ACCEPTCONN", INT2NUM(SO_ACCEPTCONN));
    01370     /* SO_ACCEPTCONN: */
    01371     rb_define_const(rb_mSockConst, "SO_ACCEPTCONN", INT2NUM(SO_ACCEPTCONN));
    01372 #endif
    01373 #if defined(SO_USELOOPBACK)
    01374     /* SO_USELOOPBACK: */
    01375     rb_define_const(rb_cSocket, "SO_USELOOPBACK", INT2NUM(SO_USELOOPBACK));
    01376     /* SO_USELOOPBACK: */
    01377     rb_define_const(rb_mSockConst, "SO_USELOOPBACK", INT2NUM(SO_USELOOPBACK));
    01378 #endif
    01379 #if defined(SO_ACCEPTFILTER)
    01380     /* SO_ACCEPTFILTER: */
    01381     rb_define_const(rb_cSocket, "SO_ACCEPTFILTER", INT2NUM(SO_ACCEPTFILTER));
    01382     /* SO_ACCEPTFILTER: */
    01383     rb_define_const(rb_mSockConst, "SO_ACCEPTFILTER", INT2NUM(SO_ACCEPTFILTER));
    01384 #endif
    01385 #if defined(SO_DONTTRUNC)
    01386     /* SO_DONTTRUNC: */
    01387     rb_define_const(rb_cSocket, "SO_DONTTRUNC", INT2NUM(SO_DONTTRUNC));
    01388     /* SO_DONTTRUNC: */
    01389     rb_define_const(rb_mSockConst, "SO_DONTTRUNC", INT2NUM(SO_DONTTRUNC));
    01390 #endif
    01391 #if defined(SO_WANTMORE)
    01392     /* SO_WANTMORE: */
    01393     rb_define_const(rb_cSocket, "SO_WANTMORE", INT2NUM(SO_WANTMORE));
    01394     /* SO_WANTMORE: */
    01395     rb_define_const(rb_mSockConst, "SO_WANTMORE", INT2NUM(SO_WANTMORE));
    01396 #endif
    01397 #if defined(SO_WANTOOBFLAG)
    01398     /* SO_WANTOOBFLAG: */
    01399     rb_define_const(rb_cSocket, "SO_WANTOOBFLAG", INT2NUM(SO_WANTOOBFLAG));
    01400     /* SO_WANTOOBFLAG: */
    01401     rb_define_const(rb_mSockConst, "SO_WANTOOBFLAG", INT2NUM(SO_WANTOOBFLAG));
    01402 #endif
    01403 #if defined(SO_NREAD)
    01404     /* SO_NREAD: */
    01405     rb_define_const(rb_cSocket, "SO_NREAD", INT2NUM(SO_NREAD));
    01406     /* SO_NREAD: */
    01407     rb_define_const(rb_mSockConst, "SO_NREAD", INT2NUM(SO_NREAD));
    01408 #endif
    01409 #if defined(SO_NKE)
    01410     /* SO_NKE: */
    01411     rb_define_const(rb_cSocket, "SO_NKE", INT2NUM(SO_NKE));
    01412     /* SO_NKE: */
    01413     rb_define_const(rb_mSockConst, "SO_NKE", INT2NUM(SO_NKE));
    01414 #endif
    01415 #if defined(SO_NOSIGPIPE)
    01416     /* SO_NOSIGPIPE: */
    01417     rb_define_const(rb_cSocket, "SO_NOSIGPIPE", INT2NUM(SO_NOSIGPIPE));
    01418     /* SO_NOSIGPIPE: */
    01419     rb_define_const(rb_mSockConst, "SO_NOSIGPIPE", INT2NUM(SO_NOSIGPIPE));
    01420 #endif
    01421 #if defined(SO_SECURITY_AUTHENTICATION)
    01422     /* SO_SECURITY_AUTHENTICATION: */
    01423     rb_define_const(rb_cSocket, "SO_SECURITY_AUTHENTICATION", INT2NUM(SO_SECURITY_AUTHENTICATION));
    01424     /* SO_SECURITY_AUTHENTICATION: */
    01425     rb_define_const(rb_mSockConst, "SO_SECURITY_AUTHENTICATION", INT2NUM(SO_SECURITY_AUTHENTICATION));
    01426 #endif
    01427 #if defined(SO_SECURITY_ENCRYPTION_TRANSPORT)
    01428     /* SO_SECURITY_ENCRYPTION_TRANSPORT: */
    01429     rb_define_const(rb_cSocket, "SO_SECURITY_ENCRYPTION_TRANSPORT", INT2NUM(SO_SECURITY_ENCRYPTION_TRANSPORT));
    01430     /* SO_SECURITY_ENCRYPTION_TRANSPORT: */
    01431     rb_define_const(rb_mSockConst, "SO_SECURITY_ENCRYPTION_TRANSPORT", INT2NUM(SO_SECURITY_ENCRYPTION_TRANSPORT));
    01432 #endif
    01433 #if defined(SO_SECURITY_ENCRYPTION_NETWORK)
    01434     /* SO_SECURITY_ENCRYPTION_NETWORK: */
    01435     rb_define_const(rb_cSocket, "SO_SECURITY_ENCRYPTION_NETWORK", INT2NUM(SO_SECURITY_ENCRYPTION_NETWORK));
    01436     /* SO_SECURITY_ENCRYPTION_NETWORK: */
    01437     rb_define_const(rb_mSockConst, "SO_SECURITY_ENCRYPTION_NETWORK", INT2NUM(SO_SECURITY_ENCRYPTION_NETWORK));
    01438 #endif
    01439 #if defined(SO_BINDTODEVICE)
    01440     /* SO_BINDTODEVICE: */
    01441     rb_define_const(rb_cSocket, "SO_BINDTODEVICE", INT2NUM(SO_BINDTODEVICE));
    01442     /* SO_BINDTODEVICE: */
    01443     rb_define_const(rb_mSockConst, "SO_BINDTODEVICE", INT2NUM(SO_BINDTODEVICE));
    01444 #endif
    01445 #if defined(SO_ATTACH_FILTER)
    01446     /* SO_ATTACH_FILTER: */
    01447     rb_define_const(rb_cSocket, "SO_ATTACH_FILTER", INT2NUM(SO_ATTACH_FILTER));
    01448     /* SO_ATTACH_FILTER: */
    01449     rb_define_const(rb_mSockConst, "SO_ATTACH_FILTER", INT2NUM(SO_ATTACH_FILTER));
    01450 #endif
    01451 #if defined(SO_DETACH_FILTER)
    01452     /* SO_DETACH_FILTER: */
    01453     rb_define_const(rb_cSocket, "SO_DETACH_FILTER", INT2NUM(SO_DETACH_FILTER));
    01454     /* SO_DETACH_FILTER: */
    01455     rb_define_const(rb_mSockConst, "SO_DETACH_FILTER", INT2NUM(SO_DETACH_FILTER));
    01456 #endif
    01457 #if defined(SO_PEERNAME)
    01458     /* SO_PEERNAME: */
    01459     rb_define_const(rb_cSocket, "SO_PEERNAME", INT2NUM(SO_PEERNAME));
    01460     /* SO_PEERNAME: */
    01461     rb_define_const(rb_mSockConst, "SO_PEERNAME", INT2NUM(SO_PEERNAME));
    01462 #endif
    01463 #if defined(SO_TIMESTAMP)
    01464     /* SO_TIMESTAMP: */
    01465     rb_define_const(rb_cSocket, "SO_TIMESTAMP", INT2NUM(SO_TIMESTAMP));
    01466     /* SO_TIMESTAMP: */
    01467     rb_define_const(rb_mSockConst, "SO_TIMESTAMP", INT2NUM(SO_TIMESTAMP));
    01468 #endif
    01469 #if defined(SO_TIMESTAMPNS)
    01470     /* SO_TIMESTAMPNS: */
    01471     rb_define_const(rb_cSocket, "SO_TIMESTAMPNS", INT2NUM(SO_TIMESTAMPNS));
    01472     /* SO_TIMESTAMPNS: */
    01473     rb_define_const(rb_mSockConst, "SO_TIMESTAMPNS", INT2NUM(SO_TIMESTAMPNS));
    01474 #endif
    01475 #if defined(SO_BINTIME)
    01476     /* SO_BINTIME: */
    01477     rb_define_const(rb_cSocket, "SO_BINTIME", INT2NUM(SO_BINTIME));
    01478     /* SO_BINTIME: */
    01479     rb_define_const(rb_mSockConst, "SO_BINTIME", INT2NUM(SO_BINTIME));
    01480 #endif
    01481 #if defined(SO_RECVUCRED)
    01482     /* SO_RECVUCRED: */
    01483     rb_define_const(rb_cSocket, "SO_RECVUCRED", INT2NUM(SO_RECVUCRED));
    01484     /* SO_RECVUCRED: */
    01485     rb_define_const(rb_mSockConst, "SO_RECVUCRED", INT2NUM(SO_RECVUCRED));
    01486 #endif
    01487 #if defined(SO_MAC_EXEMPT)
    01488     /* SO_MAC_EXEMPT: */
    01489     rb_define_const(rb_cSocket, "SO_MAC_EXEMPT", INT2NUM(SO_MAC_EXEMPT));
    01490     /* SO_MAC_EXEMPT: */
    01491     rb_define_const(rb_mSockConst, "SO_MAC_EXEMPT", INT2NUM(SO_MAC_EXEMPT));
    01492 #endif
    01493 #if defined(SO_ALLZONES)
    01494     /* SO_ALLZONES: */
    01495     rb_define_const(rb_cSocket, "SO_ALLZONES", INT2NUM(SO_ALLZONES));
    01496     /* SO_ALLZONES: */
    01497     rb_define_const(rb_mSockConst, "SO_ALLZONES", INT2NUM(SO_ALLZONES));
    01498 #endif
    01499 #if defined(SOPRI_INTERACTIVE)
    01500     /* SOPRI_INTERACTIVE: */
    01501     rb_define_const(rb_cSocket, "SOPRI_INTERACTIVE", INT2NUM(SOPRI_INTERACTIVE));
    01502     /* SOPRI_INTERACTIVE: */
    01503     rb_define_const(rb_mSockConst, "SOPRI_INTERACTIVE", INT2NUM(SOPRI_INTERACTIVE));
    01504 #endif
    01505 #if defined(SOPRI_NORMAL)
    01506     /* SOPRI_NORMAL: */
    01507     rb_define_const(rb_cSocket, "SOPRI_NORMAL", INT2NUM(SOPRI_NORMAL));
    01508     /* SOPRI_NORMAL: */
    01509     rb_define_const(rb_mSockConst, "SOPRI_NORMAL", INT2NUM(SOPRI_NORMAL));
    01510 #endif
    01511 #if defined(SOPRI_BACKGROUND)
    01512     /* SOPRI_BACKGROUND: */
    01513     rb_define_const(rb_cSocket, "SOPRI_BACKGROUND", INT2NUM(SOPRI_BACKGROUND));
    01514     /* SOPRI_BACKGROUND: */
    01515     rb_define_const(rb_mSockConst, "SOPRI_BACKGROUND", INT2NUM(SOPRI_BACKGROUND));
    01516 #endif
    01517 #if defined(IPX_TYPE)
    01518     /* IPX_TYPE: */
    01519     rb_define_const(rb_cSocket, "IPX_TYPE", INT2NUM(IPX_TYPE));
    01520     /* IPX_TYPE: */
    01521     rb_define_const(rb_mSockConst, "IPX_TYPE", INT2NUM(IPX_TYPE));
    01522 #endif
    01523 #if defined(TCP_NODELAY)
    01524     /* TCP_NODELAY: */
    01525     rb_define_const(rb_cSocket, "TCP_NODELAY", INT2NUM(TCP_NODELAY));
    01526     /* TCP_NODELAY: */
    01527     rb_define_const(rb_mSockConst, "TCP_NODELAY", INT2NUM(TCP_NODELAY));
    01528 #endif
    01529 #if defined(TCP_MAXSEG)
    01530     /* TCP_MAXSEG: */
    01531     rb_define_const(rb_cSocket, "TCP_MAXSEG", INT2NUM(TCP_MAXSEG));
    01532     /* TCP_MAXSEG: */
    01533     rb_define_const(rb_mSockConst, "TCP_MAXSEG", INT2NUM(TCP_MAXSEG));
    01534 #endif
    01535 #if defined(TCP_CORK)
    01536     /* TCP_CORK: */
    01537     rb_define_const(rb_cSocket, "TCP_CORK", INT2NUM(TCP_CORK));
    01538     /* TCP_CORK: */
    01539     rb_define_const(rb_mSockConst, "TCP_CORK", INT2NUM(TCP_CORK));
    01540 #endif
    01541 #if defined(TCP_DEFER_ACCEPT)
    01542     /* TCP_DEFER_ACCEPT: */
    01543     rb_define_const(rb_cSocket, "TCP_DEFER_ACCEPT", INT2NUM(TCP_DEFER_ACCEPT));
    01544     /* TCP_DEFER_ACCEPT: */
    01545     rb_define_const(rb_mSockConst, "TCP_DEFER_ACCEPT", INT2NUM(TCP_DEFER_ACCEPT));
    01546 #endif
    01547 #if defined(TCP_INFO)
    01548     /* TCP_INFO: */
    01549     rb_define_const(rb_cSocket, "TCP_INFO", INT2NUM(TCP_INFO));
    01550     /* TCP_INFO: */
    01551     rb_define_const(rb_mSockConst, "TCP_INFO", INT2NUM(TCP_INFO));
    01552 #endif
    01553 #if defined(TCP_KEEPCNT)
    01554     /* TCP_KEEPCNT: */
    01555     rb_define_const(rb_cSocket, "TCP_KEEPCNT", INT2NUM(TCP_KEEPCNT));
    01556     /* TCP_KEEPCNT: */
    01557     rb_define_const(rb_mSockConst, "TCP_KEEPCNT", INT2NUM(TCP_KEEPCNT));
    01558 #endif
    01559 #if defined(TCP_KEEPIDLE)
    01560     /* TCP_KEEPIDLE: */
    01561     rb_define_const(rb_cSocket, "TCP_KEEPIDLE", INT2NUM(TCP_KEEPIDLE));
    01562     /* TCP_KEEPIDLE: */
    01563     rb_define_const(rb_mSockConst, "TCP_KEEPIDLE", INT2NUM(TCP_KEEPIDLE));
    01564 #endif
    01565 #if defined(TCP_KEEPINTVL)
    01566     /* TCP_KEEPINTVL: */
    01567     rb_define_const(rb_cSocket, "TCP_KEEPINTVL", INT2NUM(TCP_KEEPINTVL));
    01568     /* TCP_KEEPINTVL: */
    01569     rb_define_const(rb_mSockConst, "TCP_KEEPINTVL", INT2NUM(TCP_KEEPINTVL));
    01570 #endif
    01571 #if defined(TCP_LINGER2)
    01572     /* TCP_LINGER2: */
    01573     rb_define_const(rb_cSocket, "TCP_LINGER2", INT2NUM(TCP_LINGER2));
    01574     /* TCP_LINGER2: */
    01575     rb_define_const(rb_mSockConst, "TCP_LINGER2", INT2NUM(TCP_LINGER2));
    01576 #endif
    01577 #if defined(TCP_MD5SIG)
    01578     /* TCP_MD5SIG: */
    01579     rb_define_const(rb_cSocket, "TCP_MD5SIG", INT2NUM(TCP_MD5SIG));
    01580     /* TCP_MD5SIG: */
    01581     rb_define_const(rb_mSockConst, "TCP_MD5SIG", INT2NUM(TCP_MD5SIG));
    01582 #endif
    01583 #if defined(TCP_NOOPT)
    01584     /* TCP_NOOPT: */
    01585     rb_define_const(rb_cSocket, "TCP_NOOPT", INT2NUM(TCP_NOOPT));
    01586     /* TCP_NOOPT: */
    01587     rb_define_const(rb_mSockConst, "TCP_NOOPT", INT2NUM(TCP_NOOPT));
    01588 #endif
    01589 #if defined(TCP_NOPUSH)
    01590     /* TCP_NOPUSH: */
    01591     rb_define_const(rb_cSocket, "TCP_NOPUSH", INT2NUM(TCP_NOPUSH));
    01592     /* TCP_NOPUSH: */
    01593     rb_define_const(rb_mSockConst, "TCP_NOPUSH", INT2NUM(TCP_NOPUSH));
    01594 #endif
    01595 #if defined(TCP_QUICKACK)
    01596     /* TCP_QUICKACK: */
    01597     rb_define_const(rb_cSocket, "TCP_QUICKACK", INT2NUM(TCP_QUICKACK));
    01598     /* TCP_QUICKACK: */
    01599     rb_define_const(rb_mSockConst, "TCP_QUICKACK", INT2NUM(TCP_QUICKACK));
    01600 #endif
    01601 #if defined(TCP_SYNCNT)
    01602     /* TCP_SYNCNT: */
    01603     rb_define_const(rb_cSocket, "TCP_SYNCNT", INT2NUM(TCP_SYNCNT));
    01604     /* TCP_SYNCNT: */
    01605     rb_define_const(rb_mSockConst, "TCP_SYNCNT", INT2NUM(TCP_SYNCNT));
    01606 #endif
    01607 #if defined(TCP_WINDOW_CLAMP)
    01608     /* TCP_WINDOW_CLAMP: */
    01609     rb_define_const(rb_cSocket, "TCP_WINDOW_CLAMP", INT2NUM(TCP_WINDOW_CLAMP));
    01610     /* TCP_WINDOW_CLAMP: */
    01611     rb_define_const(rb_mSockConst, "TCP_WINDOW_CLAMP", INT2NUM(TCP_WINDOW_CLAMP));
    01612 #endif
    01613 #if defined(UDP_CORK)
    01614     /* UDP_CORK: */
    01615     rb_define_const(rb_cSocket, "UDP_CORK", INT2NUM(UDP_CORK));
    01616     /* UDP_CORK: */
    01617     rb_define_const(rb_mSockConst, "UDP_CORK", INT2NUM(UDP_CORK));
    01618 #endif
    01619 #if defined(EAI_ADDRFAMILY)
    01620     /* EAI_ADDRFAMILY: */
    01621     rb_define_const(rb_cSocket, "EAI_ADDRFAMILY", INT2NUM(EAI_ADDRFAMILY));
    01622     /* EAI_ADDRFAMILY: */
    01623     rb_define_const(rb_mSockConst, "EAI_ADDRFAMILY", INT2NUM(EAI_ADDRFAMILY));
    01624 #endif
    01625 #if defined(EAI_AGAIN)
    01626     /* EAI_AGAIN: */
    01627     rb_define_const(rb_cSocket, "EAI_AGAIN", INT2NUM(EAI_AGAIN));
    01628     /* EAI_AGAIN: */
    01629     rb_define_const(rb_mSockConst, "EAI_AGAIN", INT2NUM(EAI_AGAIN));
    01630 #endif
    01631 #if defined(EAI_BADFLAGS)
    01632     /* EAI_BADFLAGS: */
    01633     rb_define_const(rb_cSocket, "EAI_BADFLAGS", INT2NUM(EAI_BADFLAGS));
    01634     /* EAI_BADFLAGS: */
    01635     rb_define_const(rb_mSockConst, "EAI_BADFLAGS", INT2NUM(EAI_BADFLAGS));
    01636 #endif
    01637 #if defined(EAI_FAIL)
    01638     /* EAI_FAIL: */
    01639     rb_define_const(rb_cSocket, "EAI_FAIL", INT2NUM(EAI_FAIL));
    01640     /* EAI_FAIL: */
    01641     rb_define_const(rb_mSockConst, "EAI_FAIL", INT2NUM(EAI_FAIL));
    01642 #endif
    01643 #if defined(EAI_FAMILY)
    01644     /* EAI_FAMILY: */
    01645     rb_define_const(rb_cSocket, "EAI_FAMILY", INT2NUM(EAI_FAMILY));
    01646     /* EAI_FAMILY: */
    01647     rb_define_const(rb_mSockConst, "EAI_FAMILY", INT2NUM(EAI_FAMILY));
    01648 #endif
    01649 #if defined(EAI_MEMORY)
    01650     /* EAI_MEMORY: */
    01651     rb_define_const(rb_cSocket, "EAI_MEMORY", INT2NUM(EAI_MEMORY));
    01652     /* EAI_MEMORY: */
    01653     rb_define_const(rb_mSockConst, "EAI_MEMORY", INT2NUM(EAI_MEMORY));
    01654 #endif
    01655 #if defined(EAI_NODATA)
    01656     /* EAI_NODATA: */
    01657     rb_define_const(rb_cSocket, "EAI_NODATA", INT2NUM(EAI_NODATA));
    01658     /* EAI_NODATA: */
    01659     rb_define_const(rb_mSockConst, "EAI_NODATA", INT2NUM(EAI_NODATA));
    01660 #endif
    01661 #if defined(EAI_NONAME)
    01662     /* EAI_NONAME: */
    01663     rb_define_const(rb_cSocket, "EAI_NONAME", INT2NUM(EAI_NONAME));
    01664     /* EAI_NONAME: */
    01665     rb_define_const(rb_mSockConst, "EAI_NONAME", INT2NUM(EAI_NONAME));
    01666 #endif
    01667 #if defined(EAI_OVERFLOW)
    01668     /* EAI_OVERFLOW: */
    01669     rb_define_const(rb_cSocket, "EAI_OVERFLOW", INT2NUM(EAI_OVERFLOW));
    01670     /* EAI_OVERFLOW: */
    01671     rb_define_const(rb_mSockConst, "EAI_OVERFLOW", INT2NUM(EAI_OVERFLOW));
    01672 #endif
    01673 #if defined(EAI_SERVICE)
    01674     /* EAI_SERVICE: */
    01675     rb_define_const(rb_cSocket, "EAI_SERVICE", INT2NUM(EAI_SERVICE));
    01676     /* EAI_SERVICE: */
    01677     rb_define_const(rb_mSockConst, "EAI_SERVICE", INT2NUM(EAI_SERVICE));
    01678 #endif
    01679 #if defined(EAI_SOCKTYPE)
    01680     /* EAI_SOCKTYPE: */
    01681     rb_define_const(rb_cSocket, "EAI_SOCKTYPE", INT2NUM(EAI_SOCKTYPE));
    01682     /* EAI_SOCKTYPE: */
    01683     rb_define_const(rb_mSockConst, "EAI_SOCKTYPE", INT2NUM(EAI_SOCKTYPE));
    01684 #endif
    01685 #if defined(EAI_SYSTEM)
    01686     /* EAI_SYSTEM: */
    01687     rb_define_const(rb_cSocket, "EAI_SYSTEM", INT2NUM(EAI_SYSTEM));
    01688     /* EAI_SYSTEM: */
    01689     rb_define_const(rb_mSockConst, "EAI_SYSTEM", INT2NUM(EAI_SYSTEM));
    01690 #endif
    01691 #if defined(EAI_BADHINTS)
    01692     /* EAI_BADHINTS: */
    01693     rb_define_const(rb_cSocket, "EAI_BADHINTS", INT2NUM(EAI_BADHINTS));
    01694     /* EAI_BADHINTS: */
    01695     rb_define_const(rb_mSockConst, "EAI_BADHINTS", INT2NUM(EAI_BADHINTS));
    01696 #endif
    01697 #if defined(EAI_PROTOCOL)
    01698     /* EAI_PROTOCOL: */
    01699     rb_define_const(rb_cSocket, "EAI_PROTOCOL", INT2NUM(EAI_PROTOCOL));
    01700     /* EAI_PROTOCOL: */
    01701     rb_define_const(rb_mSockConst, "EAI_PROTOCOL", INT2NUM(EAI_PROTOCOL));
    01702 #endif
    01703 #if defined(EAI_MAX)
    01704     /* EAI_MAX: */
    01705     rb_define_const(rb_cSocket, "EAI_MAX", INT2NUM(EAI_MAX));
    01706     /* EAI_MAX: */
    01707     rb_define_const(rb_mSockConst, "EAI_MAX", INT2NUM(EAI_MAX));
    01708 #endif
    01709 #if defined(AI_PASSIVE)
    01710     /* AI_PASSIVE: */
    01711     rb_define_const(rb_cSocket, "AI_PASSIVE", INT2NUM(AI_PASSIVE));
    01712     /* AI_PASSIVE: */
    01713     rb_define_const(rb_mSockConst, "AI_PASSIVE", INT2NUM(AI_PASSIVE));
    01714 #endif
    01715 #if defined(AI_CANONNAME)
    01716     /* AI_CANONNAME: */
    01717     rb_define_const(rb_cSocket, "AI_CANONNAME", INT2NUM(AI_CANONNAME));
    01718     /* AI_CANONNAME: */
    01719     rb_define_const(rb_mSockConst, "AI_CANONNAME", INT2NUM(AI_CANONNAME));
    01720 #endif
    01721 #if defined(AI_NUMERICHOST)
    01722     /* AI_NUMERICHOST: */
    01723     rb_define_const(rb_cSocket, "AI_NUMERICHOST", INT2NUM(AI_NUMERICHOST));
    01724     /* AI_NUMERICHOST: */
    01725     rb_define_const(rb_mSockConst, "AI_NUMERICHOST", INT2NUM(AI_NUMERICHOST));
    01726 #endif
    01727 #if defined(AI_NUMERICSERV)
    01728     /* AI_NUMERICSERV: */
    01729     rb_define_const(rb_cSocket, "AI_NUMERICSERV", INT2NUM(AI_NUMERICSERV));
    01730     /* AI_NUMERICSERV: */
    01731     rb_define_const(rb_mSockConst, "AI_NUMERICSERV", INT2NUM(AI_NUMERICSERV));
    01732 #endif
    01733 #if defined(AI_MASK)
    01734     /* AI_MASK: */
    01735     rb_define_const(rb_cSocket, "AI_MASK", INT2NUM(AI_MASK));
    01736     /* AI_MASK: */
    01737     rb_define_const(rb_mSockConst, "AI_MASK", INT2NUM(AI_MASK));
    01738 #endif
    01739 #if defined(AI_ALL)
    01740     /* AI_ALL: */
    01741     rb_define_const(rb_cSocket, "AI_ALL", INT2NUM(AI_ALL));
    01742     /* AI_ALL: */
    01743     rb_define_const(rb_mSockConst, "AI_ALL", INT2NUM(AI_ALL));
    01744 #endif
    01745 #if defined(AI_V4MAPPED_CFG)
    01746     /* AI_V4MAPPED_CFG: */
    01747     rb_define_const(rb_cSocket, "AI_V4MAPPED_CFG", INT2NUM(AI_V4MAPPED_CFG));
    01748     /* AI_V4MAPPED_CFG: */
    01749     rb_define_const(rb_mSockConst, "AI_V4MAPPED_CFG", INT2NUM(AI_V4MAPPED_CFG));
    01750 #endif
    01751 #if defined(AI_ADDRCONFIG)
    01752     /* AI_ADDRCONFIG: */
    01753     rb_define_const(rb_cSocket, "AI_ADDRCONFIG", INT2NUM(AI_ADDRCONFIG));
    01754     /* AI_ADDRCONFIG: */
    01755     rb_define_const(rb_mSockConst, "AI_ADDRCONFIG", INT2NUM(AI_ADDRCONFIG));
    01756 #endif
    01757 #if defined(AI_V4MAPPED)
    01758     /* AI_V4MAPPED: */
    01759     rb_define_const(rb_cSocket, "AI_V4MAPPED", INT2NUM(AI_V4MAPPED));
    01760     /* AI_V4MAPPED: */
    01761     rb_define_const(rb_mSockConst, "AI_V4MAPPED", INT2NUM(AI_V4MAPPED));
    01762 #endif
    01763 #if defined(AI_DEFAULT)
    01764     /* AI_DEFAULT: */
    01765     rb_define_const(rb_cSocket, "AI_DEFAULT", INT2NUM(AI_DEFAULT));
    01766     /* AI_DEFAULT: */
    01767     rb_define_const(rb_mSockConst, "AI_DEFAULT", INT2NUM(AI_DEFAULT));
    01768 #endif
    01769 #if defined(NI_MAXHOST)
    01770     /* NI_MAXHOST: */
    01771     rb_define_const(rb_cSocket, "NI_MAXHOST", INT2NUM(NI_MAXHOST));
    01772     /* NI_MAXHOST: */
    01773     rb_define_const(rb_mSockConst, "NI_MAXHOST", INT2NUM(NI_MAXHOST));
    01774 #endif
    01775 #if defined(NI_MAXSERV)
    01776     /* NI_MAXSERV: */
    01777     rb_define_const(rb_cSocket, "NI_MAXSERV", INT2NUM(NI_MAXSERV));
    01778     /* NI_MAXSERV: */
    01779     rb_define_const(rb_mSockConst, "NI_MAXSERV", INT2NUM(NI_MAXSERV));
    01780 #endif
    01781 #if defined(NI_NOFQDN)
    01782     /* NI_NOFQDN: */
    01783     rb_define_const(rb_cSocket, "NI_NOFQDN", INT2NUM(NI_NOFQDN));
    01784     /* NI_NOFQDN: */
    01785     rb_define_const(rb_mSockConst, "NI_NOFQDN", INT2NUM(NI_NOFQDN));
    01786 #endif
    01787 #if defined(NI_NUMERICHOST)
    01788     /* NI_NUMERICHOST: */
    01789     rb_define_const(rb_cSocket, "NI_NUMERICHOST", INT2NUM(NI_NUMERICHOST));
    01790     /* NI_NUMERICHOST: */
    01791     rb_define_const(rb_mSockConst, "NI_NUMERICHOST", INT2NUM(NI_NUMERICHOST));
    01792 #endif
    01793 #if defined(NI_NAMEREQD)
    01794     /* NI_NAMEREQD: */
    01795     rb_define_const(rb_cSocket, "NI_NAMEREQD", INT2NUM(NI_NAMEREQD));
    01796     /* NI_NAMEREQD: */
    01797     rb_define_const(rb_mSockConst, "NI_NAMEREQD", INT2NUM(NI_NAMEREQD));
    01798 #endif
    01799 #if defined(NI_NUMERICSERV)
    01800     /* NI_NUMERICSERV: */
    01801     rb_define_const(rb_cSocket, "NI_NUMERICSERV", INT2NUM(NI_NUMERICSERV));
    01802     /* NI_NUMERICSERV: */
    01803     rb_define_const(rb_mSockConst, "NI_NUMERICSERV", INT2NUM(NI_NUMERICSERV));
    01804 #endif
    01805 #if defined(NI_DGRAM)
    01806     /* NI_DGRAM: */
    01807     rb_define_const(rb_cSocket, "NI_DGRAM", INT2NUM(NI_DGRAM));
    01808     /* NI_DGRAM: */
    01809     rb_define_const(rb_mSockConst, "NI_DGRAM", INT2NUM(NI_DGRAM));
    01810 #endif
    01811 #if defined(SHUT_RD)
    01812     /* SHUT_RD: */
    01813     rb_define_const(rb_cSocket, "SHUT_RD", INT2NUM(SHUT_RD));
    01814     /* SHUT_RD: */
    01815     rb_define_const(rb_mSockConst, "SHUT_RD", INT2NUM(SHUT_RD));
    01816 #endif
    01817 #if defined(SHUT_WR)
    01818     /* SHUT_WR: */
    01819     rb_define_const(rb_cSocket, "SHUT_WR", INT2NUM(SHUT_WR));
    01820     /* SHUT_WR: */
    01821     rb_define_const(rb_mSockConst, "SHUT_WR", INT2NUM(SHUT_WR));
    01822 #endif
    01823 #if defined(SHUT_RDWR)
    01824     /* SHUT_RDWR: */
    01825     rb_define_const(rb_cSocket, "SHUT_RDWR", INT2NUM(SHUT_RDWR));
    01826     /* SHUT_RDWR: */
    01827     rb_define_const(rb_mSockConst, "SHUT_RDWR", INT2NUM(SHUT_RDWR));
    01828 #endif
    01829 #if defined(INET6)
    01830 #if defined(IPV6_JOIN_GROUP)
    01831     /* IPV6_JOIN_GROUP: */
    01832     rb_define_const(rb_cSocket, "IPV6_JOIN_GROUP", INT2NUM(IPV6_JOIN_GROUP));
    01833     /* IPV6_JOIN_GROUP: */
    01834     rb_define_const(rb_mSockConst, "IPV6_JOIN_GROUP", INT2NUM(IPV6_JOIN_GROUP));
    01835 #endif
    01836 #endif
    01837 #if defined(INET6)
    01838 #if defined(IPV6_LEAVE_GROUP)
    01839     /* IPV6_LEAVE_GROUP: */
    01840     rb_define_const(rb_cSocket, "IPV6_LEAVE_GROUP", INT2NUM(IPV6_LEAVE_GROUP));
    01841     /* IPV6_LEAVE_GROUP: */
    01842     rb_define_const(rb_mSockConst, "IPV6_LEAVE_GROUP", INT2NUM(IPV6_LEAVE_GROUP));
    01843 #endif
    01844 #endif
    01845 #if defined(INET6)
    01846 #if defined(IPV6_MULTICAST_HOPS)
    01847     /* IPV6_MULTICAST_HOPS: */
    01848     rb_define_const(rb_cSocket, "IPV6_MULTICAST_HOPS", INT2NUM(IPV6_MULTICAST_HOPS));
    01849     /* IPV6_MULTICAST_HOPS: */
    01850     rb_define_const(rb_mSockConst, "IPV6_MULTICAST_HOPS", INT2NUM(IPV6_MULTICAST_HOPS));
    01851 #endif
    01852 #endif
    01853 #if defined(INET6)
    01854 #if defined(IPV6_MULTICAST_IF)
    01855     /* IPV6_MULTICAST_IF: */
    01856     rb_define_const(rb_cSocket, "IPV6_MULTICAST_IF", INT2NUM(IPV6_MULTICAST_IF));
    01857     /* IPV6_MULTICAST_IF: */
    01858     rb_define_const(rb_mSockConst, "IPV6_MULTICAST_IF", INT2NUM(IPV6_MULTICAST_IF));
    01859 #endif
    01860 #endif
    01861 #if defined(INET6)
    01862 #if defined(IPV6_MULTICAST_LOOP)
    01863     /* IPV6_MULTICAST_LOOP: */
    01864     rb_define_const(rb_cSocket, "IPV6_MULTICAST_LOOP", INT2NUM(IPV6_MULTICAST_LOOP));
    01865     /* IPV6_MULTICAST_LOOP: */
    01866     rb_define_const(rb_mSockConst, "IPV6_MULTICAST_LOOP", INT2NUM(IPV6_MULTICAST_LOOP));
    01867 #endif
    01868 #endif
    01869 #if defined(INET6)
    01870 #if defined(IPV6_UNICAST_HOPS)
    01871     /* IPV6_UNICAST_HOPS: */
    01872     rb_define_const(rb_cSocket, "IPV6_UNICAST_HOPS", INT2NUM(IPV6_UNICAST_HOPS));
    01873     /* IPV6_UNICAST_HOPS: */
    01874     rb_define_const(rb_mSockConst, "IPV6_UNICAST_HOPS", INT2NUM(IPV6_UNICAST_HOPS));
    01875 #endif
    01876 #endif
    01877 #if defined(INET6)
    01878 #if defined(IPV6_V6ONLY)
    01879     /* IPV6_V6ONLY: */
    01880     rb_define_const(rb_cSocket, "IPV6_V6ONLY", INT2NUM(IPV6_V6ONLY));
    01881     /* IPV6_V6ONLY: */
    01882     rb_define_const(rb_mSockConst, "IPV6_V6ONLY", INT2NUM(IPV6_V6ONLY));
    01883 #endif
    01884 #endif
    01885 #if defined(INET6)
    01886 #if defined(IPV6_CHECKSUM)
    01887     /* IPV6_CHECKSUM: */
    01888     rb_define_const(rb_cSocket, "IPV6_CHECKSUM", INT2NUM(IPV6_CHECKSUM));
    01889     /* IPV6_CHECKSUM: */
    01890     rb_define_const(rb_mSockConst, "IPV6_CHECKSUM", INT2NUM(IPV6_CHECKSUM));
    01891 #endif
    01892 #endif
    01893 #if defined(INET6)
    01894 #if defined(IPV6_DONTFRAG)
    01895     /* IPV6_DONTFRAG: */
    01896     rb_define_const(rb_cSocket, "IPV6_DONTFRAG", INT2NUM(IPV6_DONTFRAG));
    01897     /* IPV6_DONTFRAG: */
    01898     rb_define_const(rb_mSockConst, "IPV6_DONTFRAG", INT2NUM(IPV6_DONTFRAG));
    01899 #endif
    01900 #endif
    01901 #if defined(INET6)
    01902 #if defined(IPV6_DSTOPTS)
    01903     /* IPV6_DSTOPTS: */
    01904     rb_define_const(rb_cSocket, "IPV6_DSTOPTS", INT2NUM(IPV6_DSTOPTS));
    01905     /* IPV6_DSTOPTS: */
    01906     rb_define_const(rb_mSockConst, "IPV6_DSTOPTS", INT2NUM(IPV6_DSTOPTS));
    01907 #endif
    01908 #endif
    01909 #if defined(INET6)
    01910 #if defined(IPV6_HOPLIMIT)
    01911     /* IPV6_HOPLIMIT: */
    01912     rb_define_const(rb_cSocket, "IPV6_HOPLIMIT", INT2NUM(IPV6_HOPLIMIT));
    01913     /* IPV6_HOPLIMIT: */
    01914     rb_define_const(rb_mSockConst, "IPV6_HOPLIMIT", INT2NUM(IPV6_HOPLIMIT));
    01915 #endif
    01916 #endif
    01917 #if defined(INET6)
    01918 #if defined(IPV6_HOPOPTS)
    01919     /* IPV6_HOPOPTS: */
    01920     rb_define_const(rb_cSocket, "IPV6_HOPOPTS", INT2NUM(IPV6_HOPOPTS));
    01921     /* IPV6_HOPOPTS: */
    01922     rb_define_const(rb_mSockConst, "IPV6_HOPOPTS", INT2NUM(IPV6_HOPOPTS));
    01923 #endif
    01924 #endif
    01925 #if defined(INET6)
    01926 #if defined(IPV6_NEXTHOP)
    01927     /* IPV6_NEXTHOP: */
    01928     rb_define_const(rb_cSocket, "IPV6_NEXTHOP", INT2NUM(IPV6_NEXTHOP));
    01929     /* IPV6_NEXTHOP: */
    01930     rb_define_const(rb_mSockConst, "IPV6_NEXTHOP", INT2NUM(IPV6_NEXTHOP));
    01931 #endif
    01932 #endif
    01933 #if defined(INET6)
    01934 #if defined(IPV6_PATHMTU)
    01935     /* IPV6_PATHMTU: */
    01936     rb_define_const(rb_cSocket, "IPV6_PATHMTU", INT2NUM(IPV6_PATHMTU));
    01937     /* IPV6_PATHMTU: */
    01938     rb_define_const(rb_mSockConst, "IPV6_PATHMTU", INT2NUM(IPV6_PATHMTU));
    01939 #endif
    01940 #endif
    01941 #if defined(INET6)
    01942 #if defined(IPV6_PKTINFO)
    01943     /* IPV6_PKTINFO: */
    01944     rb_define_const(rb_cSocket, "IPV6_PKTINFO", INT2NUM(IPV6_PKTINFO));
    01945     /* IPV6_PKTINFO: */
    01946     rb_define_const(rb_mSockConst, "IPV6_PKTINFO", INT2NUM(IPV6_PKTINFO));
    01947 #endif
    01948 #endif
    01949 #if defined(INET6)
    01950 #if defined(IPV6_RECVDSTOPTS)
    01951     /* IPV6_RECVDSTOPTS: */
    01952     rb_define_const(rb_cSocket, "IPV6_RECVDSTOPTS", INT2NUM(IPV6_RECVDSTOPTS));
    01953     /* IPV6_RECVDSTOPTS: */
    01954     rb_define_const(rb_mSockConst, "IPV6_RECVDSTOPTS", INT2NUM(IPV6_RECVDSTOPTS));
    01955 #endif
    01956 #endif
    01957 #if defined(INET6)
    01958 #if defined(IPV6_RECVHOPLIMIT)
    01959     /* IPV6_RECVHOPLIMIT: */
    01960     rb_define_const(rb_cSocket, "IPV6_RECVHOPLIMIT", INT2NUM(IPV6_RECVHOPLIMIT));
    01961     /* IPV6_RECVHOPLIMIT: */
    01962     rb_define_const(rb_mSockConst, "IPV6_RECVHOPLIMIT", INT2NUM(IPV6_RECVHOPLIMIT));
    01963 #endif
    01964 #endif
    01965 #if defined(INET6)
    01966 #if defined(IPV6_RECVHOPOPTS)
    01967     /* IPV6_RECVHOPOPTS: */
    01968     rb_define_const(rb_cSocket, "IPV6_RECVHOPOPTS", INT2NUM(IPV6_RECVHOPOPTS));
    01969     /* IPV6_RECVHOPOPTS: */
    01970     rb_define_const(rb_mSockConst, "IPV6_RECVHOPOPTS", INT2NUM(IPV6_RECVHOPOPTS));
    01971 #endif
    01972 #endif
    01973 #if defined(INET6)
    01974 #if defined(IPV6_RECVPKTINFO)
    01975     /* IPV6_RECVPKTINFO: */
    01976     rb_define_const(rb_cSocket, "IPV6_RECVPKTINFO", INT2NUM(IPV6_RECVPKTINFO));
    01977     /* IPV6_RECVPKTINFO: */
    01978     rb_define_const(rb_mSockConst, "IPV6_RECVPKTINFO", INT2NUM(IPV6_RECVPKTINFO));
    01979 #endif
    01980 #endif
    01981 #if defined(INET6)
    01982 #if defined(IPV6_RECVRTHDR)
    01983     /* IPV6_RECVRTHDR: */
    01984     rb_define_const(rb_cSocket, "IPV6_RECVRTHDR", INT2NUM(IPV6_RECVRTHDR));
    01985     /* IPV6_RECVRTHDR: */
    01986     rb_define_const(rb_mSockConst, "IPV6_RECVRTHDR", INT2NUM(IPV6_RECVRTHDR));
    01987 #endif
    01988 #endif
    01989 #if defined(INET6)
    01990 #if defined(IPV6_RECVTCLASS)
    01991     /* IPV6_RECVTCLASS: */
    01992     rb_define_const(rb_cSocket, "IPV6_RECVTCLASS", INT2NUM(IPV6_RECVTCLASS));
    01993     /* IPV6_RECVTCLASS: */
    01994     rb_define_const(rb_mSockConst, "IPV6_RECVTCLASS", INT2NUM(IPV6_RECVTCLASS));
    01995 #endif
    01996 #endif
    01997 #if defined(INET6)
    01998 #if defined(IPV6_RTHDR)
    01999     /* IPV6_RTHDR: */
    02000     rb_define_const(rb_cSocket, "IPV6_RTHDR", INT2NUM(IPV6_RTHDR));
    02001     /* IPV6_RTHDR: */
    02002     rb_define_const(rb_mSockConst, "IPV6_RTHDR", INT2NUM(IPV6_RTHDR));
    02003 #endif
    02004 #endif
    02005 #if defined(INET6)
    02006 #if defined(IPV6_RTHDRDSTOPTS)
    02007     /* IPV6_RTHDRDSTOPTS: */
    02008     rb_define_const(rb_cSocket, "IPV6_RTHDRDSTOPTS", INT2NUM(IPV6_RTHDRDSTOPTS));
    02009     /* IPV6_RTHDRDSTOPTS: */
    02010     rb_define_const(rb_mSockConst, "IPV6_RTHDRDSTOPTS", INT2NUM(IPV6_RTHDRDSTOPTS));
    02011 #endif
    02012 #endif
    02013 #if defined(INET6)
    02014 #if defined(IPV6_RTHDR_TYPE_0)
    02015     /* IPV6_RTHDR_TYPE_0: */
    02016     rb_define_const(rb_cSocket, "IPV6_RTHDR_TYPE_0", INT2NUM(IPV6_RTHDR_TYPE_0));
    02017     /* IPV6_RTHDR_TYPE_0: */
    02018     rb_define_const(rb_mSockConst, "IPV6_RTHDR_TYPE_0", INT2NUM(IPV6_RTHDR_TYPE_0));
    02019 #endif
    02020 #endif
    02021 #if defined(INET6)
    02022 #if defined(IPV6_RECVPATHMTU)
    02023     /* IPV6_RECVPATHMTU: */
    02024     rb_define_const(rb_cSocket, "IPV6_RECVPATHMTU", INT2NUM(IPV6_RECVPATHMTU));
    02025     /* IPV6_RECVPATHMTU: */
    02026     rb_define_const(rb_mSockConst, "IPV6_RECVPATHMTU", INT2NUM(IPV6_RECVPATHMTU));
    02027 #endif
    02028 #endif
    02029 #if defined(INET6)
    02030 #if defined(IPV6_TCLASS)
    02031     /* IPV6_TCLASS: */
    02032     rb_define_const(rb_cSocket, "IPV6_TCLASS", INT2NUM(IPV6_TCLASS));
    02033     /* IPV6_TCLASS: */
    02034     rb_define_const(rb_mSockConst, "IPV6_TCLASS", INT2NUM(IPV6_TCLASS));
    02035 #endif
    02036 #endif
    02037 #if defined(INET6)
    02038 #if defined(IPV6_USE_MIN_MTU)
    02039     /* IPV6_USE_MIN_MTU: */
    02040     rb_define_const(rb_cSocket, "IPV6_USE_MIN_MTU", INT2NUM(IPV6_USE_MIN_MTU));
    02041     /* IPV6_USE_MIN_MTU: */
    02042     rb_define_const(rb_mSockConst, "IPV6_USE_MIN_MTU", INT2NUM(IPV6_USE_MIN_MTU));
    02043 #endif
    02044 #endif
    02045 #if defined(INET_ADDRSTRLEN)
    02046     /* INET_ADDRSTRLEN: */
    02047     rb_define_const(rb_cSocket, "INET_ADDRSTRLEN", INT2NUM(INET_ADDRSTRLEN));
    02048     /* INET_ADDRSTRLEN: */
    02049     rb_define_const(rb_mSockConst, "INET_ADDRSTRLEN", INT2NUM(INET_ADDRSTRLEN));
    02050 #endif
    02051 #if defined(INET6_ADDRSTRLEN)
    02052     /* INET6_ADDRSTRLEN: */
    02053     rb_define_const(rb_cSocket, "INET6_ADDRSTRLEN", INT2NUM(INET6_ADDRSTRLEN));
    02054     /* INET6_ADDRSTRLEN: */
    02055     rb_define_const(rb_mSockConst, "INET6_ADDRSTRLEN", INT2NUM(INET6_ADDRSTRLEN));
    02056 #endif
    02057 #if defined(IFNAMSIZ)
    02058     /* IFNAMSIZ: */
    02059     rb_define_const(rb_cSocket, "IFNAMSIZ", INT2NUM(IFNAMSIZ));
    02060     /* IFNAMSIZ: */
    02061     rb_define_const(rb_mSockConst, "IFNAMSIZ", INT2NUM(IFNAMSIZ));
    02062 #endif
    02063 #if defined(SOMAXCONN)
    02064     /* SOMAXCONN: */
    02065     rb_define_const(rb_cSocket, "SOMAXCONN", INT2NUM(SOMAXCONN));
    02066     /* SOMAXCONN: */
    02067     rb_define_const(rb_mSockConst, "SOMAXCONN", INT2NUM(SOMAXCONN));
    02068 #endif
    02069 #if defined(SCM_RIGHTS)
    02070     /* SCM_RIGHTS: */
    02071     rb_define_const(rb_cSocket, "SCM_RIGHTS", INT2NUM(SCM_RIGHTS));
    02072     /* SCM_RIGHTS: */
    02073     rb_define_const(rb_mSockConst, "SCM_RIGHTS", INT2NUM(SCM_RIGHTS));
    02074 #endif
    02075 #if defined(SCM_TIMESTAMP)
    02076     /* SCM_TIMESTAMP: */
    02077     rb_define_const(rb_cSocket, "SCM_TIMESTAMP", INT2NUM(SCM_TIMESTAMP));
    02078     /* SCM_TIMESTAMP: */
    02079     rb_define_const(rb_mSockConst, "SCM_TIMESTAMP", INT2NUM(SCM_TIMESTAMP));
    02080 #endif
    02081 #if defined(SCM_TIMESTAMPNS)
    02082     /* SCM_TIMESTAMPNS: */
    02083     rb_define_const(rb_cSocket, "SCM_TIMESTAMPNS", INT2NUM(SCM_TIMESTAMPNS));
    02084     /* SCM_TIMESTAMPNS: */
    02085     rb_define_const(rb_mSockConst, "SCM_TIMESTAMPNS", INT2NUM(SCM_TIMESTAMPNS));
    02086 #endif
    02087 #if defined(SCM_BINTIME)
    02088     /* SCM_BINTIME: */
    02089     rb_define_const(rb_cSocket, "SCM_BINTIME", INT2NUM(SCM_BINTIME));
    02090     /* SCM_BINTIME: */
    02091     rb_define_const(rb_mSockConst, "SCM_BINTIME", INT2NUM(SCM_BINTIME));
    02092 #endif
    02093 #if defined(SCM_CREDENTIALS)
    02094     /* SCM_CREDENTIALS: */
    02095     rb_define_const(rb_cSocket, "SCM_CREDENTIALS", INT2NUM(SCM_CREDENTIALS));
    02096     /* SCM_CREDENTIALS: */
    02097     rb_define_const(rb_mSockConst, "SCM_CREDENTIALS", INT2NUM(SCM_CREDENTIALS));
    02098 #endif
    02099 #if defined(SCM_CREDS)
    02100     /* SCM_CREDS: */
    02101     rb_define_const(rb_cSocket, "SCM_CREDS", INT2NUM(SCM_CREDS));
    02102     /* SCM_CREDS: */
    02103     rb_define_const(rb_mSockConst, "SCM_CREDS", INT2NUM(SCM_CREDS));
    02104 #endif
    02105 #if defined(SCM_UCRED)
    02106     /* SCM_UCRED: */
    02107     rb_define_const(rb_cSocket, "SCM_UCRED", INT2NUM(SCM_UCRED));
    02108     /* SCM_UCRED: */
    02109     rb_define_const(rb_mSockConst, "SCM_UCRED", INT2NUM(SCM_UCRED));
    02110 #endif
    02111 #if defined(LOCAL_PEERCRED)
    02112     /* LOCAL_PEERCRED: */
    02113     rb_define_const(rb_cSocket, "LOCAL_PEERCRED", INT2NUM(LOCAL_PEERCRED));
    02114     /* LOCAL_PEERCRED: */
    02115     rb_define_const(rb_mSockConst, "LOCAL_PEERCRED", INT2NUM(LOCAL_PEERCRED));
    02116 #endif
    02117 #if defined(LOCAL_CREDS)
    02118     /* LOCAL_CREDS: */
    02119     rb_define_const(rb_cSocket, "LOCAL_CREDS", INT2NUM(LOCAL_CREDS));
    02120     /* LOCAL_CREDS: */
    02121     rb_define_const(rb_mSockConst, "LOCAL_CREDS", INT2NUM(LOCAL_CREDS));
    02122 #endif
    02123 #if defined(LOCAL_CONNWAIT)
    02124     /* LOCAL_CONNWAIT: */
    02125     rb_define_const(rb_cSocket, "LOCAL_CONNWAIT", INT2NUM(LOCAL_CONNWAIT));
    02126     /* LOCAL_CONNWAIT: */
    02127     rb_define_const(rb_mSockConst, "LOCAL_CONNWAIT", INT2NUM(LOCAL_CONNWAIT));
    02128 #endif
    02129
    02130     rsock_intern_family_hash = st_init_numtable();
    02131 #ifdef AF_E164
    02132     st_insert(rsock_intern_family_hash, (st_data_t)AF_E164, (st_data_t)rb_intern2("AF_E164", 7));
    02133 #endif
    02134 #ifdef AF_PACKET
    02135     st_insert(rsock_intern_family_hash, (st_data_t)AF_PACKET, (st_data_t)rb_intern2("AF_PACKET", 9));
    02136 #endif
    02137 #ifdef AF_MAX
    02138     st_insert(rsock_intern_family_hash, (st_data_t)AF_MAX, (st_data_t)rb_intern2("AF_MAX", 6));
    02139 #endif
    02140 #ifdef AF_NETGRAPH
    02141     st_insert(rsock_intern_family_hash, (st_data_t)AF_NETGRAPH, (st_data_t)rb_intern2("AF_NETGRAPH", 11));
    02142 #endif
    02143 #ifdef AF_ATM
    02144     st_insert(rsock_intern_family_hash, (st_data_t)AF_ATM, (st_data_t)rb_intern2("AF_ATM", 6));
    02145 #endif
    02146 #ifdef AF_PPP
    02147     st_insert(rsock_intern_family_hash, (st_data_t)AF_PPP, (st_data_t)rb_intern2("AF_PPP", 6));
    02148 #endif
    02149 #ifdef AF_NETBIOS
    02150     st_insert(rsock_intern_family_hash, (st_data_t)AF_NETBIOS, (st_data_t)rb_intern2("AF_NETBIOS", 10));
    02151 #endif
    02152 #ifdef AF_SYSTEM
    02153     st_insert(rsock_intern_family_hash, (st_data_t)AF_SYSTEM, (st_data_t)rb_intern2("AF_SYSTEM", 9));
    02154 #endif
    02155 #ifdef AF_NATM
    02156     st_insert(rsock_intern_family_hash, (st_data_t)AF_NATM, (st_data_t)rb_intern2("AF_NATM", 7));
    02157 #endif
    02158 #ifdef AF_ISDN
    02159     st_insert(rsock_intern_family_hash, (st_data_t)AF_ISDN, (st_data_t)rb_intern2("AF_ISDN", 7));
    02160 #endif
    02161 #ifdef AF_NDRV
    02162     st_insert(rsock_intern_family_hash, (st_data_t)AF_NDRV, (st_data_t)rb_intern2("AF_NDRV", 7));
    02163 #endif
    02164 #ifdef AF_SIP
    02165     st_insert(rsock_intern_family_hash, (st_data_t)AF_SIP, (st_data_t)rb_intern2("AF_SIP", 6));
    02166 #endif
    02167 #ifdef AF_CNT
    02168     st_insert(rsock_intern_family_hash, (st_data_t)AF_CNT, (st_data_t)rb_intern2("AF_CNT", 6));
    02169 #endif
    02170 #ifdef AF_COIP
    02171     st_insert(rsock_intern_family_hash, (st_data_t)AF_COIP, (st_data_t)rb_intern2("AF_COIP", 7));
    02172 #endif
    02173 #ifdef AF_LINK
    02174     st_insert(rsock_intern_family_hash, (st_data_t)AF_LINK, (st_data_t)rb_intern2("AF_LINK", 7));
    02175 #endif
    02176 #ifdef AF_ROUTE
    02177     st_insert(rsock_intern_family_hash, (st_data_t)AF_ROUTE, (st_data_t)rb_intern2("AF_ROUTE", 8));
    02178 #endif
    02179 #ifdef AF_HYLINK
    02180     st_insert(rsock_intern_family_hash, (st_data_t)AF_HYLINK, (st_data_t)rb_intern2("AF_HYLINK", 9));
    02181 #endif
    02182 #ifdef AF_LAT
    02183     st_insert(rsock_intern_family_hash, (st_data_t)AF_LAT, (st_data_t)rb_intern2("AF_LAT", 6));
    02184 #endif
    02185 #ifdef AF_DLI
    02186     st_insert(rsock_intern_family_hash, (st_data_t)AF_DLI, (st_data_t)rb_intern2("AF_DLI", 6));
    02187 #endif
    02188 #ifdef AF_DEC
    02189     st_insert(rsock_intern_family_hash, (st_data_t)AF_DEC, (st_data_t)rb_intern2("AF_DEC", 6));
    02190 #endif
    02191 #ifdef AF_SNA
    02192     st_insert(rsock_intern_family_hash, (st_data_t)AF_SNA, (st_data_t)rb_intern2("AF_SNA", 6));
    02193 #endif
    02194 #ifdef AF_CCITT
    02195     st_insert(rsock_intern_family_hash, (st_data_t)AF_CCITT, (st_data_t)rb_intern2("AF_CCITT", 8));
    02196 #endif
    02197 #ifdef AF_DATAKIT
    02198     st_insert(rsock_intern_family_hash, (st_data_t)AF_DATAKIT, (st_data_t)rb_intern2("AF_DATAKIT", 10));
    02199 #endif
    02200 #ifdef AF_ECMA
    02201     st_insert(rsock_intern_family_hash, (st_data_t)AF_ECMA, (st_data_t)rb_intern2("AF_ECMA", 7));
    02202 #endif
    02203 #ifdef AF_OSI
    02204     st_insert(rsock_intern_family_hash, (st_data_t)AF_OSI, (st_data_t)rb_intern2("AF_OSI", 6));
    02205 #endif
    02206 #ifdef AF_ISO
    02207     st_insert(rsock_intern_family_hash, (st_data_t)AF_ISO, (st_data_t)rb_intern2("AF_ISO", 6));
    02208 #endif
    02209 #ifdef AF_NS
    02210     st_insert(rsock_intern_family_hash, (st_data_t)AF_NS, (st_data_t)rb_intern2("AF_NS", 5));
    02211 #endif
    02212 #ifdef AF_CHAOS
    02213     st_insert(rsock_intern_family_hash, (st_data_t)AF_CHAOS, (st_data_t)rb_intern2("AF_CHAOS", 8));
    02214 #endif
    02215 #ifdef AF_PUP
    02216     st_insert(rsock_intern_family_hash, (st_data_t)AF_PUP, (st_data_t)rb_intern2("AF_PUP", 6));
    02217 #endif
    02218 #ifdef AF_IMPLINK
    02219     st_insert(rsock_intern_family_hash, (st_data_t)AF_IMPLINK, (st_data_t)rb_intern2("AF_IMPLINK", 10));
    02220 #endif
    02221 #ifdef AF_LOCAL
    02222     st_insert(rsock_intern_family_hash, (st_data_t)AF_LOCAL, (st_data_t)rb_intern2("AF_LOCAL", 8));
    02223 #endif
    02224 #ifdef AF_APPLETALK
    02225     st_insert(rsock_intern_family_hash, (st_data_t)AF_APPLETALK, (st_data_t)rb_intern2("AF_APPLETALK", 12));
    02226 #endif
    02227 #ifdef AF_IPX
    02228     st_insert(rsock_intern_family_hash, (st_data_t)AF_IPX, (st_data_t)rb_intern2("AF_IPX", 6));
    02229 #endif
    02230 #ifdef AF_AX25
    02231     st_insert(rsock_intern_family_hash, (st_data_t)AF_AX25, (st_data_t)rb_intern2("AF_AX25", 7));
    02232 #endif
    02233 #ifdef AF_UNIX
    02234     st_insert(rsock_intern_family_hash, (st_data_t)AF_UNIX, (st_data_t)rb_intern2("AF_UNIX", 7));
    02235 #endif
    02236 #ifdef AF_INET6
    02237     st_insert(rsock_intern_family_hash, (st_data_t)AF_INET6, (st_data_t)rb_intern2("AF_INET6", 8));
    02238 #endif
    02239 #ifdef AF_INET
    02240     st_insert(rsock_intern_family_hash, (st_data_t)AF_INET, (st_data_t)rb_intern2("AF_INET", 7));
    02241 #endif
    02242 #ifdef AF_UNSPEC
    02243     st_insert(rsock_intern_family_hash, (st_data_t)AF_UNSPEC, (st_data_t)rb_intern2("AF_UNSPEC", 9));
    02244 #endif
    02245
    02246     rsock_intern_family_noprefix_hash = st_init_numtable();
    02247 #ifdef AF_E164
    02248     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_E164, (st_data_t)rb_intern2("AF_E164", 7));
    02249 #endif
    02250 #ifdef AF_PACKET
    02251     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_PACKET, (st_data_t)rb_intern2("AF_PACKET", 9));
    02252 #endif
    02253 #ifdef AF_MAX
    02254     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_MAX, (st_data_t)rb_intern2("AF_MAX", 6));
    02255 #endif
    02256 #ifdef AF_NETGRAPH
    02257     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NETGRAPH, (st_data_t)rb_intern2("AF_NETGRAPH", 11));
    02258 #endif
    02259 #ifdef AF_ATM
    02260     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ATM, (st_data_t)rb_intern2("AF_ATM", 6));
    02261 #endif
    02262 #ifdef AF_PPP
    02263     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_PPP, (st_data_t)rb_intern2("AF_PPP", 6));
    02264 #endif
    02265 #ifdef AF_NETBIOS
    02266     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NETBIOS, (st_data_t)rb_intern2("AF_NETBIOS", 10));
    02267 #endif
    02268 #ifdef AF_SYSTEM
    02269     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_SYSTEM, (st_data_t)rb_intern2("AF_SYSTEM", 9));
    02270 #endif
    02271 #ifdef AF_NATM
    02272     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NATM, (st_data_t)rb_intern2("AF_NATM", 7));
    02273 #endif
    02274 #ifdef AF_ISDN
    02275     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ISDN, (st_data_t)rb_intern2("AF_ISDN", 7));
    02276 #endif
    02277 #ifdef AF_NDRV
    02278     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NDRV, (st_data_t)rb_intern2("AF_NDRV", 7));
    02279 #endif
    02280 #ifdef AF_SIP
    02281     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_SIP, (st_data_t)rb_intern2("AF_SIP", 6));
    02282 #endif
    02283 #ifdef AF_CNT
    02284     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_CNT, (st_data_t)rb_intern2("AF_CNT", 6));
    02285 #endif
    02286 #ifdef AF_COIP
    02287     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_COIP, (st_data_t)rb_intern2("AF_COIP", 7));
    02288 #endif
    02289 #ifdef AF_LINK
    02290     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_LINK, (st_data_t)rb_intern2("AF_LINK", 7));
    02291 #endif
    02292 #ifdef AF_ROUTE
    02293     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ROUTE, (st_data_t)rb_intern2("AF_ROUTE", 8));
    02294 #endif
    02295 #ifdef AF_HYLINK
    02296     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_HYLINK, (st_data_t)rb_intern2("AF_HYLINK", 9));
    02297 #endif
    02298 #ifdef AF_LAT
    02299     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_LAT, (st_data_t)rb_intern2("AF_LAT", 6));
    02300 #endif
    02301 #ifdef AF_DLI
    02302     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_DLI, (st_data_t)rb_intern2("AF_DLI", 6));
    02303 #endif
    02304 #ifdef AF_DEC
    02305     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_DEC, (st_data_t)rb_intern2("AF_DEC", 6));
    02306 #endif
    02307 #ifdef AF_SNA
    02308     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_SNA, (st_data_t)rb_intern2("AF_SNA", 6));
    02309 #endif
    02310 #ifdef AF_CCITT
    02311     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_CCITT, (st_data_t)rb_intern2("AF_CCITT", 8));
    02312 #endif
    02313 #ifdef AF_DATAKIT
    02314     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_DATAKIT, (st_data_t)rb_intern2("AF_DATAKIT", 10));
    02315 #endif
    02316 #ifdef AF_ECMA
    02317     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ECMA, (st_data_t)rb_intern2("AF_ECMA", 7));
    02318 #endif
    02319 #ifdef AF_OSI
    02320     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_OSI, (st_data_t)rb_intern2("AF_OSI", 6));
    02321 #endif
    02322 #ifdef AF_ISO
    02323     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ISO, (st_data_t)rb_intern2("AF_ISO", 6));
    02324 #endif
    02325 #ifdef AF_NS
    02326     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NS, (st_data_t)rb_intern2("AF_NS", 5));
    02327 #endif
    02328 #ifdef AF_CHAOS
    02329     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_CHAOS, (st_data_t)rb_intern2("AF_CHAOS", 8));
    02330 #endif
    02331 #ifdef AF_PUP
    02332     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_PUP, (st_data_t)rb_intern2("AF_PUP", 6));
    02333 #endif
    02334 #ifdef AF_IMPLINK
    02335     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_IMPLINK, (st_data_t)rb_intern2("AF_IMPLINK", 10));
    02336 #endif
    02337 #ifdef AF_LOCAL
    02338     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_LOCAL, (st_data_t)rb_intern2("AF_LOCAL", 8));
    02339 #endif
    02340 #ifdef AF_APPLETALK
    02341     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_APPLETALK, (st_data_t)rb_intern2("AF_APPLETALK", 12));
    02342 #endif
    02343 #ifdef AF_IPX
    02344     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_IPX, (st_data_t)rb_intern2("AF_IPX", 6));
    02345 #endif
    02346 #ifdef AF_AX25
    02347     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_AX25, (st_data_t)rb_intern2("AF_AX25", 7));
    02348 #endif
    02349 #ifdef AF_UNIX
    02350     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_UNIX, (st_data_t)rb_intern2("AF_UNIX", 7));
    02351 #endif
    02352 #ifdef AF_INET6
    02353     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_INET6, (st_data_t)rb_intern2("AF_INET6", 8));
    02354 #endif
    02355 #ifdef AF_INET
    02356     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_INET, (st_data_t)rb_intern2("AF_INET", 7));
    02357 #endif
    02358 #ifdef AF_UNSPEC
    02359     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_UNSPEC, (st_data_t)rb_intern2("AF_UNSPEC", 9));
    02360 #endif
    02361 #ifdef AF_E164
    02362     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_E164, (st_data_t)rb_intern2("E164", 4));
    02363 #endif
    02364 #ifdef AF_PACKET
    02365     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_PACKET, (st_data_t)rb_intern2("PACKET", 6));
    02366 #endif
    02367 #ifdef AF_MAX
    02368     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_MAX, (st_data_t)rb_intern2("MAX", 3));
    02369 #endif
    02370 #ifdef AF_NETGRAPH
    02371     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NETGRAPH, (st_data_t)rb_intern2("NETGRAPH", 8));
    02372 #endif
    02373 #ifdef AF_ATM
    02374     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ATM, (st_data_t)rb_intern2("ATM", 3));
    02375 #endif
    02376 #ifdef AF_PPP
    02377     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_PPP, (st_data_t)rb_intern2("PPP", 3));
    02378 #endif
    02379 #ifdef AF_NETBIOS
    02380     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NETBIOS, (st_data_t)rb_intern2("NETBIOS", 7));
    02381 #endif
    02382 #ifdef AF_SYSTEM
    02383     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_SYSTEM, (st_data_t)rb_intern2("SYSTEM", 6));
    02384 #endif
    02385 #ifdef AF_NATM
    02386     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NATM, (st_data_t)rb_intern2("NATM", 4));
    02387 #endif
    02388 #ifdef AF_ISDN
    02389     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ISDN, (st_data_t)rb_intern2("ISDN", 4));
    02390 #endif
    02391 #ifdef AF_NDRV
    02392     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NDRV, (st_data_t)rb_intern2("NDRV", 4));
    02393 #endif
    02394 #ifdef AF_SIP
    02395     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_SIP, (st_data_t)rb_intern2("SIP", 3));
    02396 #endif
    02397 #ifdef AF_CNT
    02398     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_CNT, (st_data_t)rb_intern2("CNT", 3));
    02399 #endif
    02400 #ifdef AF_COIP
    02401     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_COIP, (st_data_t)rb_intern2("COIP", 4));
    02402 #endif
    02403 #ifdef AF_LINK
    02404     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_LINK, (st_data_t)rb_intern2("LINK", 4));
    02405 #endif
    02406 #ifdef AF_ROUTE
    02407     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ROUTE, (st_data_t)rb_intern2("ROUTE", 5));
    02408 #endif
    02409 #ifdef AF_HYLINK
    02410     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_HYLINK, (st_data_t)rb_intern2("HYLINK", 6));
    02411 #endif
    02412 #ifdef AF_LAT
    02413     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_LAT, (st_data_t)rb_intern2("LAT", 3));
    02414 #endif
    02415 #ifdef AF_DLI
    02416     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_DLI, (st_data_t)rb_intern2("DLI", 3));
    02417 #endif
    02418 #ifdef AF_DEC
    02419     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_DEC, (st_data_t)rb_intern2("DEC", 3));
    02420 #endif
    02421 #ifdef AF_SNA
    02422     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_SNA, (st_data_t)rb_intern2("SNA", 3));
    02423 #endif
    02424 #ifdef AF_CCITT
    02425     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_CCITT, (st_data_t)rb_intern2("CCITT", 5));
    02426 #endif
    02427 #ifdef AF_DATAKIT
    02428     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_DATAKIT, (st_data_t)rb_intern2("DATAKIT", 7));
    02429 #endif
    02430 #ifdef AF_ECMA
    02431     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ECMA, (st_data_t)rb_intern2("ECMA", 4));
    02432 #endif
    02433 #ifdef AF_OSI
    02434     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_OSI, (st_data_t)rb_intern2("OSI", 3));
    02435 #endif
    02436 #ifdef AF_ISO
    02437     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_ISO, (st_data_t)rb_intern2("ISO", 3));
    02438 #endif
    02439 #ifdef AF_NS
    02440     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_NS, (st_data_t)rb_intern2("NS", 2));
    02441 #endif
    02442 #ifdef AF_CHAOS
    02443     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_CHAOS, (st_data_t)rb_intern2("CHAOS", 5));
    02444 #endif
    02445 #ifdef AF_PUP
    02446     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_PUP, (st_data_t)rb_intern2("PUP", 3));
    02447 #endif
    02448 #ifdef AF_IMPLINK
    02449     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_IMPLINK, (st_data_t)rb_intern2("IMPLINK", 7));
    02450 #endif
    02451 #ifdef AF_LOCAL
    02452     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_LOCAL, (st_data_t)rb_intern2("LOCAL", 5));
    02453 #endif
    02454 #ifdef AF_APPLETALK
    02455     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_APPLETALK, (st_data_t)rb_intern2("APPLETALK", 9));
    02456 #endif
    02457 #ifdef AF_IPX
    02458     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_IPX, (st_data_t)rb_intern2("IPX", 3));
    02459 #endif
    02460 #ifdef AF_AX25
    02461     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_AX25, (st_data_t)rb_intern2("AX25", 4));
    02462 #endif
    02463 #ifdef AF_UNIX
    02464     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_UNIX, (st_data_t)rb_intern2("UNIX", 4));
    02465 #endif
    02466 #ifdef AF_INET6
    02467     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_INET6, (st_data_t)rb_intern2("INET6", 5));
    02468 #endif
    02469 #ifdef AF_INET
    02470     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_INET, (st_data_t)rb_intern2("INET", 4));
    02471 #endif
    02472 #ifdef AF_UNSPEC
    02473     st_insert(rsock_intern_family_noprefix_hash, (st_data_t)AF_UNSPEC, (st_data_t)rb_intern2("UNSPEC", 6));
    02474 #endif
    02475
    02476     rsock_intern_protocol_family_hash = st_init_numtable();
    02477 #ifdef PF_KEY
    02478     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_KEY, (st_data_t)rb_intern2("PF_KEY", 6));
    02479 #endif
    02480 #ifdef PF_PIP
    02481     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_PIP, (st_data_t)rb_intern2("PF_PIP", 6));
    02482 #endif
    02483 #ifdef PF_RTIP
    02484     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_RTIP, (st_data_t)rb_intern2("PF_RTIP", 7));
    02485 #endif
    02486 #ifdef PF_XTP
    02487     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_XTP, (st_data_t)rb_intern2("PF_XTP", 6));
    02488 #endif
    02489 #ifdef PF_PACKET
    02490     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_PACKET, (st_data_t)rb_intern2("PF_PACKET", 9));
    02491 #endif
    02492 #ifdef PF_MAX
    02493     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_MAX, (st_data_t)rb_intern2("PF_MAX", 6));
    02494 #endif
    02495 #ifdef PF_NETGRAPH
    02496     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_NETGRAPH, (st_data_t)rb_intern2("PF_NETGRAPH", 11));
    02497 #endif
    02498 #ifdef PF_ATM
    02499     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_ATM, (st_data_t)rb_intern2("PF_ATM", 6));
    02500 #endif
    02501 #ifdef PF_PPP
    02502     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_PPP, (st_data_t)rb_intern2("PF_PPP", 6));
    02503 #endif
    02504 #ifdef PF_NETBIOS
    02505     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_NETBIOS, (st_data_t)rb_intern2("PF_NETBIOS", 10));
    02506 #endif
    02507 #ifdef PF_SYSTEM
    02508     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_SYSTEM, (st_data_t)rb_intern2("PF_SYSTEM", 9));
    02509 #endif
    02510 #ifdef PF_NATM
    02511     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_NATM, (st_data_t)rb_intern2("PF_NATM", 7));
    02512 #endif
    02513 #ifdef PF_ISDN
    02514     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_ISDN, (st_data_t)rb_intern2("PF_ISDN", 7));
    02515 #endif
    02516 #ifdef PF_NDRV
    02517     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_NDRV, (st_data_t)rb_intern2("PF_NDRV", 7));
    02518 #endif
    02519 #ifdef PF_SIP
    02520     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_SIP, (st_data_t)rb_intern2("PF_SIP", 6));
    02521 #endif
    02522 #ifdef PF_CNT
    02523     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_CNT, (st_data_t)rb_intern2("PF_CNT", 6));
    02524 #endif
    02525 #ifdef PF_COIP
    02526     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_COIP, (st_data_t)rb_intern2("PF_COIP", 7));
    02527 #endif
    02528 #ifdef PF_LINK
    02529     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_LINK, (st_data_t)rb_intern2("PF_LINK", 7));
    02530 #endif
    02531 #ifdef PF_ROUTE
    02532     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_ROUTE, (st_data_t)rb_intern2("PF_ROUTE", 8));
    02533 #endif
    02534 #ifdef PF_HYLINK
    02535     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_HYLINK, (st_data_t)rb_intern2("PF_HYLINK", 9));
    02536 #endif
    02537 #ifdef PF_LAT
    02538     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_LAT, (st_data_t)rb_intern2("PF_LAT", 6));
    02539 #endif
    02540 #ifdef PF_DLI
    02541     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_DLI, (st_data_t)rb_intern2("PF_DLI", 6));
    02542 #endif
    02543 #ifdef PF_DEC
    02544     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_DEC, (st_data_t)rb_intern2("PF_DEC", 6));
    02545 #endif
    02546 #ifdef PF_SNA
    02547     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_SNA, (st_data_t)rb_intern2("PF_SNA", 6));
    02548 #endif
    02549 #ifdef PF_CCITT
    02550     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_CCITT, (st_data_t)rb_intern2("PF_CCITT", 8));
    02551 #endif
    02552 #ifdef PF_DATAKIT
    02553     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_DATAKIT, (st_data_t)rb_intern2("PF_DATAKIT", 10));
    02554 #endif
    02555 #ifdef PF_ECMA
    02556     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_ECMA, (st_data_t)rb_intern2("PF_ECMA", 7));
    02557 #endif
    02558 #ifdef PF_OSI
    02559     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_OSI, (st_data_t)rb_intern2("PF_OSI", 6));
    02560 #endif
    02561 #ifdef PF_ISO
    02562     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_ISO, (st_data_t)rb_intern2("PF_ISO", 6));
    02563 #endif
    02564 #ifdef PF_NS
    02565     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_NS, (st_data_t)rb_intern2("PF_NS", 5));
    02566 #endif
    02567 #ifdef PF_CHAOS
    02568     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_CHAOS, (st_data_t)rb_intern2("PF_CHAOS", 8));
    02569 #endif
    02570 #ifdef PF_PUP
    02571     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_PUP, (st_data_t)rb_intern2("PF_PUP", 6));
    02572 #endif
    02573 #ifdef PF_IMPLINK
    02574     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_IMPLINK, (st_data_t)rb_intern2("PF_IMPLINK", 10));
    02575 #endif
    02576 #ifdef PF_LOCAL
    02577     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_LOCAL, (st_data_t)rb_intern2("PF_LOCAL", 8));
    02578 #endif
    02579 #ifdef PF_APPLETALK
    02580     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_APPLETALK, (st_data_t)rb_intern2("PF_APPLETALK", 12));
    02581 #endif
    02582 #ifdef PF_IPX
    02583     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_IPX, (st_data_t)rb_intern2("PF_IPX", 6));
    02584 #endif
    02585 #ifdef PF_AX25
    02586     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_AX25, (st_data_t)rb_intern2("PF_AX25", 7));
    02587 #endif
    02588 #ifdef PF_UNIX
    02589     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_UNIX, (st_data_t)rb_intern2("PF_UNIX", 7));
    02590 #endif
    02591 #ifdef PF_INET6
    02592     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_INET6, (st_data_t)rb_intern2("PF_INET6", 8));
    02593 #endif
    02594 #ifdef PF_INET
    02595     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_INET, (st_data_t)rb_intern2("PF_INET", 7));
    02596 #endif
    02597 #ifdef PF_UNSPEC
    02598     st_insert(rsock_intern_protocol_family_hash, (st_data_t)PF_UNSPEC, (st_data_t)rb_intern2("PF_UNSPEC", 9));
    02599 #endif
    02600
    02601     rsock_intern_socktype_hash = st_init_numtable();
    02602 #ifdef SOCK_PACKET
    02603     st_insert(rsock_intern_socktype_hash, (st_data_t)SOCK_PACKET, (st_data_t)rb_intern2("SOCK_PACKET", 11));
    02604 #endif
    02605 #ifdef SOCK_SEQPACKET
    02606     st_insert(rsock_intern_socktype_hash, (st_data_t)SOCK_SEQPACKET, (st_data_t)rb_intern2("SOCK_SEQPACKET", 14));
    02607 #endif
    02608 #ifdef SOCK_RDM
    02609     st_insert(rsock_intern_socktype_hash, (st_data_t)SOCK_RDM, (st_data_t)rb_intern2("SOCK_RDM", 8));
    02610 #endif
    02611 #ifdef SOCK_RAW
    02612     st_insert(rsock_intern_socktype_hash, (st_data_t)SOCK_RAW, (st_data_t)rb_intern2("SOCK_RAW", 8));
    02613 #endif
    02614 #ifdef SOCK_DGRAM
    02615     st_insert(rsock_intern_socktype_hash, (st_data_t)SOCK_DGRAM, (st_data_t)rb_intern2("SOCK_DGRAM", 10));
    02616 #endif
    02617 #ifdef SOCK_STREAM
    02618     st_insert(rsock_intern_socktype_hash, (st_data_t)SOCK_STREAM, (st_data_t)rb_intern2("SOCK_STREAM", 11));
    02619 #endif
    02620
    02621     rsock_intern_ipproto_hash = st_init_numtable();
    02622 #ifdef IPPROTO_MAX
    02623     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_MAX, (st_data_t)rb_intern2("IPPROTO_MAX", 11));
    02624 #endif
    02625 #ifdef IPPROTO_RAW
    02626     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_RAW, (st_data_t)rb_intern2("IPPROTO_RAW", 11));
    02627 #endif
    02628 #ifdef IPPROTO_ROUTING
    02629     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_ROUTING, (st_data_t)rb_intern2("IPPROTO_ROUTING", 15));
    02630 #endif
    02631 #ifdef IPPROTO_NONE
    02632     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_NONE, (st_data_t)rb_intern2("IPPROTO_NONE", 12));
    02633 #endif
    02634 #ifdef IPPROTO_IPV6
    02635     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_IPV6, (st_data_t)rb_intern2("IPPROTO_IPV6", 12));
    02636 #endif
    02637 #ifdef IPPROTO_ICMPV6
    02638     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_ICMPV6, (st_data_t)rb_intern2("IPPROTO_ICMPV6", 14));
    02639 #endif
    02640 #ifdef IPPROTO_HOPOPTS
    02641     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_HOPOPTS, (st_data_t)rb_intern2("IPPROTO_HOPOPTS", 15));
    02642 #endif
    02643 #ifdef IPPROTO_FRAGMENT
    02644     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_FRAGMENT, (st_data_t)rb_intern2("IPPROTO_FRAGMENT", 16));
    02645 #endif
    02646 #ifdef IPPROTO_ESP
    02647     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_ESP, (st_data_t)rb_intern2("IPPROTO_ESP", 11));
    02648 #endif
    02649 #ifdef IPPROTO_DSTOPTS
    02650     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_DSTOPTS, (st_data_t)rb_intern2("IPPROTO_DSTOPTS", 15));
    02651 #endif
    02652 #ifdef IPPROTO_AH
    02653     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_AH, (st_data_t)rb_intern2("IPPROTO_AH", 10));
    02654 #endif
    02655 #ifdef IPPROTO_BIP
    02656     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_BIP, (st_data_t)rb_intern2("IPPROTO_BIP", 11));
    02657 #endif
    02658 #ifdef IPPROTO_EON
    02659     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_EON, (st_data_t)rb_intern2("IPPROTO_EON", 11));
    02660 #endif
    02661 #ifdef IPPROTO_XTP
    02662     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_XTP, (st_data_t)rb_intern2("IPPROTO_XTP", 11));
    02663 #endif
    02664 #ifdef IPPROTO_TP
    02665     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_TP, (st_data_t)rb_intern2("IPPROTO_TP", 10));
    02666 #endif
    02667 #ifdef IPPROTO_ND
    02668     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_ND, (st_data_t)rb_intern2("IPPROTO_ND", 10));
    02669 #endif
    02670 #ifdef IPPROTO_HELLO
    02671     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_HELLO, (st_data_t)rb_intern2("IPPROTO_HELLO", 13));
    02672 #endif
    02673 #ifdef IPPROTO_IDP
    02674     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_IDP, (st_data_t)rb_intern2("IPPROTO_IDP", 11));
    02675 #endif
    02676 #ifdef IPPROTO_UDP
    02677     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_UDP, (st_data_t)rb_intern2("IPPROTO_UDP", 11));
    02678 #endif
    02679 #ifdef IPPROTO_PUP
    02680     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_PUP, (st_data_t)rb_intern2("IPPROTO_PUP", 11));
    02681 #endif
    02682 #ifdef IPPROTO_EGP
    02683     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_EGP, (st_data_t)rb_intern2("IPPROTO_EGP", 11));
    02684 #endif
    02685 #ifdef IPPROTO_TCP
    02686     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_TCP, (st_data_t)rb_intern2("IPPROTO_TCP", 11));
    02687 #endif
    02688 #ifdef IPPROTO_GGP
    02689     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_GGP, (st_data_t)rb_intern2("IPPROTO_GGP", 11));
    02690 #endif
    02691 #ifdef IPPROTO_IGMP
    02692     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_IGMP, (st_data_t)rb_intern2("IPPROTO_IGMP", 12));
    02693 #endif
    02694 #ifdef IPPROTO_ICMP
    02695     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_ICMP, (st_data_t)rb_intern2("IPPROTO_ICMP", 12));
    02696 #endif
    02697 #ifdef IPPROTO_IP
    02698     st_insert(rsock_intern_ipproto_hash, (st_data_t)IPPROTO_IP, (st_data_t)rb_intern2("IPPROTO_IP", 10));
    02699 #endif
    02700
    02701     rsock_intern_iplevel_hash = st_init_numtable();
    02702 #ifdef IPPROTO_MAX
    02703     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_MAX, (st_data_t)rb_intern2("IPPROTO_MAX", 11));
    02704 #endif
    02705 #ifdef IPPROTO_RAW
    02706     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_RAW, (st_data_t)rb_intern2("IPPROTO_RAW", 11));
    02707 #endif
    02708 #ifdef IPPROTO_ROUTING
    02709     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ROUTING, (st_data_t)rb_intern2("IPPROTO_ROUTING", 15));
    02710 #endif
    02711 #ifdef IPPROTO_NONE
    02712     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_NONE, (st_data_t)rb_intern2("IPPROTO_NONE", 12));
    02713 #endif
    02714 #ifdef IPPROTO_IPV6
    02715     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_IPV6, (st_data_t)rb_intern2("IPPROTO_IPV6", 12));
    02716 #endif
    02717 #ifdef IPPROTO_ICMPV6
    02718     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ICMPV6, (st_data_t)rb_intern2("IPPROTO_ICMPV6", 14));
    02719 #endif
    02720 #ifdef IPPROTO_HOPOPTS
    02721     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_HOPOPTS, (st_data_t)rb_intern2("IPPROTO_HOPOPTS", 15));
    02722 #endif
    02723 #ifdef IPPROTO_FRAGMENT
    02724     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_FRAGMENT, (st_data_t)rb_intern2("IPPROTO_FRAGMENT", 16));
    02725 #endif
    02726 #ifdef IPPROTO_ESP
    02727     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ESP, (st_data_t)rb_intern2("IPPROTO_ESP", 11));
    02728 #endif
    02729 #ifdef IPPROTO_DSTOPTS
    02730     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_DSTOPTS, (st_data_t)rb_intern2("IPPROTO_DSTOPTS", 15));
    02731 #endif
    02732 #ifdef IPPROTO_AH
    02733     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_AH, (st_data_t)rb_intern2("IPPROTO_AH", 10));
    02734 #endif
    02735 #ifdef IPPROTO_BIP
    02736     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_BIP, (st_data_t)rb_intern2("IPPROTO_BIP", 11));
    02737 #endif
    02738 #ifdef IPPROTO_EON
    02739     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_EON, (st_data_t)rb_intern2("IPPROTO_EON", 11));
    02740 #endif
    02741 #ifdef IPPROTO_XTP
    02742     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_XTP, (st_data_t)rb_intern2("IPPROTO_XTP", 11));
    02743 #endif
    02744 #ifdef IPPROTO_TP
    02745     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_TP, (st_data_t)rb_intern2("IPPROTO_TP", 10));
    02746 #endif
    02747 #ifdef IPPROTO_ND
    02748     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ND, (st_data_t)rb_intern2("IPPROTO_ND", 10));
    02749 #endif
    02750 #ifdef IPPROTO_HELLO
    02751     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_HELLO, (st_data_t)rb_intern2("IPPROTO_HELLO", 13));
    02752 #endif
    02753 #ifdef IPPROTO_IDP
    02754     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_IDP, (st_data_t)rb_intern2("IPPROTO_IDP", 11));
    02755 #endif
    02756 #ifdef IPPROTO_UDP
    02757     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_UDP, (st_data_t)rb_intern2("IPPROTO_UDP", 11));
    02758 #endif
    02759 #ifdef IPPROTO_PUP
    02760     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_PUP, (st_data_t)rb_intern2("IPPROTO_PUP", 11));
    02761 #endif
    02762 #ifdef IPPROTO_EGP
    02763     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_EGP, (st_data_t)rb_intern2("IPPROTO_EGP", 11));
    02764 #endif
    02765 #ifdef IPPROTO_TCP
    02766     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_TCP, (st_data_t)rb_intern2("IPPROTO_TCP", 11));
    02767 #endif
    02768 #ifdef IPPROTO_GGP
    02769     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_GGP, (st_data_t)rb_intern2("IPPROTO_GGP", 11));
    02770 #endif
    02771 #ifdef IPPROTO_IGMP
    02772     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_IGMP, (st_data_t)rb_intern2("IPPROTO_IGMP", 12));
    02773 #endif
    02774 #ifdef IPPROTO_ICMP
    02775     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ICMP, (st_data_t)rb_intern2("IPPROTO_ICMP", 12));
    02776 #endif
    02777 #ifdef IPPROTO_IP
    02778     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_IP, (st_data_t)rb_intern2("IPPROTO_IP", 10));
    02779 #endif
    02780 #ifdef SOL_SOCKET
    02781     st_insert(rsock_intern_iplevel_hash, (st_data_t)SOL_SOCKET, (st_data_t)rb_intern2("SOL_SOCKET", 10));
    02782 #endif
    02783 #ifdef IPPROTO_MAX
    02784     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_MAX, (st_data_t)rb_intern2("MAX", 3));
    02785 #endif
    02786 #ifdef IPPROTO_RAW
    02787     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_RAW, (st_data_t)rb_intern2("RAW", 3));
    02788 #endif
    02789 #ifdef IPPROTO_ROUTING
    02790     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ROUTING, (st_data_t)rb_intern2("ROUTING", 7));
    02791 #endif
    02792 #ifdef IPPROTO_NONE
    02793     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_NONE, (st_data_t)rb_intern2("NONE", 4));
    02794 #endif
    02795 #ifdef IPPROTO_IPV6
    02796     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_IPV6, (st_data_t)rb_intern2("IPV6", 4));
    02797 #endif
    02798 #ifdef IPPROTO_ICMPV6
    02799     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ICMPV6, (st_data_t)rb_intern2("ICMPV6", 6));
    02800 #endif
    02801 #ifdef IPPROTO_HOPOPTS
    02802     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_HOPOPTS, (st_data_t)rb_intern2("HOPOPTS", 7));
    02803 #endif
    02804 #ifdef IPPROTO_FRAGMENT
    02805     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_FRAGMENT, (st_data_t)rb_intern2("FRAGMENT", 8));
    02806 #endif
    02807 #ifdef IPPROTO_ESP
    02808     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ESP, (st_data_t)rb_intern2("ESP", 3));
    02809 #endif
    02810 #ifdef IPPROTO_DSTOPTS
    02811     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_DSTOPTS, (st_data_t)rb_intern2("DSTOPTS", 7));
    02812 #endif
    02813 #ifdef IPPROTO_AH
    02814     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_AH, (st_data_t)rb_intern2("AH", 2));
    02815 #endif
    02816 #ifdef IPPROTO_BIP
    02817     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_BIP, (st_data_t)rb_intern2("BIP", 3));
    02818 #endif
    02819 #ifdef IPPROTO_EON
    02820     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_EON, (st_data_t)rb_intern2("EON", 3));
    02821 #endif
    02822 #ifdef IPPROTO_XTP
    02823     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_XTP, (st_data_t)rb_intern2("XTP", 3));
    02824 #endif
    02825 #ifdef IPPROTO_TP
    02826     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_TP, (st_data_t)rb_intern2("TP", 2));
    02827 #endif
    02828 #ifdef IPPROTO_ND
    02829     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ND, (st_data_t)rb_intern2("ND", 2));
    02830 #endif
    02831 #ifdef IPPROTO_HELLO
    02832     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_HELLO, (st_data_t)rb_intern2("HELLO", 5));
    02833 #endif
    02834 #ifdef IPPROTO_IDP
    02835     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_IDP, (st_data_t)rb_intern2("IDP", 3));
    02836 #endif
    02837 #ifdef IPPROTO_UDP
    02838     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_UDP, (st_data_t)rb_intern2("UDP", 3));
    02839 #endif
    02840 #ifdef IPPROTO_PUP
    02841     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_PUP, (st_data_t)rb_intern2("PUP", 3));
    02842 #endif
    02843 #ifdef IPPROTO_EGP
    02844     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_EGP, (st_data_t)rb_intern2("EGP", 3));
    02845 #endif
    02846 #ifdef IPPROTO_TCP
    02847     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_TCP, (st_data_t)rb_intern2("TCP", 3));
    02848 #endif
    02849 #ifdef IPPROTO_GGP
    02850     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_GGP, (st_data_t)rb_intern2("GGP", 3));
    02851 #endif
    02852 #ifdef IPPROTO_IGMP
    02853     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_IGMP, (st_data_t)rb_intern2("IGMP", 4));
    02854 #endif
    02855 #ifdef IPPROTO_ICMP
    02856     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_ICMP, (st_data_t)rb_intern2("ICMP", 4));
    02857 #endif
    02858 #ifdef IPPROTO_IP
    02859     st_insert(rsock_intern_iplevel_hash, (st_data_t)IPPROTO_IP, (st_data_t)rb_intern2("IP", 2));
    02860 #endif
    02861 #ifdef SOL_SOCKET
    02862     st_insert(rsock_intern_iplevel_hash, (st_data_t)SOL_SOCKET, (st_data_t)rb_intern2("SOCKET", 6));
    02863 #endif
    02864
    02865     rsock_intern_so_optname_hash = st_init_numtable();
    02866 #ifdef SO_ALLZONES
    02867     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ALLZONES, (st_data_t)rb_intern2("SO_ALLZONES", 11));
    02868 #endif
    02869 #ifdef SO_MAC_EXEMPT
    02870     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_MAC_EXEMPT, (st_data_t)rb_intern2("SO_MAC_EXEMPT", 13));
    02871 #endif
    02872 #ifdef SO_RECVUCRED
    02873     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_RECVUCRED, (st_data_t)rb_intern2("SO_RECVUCRED", 12));
    02874 #endif
    02875 #ifdef SO_BINTIME
    02876     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_BINTIME, (st_data_t)rb_intern2("SO_BINTIME", 10));
    02877 #endif
    02878 #ifdef SO_TIMESTAMPNS
    02879     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_TIMESTAMPNS, (st_data_t)rb_intern2("SO_TIMESTAMPNS", 14));
    02880 #endif
    02881 #ifdef SO_TIMESTAMP
    02882     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_TIMESTAMP, (st_data_t)rb_intern2("SO_TIMESTAMP", 12));
    02883 #endif
    02884 #ifdef SO_PEERNAME
    02885     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_PEERNAME, (st_data_t)rb_intern2("SO_PEERNAME", 11));
    02886 #endif
    02887 #ifdef SO_DETACH_FILTER
    02888     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_DETACH_FILTER, (st_data_t)rb_intern2("SO_DETACH_FILTER", 16));
    02889 #endif
    02890 #ifdef SO_ATTACH_FILTER
    02891     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ATTACH_FILTER, (st_data_t)rb_intern2("SO_ATTACH_FILTER", 16));
    02892 #endif
    02893 #ifdef SO_BINDTODEVICE
    02894     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_BINDTODEVICE, (st_data_t)rb_intern2("SO_BINDTODEVICE", 15));
    02895 #endif
    02896 #ifdef SO_SECURITY_ENCRYPTION_NETWORK
    02897     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SECURITY_ENCRYPTION_NETWORK, (st_data_t)rb_intern2("SO_SECURITY_ENCRYPTION_NETWORK", 30));
    02898 #endif
    02899 #ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
    02900     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SECURITY_ENCRYPTION_TRANSPORT, (st_data_t)rb_intern2("SO_SECURITY_ENCRYPTION_TRANSPORT", 32));
    02901 #endif
    02902 #ifdef SO_SECURITY_AUTHENTICATION
    02903     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SECURITY_AUTHENTICATION, (st_data_t)rb_intern2("SO_SECURITY_AUTHENTICATION", 26));
    02904 #endif
    02905 #ifdef SO_NOSIGPIPE
    02906     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_NOSIGPIPE, (st_data_t)rb_intern2("SO_NOSIGPIPE", 12));
    02907 #endif
    02908 #ifdef SO_NKE
    02909     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_NKE, (st_data_t)rb_intern2("SO_NKE", 6));
    02910 #endif
    02911 #ifdef SO_NREAD
    02912     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_NREAD, (st_data_t)rb_intern2("SO_NREAD", 8));
    02913 #endif
    02914 #ifdef SO_WANTOOBFLAG
    02915     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_WANTOOBFLAG, (st_data_t)rb_intern2("SO_WANTOOBFLAG", 14));
    02916 #endif
    02917 #ifdef SO_WANTMORE
    02918     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_WANTMORE, (st_data_t)rb_intern2("SO_WANTMORE", 11));
    02919 #endif
    02920 #ifdef SO_DONTTRUNC
    02921     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_DONTTRUNC, (st_data_t)rb_intern2("SO_DONTTRUNC", 12));
    02922 #endif
    02923 #ifdef SO_ACCEPTFILTER
    02924     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ACCEPTFILTER, (st_data_t)rb_intern2("SO_ACCEPTFILTER", 15));
    02925 #endif
    02926 #ifdef SO_USELOOPBACK
    02927     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_USELOOPBACK, (st_data_t)rb_intern2("SO_USELOOPBACK", 14));
    02928 #endif
    02929 #ifdef SO_ACCEPTCONN
    02930     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ACCEPTCONN, (st_data_t)rb_intern2("SO_ACCEPTCONN", 13));
    02931 #endif
    02932 #ifdef SO_SNDTIMEO
    02933     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SNDTIMEO, (st_data_t)rb_intern2("SO_SNDTIMEO", 11));
    02934 #endif
    02935 #ifdef SO_RCVTIMEO
    02936     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_RCVTIMEO, (st_data_t)rb_intern2("SO_RCVTIMEO", 11));
    02937 #endif
    02938 #ifdef SO_SNDLOWAT
    02939     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SNDLOWAT, (st_data_t)rb_intern2("SO_SNDLOWAT", 11));
    02940 #endif
    02941 #ifdef SO_RCVLOWAT
    02942     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_RCVLOWAT, (st_data_t)rb_intern2("SO_RCVLOWAT", 11));
    02943 #endif
    02944 #ifdef SO_PEERCRED
    02945     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_PEERCRED, (st_data_t)rb_intern2("SO_PEERCRED", 11));
    02946 #endif
    02947 #ifdef SO_PASSCRED
    02948     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_PASSCRED, (st_data_t)rb_intern2("SO_PASSCRED", 11));
    02949 #endif
    02950 #ifdef SO_LINGER
    02951     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_LINGER, (st_data_t)rb_intern2("SO_LINGER", 9));
    02952 #endif
    02953 #ifdef SO_PRIORITY
    02954     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_PRIORITY, (st_data_t)rb_intern2("SO_PRIORITY", 11));
    02955 #endif
    02956 #ifdef SO_NO_CHECK
    02957     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_NO_CHECK, (st_data_t)rb_intern2("SO_NO_CHECK", 11));
    02958 #endif
    02959 #ifdef SO_OOBINLINE
    02960     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_OOBINLINE, (st_data_t)rb_intern2("SO_OOBINLINE", 12));
    02961 #endif
    02962 #ifdef SO_KEEPALIVE
    02963     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_KEEPALIVE, (st_data_t)rb_intern2("SO_KEEPALIVE", 12));
    02964 #endif
    02965 #ifdef SO_RCVBUF
    02966     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_RCVBUF, (st_data_t)rb_intern2("SO_RCVBUF", 9));
    02967 #endif
    02968 #ifdef SO_SNDBUF
    02969     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SNDBUF, (st_data_t)rb_intern2("SO_SNDBUF", 9));
    02970 #endif
    02971 #ifdef SO_BROADCAST
    02972     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_BROADCAST, (st_data_t)rb_intern2("SO_BROADCAST", 12));
    02973 #endif
    02974 #ifdef SO_DONTROUTE
    02975     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_DONTROUTE, (st_data_t)rb_intern2("SO_DONTROUTE", 12));
    02976 #endif
    02977 #ifdef SO_ERROR
    02978     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ERROR, (st_data_t)rb_intern2("SO_ERROR", 8));
    02979 #endif
    02980 #ifdef SO_TYPE
    02981     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_TYPE, (st_data_t)rb_intern2("SO_TYPE", 7));
    02982 #endif
    02983 #ifdef SO_REUSEPORT
    02984     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_REUSEPORT, (st_data_t)rb_intern2("SO_REUSEPORT", 12));
    02985 #endif
    02986 #ifdef SO_REUSEADDR
    02987     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_REUSEADDR, (st_data_t)rb_intern2("SO_REUSEADDR", 12));
    02988 #endif
    02989 #ifdef SO_DEBUG
    02990     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_DEBUG, (st_data_t)rb_intern2("SO_DEBUG", 8));
    02991 #endif
    02992 #ifdef SO_ALLZONES
    02993     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ALLZONES, (st_data_t)rb_intern2("ALLZONES", 8));
    02994 #endif
    02995 #ifdef SO_MAC_EXEMPT
    02996     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_MAC_EXEMPT, (st_data_t)rb_intern2("MAC_EXEMPT", 10));
    02997 #endif
    02998 #ifdef SO_RECVUCRED
    02999     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_RECVUCRED, (st_data_t)rb_intern2("RECVUCRED", 9));
    03000 #endif
    03001 #ifdef SO_BINTIME
    03002     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_BINTIME, (st_data_t)rb_intern2("BINTIME", 7));
    03003 #endif
    03004 #ifdef SO_TIMESTAMPNS
    03005     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_TIMESTAMPNS, (st_data_t)rb_intern2("TIMESTAMPNS", 11));
    03006 #endif
    03007 #ifdef SO_TIMESTAMP
    03008     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_TIMESTAMP, (st_data_t)rb_intern2("TIMESTAMP", 9));
    03009 #endif
    03010 #ifdef SO_PEERNAME
    03011     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_PEERNAME, (st_data_t)rb_intern2("PEERNAME", 8));
    03012 #endif
    03013 #ifdef SO_DETACH_FILTER
    03014     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_DETACH_FILTER, (st_data_t)rb_intern2("DETACH_FILTER", 13));
    03015 #endif
    03016 #ifdef SO_ATTACH_FILTER
    03017     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ATTACH_FILTER, (st_data_t)rb_intern2("ATTACH_FILTER", 13));
    03018 #endif
    03019 #ifdef SO_BINDTODEVICE
    03020     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_BINDTODEVICE, (st_data_t)rb_intern2("BINDTODEVICE", 12));
    03021 #endif
    03022 #ifdef SO_SECURITY_ENCRYPTION_NETWORK
    03023     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SECURITY_ENCRYPTION_NETWORK, (st_data_t)rb_intern2("SECURITY_ENCRYPTION_NETWORK", 27));
    03024 #endif
    03025 #ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
    03026     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SECURITY_ENCRYPTION_TRANSPORT, (st_data_t)rb_intern2("SECURITY_ENCRYPTION_TRANSPORT", 29));
    03027 #endif
    03028 #ifdef SO_SECURITY_AUTHENTICATION
    03029     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SECURITY_AUTHENTICATION, (st_data_t)rb_intern2("SECURITY_AUTHENTICATION", 23));
    03030 #endif
    03031 #ifdef SO_NOSIGPIPE
    03032     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_NOSIGPIPE, (st_data_t)rb_intern2("NOSIGPIPE", 9));
    03033 #endif
    03034 #ifdef SO_NKE
    03035     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_NKE, (st_data_t)rb_intern2("NKE", 3));
    03036 #endif
    03037 #ifdef SO_NREAD
    03038     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_NREAD, (st_data_t)rb_intern2("NREAD", 5));
    03039 #endif
    03040 #ifdef SO_WANTOOBFLAG
    03041     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_WANTOOBFLAG, (st_data_t)rb_intern2("WANTOOBFLAG", 11));
    03042 #endif
    03043 #ifdef SO_WANTMORE
    03044     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_WANTMORE, (st_data_t)rb_intern2("WANTMORE", 8));
    03045 #endif
    03046 #ifdef SO_DONTTRUNC
    03047     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_DONTTRUNC, (st_data_t)rb_intern2("DONTTRUNC", 9));
    03048 #endif
    03049 #ifdef SO_ACCEPTFILTER
    03050     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ACCEPTFILTER, (st_data_t)rb_intern2("ACCEPTFILTER", 12));
    03051 #endif
    03052 #ifdef SO_USELOOPBACK
    03053     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_USELOOPBACK, (st_data_t)rb_intern2("USELOOPBACK", 11));
    03054 #endif
    03055 #ifdef SO_ACCEPTCONN
    03056     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ACCEPTCONN, (st_data_t)rb_intern2("ACCEPTCONN", 10));
    03057 #endif
    03058 #ifdef SO_SNDTIMEO
    03059     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SNDTIMEO, (st_data_t)rb_intern2("SNDTIMEO", 8));
    03060 #endif
    03061 #ifdef SO_RCVTIMEO
    03062     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_RCVTIMEO, (st_data_t)rb_intern2("RCVTIMEO", 8));
    03063 #endif
    03064 #ifdef SO_SNDLOWAT
    03065     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SNDLOWAT, (st_data_t)rb_intern2("SNDLOWAT", 8));
    03066 #endif
    03067 #ifdef SO_RCVLOWAT
    03068     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_RCVLOWAT, (st_data_t)rb_intern2("RCVLOWAT", 8));
    03069 #endif
    03070 #ifdef SO_PEERCRED
    03071     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_PEERCRED, (st_data_t)rb_intern2("PEERCRED", 8));
    03072 #endif
    03073 #ifdef SO_PASSCRED
    03074     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_PASSCRED, (st_data_t)rb_intern2("PASSCRED", 8));
    03075 #endif
    03076 #ifdef SO_LINGER
    03077     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_LINGER, (st_data_t)rb_intern2("LINGER", 6));
    03078 #endif
    03079 #ifdef SO_PRIORITY
    03080     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_PRIORITY, (st_data_t)rb_intern2("PRIORITY", 8));
    03081 #endif
    03082 #ifdef SO_NO_CHECK
    03083     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_NO_CHECK, (st_data_t)rb_intern2("NO_CHECK", 8));
    03084 #endif
    03085 #ifdef SO_OOBINLINE
    03086     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_OOBINLINE, (st_data_t)rb_intern2("OOBINLINE", 9));
    03087 #endif
    03088 #ifdef SO_KEEPALIVE
    03089     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_KEEPALIVE, (st_data_t)rb_intern2("KEEPALIVE", 9));
    03090 #endif
    03091 #ifdef SO_RCVBUF
    03092     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_RCVBUF, (st_data_t)rb_intern2("RCVBUF", 6));
    03093 #endif
    03094 #ifdef SO_SNDBUF
    03095     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_SNDBUF, (st_data_t)rb_intern2("SNDBUF", 6));
    03096 #endif
    03097 #ifdef SO_BROADCAST
    03098     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_BROADCAST, (st_data_t)rb_intern2("BROADCAST", 9));
    03099 #endif
    03100 #ifdef SO_DONTROUTE
    03101     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_DONTROUTE, (st_data_t)rb_intern2("DONTROUTE", 9));
    03102 #endif
    03103 #ifdef SO_ERROR
    03104     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_ERROR, (st_data_t)rb_intern2("ERROR", 5));
    03105 #endif
    03106 #ifdef SO_TYPE
    03107     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_TYPE, (st_data_t)rb_intern2("TYPE", 4));
    03108 #endif
    03109 #ifdef SO_REUSEPORT
    03110     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_REUSEPORT, (st_data_t)rb_intern2("REUSEPORT", 9));
    03111 #endif
    03112 #ifdef SO_REUSEADDR
    03113     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_REUSEADDR, (st_data_t)rb_intern2("REUSEADDR", 9));
    03114 #endif
    03115 #ifdef SO_DEBUG
    03116     st_insert(rsock_intern_so_optname_hash, (st_data_t)SO_DEBUG, (st_data_t)rb_intern2("DEBUG", 5));
    03117 #endif
    03118
    03119     rsock_intern_ip_optname_hash = st_init_numtable();
    03120 #ifdef IP_MSFILTER
    03121     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MSFILTER, (st_data_t)rb_intern2("IP_MSFILTER", 11));
    03122 #endif
    03123 #ifdef IP_DROP_SOURCE_MEMBERSHIP
    03124     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DROP_SOURCE_MEMBERSHIP, (st_data_t)rb_intern2("IP_DROP_SOURCE_MEMBERSHIP", 25));
    03125 #endif
    03126 #ifdef IP_ADD_SOURCE_MEMBERSHIP
    03127     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_ADD_SOURCE_MEMBERSHIP, (st_data_t)rb_intern2("IP_ADD_SOURCE_MEMBERSHIP", 24));
    03128 #endif
    03129 #ifdef IP_BLOCK_SOURCE
    03130     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_BLOCK_SOURCE, (st_data_t)rb_intern2("IP_BLOCK_SOURCE", 15));
    03131 #endif
    03132 #ifdef IP_UNBLOCK_SOURCE
    03133     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_UNBLOCK_SOURCE, (st_data_t)rb_intern2("IP_UNBLOCK_SOURCE", 17));
    03134 #endif
    03135 #ifdef IP_PMTUDISC_DO
    03136     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PMTUDISC_DO, (st_data_t)rb_intern2("IP_PMTUDISC_DO", 14));
    03137 #endif
    03138 #ifdef IP_PMTUDISC_WANT
    03139     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PMTUDISC_WANT, (st_data_t)rb_intern2("IP_PMTUDISC_WANT", 16));
    03140 #endif
    03141 #ifdef IP_PMTUDISC_DONT
    03142     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PMTUDISC_DONT, (st_data_t)rb_intern2("IP_PMTUDISC_DONT", 16));
    03143 #endif
    03144 #ifdef IP_PASSSEC
    03145     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PASSSEC, (st_data_t)rb_intern2("IP_PASSSEC", 10));
    03146 #endif
    03147 #ifdef IP_XFRM_POLICY
    03148     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_XFRM_POLICY, (st_data_t)rb_intern2("IP_XFRM_POLICY", 14));
    03149 #endif
    03150 #ifdef IP_IPSEC_POLICY
    03151     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_IPSEC_POLICY, (st_data_t)rb_intern2("IP_IPSEC_POLICY", 15));
    03152 #endif
    03153 #ifdef IP_FREEBIND
    03154     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_FREEBIND, (st_data_t)rb_intern2("IP_FREEBIND", 11));
    03155 #endif
    03156 #ifdef IP_MTU
    03157     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MTU, (st_data_t)rb_intern2("IP_MTU", 6));
    03158 #endif
    03159 #ifdef IP_RECVTOS
    03160     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVTOS, (st_data_t)rb_intern2("IP_RECVTOS", 10));
    03161 #endif
    03162 #ifdef IP_RECVERR
    03163     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVERR, (st_data_t)rb_intern2("IP_RECVERR", 10));
    03164 #endif
    03165 #ifdef IP_MTU_DISCOVER
    03166     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MTU_DISCOVER, (st_data_t)rb_intern2("IP_MTU_DISCOVER", 15));
    03167 #endif
    03168 #ifdef IP_PKTOPTIONS
    03169     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PKTOPTIONS, (st_data_t)rb_intern2("IP_PKTOPTIONS", 13));
    03170 #endif
    03171 #ifdef IP_PKTINFO
    03172     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PKTINFO, (st_data_t)rb_intern2("IP_PKTINFO", 10));
    03173 #endif
    03174 #ifdef IP_ROUTER_ALERT
    03175     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_ROUTER_ALERT, (st_data_t)rb_intern2("IP_ROUTER_ALERT", 15));
    03176 #endif
    03177 #ifdef IP_MAX_MEMBERSHIPS
    03178     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MAX_MEMBERSHIPS, (st_data_t)rb_intern2("IP_MAX_MEMBERSHIPS", 18));
    03179 #endif
    03180 #ifdef IP_DEFAULT_MULTICAST_LOOP
    03181     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DEFAULT_MULTICAST_LOOP, (st_data_t)rb_intern2("IP_DEFAULT_MULTICAST_LOOP", 25));
    03182 #endif
    03183 #ifdef IP_DEFAULT_MULTICAST_TTL
    03184     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DEFAULT_MULTICAST_TTL, (st_data_t)rb_intern2("IP_DEFAULT_MULTICAST_TTL", 24));
    03185 #endif
    03186 #ifdef IP_DROP_MEMBERSHIP
    03187     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DROP_MEMBERSHIP, (st_data_t)rb_intern2("IP_DROP_MEMBERSHIP", 18));
    03188 #endif
    03189 #ifdef IP_ADD_MEMBERSHIP
    03190     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_ADD_MEMBERSHIP, (st_data_t)rb_intern2("IP_ADD_MEMBERSHIP", 17));
    03191 #endif
    03192 #ifdef IP_MULTICAST_LOOP
    03193     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MULTICAST_LOOP, (st_data_t)rb_intern2("IP_MULTICAST_LOOP", 17));
    03194 #endif
    03195 #ifdef IP_MULTICAST_TTL
    03196     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MULTICAST_TTL, (st_data_t)rb_intern2("IP_MULTICAST_TTL", 16));
    03197 #endif
    03198 #ifdef IP_MULTICAST_IF
    03199     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MULTICAST_IF, (st_data_t)rb_intern2("IP_MULTICAST_IF", 15));
    03200 #endif
    03201 #ifdef IP_PORTRANGE
    03202     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PORTRANGE, (st_data_t)rb_intern2("IP_PORTRANGE", 12));
    03203 #endif
    03204 #ifdef IP_RECVSLLA
    03205     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVSLLA, (st_data_t)rb_intern2("IP_RECVSLLA", 11));
    03206 #endif
    03207 #ifdef IP_RECVIF
    03208     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVIF, (st_data_t)rb_intern2("IP_RECVIF", 9));
    03209 #endif
    03210 #ifdef IP_RECVTTL
    03211     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVTTL, (st_data_t)rb_intern2("IP_RECVTTL", 10));
    03212 #endif
    03213 #ifdef IP_ONESBCAST
    03214     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_ONESBCAST, (st_data_t)rb_intern2("IP_ONESBCAST", 12));
    03215 #endif
    03216 #ifdef IP_SENDSRCADDR
    03217     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_SENDSRCADDR, (st_data_t)rb_intern2("IP_SENDSRCADDR", 14));
    03218 #endif
    03219 #ifdef IP_DONTFRAG
    03220     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DONTFRAG, (st_data_t)rb_intern2("IP_DONTFRAG", 11));
    03221 #endif
    03222 #ifdef IP_MINTTL
    03223     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MINTTL, (st_data_t)rb_intern2("IP_MINTTL", 9));
    03224 #endif
    03225 #ifdef IP_RETOPTS
    03226     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RETOPTS, (st_data_t)rb_intern2("IP_RETOPTS", 10));
    03227 #endif
    03228 #ifdef IP_RECVDSTADDR
    03229     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVDSTADDR, (st_data_t)rb_intern2("IP_RECVDSTADDR", 14));
    03230 #endif
    03231 #ifdef IP_RECVRETOPTS
    03232     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVRETOPTS, (st_data_t)rb_intern2("IP_RECVRETOPTS", 14));
    03233 #endif
    03234 #ifdef IP_RECVOPTS
    03235     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVOPTS, (st_data_t)rb_intern2("IP_RECVOPTS", 11));
    03236 #endif
    03237 #ifdef IP_TTL
    03238     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_TTL, (st_data_t)rb_intern2("IP_TTL", 6));
    03239 #endif
    03240 #ifdef IP_TOS
    03241     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_TOS, (st_data_t)rb_intern2("IP_TOS", 6));
    03242 #endif
    03243 #ifdef IP_HDRINCL
    03244     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_HDRINCL, (st_data_t)rb_intern2("IP_HDRINCL", 10));
    03245 #endif
    03246 #ifdef IP_OPTIONS
    03247     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_OPTIONS, (st_data_t)rb_intern2("IP_OPTIONS", 10));
    03248 #endif
    03249 #ifdef IP_MSFILTER
    03250     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MSFILTER, (st_data_t)rb_intern2("MSFILTER", 8));
    03251 #endif
    03252 #ifdef IP_DROP_SOURCE_MEMBERSHIP
    03253     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DROP_SOURCE_MEMBERSHIP, (st_data_t)rb_intern2("DROP_SOURCE_MEMBERSHIP", 22));
    03254 #endif
    03255 #ifdef IP_ADD_SOURCE_MEMBERSHIP
    03256     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_ADD_SOURCE_MEMBERSHIP, (st_data_t)rb_intern2("ADD_SOURCE_MEMBERSHIP", 21));
    03257 #endif
    03258 #ifdef IP_BLOCK_SOURCE
    03259     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_BLOCK_SOURCE, (st_data_t)rb_intern2("BLOCK_SOURCE", 12));
    03260 #endif
    03261 #ifdef IP_UNBLOCK_SOURCE
    03262     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_UNBLOCK_SOURCE, (st_data_t)rb_intern2("UNBLOCK_SOURCE", 14));
    03263 #endif
    03264 #ifdef IP_PMTUDISC_DO
    03265     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PMTUDISC_DO, (st_data_t)rb_intern2("PMTUDISC_DO", 11));
    03266 #endif
    03267 #ifdef IP_PMTUDISC_WANT
    03268     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PMTUDISC_WANT, (st_data_t)rb_intern2("PMTUDISC_WANT", 13));
    03269 #endif
    03270 #ifdef IP_PMTUDISC_DONT
    03271     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PMTUDISC_DONT, (st_data_t)rb_intern2("PMTUDISC_DONT", 13));
    03272 #endif
    03273 #ifdef IP_PASSSEC
    03274     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PASSSEC, (st_data_t)rb_intern2("PASSSEC", 7));
    03275 #endif
    03276 #ifdef IP_XFRM_POLICY
    03277     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_XFRM_POLICY, (st_data_t)rb_intern2("XFRM_POLICY", 11));
    03278 #endif
    03279 #ifdef IP_IPSEC_POLICY
    03280     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_IPSEC_POLICY, (st_data_t)rb_intern2("IPSEC_POLICY", 12));
    03281 #endif
    03282 #ifdef IP_FREEBIND
    03283     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_FREEBIND, (st_data_t)rb_intern2("FREEBIND", 8));
    03284 #endif
    03285 #ifdef IP_MTU
    03286     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MTU, (st_data_t)rb_intern2("MTU", 3));
    03287 #endif
    03288 #ifdef IP_RECVTOS
    03289     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVTOS, (st_data_t)rb_intern2("RECVTOS", 7));
    03290 #endif
    03291 #ifdef IP_RECVERR
    03292     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVERR, (st_data_t)rb_intern2("RECVERR", 7));
    03293 #endif
    03294 #ifdef IP_MTU_DISCOVER
    03295     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MTU_DISCOVER, (st_data_t)rb_intern2("MTU_DISCOVER", 12));
    03296 #endif
    03297 #ifdef IP_PKTOPTIONS
    03298     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PKTOPTIONS, (st_data_t)rb_intern2("PKTOPTIONS", 10));
    03299 #endif
    03300 #ifdef IP_PKTINFO
    03301     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PKTINFO, (st_data_t)rb_intern2("PKTINFO", 7));
    03302 #endif
    03303 #ifdef IP_ROUTER_ALERT
    03304     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_ROUTER_ALERT, (st_data_t)rb_intern2("ROUTER_ALERT", 12));
    03305 #endif
    03306 #ifdef IP_MAX_MEMBERSHIPS
    03307     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MAX_MEMBERSHIPS, (st_data_t)rb_intern2("MAX_MEMBERSHIPS", 15));
    03308 #endif
    03309 #ifdef IP_DEFAULT_MULTICAST_LOOP
    03310     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DEFAULT_MULTICAST_LOOP, (st_data_t)rb_intern2("DEFAULT_MULTICAST_LOOP", 22));
    03311 #endif
    03312 #ifdef IP_DEFAULT_MULTICAST_TTL
    03313     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DEFAULT_MULTICAST_TTL, (st_data_t)rb_intern2("DEFAULT_MULTICAST_TTL", 21));
    03314 #endif
    03315 #ifdef IP_DROP_MEMBERSHIP
    03316     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DROP_MEMBERSHIP, (st_data_t)rb_intern2("DROP_MEMBERSHIP", 15));
    03317 #endif
    03318 #ifdef IP_ADD_MEMBERSHIP
    03319     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_ADD_MEMBERSHIP, (st_data_t)rb_intern2("ADD_MEMBERSHIP", 14));
    03320 #endif
    03321 #ifdef IP_MULTICAST_LOOP
    03322     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MULTICAST_LOOP, (st_data_t)rb_intern2("MULTICAST_LOOP", 14));
    03323 #endif
    03324 #ifdef IP_MULTICAST_TTL
    03325     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MULTICAST_TTL, (st_data_t)rb_intern2("MULTICAST_TTL", 13));
    03326 #endif
    03327 #ifdef IP_MULTICAST_IF
    03328     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MULTICAST_IF, (st_data_t)rb_intern2("MULTICAST_IF", 12));
    03329 #endif
    03330 #ifdef IP_PORTRANGE
    03331     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_PORTRANGE, (st_data_t)rb_intern2("PORTRANGE", 9));
    03332 #endif
    03333 #ifdef IP_RECVSLLA
    03334     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVSLLA, (st_data_t)rb_intern2("RECVSLLA", 8));
    03335 #endif
    03336 #ifdef IP_RECVIF
    03337     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVIF, (st_data_t)rb_intern2("RECVIF", 6));
    03338 #endif
    03339 #ifdef IP_RECVTTL
    03340     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVTTL, (st_data_t)rb_intern2("RECVTTL", 7));
    03341 #endif
    03342 #ifdef IP_ONESBCAST
    03343     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_ONESBCAST, (st_data_t)rb_intern2("ONESBCAST", 9));
    03344 #endif
    03345 #ifdef IP_SENDSRCADDR
    03346     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_SENDSRCADDR, (st_data_t)rb_intern2("SENDSRCADDR", 11));
    03347 #endif
    03348 #ifdef IP_DONTFRAG
    03349     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_DONTFRAG, (st_data_t)rb_intern2("DONTFRAG", 8));
    03350 #endif
    03351 #ifdef IP_MINTTL
    03352     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_MINTTL, (st_data_t)rb_intern2("MINTTL", 6));
    03353 #endif
    03354 #ifdef IP_RETOPTS
    03355     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RETOPTS, (st_data_t)rb_intern2("RETOPTS", 7));
    03356 #endif
    03357 #ifdef IP_RECVDSTADDR
    03358     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVDSTADDR, (st_data_t)rb_intern2("RECVDSTADDR", 11));
    03359 #endif
    03360 #ifdef IP_RECVRETOPTS
    03361     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVRETOPTS, (st_data_t)rb_intern2("RECVRETOPTS", 11));
    03362 #endif
    03363 #ifdef IP_RECVOPTS
    03364     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_RECVOPTS, (st_data_t)rb_intern2("RECVOPTS", 8));
    03365 #endif
    03366 #ifdef IP_TTL
    03367     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_TTL, (st_data_t)rb_intern2("TTL", 3));
    03368 #endif
    03369 #ifdef IP_TOS
    03370     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_TOS, (st_data_t)rb_intern2("TOS", 3));
    03371 #endif
    03372 #ifdef IP_HDRINCL
    03373     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_HDRINCL, (st_data_t)rb_intern2("HDRINCL", 7));
    03374 #endif
    03375 #ifdef IP_OPTIONS
    03376     st_insert(rsock_intern_ip_optname_hash, (st_data_t)IP_OPTIONS, (st_data_t)rb_intern2("OPTIONS", 7));
    03377 #endif
    03378
    03379     rsock_intern_ipv6_optname_hash = st_init_numtable();
    03380 #ifdef IPV6_USE_MIN_MTU
    03381     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_USE_MIN_MTU, (st_data_t)rb_intern2("IPV6_USE_MIN_MTU", 16));
    03382 #endif
    03383 #ifdef IPV6_TCLASS
    03384     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_TCLASS, (st_data_t)rb_intern2("IPV6_TCLASS", 11));
    03385 #endif
    03386 #ifdef IPV6_RECVPATHMTU
    03387     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVPATHMTU, (st_data_t)rb_intern2("IPV6_RECVPATHMTU", 16));
    03388 #endif
    03389 #ifdef IPV6_RTHDR_TYPE_0
    03390     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RTHDR_TYPE_0, (st_data_t)rb_intern2("IPV6_RTHDR_TYPE_0", 17));
    03391 #endif
    03392 #ifdef IPV6_RTHDRDSTOPTS
    03393     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RTHDRDSTOPTS, (st_data_t)rb_intern2("IPV6_RTHDRDSTOPTS", 17));
    03394 #endif
    03395 #ifdef IPV6_RTHDR
    03396     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RTHDR, (st_data_t)rb_intern2("IPV6_RTHDR", 10));
    03397 #endif
    03398 #ifdef IPV6_RECVTCLASS
    03399     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVTCLASS, (st_data_t)rb_intern2("IPV6_RECVTCLASS", 15));
    03400 #endif
    03401 #ifdef IPV6_RECVRTHDR
    03402     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVRTHDR, (st_data_t)rb_intern2("IPV6_RECVRTHDR", 14));
    03403 #endif
    03404 #ifdef IPV6_RECVPKTINFO
    03405     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVPKTINFO, (st_data_t)rb_intern2("IPV6_RECVPKTINFO", 16));
    03406 #endif
    03407 #ifdef IPV6_RECVHOPOPTS
    03408     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVHOPOPTS, (st_data_t)rb_intern2("IPV6_RECVHOPOPTS", 16));
    03409 #endif
    03410 #ifdef IPV6_RECVHOPLIMIT
    03411     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVHOPLIMIT, (st_data_t)rb_intern2("IPV6_RECVHOPLIMIT", 17));
    03412 #endif
    03413 #ifdef IPV6_RECVDSTOPTS
    03414     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVDSTOPTS, (st_data_t)rb_intern2("IPV6_RECVDSTOPTS", 16));
    03415 #endif
    03416 #ifdef IPV6_PKTINFO
    03417     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_PKTINFO, (st_data_t)rb_intern2("IPV6_PKTINFO", 12));
    03418 #endif
    03419 #ifdef IPV6_PATHMTU
    03420     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_PATHMTU, (st_data_t)rb_intern2("IPV6_PATHMTU", 12));
    03421 #endif
    03422 #ifdef IPV6_NEXTHOP
    03423     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_NEXTHOP, (st_data_t)rb_intern2("IPV6_NEXTHOP", 12));
    03424 #endif
    03425 #ifdef IPV6_HOPOPTS
    03426     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_HOPOPTS, (st_data_t)rb_intern2("IPV6_HOPOPTS", 12));
    03427 #endif
    03428 #ifdef IPV6_HOPLIMIT
    03429     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_HOPLIMIT, (st_data_t)rb_intern2("IPV6_HOPLIMIT", 13));
    03430 #endif
    03431 #ifdef IPV6_DSTOPTS
    03432     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_DSTOPTS, (st_data_t)rb_intern2("IPV6_DSTOPTS", 12));
    03433 #endif
    03434 #ifdef IPV6_DONTFRAG
    03435     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_DONTFRAG, (st_data_t)rb_intern2("IPV6_DONTFRAG", 13));
    03436 #endif
    03437 #ifdef IPV6_CHECKSUM
    03438     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_CHECKSUM, (st_data_t)rb_intern2("IPV6_CHECKSUM", 13));
    03439 #endif
    03440 #ifdef IPV6_V6ONLY
    03441     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_V6ONLY, (st_data_t)rb_intern2("IPV6_V6ONLY", 11));
    03442 #endif
    03443 #ifdef IPV6_UNICAST_HOPS
    03444     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_UNICAST_HOPS, (st_data_t)rb_intern2("IPV6_UNICAST_HOPS", 17));
    03445 #endif
    03446 #ifdef IPV6_MULTICAST_LOOP
    03447     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_MULTICAST_LOOP, (st_data_t)rb_intern2("IPV6_MULTICAST_LOOP", 19));
    03448 #endif
    03449 #ifdef IPV6_MULTICAST_IF
    03450     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_MULTICAST_IF, (st_data_t)rb_intern2("IPV6_MULTICAST_IF", 17));
    03451 #endif
    03452 #ifdef IPV6_MULTICAST_HOPS
    03453     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_MULTICAST_HOPS, (st_data_t)rb_intern2("IPV6_MULTICAST_HOPS", 19));
    03454 #endif
    03455 #ifdef IPV6_LEAVE_GROUP
    03456     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_LEAVE_GROUP, (st_data_t)rb_intern2("IPV6_LEAVE_GROUP", 16));
    03457 #endif
    03458 #ifdef IPV6_JOIN_GROUP
    03459     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_JOIN_GROUP, (st_data_t)rb_intern2("IPV6_JOIN_GROUP", 15));
    03460 #endif
    03461 #ifdef IPV6_USE_MIN_MTU
    03462     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_USE_MIN_MTU, (st_data_t)rb_intern2("USE_MIN_MTU", 11));
    03463 #endif
    03464 #ifdef IPV6_TCLASS
    03465     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_TCLASS, (st_data_t)rb_intern2("TCLASS", 6));
    03466 #endif
    03467 #ifdef IPV6_RECVPATHMTU
    03468     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVPATHMTU, (st_data_t)rb_intern2("RECVPATHMTU", 11));
    03469 #endif
    03470 #ifdef IPV6_RTHDR_TYPE_0
    03471     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RTHDR_TYPE_0, (st_data_t)rb_intern2("RTHDR_TYPE_0", 12));
    03472 #endif
    03473 #ifdef IPV6_RTHDRDSTOPTS
    03474     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RTHDRDSTOPTS, (st_data_t)rb_intern2("RTHDRDSTOPTS", 12));
    03475 #endif
    03476 #ifdef IPV6_RTHDR
    03477     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RTHDR, (st_data_t)rb_intern2("RTHDR", 5));
    03478 #endif
    03479 #ifdef IPV6_RECVTCLASS
    03480     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVTCLASS, (st_data_t)rb_intern2("RECVTCLASS", 10));
    03481 #endif
    03482 #ifdef IPV6_RECVRTHDR
    03483     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVRTHDR, (st_data_t)rb_intern2("RECVRTHDR", 9));
    03484 #endif
    03485 #ifdef IPV6_RECVPKTINFO
    03486     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVPKTINFO, (st_data_t)rb_intern2("RECVPKTINFO", 11));
    03487 #endif
    03488 #ifdef IPV6_RECVHOPOPTS
    03489     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVHOPOPTS, (st_data_t)rb_intern2("RECVHOPOPTS", 11));
    03490 #endif
    03491 #ifdef IPV6_RECVHOPLIMIT
    03492     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVHOPLIMIT, (st_data_t)rb_intern2("RECVHOPLIMIT", 12));
    03493 #endif
    03494 #ifdef IPV6_RECVDSTOPTS
    03495     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_RECVDSTOPTS, (st_data_t)rb_intern2("RECVDSTOPTS", 11));
    03496 #endif
    03497 #ifdef IPV6_PKTINFO
    03498     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_PKTINFO, (st_data_t)rb_intern2("PKTINFO", 7));
    03499 #endif
    03500 #ifdef IPV6_PATHMTU
    03501     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_PATHMTU, (st_data_t)rb_intern2("PATHMTU", 7));
    03502 #endif
    03503 #ifdef IPV6_NEXTHOP
    03504     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_NEXTHOP, (st_data_t)rb_intern2("NEXTHOP", 7));
    03505 #endif
    03506 #ifdef IPV6_HOPOPTS
    03507     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_HOPOPTS, (st_data_t)rb_intern2("HOPOPTS", 7));
    03508 #endif
    03509 #ifdef IPV6_HOPLIMIT
    03510     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_HOPLIMIT, (st_data_t)rb_intern2("HOPLIMIT", 8));
    03511 #endif
    03512 #ifdef IPV6_DSTOPTS
    03513     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_DSTOPTS, (st_data_t)rb_intern2("DSTOPTS", 7));
    03514 #endif
    03515 #ifdef IPV6_DONTFRAG
    03516     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_DONTFRAG, (st_data_t)rb_intern2("DONTFRAG", 8));
    03517 #endif
    03518 #ifdef IPV6_CHECKSUM
    03519     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_CHECKSUM, (st_data_t)rb_intern2("CHECKSUM", 8));
    03520 #endif
    03521 #ifdef IPV6_V6ONLY
    03522     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_V6ONLY, (st_data_t)rb_intern2("V6ONLY", 6));
    03523 #endif
    03524 #ifdef IPV6_UNICAST_HOPS
    03525     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_UNICAST_HOPS, (st_data_t)rb_intern2("UNICAST_HOPS", 12));
    03526 #endif
    03527 #ifdef IPV6_MULTICAST_LOOP
    03528     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_MULTICAST_LOOP, (st_data_t)rb_intern2("MULTICAST_LOOP", 14));
    03529 #endif
    03530 #ifdef IPV6_MULTICAST_IF
    03531     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_MULTICAST_IF, (st_data_t)rb_intern2("MULTICAST_IF", 12));
    03532 #endif
    03533 #ifdef IPV6_MULTICAST_HOPS
    03534     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_MULTICAST_HOPS, (st_data_t)rb_intern2("MULTICAST_HOPS", 14));
    03535 #endif
    03536 #ifdef IPV6_LEAVE_GROUP
    03537     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_LEAVE_GROUP, (st_data_t)rb_intern2("LEAVE_GROUP", 11));
    03538 #endif
    03539 #ifdef IPV6_JOIN_GROUP
    03540     st_insert(rsock_intern_ipv6_optname_hash, (st_data_t)IPV6_JOIN_GROUP, (st_data_t)rb_intern2("JOIN_GROUP", 10));
    03541 #endif
    03542
    03543     rsock_intern_tcp_optname_hash = st_init_numtable();
    03544 #ifdef TCP_WINDOW_CLAMP
    03545     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_WINDOW_CLAMP, (st_data_t)rb_intern2("TCP_WINDOW_CLAMP", 16));
    03546 #endif
    03547 #ifdef TCP_SYNCNT
    03548     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_SYNCNT, (st_data_t)rb_intern2("TCP_SYNCNT", 10));
    03549 #endif
    03550 #ifdef TCP_QUICKACK
    03551     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_QUICKACK, (st_data_t)rb_intern2("TCP_QUICKACK", 12));
    03552 #endif
    03553 #ifdef TCP_NOPUSH
    03554     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_NOPUSH, (st_data_t)rb_intern2("TCP_NOPUSH", 10));
    03555 #endif
    03556 #ifdef TCP_NOOPT
    03557     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_NOOPT, (st_data_t)rb_intern2("TCP_NOOPT", 9));
    03558 #endif
    03559 #ifdef TCP_MD5SIG
    03560     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_MD5SIG, (st_data_t)rb_intern2("TCP_MD5SIG", 10));
    03561 #endif
    03562 #ifdef TCP_LINGER2
    03563     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_LINGER2, (st_data_t)rb_intern2("TCP_LINGER2", 11));
    03564 #endif
    03565 #ifdef TCP_KEEPINTVL
    03566     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_KEEPINTVL, (st_data_t)rb_intern2("TCP_KEEPINTVL", 13));
    03567 #endif
    03568 #ifdef TCP_KEEPIDLE
    03569     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_KEEPIDLE, (st_data_t)rb_intern2("TCP_KEEPIDLE", 12));
    03570 #endif
    03571 #ifdef TCP_KEEPCNT
    03572     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_KEEPCNT, (st_data_t)rb_intern2("TCP_KEEPCNT", 11));
    03573 #endif
    03574 #ifdef TCP_INFO
    03575     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_INFO, (st_data_t)rb_intern2("TCP_INFO", 8));
    03576 #endif
    03577 #ifdef TCP_DEFER_ACCEPT
    03578     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_DEFER_ACCEPT, (st_data_t)rb_intern2("TCP_DEFER_ACCEPT", 16));
    03579 #endif
    03580 #ifdef TCP_CORK
    03581     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_CORK, (st_data_t)rb_intern2("TCP_CORK", 8));
    03582 #endif
    03583 #ifdef TCP_MAXSEG
    03584     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_MAXSEG, (st_data_t)rb_intern2("TCP_MAXSEG", 10));
    03585 #endif
    03586 #ifdef TCP_NODELAY
    03587     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_NODELAY, (st_data_t)rb_intern2("TCP_NODELAY", 11));
    03588 #endif
    03589 #ifdef TCP_WINDOW_CLAMP
    03590     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_WINDOW_CLAMP, (st_data_t)rb_intern2("WINDOW_CLAMP", 12));
    03591 #endif
    03592 #ifdef TCP_SYNCNT
    03593     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_SYNCNT, (st_data_t)rb_intern2("SYNCNT", 6));
    03594 #endif
    03595 #ifdef TCP_QUICKACK
    03596     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_QUICKACK, (st_data_t)rb_intern2("QUICKACK", 8));
    03597 #endif
    03598 #ifdef TCP_NOPUSH
    03599     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_NOPUSH, (st_data_t)rb_intern2("NOPUSH", 6));
    03600 #endif
    03601 #ifdef TCP_NOOPT
    03602     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_NOOPT, (st_data_t)rb_intern2("NOOPT", 5));
    03603 #endif
    03604 #ifdef TCP_MD5SIG
    03605     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_MD5SIG, (st_data_t)rb_intern2("MD5SIG", 6));
    03606 #endif
    03607 #ifdef TCP_LINGER2
    03608     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_LINGER2, (st_data_t)rb_intern2("LINGER2", 7));
    03609 #endif
    03610 #ifdef TCP_KEEPINTVL
    03611     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_KEEPINTVL, (st_data_t)rb_intern2("KEEPINTVL", 9));
    03612 #endif
    03613 #ifdef TCP_KEEPIDLE
    03614     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_KEEPIDLE, (st_data_t)rb_intern2("KEEPIDLE", 8));
    03615 #endif
    03616 #ifdef TCP_KEEPCNT
    03617     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_KEEPCNT, (st_data_t)rb_intern2("KEEPCNT", 7));
    03618 #endif
    03619 #ifdef TCP_INFO
    03620     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_INFO, (st_data_t)rb_intern2("INFO", 4));
    03621 #endif
    03622 #ifdef TCP_DEFER_ACCEPT
    03623     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_DEFER_ACCEPT, (st_data_t)rb_intern2("DEFER_ACCEPT", 12));
    03624 #endif
    03625 #ifdef TCP_CORK
    03626     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_CORK, (st_data_t)rb_intern2("CORK", 4));
    03627 #endif
    03628 #ifdef TCP_MAXSEG
    03629     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_MAXSEG, (st_data_t)rb_intern2("MAXSEG", 6));
    03630 #endif
    03631 #ifdef TCP_NODELAY
    03632     st_insert(rsock_intern_tcp_optname_hash, (st_data_t)TCP_NODELAY, (st_data_t)rb_intern2("NODELAY", 7));
    03633 #endif
    03634
    03635     rsock_intern_udp_optname_hash = st_init_numtable();
    03636 #ifdef UDP_CORK
    03637     st_insert(rsock_intern_udp_optname_hash, (st_data_t)UDP_CORK, (st_data_t)rb_intern2("UDP_CORK", 8));
    03638 #endif
    03639 #ifdef UDP_CORK
    03640     st_insert(rsock_intern_udp_optname_hash, (st_data_t)UDP_CORK, (st_data_t)rb_intern2("CORK", 4));
    03641 #endif
    03642
    03643     rsock_intern_scm_optname_hash = st_init_numtable();
    03644 #ifdef SCM_UCRED
    03645     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_UCRED, (st_data_t)rb_intern2("SCM_UCRED", 9));
    03646 #endif
    03647 #ifdef SCM_CREDS
    03648     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_CREDS, (st_data_t)rb_intern2("SCM_CREDS", 9));
    03649 #endif
    03650 #ifdef SCM_CREDENTIALS
    03651     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_CREDENTIALS, (st_data_t)rb_intern2("SCM_CREDENTIALS", 15));
    03652 #endif
    03653 #ifdef SCM_BINTIME
    03654     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_BINTIME, (st_data_t)rb_intern2("SCM_BINTIME", 11));
    03655 #endif
    03656 #ifdef SCM_TIMESTAMPNS
    03657     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_TIMESTAMPNS, (st_data_t)rb_intern2("SCM_TIMESTAMPNS", 15));
    03658 #endif
    03659 #ifdef SCM_TIMESTAMP
    03660     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_TIMESTAMP, (st_data_t)rb_intern2("SCM_TIMESTAMP", 13));
    03661 #endif
    03662 #ifdef SCM_RIGHTS
    03663     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_RIGHTS, (st_data_t)rb_intern2("SCM_RIGHTS", 10));
    03664 #endif
    03665 #ifdef SCM_UCRED
    03666     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_UCRED, (st_data_t)rb_intern2("UCRED", 5));
    03667 #endif
    03668 #ifdef SCM_CREDS
    03669     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_CREDS, (st_data_t)rb_intern2("CREDS", 5));
    03670 #endif
    03671 #ifdef SCM_CREDENTIALS
    03672     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_CREDENTIALS, (st_data_t)rb_intern2("CREDENTIALS", 11));
    03673 #endif
    03674 #ifdef SCM_BINTIME
    03675     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_BINTIME, (st_data_t)rb_intern2("BINTIME", 7));
    03676 #endif
    03677 #ifdef SCM_TIMESTAMPNS
    03678     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_TIMESTAMPNS, (st_data_t)rb_intern2("TIMESTAMPNS", 11));
    03679 #endif
    03680 #ifdef SCM_TIMESTAMP
    03681     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_TIMESTAMP, (st_data_t)rb_intern2("TIMESTAMP", 9));
    03682 #endif
    03683 #ifdef SCM_RIGHTS
    03684     st_insert(rsock_intern_scm_optname_hash, (st_data_t)SCM_RIGHTS, (st_data_t)rb_intern2("RIGHTS", 6));
    03685 #endif
    03686
    03687     rsock_intern_local_optname_hash = st_init_numtable();
    03688 #ifdef LOCAL_CONNWAIT
    03689     st_insert(rsock_intern_local_optname_hash, (st_data_t)LOCAL_CONNWAIT, (st_data_t)rb_intern2("LOCAL_CONNWAIT", 14));
    03690 #endif
    03691 #ifdef LOCAL_CREDS
    03692     st_insert(rsock_intern_local_optname_hash, (st_data_t)LOCAL_CREDS, (st_data_t)rb_intern2("LOCAL_CREDS", 11));
    03693 #endif
    03694 #ifdef LOCAL_PEERCRED
    03695     st_insert(rsock_intern_local_optname_hash, (st_data_t)LOCAL_PEERCRED, (st_data_t)rb_intern2("LOCAL_PEERCRED", 14));
    03696 #endif
    03697 #ifdef LOCAL_CONNWAIT
    03698     st_insert(rsock_intern_local_optname_hash, (st_data_t)LOCAL_CONNWAIT, (st_data_t)rb_intern2("CONNWAIT", 8));
    03699 #endif
    03700 #ifdef LOCAL_CREDS
    03701     st_insert(rsock_intern_local_optname_hash, (st_data_t)LOCAL_CREDS, (st_data_t)rb_intern2("CREDS", 5));
    03702 #endif
    03703 #ifdef LOCAL_PEERCRED
    03704     st_insert(rsock_intern_local_optname_hash, (st_data_t)LOCAL_PEERCRED, (st_data_t)rb_intern2("PEERCRED", 8));
    03705 #endif
    03706
    03707 }
    03708
    03709 int
    03710 rsock_family_to_int(const char *str, long len, int *valp)
    03711 {
    03712     switch (len) {
    03713       case 2:
    03714 #ifdef AF_NS
    03715         if (memcmp(str, "NS", 2) == 0) { *valp = AF_NS; return 0; }
    03716 #endif
    03717         return -1;
    03718
    03719       case 3:
    03720 #ifdef AF_IPX
    03721         if (memcmp(str, "IPX", 3) == 0) { *valp = AF_IPX; return 0; }
    03722 #endif
    03723 #ifdef AF_PUP
    03724         if (memcmp(str, "PUP", 3) == 0) { *valp = AF_PUP; return 0; }
    03725 #endif
    03726 #ifdef AF_ISO
    03727         if (memcmp(str, "ISO", 3) == 0) { *valp = AF_ISO; return 0; }
    03728 #endif
    03729 #ifdef AF_OSI
    03730         if (memcmp(str, "OSI", 3) == 0) { *valp = AF_OSI; return 0; }
    03731 #endif
    03732 #ifdef AF_SNA
    03733         if (memcmp(str, "SNA", 3) == 0) { *valp = AF_SNA; return 0; }
    03734 #endif
    03735 #ifdef AF_DEC
    03736         if (memcmp(str, "DEC", 3) == 0) { *valp = AF_DEC; return 0; }
    03737 #endif
    03738 #ifdef AF_DLI
    03739         if (memcmp(str, "DLI", 3) == 0) { *valp = AF_DLI; return 0; }
    03740 #endif
    03741 #ifdef AF_LAT
    03742         if (memcmp(str, "LAT", 3) == 0) { *valp = AF_LAT; return 0; }
    03743 #endif
    03744 #ifdef AF_CNT
    03745         if (memcmp(str, "CNT", 3) == 0) { *valp = AF_CNT; return 0; }
    03746 #endif
    03747 #ifdef AF_SIP
    03748         if (memcmp(str, "SIP", 3) == 0) { *valp = AF_SIP; return 0; }
    03749 #endif
    03750 #ifdef AF_PPP
    03751         if (memcmp(str, "PPP", 3) == 0) { *valp = AF_PPP; return 0; }
    03752 #endif
    03753 #ifdef AF_ATM
    03754         if (memcmp(str, "ATM", 3) == 0) { *valp = AF_ATM; return 0; }
    03755 #endif
    03756 #ifdef AF_MAX
    03757         if (memcmp(str, "MAX", 3) == 0) { *valp = AF_MAX; return 0; }
    03758 #endif
    03759         return -1;
    03760
    03761       case 4:
    03762 #ifdef AF_INET
    03763         if (memcmp(str, "INET", 4) == 0) { *valp = AF_INET; return 0; }
    03764 #endif
    03765 #ifdef AF_UNIX
    03766         if (memcmp(str, "UNIX", 4) == 0) { *valp = AF_UNIX; return 0; }
    03767 #endif
    03768 #ifdef AF_AX25
    03769         if (memcmp(str, "AX25", 4) == 0) { *valp = AF_AX25; return 0; }
    03770 #endif
    03771 #ifdef AF_ECMA
    03772         if (memcmp(str, "ECMA", 4) == 0) { *valp = AF_ECMA; return 0; }
    03773 #endif
    03774 #ifdef AF_LINK
    03775         if (memcmp(str, "LINK", 4) == 0) { *valp = AF_LINK; return 0; }
    03776 #endif
    03777 #ifdef AF_COIP
    03778         if (memcmp(str, "COIP", 4) == 0) { *valp = AF_COIP; return 0; }
    03779 #endif
    03780 #ifdef AF_NDRV
    03781         if (memcmp(str, "NDRV", 4) == 0) { *valp = AF_NDRV; return 0; }
    03782 #endif
    03783 #ifdef AF_ISDN
    03784         if (memcmp(str, "ISDN", 4) == 0) { *valp = AF_ISDN; return 0; }
    03785 #endif
    03786 #ifdef AF_NATM
    03787         if (memcmp(str, "NATM", 4) == 0) { *valp = AF_NATM; return 0; }
    03788 #endif
    03789 #ifdef AF_E164
    03790         if (memcmp(str, "E164", 4) == 0) { *valp = AF_E164; return 0; }
    03791 #endif
    03792         return -1;
    03793
    03794       case 5:
    03795 #ifdef AF_NS
    03796         if (memcmp(str, "AF_NS", 5) == 0) { *valp = AF_NS; return 0; }
    03797 #endif
    03798 #ifdef PF_NS
    03799         if (memcmp(str, "PF_NS", 5) == 0) { *valp = PF_NS; return 0; }
    03800 #endif
    03801 #ifdef AF_INET6
    03802         if (memcmp(str, "INET6", 5) == 0) { *valp = AF_INET6; return 0; }
    03803 #endif
    03804 #ifdef AF_LOCAL
    03805         if (memcmp(str, "LOCAL", 5) == 0) { *valp = AF_LOCAL; return 0; }
    03806 #endif
    03807 #ifdef AF_CHAOS
    03808         if (memcmp(str, "CHAOS", 5) == 0) { *valp = AF_CHAOS; return 0; }
    03809 #endif
    03810 #ifdef AF_CCITT
    03811         if (memcmp(str, "CCITT", 5) == 0) { *valp = AF_CCITT; return 0; }
    03812 #endif
    03813 #ifdef AF_ROUTE
    03814         if (memcmp(str, "ROUTE", 5) == 0) { *valp = AF_ROUTE; return 0; }
    03815 #endif
    03816         return -1;
    03817
    03818       case 6:
    03819 #ifdef AF_IPX
    03820         if (memcmp(str, "AF_IPX", 6) == 0) { *valp = AF_IPX; return 0; }
    03821 #endif
    03822 #ifdef PF_IPX
    03823         if (memcmp(str, "PF_IPX", 6) == 0) { *valp = PF_IPX; return 0; }
    03824 #endif
    03825 #ifdef AF_PUP
    03826         if (memcmp(str, "AF_PUP", 6) == 0) { *valp = AF_PUP; return 0; }
    03827 #endif
    03828 #ifdef PF_PUP
    03829         if (memcmp(str, "PF_PUP", 6) == 0) { *valp = PF_PUP; return 0; }
    03830 #endif
    03831 #ifdef AF_ISO
    03832         if (memcmp(str, "AF_ISO", 6) == 0) { *valp = AF_ISO; return 0; }
    03833 #endif
    03834 #ifdef PF_ISO
    03835         if (memcmp(str, "PF_ISO", 6) == 0) { *valp = PF_ISO; return 0; }
    03836 #endif
    03837 #ifdef AF_OSI
    03838         if (memcmp(str, "AF_OSI", 6) == 0) { *valp = AF_OSI; return 0; }
    03839 #endif
    03840 #ifdef PF_OSI
    03841         if (memcmp(str, "PF_OSI", 6) == 0) { *valp = PF_OSI; return 0; }
    03842 #endif
    03843 #ifdef AF_SNA
    03844         if (memcmp(str, "AF_SNA", 6) == 0) { *valp = AF_SNA; return 0; }
    03845 #endif
    03846 #ifdef PF_SNA
    03847         if (memcmp(str, "PF_SNA", 6) == 0) { *valp = PF_SNA; return 0; }
    03848 #endif
    03849 #ifdef AF_DEC
    03850         if (memcmp(str, "AF_DEC", 6) == 0) { *valp = AF_DEC; return 0; }
    03851 #endif
    03852 #ifdef PF_DEC
    03853         if (memcmp(str, "PF_DEC", 6) == 0) { *valp = PF_DEC; return 0; }
    03854 #endif
    03855 #ifdef AF_DLI
    03856         if (memcmp(str, "AF_DLI", 6) == 0) { *valp = AF_DLI; return 0; }
    03857 #endif
    03858 #ifdef PF_DLI
    03859         if (memcmp(str, "PF_DLI", 6) == 0) { *valp = PF_DLI; return 0; }
    03860 #endif
    03861 #ifdef AF_LAT
    03862         if (memcmp(str, "AF_LAT", 6) == 0) { *valp = AF_LAT; return 0; }
    03863 #endif
    03864 #ifdef PF_LAT
    03865         if (memcmp(str, "PF_LAT", 6) == 0) { *valp = PF_LAT; return 0; }
    03866 #endif
    03867 #ifdef AF_CNT
    03868         if (memcmp(str, "AF_CNT", 6) == 0) { *valp = AF_CNT; return 0; }
    03869 #endif
    03870 #ifdef PF_CNT
    03871         if (memcmp(str, "PF_CNT", 6) == 0) { *valp = PF_CNT; return 0; }
    03872 #endif
    03873 #ifdef AF_SIP
    03874         if (memcmp(str, "AF_SIP", 6) == 0) { *valp = AF_SIP; return 0; }
    03875 #endif
    03876 #ifdef PF_SIP
    03877         if (memcmp(str, "PF_SIP", 6) == 0) { *valp = PF_SIP; return 0; }
    03878 #endif
    03879 #ifdef AF_PPP
    03880         if (memcmp(str, "AF_PPP", 6) == 0) { *valp = AF_PPP; return 0; }
    03881 #endif
    03882 #ifdef PF_PPP
    03883         if (memcmp(str, "PF_PPP", 6) == 0) { *valp = PF_PPP; return 0; }
    03884 #endif
    03885 #ifdef AF_ATM
    03886         if (memcmp(str, "AF_ATM", 6) == 0) { *valp = AF_ATM; return 0; }
    03887 #endif
    03888 #ifdef PF_ATM
    03889         if (memcmp(str, "PF_ATM", 6) == 0) { *valp = PF_ATM; return 0; }
    03890 #endif
    03891 #ifdef AF_MAX
    03892         if (memcmp(str, "AF_MAX", 6) == 0) { *valp = AF_MAX; return 0; }
    03893 #endif
    03894 #ifdef PF_MAX
    03895         if (memcmp(str, "PF_MAX", 6) == 0) { *valp = PF_MAX; return 0; }
    03896 #endif
    03897 #ifdef PF_XTP
    03898         if (memcmp(str, "PF_XTP", 6) == 0) { *valp = PF_XTP; return 0; }
    03899 #endif
    03900 #ifdef PF_PIP
    03901         if (memcmp(str, "PF_PIP", 6) == 0) { *valp = PF_PIP; return 0; }
    03902 #endif
    03903 #ifdef PF_KEY
    03904         if (memcmp(str, "PF_KEY", 6) == 0) { *valp = PF_KEY; return 0; }
    03905 #endif
    03906 #ifdef AF_UNSPEC
    03907         if (memcmp(str, "UNSPEC", 6) == 0) { *valp = AF_UNSPEC; return 0; }
    03908 #endif
    03909 #ifdef AF_HYLINK
    03910         if (memcmp(str, "HYLINK", 6) == 0) { *valp = AF_HYLINK; return 0; }
    03911 #endif
    03912 #ifdef AF_SYSTEM
    03913         if (memcmp(str, "SYSTEM", 6) == 0) { *valp = AF_SYSTEM; return 0; }
    03914 #endif
    03915 #ifdef AF_PACKET
    03916         if (memcmp(str, "PACKET", 6) == 0) { *valp = AF_PACKET; return 0; }
    03917 #endif
    03918         return -1;
    03919
    03920       case 7:
    03921 #ifdef AF_INET
    03922         if (memcmp(str, "AF_INET", 7) == 0) { *valp = AF_INET; return 0; }
    03923 #endif
    03924 #ifdef PF_INET
    03925         if (memcmp(str, "PF_INET", 7) == 0) { *valp = PF_INET; return 0; }
    03926 #endif
    03927 #ifdef AF_UNIX
    03928         if (memcmp(str, "AF_UNIX", 7) == 0) { *valp = AF_UNIX; return 0; }
    03929 #endif
    03930 #ifdef PF_UNIX
    03931         if (memcmp(str, "PF_UNIX", 7) == 0) { *valp = PF_UNIX; return 0; }
    03932 #endif
    03933 #ifdef AF_AX25
    03934         if (memcmp(str, "AF_AX25", 7) == 0) { *valp = AF_AX25; return 0; }
    03935 #endif
    03936 #ifdef PF_AX25
    03937         if (memcmp(str, "PF_AX25", 7) == 0) { *valp = PF_AX25; return 0; }
    03938 #endif
    03939 #ifdef AF_ECMA
    03940         if (memcmp(str, "AF_ECMA", 7) == 0) { *valp = AF_ECMA; return 0; }
    03941 #endif
    03942 #ifdef PF_ECMA
    03943         if (memcmp(str, "PF_ECMA", 7) == 0) { *valp = PF_ECMA; return 0; }
    03944 #endif
    03945 #ifdef AF_LINK
    03946         if (memcmp(str, "AF_LINK", 7) == 0) { *valp = AF_LINK; return 0; }
    03947 #endif
    03948 #ifdef PF_LINK
    03949         if (memcmp(str, "PF_LINK", 7) == 0) { *valp = PF_LINK; return 0; }
    03950 #endif
    03951 #ifdef AF_COIP
    03952         if (memcmp(str, "AF_COIP", 7) == 0) { *valp = AF_COIP; return 0; }
    03953 #endif
    03954 #ifdef PF_COIP
    03955         if (memcmp(str, "PF_COIP", 7) == 0) { *valp = PF_COIP; return 0; }
    03956 #endif
    03957 #ifdef AF_NDRV
    03958         if (memcmp(str, "AF_NDRV", 7) == 0) { *valp = AF_NDRV; return 0; }
    03959 #endif
    03960 #ifdef PF_NDRV
    03961         if (memcmp(str, "PF_NDRV", 7) == 0) { *valp = PF_NDRV; return 0; }
    03962 #endif
    03963 #ifdef AF_ISDN
    03964         if (memcmp(str, "AF_ISDN", 7) == 0) { *valp = AF_ISDN; return 0; }
    03965 #endif
    03966 #ifdef PF_ISDN
    03967         if (memcmp(str, "PF_ISDN", 7) == 0) { *valp = PF_ISDN; return 0; }
    03968 #endif
    03969 #ifdef AF_NATM
    03970         if (memcmp(str, "AF_NATM", 7) == 0) { *valp = AF_NATM; return 0; }
    03971 #endif
    03972 #ifdef PF_NATM
    03973         if (memcmp(str, "PF_NATM", 7) == 0) { *valp = PF_NATM; return 0; }
    03974 #endif
    03975 #ifdef AF_E164
    03976         if (memcmp(str, "AF_E164", 7) == 0) { *valp = AF_E164; return 0; }
    03977 #endif
    03978 #ifdef PF_RTIP
    03979         if (memcmp(str, "PF_RTIP", 7) == 0) { *valp = PF_RTIP; return 0; }
    03980 #endif
    03981 #ifdef AF_IMPLINK
    03982         if (memcmp(str, "IMPLINK", 7) == 0) { *valp = AF_IMPLINK; return 0; }
    03983 #endif
    03984 #ifdef AF_DATAKIT
    03985         if (memcmp(str, "DATAKIT", 7) == 0) { *valp = AF_DATAKIT; return 0; }
    03986 #endif
    03987 #ifdef AF_NETBIOS
    03988         if (memcmp(str, "NETBIOS", 7) == 0) { *valp = AF_NETBIOS; return 0; }
    03989 #endif
    03990         return -1;
    03991
    03992       case 8:
    03993 #ifdef AF_INET6
    03994         if (memcmp(str, "AF_INET6", 8) == 0) { *valp = AF_INET6; return 0; }
    03995 #endif
    03996 #ifdef PF_INET6
    03997         if (memcmp(str, "PF_INET6", 8) == 0) { *valp = PF_INET6; return 0; }
    03998 #endif
    03999 #ifdef AF_LOCAL
    04000         if (memcmp(str, "AF_LOCAL", 8) == 0) { *valp = AF_LOCAL; return 0; }
    04001 #endif
    04002 #ifdef PF_LOCAL
    04003         if (memcmp(str, "PF_LOCAL", 8) == 0) { *valp = PF_LOCAL; return 0; }
    04004 #endif
    04005 #ifdef AF_CHAOS
    04006         if (memcmp(str, "AF_CHAOS", 8) == 0) { *valp = AF_CHAOS; return 0; }
    04007 #endif
    04008 #ifdef PF_CHAOS
    04009         if (memcmp(str, "PF_CHAOS", 8) == 0) { *valp = PF_CHAOS; return 0; }
    04010 #endif
    04011 #ifdef AF_CCITT
    04012         if (memcmp(str, "AF_CCITT", 8) == 0) { *valp = AF_CCITT; return 0; }
    04013 #endif
    04014 #ifdef PF_CCITT
    04015         if (memcmp(str, "PF_CCITT", 8) == 0) { *valp = PF_CCITT; return 0; }
    04016 #endif
    04017 #ifdef AF_ROUTE
    04018         if (memcmp(str, "AF_ROUTE", 8) == 0) { *valp = AF_ROUTE; return 0; }
    04019 #endif
    04020 #ifdef PF_ROUTE
    04021         if (memcmp(str, "PF_ROUTE", 8) == 0) { *valp = PF_ROUTE; return 0; }
    04022 #endif
    04023 #ifdef AF_NETGRAPH
    04024         if (memcmp(str, "NETGRAPH", 8) == 0) { *valp = AF_NETGRAPH; return 0; }
    04025 #endif
    04026         return -1;
    04027
    04028       case 9:
    04029 #ifdef AF_UNSPEC
    04030         if (memcmp(str, "AF_UNSPEC", 9) == 0) { *valp = AF_UNSPEC; return 0; }
    04031 #endif
    04032 #ifdef PF_UNSPEC
    04033         if (memcmp(str, "PF_UNSPEC", 9) == 0) { *valp = PF_UNSPEC; return 0; }
    04034 #endif
    04035 #ifdef AF_HYLINK
    04036         if (memcmp(str, "AF_HYLINK", 9) == 0) { *valp = AF_HYLINK; return 0; }
    04037 #endif
    04038 #ifdef PF_HYLINK
    04039         if (memcmp(str, "PF_HYLINK", 9) == 0) { *valp = PF_HYLINK; return 0; }
    04040 #endif
    04041 #ifdef AF_SYSTEM
    04042         if (memcmp(str, "AF_SYSTEM", 9) == 0) { *valp = AF_SYSTEM; return 0; }
    04043 #endif
    04044 #ifdef PF_SYSTEM
    04045         if (memcmp(str, "PF_SYSTEM", 9) == 0) { *valp = PF_SYSTEM; return 0; }
    04046 #endif
    04047 #ifdef AF_PACKET
    04048         if (memcmp(str, "AF_PACKET", 9) == 0) { *valp = AF_PACKET; return 0; }
    04049 #endif
    04050 #ifdef PF_PACKET
    04051         if (memcmp(str, "PF_PACKET", 9) == 0) { *valp = PF_PACKET; return 0; }
    04052 #endif
    04053 #ifdef AF_APPLETALK
    04054         if (memcmp(str, "APPLETALK", 9) == 0) { *valp = AF_APPLETALK; return 0; }
    04055 #endif
    04056         return -1;
    04057
    04058       case 10:
    04059 #ifdef AF_IMPLINK
    04060         if (memcmp(str, "AF_IMPLINK", 10) == 0) { *valp = AF_IMPLINK; return 0; }
    04061 #endif
    04062 #ifdef PF_IMPLINK
    04063         if (memcmp(str, "PF_IMPLINK", 10) == 0) { *valp = PF_IMPLINK; return 0; }
    04064 #endif
    04065 #ifdef AF_DATAKIT
    04066         if (memcmp(str, "AF_DATAKIT", 10) == 0) { *valp = AF_DATAKIT; return 0; }
    04067 #endif
    04068 #ifdef PF_DATAKIT
    04069         if (memcmp(str, "PF_DATAKIT", 10) == 0) { *valp = PF_DATAKIT; return 0; }
    04070 #endif
    04071 #ifdef AF_NETBIOS
    04072         if (memcmp(str, "AF_NETBIOS", 10) == 0) { *valp = AF_NETBIOS; return 0; }
    04073 #endif
    04074 #ifdef PF_NETBIOS
    04075         if (memcmp(str, "PF_NETBIOS", 10) == 0) { *valp = PF_NETBIOS; return 0; }
    04076 #endif
    04077         return -1;
    04078
    04079       case 11:
    04080 #ifdef AF_NETGRAPH
    04081         if (memcmp(str, "AF_NETGRAPH", 11) == 0) { *valp = AF_NETGRAPH; return 0; }
    04082 #endif
    04083 #ifdef PF_NETGRAPH
    04084         if (memcmp(str, "PF_NETGRAPH", 11) == 0) { *valp = PF_NETGRAPH; return 0; }
    04085 #endif
    04086         return -1;
    04087
    04088       case 12:
    04089 #ifdef AF_APPLETALK
    04090         if (memcmp(str, "AF_APPLETALK", 12) == 0) { *valp = AF_APPLETALK; return 0; }
    04091 #endif
    04092 #ifdef PF_APPLETALK
    04093         if (memcmp(str, "PF_APPLETALK", 12) == 0) { *valp = PF_APPLETALK; return 0; }
    04094 #endif
    04095         return -1;
    04096
    04097       default:
    04098         return -1;
    04099     }
    04100 }
    04101
    04102
    04103 int
    04104 rsock_socktype_to_int(const char *str, long len, int *valp)
    04105 {
    04106     switch (len) {
    04107       case 3:
    04108 #ifdef SOCK_RAW
    04109         if (memcmp(str, "RAW", 3) == 0) { *valp = SOCK_RAW; return 0; }
    04110 #endif
    04111 #ifdef SOCK_RDM
    04112         if (memcmp(str, "RDM", 3) == 0) { *valp = SOCK_RDM; return 0; }
    04113 #endif
    04114         return -1;
    04115
    04116       case 5:
    04117 #ifdef SOCK_DGRAM
    04118         if (memcmp(str, "DGRAM", 5) == 0) { *valp = SOCK_DGRAM; return 0; }
    04119 #endif
    04120         return -1;
    04121
    04122       case 6:
    04123 #ifdef SOCK_STREAM
    04124         if (memcmp(str, "STREAM", 6) == 0) { *valp = SOCK_STREAM; return 0; }
    04125 #endif
    04126 #ifdef SOCK_PACKET
    04127         if (memcmp(str, "PACKET", 6) == 0) { *valp = SOCK_PACKET; return 0; }
    04128 #endif
    04129         return -1;
    04130
    04131       case 8:
    04132 #ifdef SOCK_RAW
    04133         if (memcmp(str, "SOCK_RAW", 8) == 0) { *valp = SOCK_RAW; return 0; }
    04134 #endif
    04135 #ifdef SOCK_RDM
    04136         if (memcmp(str, "SOCK_RDM", 8) == 0) { *valp = SOCK_RDM; return 0; }
    04137 #endif
    04138         return -1;
    04139
    04140       case 9:
    04141 #ifdef SOCK_SEQPACKET
    04142         if (memcmp(str, "SEQPACKET", 9) == 0) { *valp = SOCK_SEQPACKET; return 0; }
    04143 #endif
    04144         return -1;
    04145
    04146       case 10:
    04147 #ifdef SOCK_DGRAM
    04148         if (memcmp(str, "SOCK_DGRAM", 10) == 0) { *valp = SOCK_DGRAM; return 0; }
    04149 #endif
    04150         return -1;
    04151
    04152       case 11:
    04153 #ifdef SOCK_STREAM
    04154         if (memcmp(str, "SOCK_STREAM", 11) == 0) { *valp = SOCK_STREAM; return 0; }
    04155 #endif
    04156 #ifdef SOCK_PACKET
    04157         if (memcmp(str, "SOCK_PACKET", 11) == 0) { *valp = SOCK_PACKET; return 0; }
    04158 #endif
    04159         return -1;
    04160
    04161       case 14:
    04162 #ifdef SOCK_SEQPACKET
    04163         if (memcmp(str, "SOCK_SEQPACKET", 14) == 0) { *valp = SOCK_SEQPACKET; return 0; }
    04164 #endif
    04165         return -1;
    04166
    04167       default:
    04168         return -1;
    04169     }
    04170 }
    04171
    04172
    04173 int
    04174 rsock_ipproto_to_int(const char *str, long len, int *valp)
    04175 {
    04176     switch (len) {
    04177       case 2:
    04178 #ifdef IPPROTO_IP
    04179         if (memcmp(str, "IP", 2) == 0) { *valp = IPPROTO_IP; return 0; }
    04180 #endif
    04181 #ifdef IPPROTO_ND
    04182         if (memcmp(str, "ND", 2) == 0) { *valp = IPPROTO_ND; return 0; }
    04183 #endif
    04184 #ifdef IPPROTO_TP
    04185         if (memcmp(str, "TP", 2) == 0) { *valp = IPPROTO_TP; return 0; }
    04186 #endif
    04187 #ifdef IPPROTO_AH
    04188         if (memcmp(str, "AH", 2) == 0) { *valp = IPPROTO_AH; return 0; }
    04189 #endif
    04190         return -1;
    04191
    04192       case 3:
    04193 #ifdef IPPROTO_GGP
    04194         if (memcmp(str, "GGP", 3) == 0) { *valp = IPPROTO_GGP; return 0; }
    04195 #endif
    04196 #ifdef IPPROTO_TCP
    04197         if (memcmp(str, "TCP", 3) == 0) { *valp = IPPROTO_TCP; return 0; }
    04198 #endif
    04199 #ifdef IPPROTO_EGP
    04200         if (memcmp(str, "EGP", 3) == 0) { *valp = IPPROTO_EGP; return 0; }
    04201 #endif
    04202 #ifdef IPPROTO_PUP
    04203         if (memcmp(str, "PUP", 3) == 0) { *valp = IPPROTO_PUP; return 0; }
    04204 #endif
    04205 #ifdef IPPROTO_UDP
    04206         if (memcmp(str, "UDP", 3) == 0) { *valp = IPPROTO_UDP; return 0; }
    04207 #endif
    04208 #ifdef IPPROTO_IDP
    04209         if (memcmp(str, "IDP", 3) == 0) { *valp = IPPROTO_IDP; return 0; }
    04210 #endif
    04211 #ifdef IPPROTO_XTP
    04212         if (memcmp(str, "XTP", 3) == 0) { *valp = IPPROTO_XTP; return 0; }
    04213 #endif
    04214 #ifdef IPPROTO_EON
    04215         if (memcmp(str, "EON", 3) == 0) { *valp = IPPROTO_EON; return 0; }
    04216 #endif
    04217 #ifdef IPPROTO_BIP
    04218         if (memcmp(str, "BIP", 3) == 0) { *valp = IPPROTO_BIP; return 0; }
    04219 #endif
    04220 #ifdef IPPROTO_ESP
    04221         if (memcmp(str, "ESP", 3) == 0) { *valp = IPPROTO_ESP; return 0; }
    04222 #endif
    04223 #ifdef IPPROTO_RAW
    04224         if (memcmp(str, "RAW", 3) == 0) { *valp = IPPROTO_RAW; return 0; }
    04225 #endif
    04226 #ifdef IPPROTO_MAX
    04227         if (memcmp(str, "MAX", 3) == 0) { *valp = IPPROTO_MAX; return 0; }
    04228 #endif
    04229         return -1;
    04230
    04231       case 4:
    04232 #ifdef IPPROTO_ICMP
    04233         if (memcmp(str, "ICMP", 4) == 0) { *valp = IPPROTO_ICMP; return 0; }
    04234 #endif
    04235 #ifdef IPPROTO_IGMP
    04236         if (memcmp(str, "IGMP", 4) == 0) { *valp = IPPROTO_IGMP; return 0; }
    04237 #endif
    04238 #ifdef IPPROTO_IPV6
    04239         if (memcmp(str, "IPV6", 4) == 0) { *valp = IPPROTO_IPV6; return 0; }
    04240 #endif
    04241 #ifdef IPPROTO_NONE
    04242         if (memcmp(str, "NONE", 4) == 0) { *valp = IPPROTO_NONE; return 0; }
    04243 #endif
    04244         return -1;
    04245
    04246       case 5:
    04247 #ifdef IPPROTO_HELLO
    04248         if (memcmp(str, "HELLO", 5) == 0) { *valp = IPPROTO_HELLO; return 0; }
    04249 #endif
    04250         return -1;
    04251
    04252       case 6:
    04253 #ifdef IPPROTO_ICMPV6
    04254         if (memcmp(str, "ICMPV6", 6) == 0) { *valp = IPPROTO_ICMPV6; return 0; }
    04255 #endif
    04256         return -1;
    04257
    04258       case 7:
    04259 #ifdef IPPROTO_DSTOPTS
    04260         if (memcmp(str, "DSTOPTS", 7) == 0) { *valp = IPPROTO_DSTOPTS; return 0; }
    04261 #endif
    04262 #ifdef IPPROTO_HOPOPTS
    04263         if (memcmp(str, "HOPOPTS", 7) == 0) { *valp = IPPROTO_HOPOPTS; return 0; }
    04264 #endif
    04265 #ifdef IPPROTO_ROUTING
    04266         if (memcmp(str, "ROUTING", 7) == 0) { *valp = IPPROTO_ROUTING; return 0; }
    04267 #endif
    04268         return -1;
    04269
    04270       case 8:
    04271 #ifdef IPPROTO_FRAGMENT
    04272         if (memcmp(str, "FRAGMENT", 8) == 0) { *valp = IPPROTO_FRAGMENT; return 0; }
    04273 #endif
    04274         return -1;
    04275
    04276       case 10:
    04277 #ifdef IPPROTO_IP
    04278         if (memcmp(str, "IPPROTO_IP", 10) == 0) { *valp = IPPROTO_IP; return 0; }
    04279 #endif
    04280 #ifdef IPPROTO_ND
    04281         if (memcmp(str, "IPPROTO_ND", 10) == 0) { *valp = IPPROTO_ND; return 0; }
    04282 #endif
    04283 #ifdef IPPROTO_TP
    04284         if (memcmp(str, "IPPROTO_TP", 10) == 0) { *valp = IPPROTO_TP; return 0; }
    04285 #endif
    04286 #ifdef IPPROTO_AH
    04287         if (memcmp(str, "IPPROTO_AH", 10) == 0) { *valp = IPPROTO_AH; return 0; }
    04288 #endif
    04289         return -1;
    04290
    04291       case 11:
    04292 #ifdef IPPROTO_GGP
    04293         if (memcmp(str, "IPPROTO_GGP", 11) == 0) { *valp = IPPROTO_GGP; return 0; }
    04294 #endif
    04295 #ifdef IPPROTO_TCP
    04296         if (memcmp(str, "IPPROTO_TCP", 11) == 0) { *valp = IPPROTO_TCP; return 0; }
    04297 #endif
    04298 #ifdef IPPROTO_EGP
    04299         if (memcmp(str, "IPPROTO_EGP", 11) == 0) { *valp = IPPROTO_EGP; return 0; }
    04300 #endif
    04301 #ifdef IPPROTO_PUP
    04302         if (memcmp(str, "IPPROTO_PUP", 11) == 0) { *valp = IPPROTO_PUP; return 0; }
    04303 #endif
    04304 #ifdef IPPROTO_UDP
    04305         if (memcmp(str, "IPPROTO_UDP", 11) == 0) { *valp = IPPROTO_UDP; return 0; }
    04306 #endif
    04307 #ifdef IPPROTO_IDP
    04308         if (memcmp(str, "IPPROTO_IDP", 11) == 0) { *valp = IPPROTO_IDP; return 0; }
    04309 #endif
    04310 #ifdef IPPROTO_XTP
    04311         if (memcmp(str, "IPPROTO_XTP", 11) == 0) { *valp = IPPROTO_XTP; return 0; }
    04312 #endif
    04313 #ifdef IPPROTO_EON
    04314         if (memcmp(str, "IPPROTO_EON", 11) == 0) { *valp = IPPROTO_EON; return 0; }
    04315 #endif
    04316 #ifdef IPPROTO_BIP
    04317         if (memcmp(str, "IPPROTO_BIP", 11) == 0) { *valp = IPPROTO_BIP; return 0; }
    04318 #endif
    04319 #ifdef IPPROTO_ESP
    04320         if (memcmp(str, "IPPROTO_ESP", 11) == 0) { *valp = IPPROTO_ESP; return 0; }
    04321 #endif
    04322 #ifdef IPPROTO_RAW
    04323         if (memcmp(str, "IPPROTO_RAW", 11) == 0) { *valp = IPPROTO_RAW; return 0; }
    04324 #endif
    04325 #ifdef IPPROTO_MAX
    04326         if (memcmp(str, "IPPROTO_MAX", 11) == 0) { *valp = IPPROTO_MAX; return 0; }
    04327 #endif
    04328         return -1;
    04329
    04330       case 12:
    04331 #ifdef IPPROTO_ICMP
    04332         if (memcmp(str, "IPPROTO_ICMP", 12) == 0) { *valp = IPPROTO_ICMP; return 0; }
    04333 #endif
    04334 #ifdef IPPROTO_IGMP
    04335         if (memcmp(str, "IPPROTO_IGMP", 12) == 0) { *valp = IPPROTO_IGMP; return 0; }
    04336 #endif
    04337 #ifdef IPPROTO_IPV6
    04338         if (memcmp(str, "IPPROTO_IPV6", 12) == 0) { *valp = IPPROTO_IPV6; return 0; }
    04339 #endif
    04340 #ifdef IPPROTO_NONE
    04341         if (memcmp(str, "IPPROTO_NONE", 12) == 0) { *valp = IPPROTO_NONE; return 0; }
    04342 #endif
    04343         return -1;
    04344
    04345       case 13:
    04346 #ifdef IPPROTO_HELLO
    04347         if (memcmp(str, "IPPROTO_HELLO", 13) == 0) { *valp = IPPROTO_HELLO; return 0; }
    04348 #endif
    04349         return -1;
    04350
    04351       case 14:
    04352 #ifdef IPPROTO_ICMPV6
    04353         if (memcmp(str, "IPPROTO_ICMPV6", 14) == 0) { *valp = IPPROTO_ICMPV6; return 0; }
    04354 #endif
    04355         return -1;
    04356
    04357       case 15:
    04358 #ifdef IPPROTO_DSTOPTS
    04359         if (memcmp(str, "IPPROTO_DSTOPTS", 15) == 0) { *valp = IPPROTO_DSTOPTS; return 0; }
    04360 #endif
    04361 #ifdef IPPROTO_HOPOPTS
    04362         if (memcmp(str, "IPPROTO_HOPOPTS", 15) == 0) { *valp = IPPROTO_HOPOPTS; return 0; }
    04363 #endif
    04364 #ifdef IPPROTO_ROUTING
    04365         if (memcmp(str, "IPPROTO_ROUTING", 15) == 0) { *valp = IPPROTO_ROUTING; return 0; }
    04366 #endif
    04367         return -1;
    04368
    04369       case 16:
    04370 #ifdef IPPROTO_FRAGMENT
    04371         if (memcmp(str, "IPPROTO_FRAGMENT", 16) == 0) { *valp = IPPROTO_FRAGMENT; return 0; }
    04372 #endif
    04373         return -1;
    04374
    04375       default:
    04376         return -1;
    04377     }
    04378 }
    04379
    04380
    04381 int
    04382 rsock_unknown_level_to_int(const char *str, long len, int *valp)
    04383 {
    04384     switch (len) {
    04385       case 6:
    04386 #ifdef SOL_SOCKET
    04387         if (memcmp(str, "SOCKET", 6) == 0) { *valp = SOL_SOCKET; return 0; }
    04388 #endif
    04389         return -1;
    04390
    04391       case 10:
    04392 #ifdef SOL_SOCKET
    04393         if (memcmp(str, "SOL_SOCKET", 10) == 0) { *valp = SOL_SOCKET; return 0; }
    04394 #endif
    04395         return -1;
    04396
    04397       default:
    04398         return -1;
    04399     }
    04400 }
    04401
    04402
    04403 int
    04404 rsock_ip_level_to_int(const char *str, long len, int *valp)
    04405 {
    04406     switch (len) {
    04407       case 2:
    04408 #ifdef IPPROTO_IP
    04409         if (memcmp(str, "IP", 2) == 0) { *valp = IPPROTO_IP; return 0; }
    04410 #endif
    04411 #ifdef IPPROTO_ND
    04412         if (memcmp(str, "ND", 2) == 0) { *valp = IPPROTO_ND; return 0; }
    04413 #endif
    04414 #ifdef IPPROTO_TP
    04415         if (memcmp(str, "TP", 2) == 0) { *valp = IPPROTO_TP; return 0; }
    04416 #endif
    04417 #ifdef IPPROTO_AH
    04418         if (memcmp(str, "AH", 2) == 0) { *valp = IPPROTO_AH; return 0; }
    04419 #endif
    04420         return -1;
    04421
    04422       case 3:
    04423 #ifdef IPPROTO_GGP
    04424         if (memcmp(str, "GGP", 3) == 0) { *valp = IPPROTO_GGP; return 0; }
    04425 #endif
    04426 #ifdef IPPROTO_TCP
    04427         if (memcmp(str, "TCP", 3) == 0) { *valp = IPPROTO_TCP; return 0; }
    04428 #endif
    04429 #ifdef IPPROTO_EGP
    04430         if (memcmp(str, "EGP", 3) == 0) { *valp = IPPROTO_EGP; return 0; }
    04431 #endif
    04432 #ifdef IPPROTO_PUP
    04433         if (memcmp(str, "PUP", 3) == 0) { *valp = IPPROTO_PUP; return 0; }
    04434 #endif
    04435 #ifdef IPPROTO_UDP
    04436         if (memcmp(str, "UDP", 3) == 0) { *valp = IPPROTO_UDP; return 0; }
    04437 #endif
    04438 #ifdef IPPROTO_IDP
    04439         if (memcmp(str, "IDP", 3) == 0) { *valp = IPPROTO_IDP; return 0; }
    04440 #endif
    04441 #ifdef IPPROTO_XTP
    04442         if (memcmp(str, "XTP", 3) == 0) { *valp = IPPROTO_XTP; return 0; }
    04443 #endif
    04444 #ifdef IPPROTO_EON
    04445         if (memcmp(str, "EON", 3) == 0) { *valp = IPPROTO_EON; return 0; }
    04446 #endif
    04447 #ifdef IPPROTO_BIP
    04448         if (memcmp(str, "BIP", 3) == 0) { *valp = IPPROTO_BIP; return 0; }
    04449 #endif
    04450 #ifdef IPPROTO_ESP
    04451         if (memcmp(str, "ESP", 3) == 0) { *valp = IPPROTO_ESP; return 0; }
    04452 #endif
    04453 #ifdef IPPROTO_RAW
    04454         if (memcmp(str, "RAW", 3) == 0) { *valp = IPPROTO_RAW; return 0; }
    04455 #endif
    04456 #ifdef IPPROTO_MAX
    04457         if (memcmp(str, "MAX", 3) == 0) { *valp = IPPROTO_MAX; return 0; }
    04458 #endif
    04459         return -1;
    04460
    04461       case 4:
    04462 #ifdef IPPROTO_ICMP
    04463         if (memcmp(str, "ICMP", 4) == 0) { *valp = IPPROTO_ICMP; return 0; }
    04464 #endif
    04465 #ifdef IPPROTO_IGMP
    04466         if (memcmp(str, "IGMP", 4) == 0) { *valp = IPPROTO_IGMP; return 0; }
    04467 #endif
    04468 #ifdef IPPROTO_IPV6
    04469         if (memcmp(str, "IPV6", 4) == 0) { *valp = IPPROTO_IPV6; return 0; }
    04470 #endif
    04471 #ifdef IPPROTO_NONE
    04472         if (memcmp(str, "NONE", 4) == 0) { *valp = IPPROTO_NONE; return 0; }
    04473 #endif
    04474         return -1;
    04475
    04476       case 5:
    04477 #ifdef IPPROTO_HELLO
    04478         if (memcmp(str, "HELLO", 5) == 0) { *valp = IPPROTO_HELLO; return 0; }
    04479 #endif
    04480         return -1;
    04481
    04482       case 6:
    04483 #ifdef SOL_SOCKET
    04484         if (memcmp(str, "SOCKET", 6) == 0) { *valp = SOL_SOCKET; return 0; }
    04485 #endif
    04486 #ifdef IPPROTO_ICMPV6
    04487         if (memcmp(str, "ICMPV6", 6) == 0) { *valp = IPPROTO_ICMPV6; return 0; }
    04488 #endif
    04489         return -1;
    04490
    04491       case 7:
    04492 #ifdef IPPROTO_DSTOPTS
    04493         if (memcmp(str, "DSTOPTS", 7) == 0) { *valp = IPPROTO_DSTOPTS; return 0; }
    04494 #endif
    04495 #ifdef IPPROTO_HOPOPTS
    04496         if (memcmp(str, "HOPOPTS", 7) == 0) { *valp = IPPROTO_HOPOPTS; return 0; }
    04497 #endif
    04498 #ifdef IPPROTO_ROUTING
    04499         if (memcmp(str, "ROUTING", 7) == 0) { *valp = IPPROTO_ROUTING; return 0; }
    04500 #endif
    04501         return -1;
    04502
    04503       case 8:
    04504 #ifdef IPPROTO_FRAGMENT
    04505         if (memcmp(str, "FRAGMENT", 8) == 0) { *valp = IPPROTO_FRAGMENT; return 0; }
    04506 #endif
    04507         return -1;
    04508
    04509       case 10:
    04510 #ifdef SOL_SOCKET
    04511         if (memcmp(str, "SOL_SOCKET", 10) == 0) { *valp = SOL_SOCKET; return 0; }
    04512 #endif
    04513 #ifdef IPPROTO_IP
    04514         if (memcmp(str, "IPPROTO_IP", 10) == 0) { *valp = IPPROTO_IP; return 0; }
    04515 #endif
    04516 #ifdef IPPROTO_ND
    04517         if (memcmp(str, "IPPROTO_ND", 10) == 0) { *valp = IPPROTO_ND; return 0; }
    04518 #endif
    04519 #ifdef IPPROTO_TP
    04520         if (memcmp(str, "IPPROTO_TP", 10) == 0) { *valp = IPPROTO_TP; return 0; }
    04521 #endif
    04522 #ifdef IPPROTO_AH
    04523         if (memcmp(str, "IPPROTO_AH", 10) == 0) { *valp = IPPROTO_AH; return 0; }
    04524 #endif
    04525         return -1;
    04526
    04527       case 11:
    04528 #ifdef IPPROTO_GGP
    04529         if (memcmp(str, "IPPROTO_GGP", 11) == 0) { *valp = IPPROTO_GGP; return 0; }
    04530 #endif
    04531 #ifdef IPPROTO_TCP
    04532         if (memcmp(str, "IPPROTO_TCP", 11) == 0) { *valp = IPPROTO_TCP; return 0; }
    04533 #endif
    04534 #ifdef IPPROTO_EGP
    04535         if (memcmp(str, "IPPROTO_EGP", 11) == 0) { *valp = IPPROTO_EGP; return 0; }
    04536 #endif
    04537 #ifdef IPPROTO_PUP
    04538         if (memcmp(str, "IPPROTO_PUP", 11) == 0) { *valp = IPPROTO_PUP; return 0; }
    04539 #endif
    04540 #ifdef IPPROTO_UDP
    04541         if (memcmp(str, "IPPROTO_UDP", 11) == 0) { *valp = IPPROTO_UDP; return 0; }
    04542 #endif
    04543 #ifdef IPPROTO_IDP
    04544         if (memcmp(str, "IPPROTO_IDP", 11) == 0) { *valp = IPPROTO_IDP; return 0; }
    04545 #endif
    04546 #ifdef IPPROTO_XTP
    04547         if (memcmp(str, "IPPROTO_XTP", 11) == 0) { *valp = IPPROTO_XTP; return 0; }
    04548 #endif
    04549 #ifdef IPPROTO_EON
    04550         if (memcmp(str, "IPPROTO_EON", 11) == 0) { *valp = IPPROTO_EON; return 0; }
    04551 #endif
    04552 #ifdef IPPROTO_BIP
    04553         if (memcmp(str, "IPPROTO_BIP", 11) == 0) { *valp = IPPROTO_BIP; return 0; }
    04554 #endif
    04555 #ifdef IPPROTO_ESP
    04556         if (memcmp(str, "IPPROTO_ESP", 11) == 0) { *valp = IPPROTO_ESP; return 0; }
    04557 #endif
    04558 #ifdef IPPROTO_RAW
    04559         if (memcmp(str, "IPPROTO_RAW", 11) == 0) { *valp = IPPROTO_RAW; return 0; }
    04560 #endif
    04561 #ifdef IPPROTO_MAX
    04562         if (memcmp(str, "IPPROTO_MAX", 11) == 0) { *valp = IPPROTO_MAX; return 0; }
    04563 #endif
    04564         return -1;
    04565
    04566       case 12:
    04567 #ifdef IPPROTO_ICMP
    04568         if (memcmp(str, "IPPROTO_ICMP", 12) == 0) { *valp = IPPROTO_ICMP; return 0; }
    04569 #endif
    04570 #ifdef IPPROTO_IGMP
    04571         if (memcmp(str, "IPPROTO_IGMP", 12) == 0) { *valp = IPPROTO_IGMP; return 0; }
    04572 #endif
    04573 #ifdef IPPROTO_IPV6
    04574         if (memcmp(str, "IPPROTO_IPV6", 12) == 0) { *valp = IPPROTO_IPV6; return 0; }
    04575 #endif
    04576 #ifdef IPPROTO_NONE
    04577         if (memcmp(str, "IPPROTO_NONE", 12) == 0) { *valp = IPPROTO_NONE; return 0; }
    04578 #endif
    04579         return -1;
    04580
    04581       case 13:
    04582 #ifdef IPPROTO_HELLO
    04583         if (memcmp(str, "IPPROTO_HELLO", 13) == 0) { *valp = IPPROTO_HELLO; return 0; }
    04584 #endif
    04585         return -1;
    04586
    04587       case 14:
    04588 #ifdef IPPROTO_ICMPV6
    04589         if (memcmp(str, "IPPROTO_ICMPV6", 14) == 0) { *valp = IPPROTO_ICMPV6; return 0; }
    04590 #endif
    04591         return -1;
    04592
    04593       case 15:
    04594 #ifdef IPPROTO_DSTOPTS
    04595         if (memcmp(str, "IPPROTO_DSTOPTS", 15) == 0) { *valp = IPPROTO_DSTOPTS; return 0; }
    04596 #endif
    04597 #ifdef IPPROTO_HOPOPTS
    04598         if (memcmp(str, "IPPROTO_HOPOPTS", 15) == 0) { *valp = IPPROTO_HOPOPTS; return 0; }
    04599 #endif
    04600 #ifdef IPPROTO_ROUTING
    04601         if (memcmp(str, "IPPROTO_ROUTING", 15) == 0) { *valp = IPPROTO_ROUTING; return 0; }
    04602 #endif
    04603         return -1;
    04604
    04605       case 16:
    04606 #ifdef IPPROTO_FRAGMENT
    04607         if (memcmp(str, "IPPROTO_FRAGMENT", 16) == 0) { *valp = IPPROTO_FRAGMENT; return 0; }
    04608 #endif
    04609         return -1;
    04610
    04611       default:
    04612         return -1;
    04613     }
    04614 }
    04615
    04616
    04617 int
    04618 rsock_so_optname_to_int(const char *str, long len, int *valp)
    04619 {
    04620     switch (len) {
    04621       case 3:
    04622 #ifdef SO_NKE
    04623         if (memcmp(str, "NKE", 3) == 0) { *valp = SO_NKE; return 0; }
    04624 #endif
    04625         return -1;
    04626
    04627       case 4:
    04628 #ifdef SO_TYPE
    04629         if (memcmp(str, "TYPE", 4) == 0) { *valp = SO_TYPE; return 0; }
    04630 #endif
    04631         return -1;
    04632
    04633       case 5:
    04634 #ifdef SO_DEBUG
    04635         if (memcmp(str, "DEBUG", 5) == 0) { *valp = SO_DEBUG; return 0; }
    04636 #endif
    04637 #ifdef SO_ERROR
    04638         if (memcmp(str, "ERROR", 5) == 0) { *valp = SO_ERROR; return 0; }
    04639 #endif
    04640 #ifdef SO_NREAD
    04641         if (memcmp(str, "NREAD", 5) == 0) { *valp = SO_NREAD; return 0; }
    04642 #endif
    04643         return -1;
    04644
    04645       case 6:
    04646 #ifdef SO_NKE
    04647         if (memcmp(str, "SO_NKE", 6) == 0) { *valp = SO_NKE; return 0; }
    04648 #endif
    04649 #ifdef SO_SNDBUF
    04650         if (memcmp(str, "SNDBUF", 6) == 0) { *valp = SO_SNDBUF; return 0; }
    04651 #endif
    04652 #ifdef SO_RCVBUF
    04653         if (memcmp(str, "RCVBUF", 6) == 0) { *valp = SO_RCVBUF; return 0; }
    04654 #endif
    04655 #ifdef SO_LINGER
    04656         if (memcmp(str, "LINGER", 6) == 0) { *valp = SO_LINGER; return 0; }
    04657 #endif
    04658         return -1;
    04659
    04660       case 7:
    04661 #ifdef SO_TYPE
    04662         if (memcmp(str, "SO_TYPE", 7) == 0) { *valp = SO_TYPE; return 0; }
    04663 #endif
    04664 #ifdef SO_BINTIME
    04665         if (memcmp(str, "BINTIME", 7) == 0) { *valp = SO_BINTIME; return 0; }
    04666 #endif
    04667         return -1;
    04668
    04669       case 8:
    04670 #ifdef SO_DEBUG
    04671         if (memcmp(str, "SO_DEBUG", 8) == 0) { *valp = SO_DEBUG; return 0; }
    04672 #endif
    04673 #ifdef SO_ERROR
    04674         if (memcmp(str, "SO_ERROR", 8) == 0) { *valp = SO_ERROR; return 0; }
    04675 #endif
    04676 #ifdef SO_NREAD
    04677         if (memcmp(str, "SO_NREAD", 8) == 0) { *valp = SO_NREAD; return 0; }
    04678 #endif
    04679 #ifdef SO_NO_CHECK
    04680         if (memcmp(str, "NO_CHECK", 8) == 0) { *valp = SO_NO_CHECK; return 0; }
    04681 #endif
    04682 #ifdef SO_PRIORITY
    04683         if (memcmp(str, "PRIORITY", 8) == 0) { *valp = SO_PRIORITY; return 0; }
    04684 #endif
    04685 #ifdef SO_PASSCRED
    04686         if (memcmp(str, "PASSCRED", 8) == 0) { *valp = SO_PASSCRED; return 0; }
    04687 #endif
    04688 #ifdef SO_PEERCRED
    04689         if (memcmp(str, "PEERCRED", 8) == 0) { *valp = SO_PEERCRED; return 0; }
    04690 #endif
    04691 #ifdef SO_RCVLOWAT
    04692         if (memcmp(str, "RCVLOWAT", 8) == 0) { *valp = SO_RCVLOWAT; return 0; }
    04693 #endif
    04694 #ifdef SO_SNDLOWAT
    04695         if (memcmp(str, "SNDLOWAT", 8) == 0) { *valp = SO_SNDLOWAT; return 0; }
    04696 #endif
    04697 #ifdef SO_RCVTIMEO
    04698         if (memcmp(str, "RCVTIMEO", 8) == 0) { *valp = SO_RCVTIMEO; return 0; }
    04699 #endif
    04700 #ifdef SO_SNDTIMEO
    04701         if (memcmp(str, "SNDTIMEO", 8) == 0) { *valp = SO_SNDTIMEO; return 0; }
    04702 #endif
    04703 #ifdef SO_WANTMORE
    04704         if (memcmp(str, "WANTMORE", 8) == 0) { *valp = SO_WANTMORE; return 0; }
    04705 #endif
    04706 #ifdef SO_PEERNAME
    04707         if (memcmp(str, "PEERNAME", 8) == 0) { *valp = SO_PEERNAME; return 0; }
    04708 #endif
    04709 #ifdef SO_ALLZONES
    04710         if (memcmp(str, "ALLZONES", 8) == 0) { *valp = SO_ALLZONES; return 0; }
    04711 #endif
    04712         return -1;
    04713
    04714       case 9:
    04715 #ifdef SO_SNDBUF
    04716         if (memcmp(str, "SO_SNDBUF", 9) == 0) { *valp = SO_SNDBUF; return 0; }
    04717 #endif
    04718 #ifdef SO_RCVBUF
    04719         if (memcmp(str, "SO_RCVBUF", 9) == 0) { *valp = SO_RCVBUF; return 0; }
    04720 #endif
    04721 #ifdef SO_LINGER
    04722         if (memcmp(str, "SO_LINGER", 9) == 0) { *valp = SO_LINGER; return 0; }
    04723 #endif
    04724 #ifdef SO_REUSEADDR
    04725         if (memcmp(str, "REUSEADDR", 9) == 0) { *valp = SO_REUSEADDR; return 0; }
    04726 #endif
    04727 #ifdef SO_REUSEPORT
    04728         if (memcmp(str, "REUSEPORT", 9) == 0) { *valp = SO_REUSEPORT; return 0; }
    04729 #endif
    04730 #ifdef SO_DONTROUTE
    04731         if (memcmp(str, "DONTROUTE", 9) == 0) { *valp = SO_DONTROUTE; return 0; }
    04732 #endif
    04733 #ifdef SO_BROADCAST
    04734         if (memcmp(str, "BROADCAST", 9) == 0) { *valp = SO_BROADCAST; return 0; }
    04735 #endif
    04736 #ifdef SO_KEEPALIVE
    04737         if (memcmp(str, "KEEPALIVE", 9) == 0) { *valp = SO_KEEPALIVE; return 0; }
    04738 #endif
    04739 #ifdef SO_OOBINLINE
    04740         if (memcmp(str, "OOBINLINE", 9) == 0) { *valp = SO_OOBINLINE; return 0; }
    04741 #endif
    04742 #ifdef SO_DONTTRUNC
    04743         if (memcmp(str, "DONTTRUNC", 9) == 0) { *valp = SO_DONTTRUNC; return 0; }
    04744 #endif
    04745 #ifdef SO_NOSIGPIPE
    04746         if (memcmp(str, "NOSIGPIPE", 9) == 0) { *valp = SO_NOSIGPIPE; return 0; }
    04747 #endif
    04748 #ifdef SO_TIMESTAMP
    04749         if (memcmp(str, "TIMESTAMP", 9) == 0) { *valp = SO_TIMESTAMP; return 0; }
    04750 #endif
    04751 #ifdef SO_RECVUCRED
    04752         if (memcmp(str, "RECVUCRED", 9) == 0) { *valp = SO_RECVUCRED; return 0; }
    04753 #endif
    04754         return -1;
    04755
    04756       case 10:
    04757 #ifdef SO_BINTIME
    04758         if (memcmp(str, "SO_BINTIME", 10) == 0) { *valp = SO_BINTIME; return 0; }
    04759 #endif
    04760 #ifdef SO_ACCEPTCONN
    04761         if (memcmp(str, "ACCEPTCONN", 10) == 0) { *valp = SO_ACCEPTCONN; return 0; }
    04762 #endif
    04763 #ifdef SO_MAC_EXEMPT
    04764         if (memcmp(str, "MAC_EXEMPT", 10) == 0) { *valp = SO_MAC_EXEMPT; return 0; }
    04765 #endif
    04766         return -1;
    04767
    04768       case 11:
    04769 #ifdef SO_NO_CHECK
    04770         if (memcmp(str, "SO_NO_CHECK", 11) == 0) { *valp = SO_NO_CHECK; return 0; }
    04771 #endif
    04772 #ifdef SO_PRIORITY
    04773         if (memcmp(str, "SO_PRIORITY", 11) == 0) { *valp = SO_PRIORITY; return 0; }
    04774 #endif
    04775 #ifdef SO_PASSCRED
    04776         if (memcmp(str, "SO_PASSCRED", 11) == 0) { *valp = SO_PASSCRED; return 0; }
    04777 #endif
    04778 #ifdef SO_PEERCRED
    04779         if (memcmp(str, "SO_PEERCRED", 11) == 0) { *valp = SO_PEERCRED; return 0; }
    04780 #endif
    04781 #ifdef SO_RCVLOWAT
    04782         if (memcmp(str, "SO_RCVLOWAT", 11) == 0) { *valp = SO_RCVLOWAT; return 0; }
    04783 #endif
    04784 #ifdef SO_SNDLOWAT
    04785         if (memcmp(str, "SO_SNDLOWAT", 11) == 0) { *valp = SO_SNDLOWAT; return 0; }
    04786 #endif
    04787 #ifdef SO_RCVTIMEO
    04788         if (memcmp(str, "SO_RCVTIMEO", 11) == 0) { *valp = SO_RCVTIMEO; return 0; }
    04789 #endif
    04790 #ifdef SO_SNDTIMEO
    04791         if (memcmp(str, "SO_SNDTIMEO", 11) == 0) { *valp = SO_SNDTIMEO; return 0; }
    04792 #endif
    04793 #ifdef SO_WANTMORE
    04794         if (memcmp(str, "SO_WANTMORE", 11) == 0) { *valp = SO_WANTMORE; return 0; }
    04795 #endif
    04796 #ifdef SO_PEERNAME
    04797         if (memcmp(str, "SO_PEERNAME", 11) == 0) { *valp = SO_PEERNAME; return 0; }
    04798 #endif
    04799 #ifdef SO_ALLZONES
    04800         if (memcmp(str, "SO_ALLZONES", 11) == 0) { *valp = SO_ALLZONES; return 0; }
    04801 #endif
    04802 #ifdef SO_USELOOPBACK
    04803         if (memcmp(str, "USELOOPBACK", 11) == 0) { *valp = SO_USELOOPBACK; return 0; }
    04804 #endif
    04805 #ifdef SO_WANTOOBFLAG
    04806         if (memcmp(str, "WANTOOBFLAG", 11) == 0) { *valp = SO_WANTOOBFLAG; return 0; }
    04807 #endif
    04808 #ifdef SO_TIMESTAMPNS
    04809         if (memcmp(str, "TIMESTAMPNS", 11) == 0) { *valp = SO_TIMESTAMPNS; return 0; }
    04810 #endif
    04811         return -1;
    04812
    04813       case 12:
    04814 #ifdef SO_REUSEADDR
    04815         if (memcmp(str, "SO_REUSEADDR", 12) == 0) { *valp = SO_REUSEADDR; return 0; }
    04816 #endif
    04817 #ifdef SO_REUSEPORT
    04818         if (memcmp(str, "SO_REUSEPORT", 12) == 0) { *valp = SO_REUSEPORT; return 0; }
    04819 #endif
    04820 #ifdef SO_DONTROUTE
    04821         if (memcmp(str, "SO_DONTROUTE", 12) == 0) { *valp = SO_DONTROUTE; return 0; }
    04822 #endif
    04823 #ifdef SO_BROADCAST
    04824         if (memcmp(str, "SO_BROADCAST", 12) == 0) { *valp = SO_BROADCAST; return 0; }
    04825 #endif
    04826 #ifdef SO_KEEPALIVE
    04827         if (memcmp(str, "SO_KEEPALIVE", 12) == 0) { *valp = SO_KEEPALIVE; return 0; }
    04828 #endif
    04829 #ifdef SO_OOBINLINE
    04830         if (memcmp(str, "SO_OOBINLINE", 12) == 0) { *valp = SO_OOBINLINE; return 0; }
    04831 #endif
    04832 #ifdef SO_DONTTRUNC
    04833         if (memcmp(str, "SO_DONTTRUNC", 12) == 0) { *valp = SO_DONTTRUNC; return 0; }
    04834 #endif
    04835 #ifdef SO_NOSIGPIPE
    04836         if (memcmp(str, "SO_NOSIGPIPE", 12) == 0) { *valp = SO_NOSIGPIPE; return 0; }
    04837 #endif
    04838 #ifdef SO_TIMESTAMP
    04839         if (memcmp(str, "SO_TIMESTAMP", 12) == 0) { *valp = SO_TIMESTAMP; return 0; }
    04840 #endif
    04841 #ifdef SO_RECVUCRED
    04842         if (memcmp(str, "SO_RECVUCRED", 12) == 0) { *valp = SO_RECVUCRED; return 0; }
    04843 #endif
    04844 #ifdef SO_ACCEPTFILTER
    04845         if (memcmp(str, "ACCEPTFILTER", 12) == 0) { *valp = SO_ACCEPTFILTER; return 0; }
    04846 #endif
    04847 #ifdef SO_BINDTODEVICE
    04848         if (memcmp(str, "BINDTODEVICE", 12) == 0) { *valp = SO_BINDTODEVICE; return 0; }
    04849 #endif
    04850         return -1;
    04851
    04852       case 13:
    04853 #ifdef SO_ACCEPTCONN
    04854         if (memcmp(str, "SO_ACCEPTCONN", 13) == 0) { *valp = SO_ACCEPTCONN; return 0; }
    04855 #endif
    04856 #ifdef SO_MAC_EXEMPT
    04857         if (memcmp(str, "SO_MAC_EXEMPT", 13) == 0) { *valp = SO_MAC_EXEMPT; return 0; }
    04858 #endif
    04859 #ifdef SO_ATTACH_FILTER
    04860         if (memcmp(str, "ATTACH_FILTER", 13) == 0) { *valp = SO_ATTACH_FILTER; return 0; }
    04861 #endif
    04862 #ifdef SO_DETACH_FILTER
    04863         if (memcmp(str, "DETACH_FILTER", 13) == 0) { *valp = SO_DETACH_FILTER; return 0; }
    04864 #endif
    04865         return -1;
    04866
    04867       case 14:
    04868 #ifdef SO_USELOOPBACK
    04869         if (memcmp(str, "SO_USELOOPBACK", 14) == 0) { *valp = SO_USELOOPBACK; return 0; }
    04870 #endif
    04871 #ifdef SO_WANTOOBFLAG
    04872         if (memcmp(str, "SO_WANTOOBFLAG", 14) == 0) { *valp = SO_WANTOOBFLAG; return 0; }
    04873 #endif
    04874 #ifdef SO_TIMESTAMPNS
    04875         if (memcmp(str, "SO_TIMESTAMPNS", 14) == 0) { *valp = SO_TIMESTAMPNS; return 0; }
    04876 #endif
    04877         return -1;
    04878
    04879       case 15:
    04880 #ifdef SO_ACCEPTFILTER
    04881         if (memcmp(str, "SO_ACCEPTFILTER", 15) == 0) { *valp = SO_ACCEPTFILTER; return 0; }
    04882 #endif
    04883 #ifdef SO_BINDTODEVICE
    04884         if (memcmp(str, "SO_BINDTODEVICE", 15) == 0) { *valp = SO_BINDTODEVICE; return 0; }
    04885 #endif
    04886         return -1;
    04887
    04888       case 16:
    04889 #ifdef SO_ATTACH_FILTER
    04890         if (memcmp(str, "SO_ATTACH_FILTER", 16) == 0) { *valp = SO_ATTACH_FILTER; return 0; }
    04891 #endif
    04892 #ifdef SO_DETACH_FILTER
    04893         if (memcmp(str, "SO_DETACH_FILTER", 16) == 0) { *valp = SO_DETACH_FILTER; return 0; }
    04894 #endif
    04895         return -1;
    04896
    04897       case 23:
    04898 #ifdef SO_SECURITY_AUTHENTICATION
    04899         if (memcmp(str, "SECURITY_AUTHENTICATION", 23) == 0) { *valp = SO_SECURITY_AUTHENTICATION; return 0; }
    04900 #endif
    04901         return -1;
    04902
    04903       case 26:
    04904 #ifdef SO_SECURITY_AUTHENTICATION
    04905         if (memcmp(str, "SO_SECURITY_AUTHENTICATION", 26) == 0) { *valp = SO_SECURITY_AUTHENTICATION; return 0; }
    04906 #endif
    04907         return -1;
    04908
    04909       case 27:
    04910 #ifdef SO_SECURITY_ENCRYPTION_NETWORK
    04911         if (memcmp(str, "SECURITY_ENCRYPTION_NETWORK", 27) == 0) { *valp = SO_SECURITY_ENCRYPTION_NETWORK; return 0; }
    04912 #endif
    04913         return -1;
    04914
    04915       case 29:
    04916 #ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
    04917         if (memcmp(str, "SECURITY_ENCRYPTION_TRANSPORT", 29) == 0) { *valp = SO_SECURITY_ENCRYPTION_TRANSPORT; return 0; }
    04918 #endif
    04919         return -1;
    04920
    04921       case 30:
    04922 #ifdef SO_SECURITY_ENCRYPTION_NETWORK
    04923         if (memcmp(str, "SO_SECURITY_ENCRYPTION_NETWORK", 30) == 0) { *valp = SO_SECURITY_ENCRYPTION_NETWORK; return 0; }
    04924 #endif
    04925         return -1;
    04926
    04927       case 32:
    04928 #ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
    04929         if (memcmp(str, "SO_SECURITY_ENCRYPTION_TRANSPORT", 32) == 0) { *valp = SO_SECURITY_ENCRYPTION_TRANSPORT; return 0; }
    04930 #endif
    04931         return -1;
    04932
    04933       default:
    04934         return -1;
    04935     }
    04936 }
    04937
    04938
    04939 int
    04940 rsock_ip_optname_to_int(const char *str, long len, int *valp)
    04941 {
    04942     switch (len) {
    04943       case 3:
    04944 #ifdef IP_TOS
    04945         if (memcmp(str, "TOS", 3) == 0) { *valp = IP_TOS; return 0; }
    04946 #endif
    04947 #ifdef IP_TTL
    04948         if (memcmp(str, "TTL", 3) == 0) { *valp = IP_TTL; return 0; }
    04949 #endif
    04950 #ifdef IP_MTU
    04951         if (memcmp(str, "MTU", 3) == 0) { *valp = IP_MTU; return 0; }
    04952 #endif
    04953         return -1;
    04954
    04955       case 6:
    04956 #ifdef IP_TOS
    04957         if (memcmp(str, "IP_TOS", 6) == 0) { *valp = IP_TOS; return 0; }
    04958 #endif
    04959 #ifdef IP_TTL
    04960         if (memcmp(str, "IP_TTL", 6) == 0) { *valp = IP_TTL; return 0; }
    04961 #endif
    04962 #ifdef IP_MTU
    04963         if (memcmp(str, "IP_MTU", 6) == 0) { *valp = IP_MTU; return 0; }
    04964 #endif
    04965 #ifdef IP_MINTTL
    04966         if (memcmp(str, "MINTTL", 6) == 0) { *valp = IP_MINTTL; return 0; }
    04967 #endif
    04968 #ifdef IP_RECVIF
    04969         if (memcmp(str, "RECVIF", 6) == 0) { *valp = IP_RECVIF; return 0; }
    04970 #endif
    04971         return -1;
    04972
    04973       case 7:
    04974 #ifdef IP_OPTIONS
    04975         if (memcmp(str, "OPTIONS", 7) == 0) { *valp = IP_OPTIONS; return 0; }
    04976 #endif
    04977 #ifdef IP_HDRINCL
    04978         if (memcmp(str, "HDRINCL", 7) == 0) { *valp = IP_HDRINCL; return 0; }
    04979 #endif
    04980 #ifdef IP_RETOPTS
    04981         if (memcmp(str, "RETOPTS", 7) == 0) { *valp = IP_RETOPTS; return 0; }
    04982 #endif
    04983 #ifdef IP_RECVTTL
    04984         if (memcmp(str, "RECVTTL", 7) == 0) { *valp = IP_RECVTTL; return 0; }
    04985 #endif
    04986 #ifdef IP_PKTINFO
    04987         if (memcmp(str, "PKTINFO", 7) == 0) { *valp = IP_PKTINFO; return 0; }
    04988 #endif
    04989 #ifdef IP_RECVERR
    04990         if (memcmp(str, "RECVERR", 7) == 0) { *valp = IP_RECVERR; return 0; }
    04991 #endif
    04992 #ifdef IP_RECVTOS
    04993         if (memcmp(str, "RECVTOS", 7) == 0) { *valp = IP_RECVTOS; return 0; }
    04994 #endif
    04995 #ifdef IP_PASSSEC
    04996         if (memcmp(str, "PASSSEC", 7) == 0) { *valp = IP_PASSSEC; return 0; }
    04997 #endif
    04998         return -1;
    04999
    05000       case 8:
    05001 #ifdef IP_RECVOPTS
    05002         if (memcmp(str, "RECVOPTS", 8) == 0) { *valp = IP_RECVOPTS; return 0; }
    05003 #endif
    05004 #ifdef IP_DONTFRAG
    05005         if (memcmp(str, "DONTFRAG", 8) == 0) { *valp = IP_DONTFRAG; return 0; }
    05006 #endif
    05007 #ifdef IP_RECVSLLA
    05008         if (memcmp(str, "RECVSLLA", 8) == 0) { *valp = IP_RECVSLLA; return 0; }
    05009 #endif
    05010 #ifdef IP_FREEBIND
    05011         if (memcmp(str, "FREEBIND", 8) == 0) { *valp = IP_FREEBIND; return 0; }
    05012 #endif
    05013 #ifdef IP_MSFILTER
    05014         if (memcmp(str, "MSFILTER", 8) == 0) { *valp = IP_MSFILTER; return 0; }
    05015 #endif
    05016         return -1;
    05017
    05018       case 9:
    05019 #ifdef IP_MINTTL
    05020         if (memcmp(str, "IP_MINTTL", 9) == 0) { *valp = IP_MINTTL; return 0; }
    05021 #endif
    05022 #ifdef IP_RECVIF
    05023         if (memcmp(str, "IP_RECVIF", 9) == 0) { *valp = IP_RECVIF; return 0; }
    05024 #endif
    05025 #ifdef IP_ONESBCAST
    05026         if (memcmp(str, "ONESBCAST", 9) == 0) { *valp = IP_ONESBCAST; return 0; }
    05027 #endif
    05028 #ifdef IP_PORTRANGE
    05029         if (memcmp(str, "PORTRANGE", 9) == 0) { *valp = IP_PORTRANGE; return 0; }
    05030 #endif
    05031         return -1;
    05032
    05033       case 10:
    05034 #ifdef IP_OPTIONS
    05035         if (memcmp(str, "IP_OPTIONS", 10) == 0) { *valp = IP_OPTIONS; return 0; }
    05036 #endif
    05037 #ifdef IP_HDRINCL
    05038         if (memcmp(str, "IP_HDRINCL", 10) == 0) { *valp = IP_HDRINCL; return 0; }
    05039 #endif
    05040 #ifdef IP_RETOPTS
    05041         if (memcmp(str, "IP_RETOPTS", 10) == 0) { *valp = IP_RETOPTS; return 0; }
    05042 #endif
    05043 #ifdef IP_RECVTTL
    05044         if (memcmp(str, "IP_RECVTTL", 10) == 0) { *valp = IP_RECVTTL; return 0; }
    05045 #endif
    05046 #ifdef IP_PKTINFO
    05047         if (memcmp(str, "IP_PKTINFO", 10) == 0) { *valp = IP_PKTINFO; return 0; }
    05048 #endif
    05049 #ifdef IP_RECVERR
    05050         if (memcmp(str, "IP_RECVERR", 10) == 0) { *valp = IP_RECVERR; return 0; }
    05051 #endif
    05052 #ifdef IP_RECVTOS
    05053         if (memcmp(str, "IP_RECVTOS", 10) == 0) { *valp = IP_RECVTOS; return 0; }
    05054 #endif
    05055 #ifdef IP_PASSSEC
    05056         if (memcmp(str, "IP_PASSSEC", 10) == 0) { *valp = IP_PASSSEC; return 0; }
    05057 #endif
    05058 #ifdef IP_PKTOPTIONS
    05059         if (memcmp(str, "PKTOPTIONS", 10) == 0) { *valp = IP_PKTOPTIONS; return 0; }
    05060 #endif
    05061         return -1;
    05062
    05063       case 11:
    05064 #ifdef IP_RECVOPTS
    05065         if (memcmp(str, "IP_RECVOPTS", 11) == 0) { *valp = IP_RECVOPTS; return 0; }
    05066 #endif
    05067 #ifdef IP_DONTFRAG
    05068         if (memcmp(str, "IP_DONTFRAG", 11) == 0) { *valp = IP_DONTFRAG; return 0; }
    05069 #endif
    05070 #ifdef IP_RECVSLLA
    05071         if (memcmp(str, "IP_RECVSLLA", 11) == 0) { *valp = IP_RECVSLLA; return 0; }
    05072 #endif
    05073 #ifdef IP_FREEBIND
    05074         if (memcmp(str, "IP_FREEBIND", 11) == 0) { *valp = IP_FREEBIND; return 0; }
    05075 #endif
    05076 #ifdef IP_MSFILTER
    05077         if (memcmp(str, "IP_MSFILTER", 11) == 0) { *valp = IP_MSFILTER; return 0; }
    05078 #endif
    05079 #ifdef IP_RECVRETOPTS
    05080         if (memcmp(str, "RECVRETOPTS", 11) == 0) { *valp = IP_RECVRETOPTS; return 0; }
    05081 #endif
    05082 #ifdef IP_RECVDSTADDR
    05083         if (memcmp(str, "RECVDSTADDR", 11) == 0) { *valp = IP_RECVDSTADDR; return 0; }
    05084 #endif
    05085 #ifdef IP_SENDSRCADDR
    05086         if (memcmp(str, "SENDSRCADDR", 11) == 0) { *valp = IP_SENDSRCADDR; return 0; }
    05087 #endif
    05088 #ifdef IP_XFRM_POLICY
    05089         if (memcmp(str, "XFRM_POLICY", 11) == 0) { *valp = IP_XFRM_POLICY; return 0; }
    05090 #endif
    05091 #ifdef IP_PMTUDISC_DO
    05092         if (memcmp(str, "PMTUDISC_DO", 11) == 0) { *valp = IP_PMTUDISC_DO; return 0; }
    05093 #endif
    05094         return -1;
    05095
    05096       case 12:
    05097 #ifdef IP_ONESBCAST
    05098         if (memcmp(str, "IP_ONESBCAST", 12) == 0) { *valp = IP_ONESBCAST; return 0; }
    05099 #endif
    05100 #ifdef IP_PORTRANGE
    05101         if (memcmp(str, "IP_PORTRANGE", 12) == 0) { *valp = IP_PORTRANGE; return 0; }
    05102 #endif
    05103 #ifdef IP_MULTICAST_IF
    05104         if (memcmp(str, "MULTICAST_IF", 12) == 0) { *valp = IP_MULTICAST_IF; return 0; }
    05105 #endif
    05106 #ifdef IP_ROUTER_ALERT
    05107         if (memcmp(str, "ROUTER_ALERT", 12) == 0) { *valp = IP_ROUTER_ALERT; return 0; }
    05108 #endif
    05109 #ifdef IP_MTU_DISCOVER
    05110         if (memcmp(str, "MTU_DISCOVER", 12) == 0) { *valp = IP_MTU_DISCOVER; return 0; }
    05111 #endif
    05112 #ifdef IP_IPSEC_POLICY
    05113         if (memcmp(str, "IPSEC_POLICY", 12) == 0) { *valp = IP_IPSEC_POLICY; return 0; }
    05114 #endif
    05115 #ifdef IP_BLOCK_SOURCE
    05116         if (memcmp(str, "BLOCK_SOURCE", 12) == 0) { *valp = IP_BLOCK_SOURCE; return 0; }
    05117 #endif
    05118         return -1;
    05119
    05120       case 13:
    05121 #ifdef IP_PKTOPTIONS
    05122         if (memcmp(str, "IP_PKTOPTIONS", 13) == 0) { *valp = IP_PKTOPTIONS; return 0; }
    05123 #endif
    05124 #ifdef IP_MULTICAST_TTL
    05125         if (memcmp(str, "MULTICAST_TTL", 13) == 0) { *valp = IP_MULTICAST_TTL; return 0; }
    05126 #endif
    05127 #ifdef IP_PMTUDISC_DONT
    05128         if (memcmp(str, "PMTUDISC_DONT", 13) == 0) { *valp = IP_PMTUDISC_DONT; return 0; }
    05129 #endif
    05130 #ifdef IP_PMTUDISC_WANT
    05131         if (memcmp(str, "PMTUDISC_WANT", 13) == 0) { *valp = IP_PMTUDISC_WANT; return 0; }
    05132 #endif
    05133         return -1;
    05134
    05135       case 14:
    05136 #ifdef IP_RECVRETOPTS
    05137         if (memcmp(str, "IP_RECVRETOPTS", 14) == 0) { *valp = IP_RECVRETOPTS; return 0; }
    05138 #endif
    05139 #ifdef IP_RECVDSTADDR
    05140         if (memcmp(str, "IP_RECVDSTADDR", 14) == 0) { *valp = IP_RECVDSTADDR; return 0; }
    05141 #endif
    05142 #ifdef IP_SENDSRCADDR
    05143         if (memcmp(str, "IP_SENDSRCADDR", 14) == 0) { *valp = IP_SENDSRCADDR; return 0; }
    05144 #endif
    05145 #ifdef IP_XFRM_POLICY
    05146         if (memcmp(str, "IP_XFRM_POLICY", 14) == 0) { *valp = IP_XFRM_POLICY; return 0; }
    05147 #endif
    05148 #ifdef IP_PMTUDISC_DO
    05149         if (memcmp(str, "IP_PMTUDISC_DO", 14) == 0) { *valp = IP_PMTUDISC_DO; return 0; }
    05150 #endif
    05151 #ifdef IP_MULTICAST_LOOP
    05152         if (memcmp(str, "MULTICAST_LOOP", 14) == 0) { *valp = IP_MULTICAST_LOOP; return 0; }
    05153 #endif
    05154 #ifdef IP_ADD_MEMBERSHIP
    05155         if (memcmp(str, "ADD_MEMBERSHIP", 14) == 0) { *valp = IP_ADD_MEMBERSHIP; return 0; }
    05156 #endif
    05157 #ifdef IP_UNBLOCK_SOURCE
    05158         if (memcmp(str, "UNBLOCK_SOURCE", 14) == 0) { *valp = IP_UNBLOCK_SOURCE; return 0; }
    05159 #endif
    05160         return -1;
    05161
    05162       case 15:
    05163 #ifdef IP_MULTICAST_IF
    05164         if (memcmp(str, "IP_MULTICAST_IF", 15) == 0) { *valp = IP_MULTICAST_IF; return 0; }
    05165 #endif
    05166 #ifdef IP_ROUTER_ALERT
    05167         if (memcmp(str, "IP_ROUTER_ALERT", 15) == 0) { *valp = IP_ROUTER_ALERT; return 0; }
    05168 #endif
    05169 #ifdef IP_MTU_DISCOVER
    05170         if (memcmp(str, "IP_MTU_DISCOVER", 15) == 0) { *valp = IP_MTU_DISCOVER; return 0; }
    05171 #endif
    05172 #ifdef IP_IPSEC_POLICY
    05173         if (memcmp(str, "IP_IPSEC_POLICY", 15) == 0) { *valp = IP_IPSEC_POLICY; return 0; }
    05174 #endif
    05175 #ifdef IP_BLOCK_SOURCE
    05176         if (memcmp(str, "IP_BLOCK_SOURCE", 15) == 0) { *valp = IP_BLOCK_SOURCE; return 0; }
    05177 #endif
    05178 #ifdef IP_DROP_MEMBERSHIP
    05179         if (memcmp(str, "DROP_MEMBERSHIP", 15) == 0) { *valp = IP_DROP_MEMBERSHIP; return 0; }
    05180 #endif
    05181 #ifdef IP_MAX_MEMBERSHIPS
    05182         if (memcmp(str, "MAX_MEMBERSHIPS", 15) == 0) { *valp = IP_MAX_MEMBERSHIPS; return 0; }
    05183 #endif
    05184         return -1;
    05185
    05186       case 16:
    05187 #ifdef IP_MULTICAST_TTL
    05188         if (memcmp(str, "IP_MULTICAST_TTL", 16) == 0) { *valp = IP_MULTICAST_TTL; return 0; }
    05189 #endif
    05190 #ifdef IP_PMTUDISC_DONT
    05191         if (memcmp(str, "IP_PMTUDISC_DONT", 16) == 0) { *valp = IP_PMTUDISC_DONT; return 0; }
    05192 #endif
    05193 #ifdef IP_PMTUDISC_WANT
    05194         if (memcmp(str, "IP_PMTUDISC_WANT", 16) == 0) { *valp = IP_PMTUDISC_WANT; return 0; }
    05195 #endif
    05196         return -1;
    05197
    05198       case 17:
    05199 #ifdef IP_MULTICAST_LOOP
    05200         if (memcmp(str, "IP_MULTICAST_LOOP", 17) == 0) { *valp = IP_MULTICAST_LOOP; return 0; }
    05201 #endif
    05202 #ifdef IP_ADD_MEMBERSHIP
    05203         if (memcmp(str, "IP_ADD_MEMBERSHIP", 17) == 0) { *valp = IP_ADD_MEMBERSHIP; return 0; }
    05204 #endif
    05205 #ifdef IP_UNBLOCK_SOURCE
    05206         if (memcmp(str, "IP_UNBLOCK_SOURCE", 17) == 0) { *valp = IP_UNBLOCK_SOURCE; return 0; }
    05207 #endif
    05208         return -1;
    05209
    05210       case 18:
    05211 #ifdef IP_DROP_MEMBERSHIP
    05212         if (memcmp(str, "IP_DROP_MEMBERSHIP", 18) == 0) { *valp = IP_DROP_MEMBERSHIP; return 0; }
    05213 #endif
    05214 #ifdef IP_MAX_MEMBERSHIPS
    05215         if (memcmp(str, "IP_MAX_MEMBERSHIPS", 18) == 0) { *valp = IP_MAX_MEMBERSHIPS; return 0; }
    05216 #endif
    05217         return -1;
    05218
    05219       case 21:
    05220 #ifdef IP_DEFAULT_MULTICAST_TTL
    05221         if (memcmp(str, "DEFAULT_MULTICAST_TTL", 21) == 0) { *valp = IP_DEFAULT_MULTICAST_TTL; return 0; }
    05222 #endif
    05223 #ifdef IP_ADD_SOURCE_MEMBERSHIP
    05224         if (memcmp(str, "ADD_SOURCE_MEMBERSHIP", 21) == 0) { *valp = IP_ADD_SOURCE_MEMBERSHIP; return 0; }
    05225 #endif
    05226         return -1;
    05227
    05228       case 22:
    05229 #ifdef IP_DEFAULT_MULTICAST_LOOP
    05230         if (memcmp(str, "DEFAULT_MULTICAST_LOOP", 22) == 0) { *valp = IP_DEFAULT_MULTICAST_LOOP; return 0; }
    05231 #endif
    05232 #ifdef IP_DROP_SOURCE_MEMBERSHIP
    05233         if (memcmp(str, "DROP_SOURCE_MEMBERSHIP", 22) == 0) { *valp = IP_DROP_SOURCE_MEMBERSHIP; return 0; }
    05234 #endif
    05235         return -1;
    05236
    05237       case 24:
    05238 #ifdef IP_DEFAULT_MULTICAST_TTL
    05239         if (memcmp(str, "IP_DEFAULT_MULTICAST_TTL", 24) == 0) { *valp = IP_DEFAULT_MULTICAST_TTL; return 0; }
    05240 #endif
    05241 #ifdef IP_ADD_SOURCE_MEMBERSHIP
    05242         if (memcmp(str, "IP_ADD_SOURCE_MEMBERSHIP", 24) == 0) { *valp = IP_ADD_SOURCE_MEMBERSHIP; return 0; }
    05243 #endif
    05244         return -1;
    05245
    05246       case 25:
    05247 #ifdef IP_DEFAULT_MULTICAST_LOOP
    05248         if (memcmp(str, "IP_DEFAULT_MULTICAST_LOOP", 25) == 0) { *valp = IP_DEFAULT_MULTICAST_LOOP; return 0; }
    05249 #endif
    05250 #ifdef IP_DROP_SOURCE_MEMBERSHIP
    05251         if (memcmp(str, "IP_DROP_SOURCE_MEMBERSHIP", 25) == 0) { *valp = IP_DROP_SOURCE_MEMBERSHIP; return 0; }
    05252 #endif
    05253         return -1;
    05254
    05255       default:
    05256         return -1;
    05257     }
    05258 }
    05259
    05260
    05261 #ifdef IPPROTO_IPV6
    05262 int
    05263 rsock_ipv6_optname_to_int(const char *str, long len, int *valp)
    05264 {
    05265     switch (len) {
    05266       case 5:
    05267 #ifdef IPV6_RTHDR
    05268         if (memcmp(str, "RTHDR", 5) == 0) { *valp = IPV6_RTHDR; return 0; }
    05269 #endif
    05270         return -1;
    05271
    05272       case 6:
    05273 #ifdef IPV6_V6ONLY
    05274         if (memcmp(str, "V6ONLY", 6) == 0) { *valp = IPV6_V6ONLY; return 0; }
    05275 #endif
    05276 #ifdef IPV6_TCLASS
    05277         if (memcmp(str, "TCLASS", 6) == 0) { *valp = IPV6_TCLASS; return 0; }
    05278 #endif
    05279         return -1;
    05280
    05281       case 7:
    05282 #ifdef IPV6_DSTOPTS
    05283         if (memcmp(str, "DSTOPTS", 7) == 0) { *valp = IPV6_DSTOPTS; return 0; }
    05284 #endif
    05285 #ifdef IPV6_HOPOPTS
    05286         if (memcmp(str, "HOPOPTS", 7) == 0) { *valp = IPV6_HOPOPTS; return 0; }
    05287 #endif
    05288 #ifdef IPV6_NEXTHOP
    05289         if (memcmp(str, "NEXTHOP", 7) == 0) { *valp = IPV6_NEXTHOP; return 0; }
    05290 #endif
    05291 #ifdef IPV6_PATHMTU
    05292         if (memcmp(str, "PATHMTU", 7) == 0) { *valp = IPV6_PATHMTU; return 0; }
    05293 #endif
    05294 #ifdef IPV6_PKTINFO
    05295         if (memcmp(str, "PKTINFO", 7) == 0) { *valp = IPV6_PKTINFO; return 0; }
    05296 #endif
    05297         return -1;
    05298
    05299       case 8:
    05300 #ifdef IPV6_CHECKSUM
    05301         if (memcmp(str, "CHECKSUM", 8) == 0) { *valp = IPV6_CHECKSUM; return 0; }
    05302 #endif
    05303 #ifdef IPV6_DONTFRAG
    05304         if (memcmp(str, "DONTFRAG", 8) == 0) { *valp = IPV6_DONTFRAG; return 0; }
    05305 #endif
    05306 #ifdef IPV6_HOPLIMIT
    05307         if (memcmp(str, "HOPLIMIT", 8) == 0) { *valp = IPV6_HOPLIMIT; return 0; }
    05308 #endif
    05309         return -1;
    05310
    05311       case 9:
    05312 #ifdef IPV6_RECVRTHDR
    05313         if (memcmp(str, "RECVRTHDR", 9) == 0) { *valp = IPV6_RECVRTHDR; return 0; }
    05314 #endif
    05315         return -1;
    05316
    05317       case 10:
    05318 #ifdef IPV6_RTHDR
    05319         if (memcmp(str, "IPV6_RTHDR", 10) == 0) { *valp = IPV6_RTHDR; return 0; }
    05320 #endif
    05321 #ifdef IPV6_JOIN_GROUP
    05322         if (memcmp(str, "JOIN_GROUP", 10) == 0) { *valp = IPV6_JOIN_GROUP; return 0; }
    05323 #endif
    05324 #ifdef IPV6_RECVTCLASS
    05325         if (memcmp(str, "RECVTCLASS", 10) == 0) { *valp = IPV6_RECVTCLASS; return 0; }
    05326 #endif
    05327         return -1;
    05328
    05329       case 11:
    05330 #ifdef IPV6_V6ONLY
    05331         if (memcmp(str, "IPV6_V6ONLY", 11) == 0) { *valp = IPV6_V6ONLY; return 0; }
    05332 #endif
    05333 #ifdef IPV6_TCLASS
    05334         if (memcmp(str, "IPV6_TCLASS", 11) == 0) { *valp = IPV6_TCLASS; return 0; }
    05335 #endif
    05336 #ifdef IPV6_LEAVE_GROUP
    05337         if (memcmp(str, "LEAVE_GROUP", 11) == 0) { *valp = IPV6_LEAVE_GROUP; return 0; }
    05338 #endif
    05339 #ifdef IPV6_RECVDSTOPTS
    05340         if (memcmp(str, "RECVDSTOPTS", 11) == 0) { *valp = IPV6_RECVDSTOPTS; return 0; }
    05341 #endif
    05342 #ifdef IPV6_RECVHOPOPTS
    05343         if (memcmp(str, "RECVHOPOPTS", 11) == 0) { *valp = IPV6_RECVHOPOPTS; return 0; }
    05344 #endif
    05345 #ifdef IPV6_RECVPKTINFO
    05346         if (memcmp(str, "RECVPKTINFO", 11) == 0) { *valp = IPV6_RECVPKTINFO; return 0; }
    05347 #endif
    05348 #ifdef IPV6_RECVPATHMTU
    05349         if (memcmp(str, "RECVPATHMTU", 11) == 0) { *valp = IPV6_RECVPATHMTU; return 0; }
    05350 #endif
    05351 #ifdef IPV6_USE_MIN_MTU
    05352         if (memcmp(str, "USE_MIN_MTU", 11) == 0) { *valp = IPV6_USE_MIN_MTU; return 0; }
    05353 #endif
    05354         return -1;
    05355
    05356       case 12:
    05357 #ifdef IPV6_DSTOPTS
    05358         if (memcmp(str, "IPV6_DSTOPTS", 12) == 0) { *valp = IPV6_DSTOPTS; return 0; }
    05359 #endif
    05360 #ifdef IPV6_HOPOPTS
    05361         if (memcmp(str, "IPV6_HOPOPTS", 12) == 0) { *valp = IPV6_HOPOPTS; return 0; }
    05362 #endif
    05363 #ifdef IPV6_NEXTHOP
    05364         if (memcmp(str, "IPV6_NEXTHOP", 12) == 0) { *valp = IPV6_NEXTHOP; return 0; }
    05365 #endif
    05366 #ifdef IPV6_PATHMTU
    05367         if (memcmp(str, "IPV6_PATHMTU", 12) == 0) { *valp = IPV6_PATHMTU; return 0; }
    05368 #endif
    05369 #ifdef IPV6_PKTINFO
    05370         if (memcmp(str, "IPV6_PKTINFO", 12) == 0) { *valp = IPV6_PKTINFO; return 0; }
    05371 #endif
    05372 #ifdef IPV6_MULTICAST_IF
    05373         if (memcmp(str, "MULTICAST_IF", 12) == 0) { *valp = IPV6_MULTICAST_IF; return 0; }
    05374 #endif
    05375 #ifdef IPV6_UNICAST_HOPS
    05376         if (memcmp(str, "UNICAST_HOPS", 12) == 0) { *valp = IPV6_UNICAST_HOPS; return 0; }
    05377 #endif
    05378 #ifdef IPV6_RECVHOPLIMIT
    05379         if (memcmp(str, "RECVHOPLIMIT", 12) == 0) { *valp = IPV6_RECVHOPLIMIT; return 0; }
    05380 #endif
    05381 #ifdef IPV6_RTHDRDSTOPTS
    05382         if (memcmp(str, "RTHDRDSTOPTS", 12) == 0) { *valp = IPV6_RTHDRDSTOPTS; return 0; }
    05383 #endif
    05384 #ifdef IPV6_RTHDR_TYPE_0
    05385         if (memcmp(str, "RTHDR_TYPE_0", 12) == 0) { *valp = IPV6_RTHDR_TYPE_0; return 0; }
    05386 #endif
    05387         return -1;
    05388
    05389       case 13:
    05390 #ifdef IPV6_CHECKSUM
    05391         if (memcmp(str, "IPV6_CHECKSUM", 13) == 0) { *valp = IPV6_CHECKSUM; return 0; }
    05392 #endif
    05393 #ifdef IPV6_DONTFRAG
    05394         if (memcmp(str, "IPV6_DONTFRAG", 13) == 0) { *valp = IPV6_DONTFRAG; return 0; }
    05395 #endif
    05396 #ifdef IPV6_HOPLIMIT
    05397         if (memcmp(str, "IPV6_HOPLIMIT", 13) == 0) { *valp = IPV6_HOPLIMIT; return 0; }
    05398 #endif
    05399         return -1;
    05400
    05401       case 14:
    05402 #ifdef IPV6_RECVRTHDR
    05403         if (memcmp(str, "IPV6_RECVRTHDR", 14) == 0) { *valp = IPV6_RECVRTHDR; return 0; }
    05404 #endif
    05405 #ifdef IPV6_MULTICAST_HOPS
    05406         if (memcmp(str, "MULTICAST_HOPS", 14) == 0) { *valp = IPV6_MULTICAST_HOPS; return 0; }
    05407 #endif
    05408 #ifdef IPV6_MULTICAST_LOOP
    05409         if (memcmp(str, "MULTICAST_LOOP", 14) == 0) { *valp = IPV6_MULTICAST_LOOP; return 0; }
    05410 #endif
    05411         return -1;
    05412
    05413       case 15:
    05414 #ifdef IPV6_JOIN_GROUP
    05415         if (memcmp(str, "IPV6_JOIN_GROUP", 15) == 0) { *valp = IPV6_JOIN_GROUP; return 0; }
    05416 #endif
    05417 #ifdef IPV6_RECVTCLASS
    05418         if (memcmp(str, "IPV6_RECVTCLASS", 15) == 0) { *valp = IPV6_RECVTCLASS; return 0; }
    05419 #endif
    05420         return -1;
    05421
    05422       case 16:
    05423 #ifdef IPV6_LEAVE_GROUP
    05424         if (memcmp(str, "IPV6_LEAVE_GROUP", 16) == 0) { *valp = IPV6_LEAVE_GROUP; return 0; }
    05425 #endif
    05426 #ifdef IPV6_RECVDSTOPTS
    05427         if (memcmp(str, "IPV6_RECVDSTOPTS", 16) == 0) { *valp = IPV6_RECVDSTOPTS; return 0; }
    05428 #endif
    05429 #ifdef IPV6_RECVHOPOPTS
    05430         if (memcmp(str, "IPV6_RECVHOPOPTS", 16) == 0) { *valp = IPV6_RECVHOPOPTS; return 0; }
    05431 #endif
    05432 #ifdef IPV6_RECVPKTINFO
    05433         if (memcmp(str, "IPV6_RECVPKTINFO", 16) == 0) { *valp = IPV6_RECVPKTINFO; return 0; }
    05434 #endif
    05435 #ifdef IPV6_RECVPATHMTU
    05436         if (memcmp(str, "IPV6_RECVPATHMTU", 16) == 0) { *valp = IPV6_RECVPATHMTU; return 0; }
    05437 #endif
    05438 #ifdef IPV6_USE_MIN_MTU
    05439         if (memcmp(str, "IPV6_USE_MIN_MTU", 16) == 0) { *valp = IPV6_USE_MIN_MTU; return 0; }
    05440 #endif
    05441         return -1;
    05442
    05443       case 17:
    05444 #ifdef IPV6_MULTICAST_IF
    05445         if (memcmp(str, "IPV6_MULTICAST_IF", 17) == 0) { *valp = IPV6_MULTICAST_IF; return 0; }
    05446 #endif
    05447 #ifdef IPV6_UNICAST_HOPS
    05448         if (memcmp(str, "IPV6_UNICAST_HOPS", 17) == 0) { *valp = IPV6_UNICAST_HOPS; return 0; }
    05449 #endif
    05450 #ifdef IPV6_RECVHOPLIMIT
    05451         if (memcmp(str, "IPV6_RECVHOPLIMIT", 17) == 0) { *valp = IPV6_RECVHOPLIMIT; return 0; }
    05452 #endif
    05453 #ifdef IPV6_RTHDRDSTOPTS
    05454         if (memcmp(str, "IPV6_RTHDRDSTOPTS", 17) == 0) { *valp = IPV6_RTHDRDSTOPTS; return 0; }
    05455 #endif
    05456 #ifdef IPV6_RTHDR_TYPE_0
    05457         if (memcmp(str, "IPV6_RTHDR_TYPE_0", 17) == 0) { *valp = IPV6_RTHDR_TYPE_0; return 0; }
    05458 #endif
    05459         return -1;
    05460
    05461       case 19:
    05462 #ifdef IPV6_MULTICAST_HOPS
    05463         if (memcmp(str, "IPV6_MULTICAST_HOPS", 19) == 0) { *valp = IPV6_MULTICAST_HOPS; return 0; }
    05464 #endif
    05465 #ifdef IPV6_MULTICAST_LOOP
    05466         if (memcmp(str, "IPV6_MULTICAST_LOOP", 19) == 0) { *valp = IPV6_MULTICAST_LOOP; return 0; }
    05467 #endif
    05468         return -1;
    05469
    05470       default:
    05471         return -1;
    05472     }
    05473 }
    05474
    05475 #endif
    05476
    05477 int
    05478 rsock_tcp_optname_to_int(const char *str, long len, int *valp)
    05479 {
    05480     switch (len) {
    05481       case 4:
    05482 #ifdef TCP_CORK
    05483         if (memcmp(str, "CORK", 4) == 0) { *valp = TCP_CORK; return 0; }
    05484 #endif
    05485 #ifdef TCP_INFO
    05486         if (memcmp(str, "INFO", 4) == 0) { *valp = TCP_INFO; return 0; }
    05487 #endif
    05488         return -1;
    05489
    05490       case 5:
    05491 #ifdef TCP_NOOPT
    05492         if (memcmp(str, "NOOPT", 5) == 0) { *valp = TCP_NOOPT; return 0; }
    05493 #endif
    05494         return -1;
    05495
    05496       case 6:
    05497 #ifdef TCP_MAXSEG
    05498         if (memcmp(str, "MAXSEG", 6) == 0) { *valp = TCP_MAXSEG; return 0; }
    05499 #endif
    05500 #ifdef TCP_MD5SIG
    05501         if (memcmp(str, "MD5SIG", 6) == 0) { *valp = TCP_MD5SIG; return 0; }
    05502 #endif
    05503 #ifdef TCP_NOPUSH
    05504         if (memcmp(str, "NOPUSH", 6) == 0) { *valp = TCP_NOPUSH; return 0; }
    05505 #endif
    05506 #ifdef TCP_SYNCNT
    05507         if (memcmp(str, "SYNCNT", 6) == 0) { *valp = TCP_SYNCNT; return 0; }
    05508 #endif
    05509         return -1;
    05510
    05511       case 7:
    05512 #ifdef TCP_NODELAY
    05513         if (memcmp(str, "NODELAY", 7) == 0) { *valp = TCP_NODELAY; return 0; }
    05514 #endif
    05515 #ifdef TCP_KEEPCNT
    05516         if (memcmp(str, "KEEPCNT", 7) == 0) { *valp = TCP_KEEPCNT; return 0; }
    05517 #endif
    05518 #ifdef TCP_LINGER2
    05519         if (memcmp(str, "LINGER2", 7) == 0) { *valp = TCP_LINGER2; return 0; }
    05520 #endif
    05521         return -1;
    05522
    05523       case 8:
    05524 #ifdef TCP_CORK
    05525         if (memcmp(str, "TCP_CORK", 8) == 0) { *valp = TCP_CORK; return 0; }
    05526 #endif
    05527 #ifdef TCP_INFO
    05528         if (memcmp(str, "TCP_INFO", 8) == 0) { *valp = TCP_INFO; return 0; }
    05529 #endif
    05530 #ifdef TCP_KEEPIDLE
    05531         if (memcmp(str, "KEEPIDLE", 8) == 0) { *valp = TCP_KEEPIDLE; return 0; }
    05532 #endif
    05533 #ifdef TCP_QUICKACK
    05534         if (memcmp(str, "QUICKACK", 8) == 0) { *valp = TCP_QUICKACK; return 0; }
    05535 #endif
    05536         return -1;
    05537
    05538       case 9:
    05539 #ifdef TCP_NOOPT
    05540         if (memcmp(str, "TCP_NOOPT", 9) == 0) { *valp = TCP_NOOPT; return 0; }
    05541 #endif
    05542 #ifdef TCP_KEEPINTVL
    05543         if (memcmp(str, "KEEPINTVL", 9) == 0) { *valp = TCP_KEEPINTVL; return 0; }
    05544 #endif
    05545         return -1;
    05546
    05547       case 10:
    05548 #ifdef TCP_MAXSEG
    05549         if (memcmp(str, "TCP_MAXSEG", 10) == 0) { *valp = TCP_MAXSEG; return 0; }
    05550 #endif
    05551 #ifdef TCP_MD5SIG
    05552         if (memcmp(str, "TCP_MD5SIG", 10) == 0) { *valp = TCP_MD5SIG; return 0; }
    05553 #endif
    05554 #ifdef TCP_NOPUSH
    05555         if (memcmp(str, "TCP_NOPUSH", 10) == 0) { *valp = TCP_NOPUSH; return 0; }
    05556 #endif
    05557 #ifdef TCP_SYNCNT
    05558         if (memcmp(str, "TCP_SYNCNT", 10) == 0) { *valp = TCP_SYNCNT; return 0; }
    05559 #endif
    05560         return -1;
    05561
    05562       case 11:
    05563 #ifdef TCP_NODELAY
    05564         if (memcmp(str, "TCP_NODELAY", 11) == 0) { *valp = TCP_NODELAY; return 0; }
    05565 #endif
    05566 #ifdef TCP_KEEPCNT
    05567         if (memcmp(str, "TCP_KEEPCNT", 11) == 0) { *valp = TCP_KEEPCNT; return 0; }
    05568 #endif
    05569 #ifdef TCP_LINGER2
    05570         if (memcmp(str, "TCP_LINGER2", 11) == 0) { *valp = TCP_LINGER2; return 0; }
    05571 #endif
    05572         return -1;
    05573
    05574       case 12:
    05575 #ifdef TCP_KEEPIDLE
    05576         if (memcmp(str, "TCP_KEEPIDLE", 12) == 0) { *valp = TCP_KEEPIDLE; return 0; }
    05577 #endif
    05578 #ifdef TCP_QUICKACK
    05579         if (memcmp(str, "TCP_QUICKACK", 12) == 0) { *valp = TCP_QUICKACK; return 0; }
    05580 #endif
    05581 #ifdef TCP_DEFER_ACCEPT
    05582         if (memcmp(str, "DEFER_ACCEPT", 12) == 0) { *valp = TCP_DEFER_ACCEPT; return 0; }
    05583 #endif
    05584 #ifdef TCP_WINDOW_CLAMP
    05585         if (memcmp(str, "WINDOW_CLAMP", 12) == 0) { *valp = TCP_WINDOW_CLAMP; return 0; }
    05586 #endif
    05587         return -1;
    05588
    05589       case 13:
    05590 #ifdef TCP_KEEPINTVL
    05591         if (memcmp(str, "TCP_KEEPINTVL", 13) == 0) { *valp = TCP_KEEPINTVL; return 0; }
    05592 #endif
    05593         return -1;
    05594
    05595       case 16:
    05596 #ifdef TCP_DEFER_ACCEPT
    05597         if (memcmp(str, "TCP_DEFER_ACCEPT", 16) == 0) { *valp = TCP_DEFER_ACCEPT; return 0; }
    05598 #endif
    05599 #ifdef TCP_WINDOW_CLAMP
    05600         if (memcmp(str, "TCP_WINDOW_CLAMP", 16) == 0) { *valp = TCP_WINDOW_CLAMP; return 0; }
    05601 #endif
    05602         return -1;
    05603
    05604       default:
    05605         return -1;
    05606     }
    05607 }
    05608
    05609
    05610 int
    05611 rsock_udp_optname_to_int(const char *str, long len, int *valp)
    05612 {
    05613     switch (len) {
    05614       case 4:
    05615 #ifdef UDP_CORK
    05616         if (memcmp(str, "CORK", 4) == 0) { *valp = UDP_CORK; return 0; }
    05617 #endif
    05618         return -1;
    05619
    05620       case 8:
    05621 #ifdef UDP_CORK
    05622         if (memcmp(str, "UDP_CORK", 8) == 0) { *valp = UDP_CORK; return 0; }
    05623 #endif
    05624         return -1;
    05625
    05626       default:
    05627         return -1;
    05628     }
    05629 }
    05630
    05631
    05632 int
    05633 rsock_shutdown_how_to_int(const char *str, long len, int *valp)
    05634 {
    05635     switch (len) {
    05636       case 2:
    05637 #ifdef SHUT_RD
    05638         if (memcmp(str, "RD", 2) == 0) { *valp = SHUT_RD; return 0; }
    05639 #endif
    05640 #ifdef SHUT_WR
    05641         if (memcmp(str, "WR", 2) == 0) { *valp = SHUT_WR; return 0; }
    05642 #endif
    05643         return -1;
    05644
    05645       case 4:
    05646 #ifdef SHUT_RDWR
    05647         if (memcmp(str, "RDWR", 4) == 0) { *valp = SHUT_RDWR; return 0; }
    05648 #endif
    05649         return -1;
    05650
    05651       case 7:
    05652 #ifdef SHUT_RD
    05653         if (memcmp(str, "SHUT_RD", 7) == 0) { *valp = SHUT_RD; return 0; }
    05654 #endif
    05655 #ifdef SHUT_WR
    05656         if (memcmp(str, "SHUT_WR", 7) == 0) { *valp = SHUT_WR; return 0; }
    05657 #endif
    05658         return -1;
    05659
    05660       case 9:
    05661 #ifdef SHUT_RDWR
    05662         if (memcmp(str, "SHUT_RDWR", 9) == 0) { *valp = SHUT_RDWR; return 0; }
    05663 #endif
    05664         return -1;
    05665
    05666       default:
    05667         return -1;
    05668     }
    05669 }
    05670
    05671
    05672 int
    05673 rsock_scm_optname_to_int(const char *str, long len, int *valp)
    05674 {
    05675     switch (len) {
    05676       case 5:
    05677 #ifdef SCM_CREDS
    05678         if (memcmp(str, "CREDS", 5) == 0) { *valp = SCM_CREDS; return 0; }
    05679 #endif
    05680 #ifdef SCM_UCRED
    05681         if (memcmp(str, "UCRED", 5) == 0) { *valp = SCM_UCRED; return 0; }
    05682 #endif
    05683         return -1;
    05684
    05685       case 6:
    05686 #ifdef SCM_RIGHTS
    05687         if (memcmp(str, "RIGHTS", 6) == 0) { *valp = SCM_RIGHTS; return 0; }
    05688 #endif
    05689         return -1;
    05690
    05691       case 7:
    05692 #ifdef SCM_BINTIME
    05693         if (memcmp(str, "BINTIME", 7) == 0) { *valp = SCM_BINTIME; return 0; }
    05694 #endif
    05695         return -1;
    05696
    05697       case 9:
    05698 #ifdef SCM_CREDS
    05699         if (memcmp(str, "SCM_CREDS", 9) == 0) { *valp = SCM_CREDS; return 0; }
    05700 #endif
    05701 #ifdef SCM_UCRED
    05702         if (memcmp(str, "SCM_UCRED", 9) == 0) { *valp = SCM_UCRED; return 0; }
    05703 #endif
    05704 #ifdef SCM_TIMESTAMP
    05705         if (memcmp(str, "TIMESTAMP", 9) == 0) { *valp = SCM_TIMESTAMP; return 0; }
    05706 #endif
    05707         return -1;
    05708
    05709       case 10:
    05710 #ifdef SCM_RIGHTS
    05711         if (memcmp(str, "SCM_RIGHTS", 10) == 0) { *valp = SCM_RIGHTS; return 0; }
    05712 #endif
    05713         return -1;
    05714
    05715       case 11:
    05716 #ifdef SCM_BINTIME
    05717         if (memcmp(str, "SCM_BINTIME", 11) == 0) { *valp = SCM_BINTIME; return 0; }
    05718 #endif
    05719 #ifdef SCM_TIMESTAMPNS
    05720         if (memcmp(str, "TIMESTAMPNS", 11) == 0) { *valp = SCM_TIMESTAMPNS; return 0; }
    05721 #endif
    05722 #ifdef SCM_CREDENTIALS
    05723         if (memcmp(str, "CREDENTIALS", 11) == 0) { *valp = SCM_CREDENTIALS; return 0; }
    05724 #endif
    05725         return -1;
    05726
    05727       case 13:
    05728 #ifdef SCM_TIMESTAMP
    05729         if (memcmp(str, "SCM_TIMESTAMP", 13) == 0) { *valp = SCM_TIMESTAMP; return 0; }
    05730 #endif
    05731         return -1;
    05732
    05733       case 15:
    05734 #ifdef SCM_TIMESTAMPNS
    05735         if (memcmp(str, "SCM_TIMESTAMPNS", 15) == 0) { *valp = SCM_TIMESTAMPNS; return 0; }
    05736 #endif
    05737 #ifdef SCM_CREDENTIALS
    05738         if (memcmp(str, "SCM_CREDENTIALS", 15) == 0) { *valp = SCM_CREDENTIALS; return 0; }
    05739 #endif
    05740         return -1;
    05741
    05742       default:
    05743         return -1;
    05744     }
    05745 }
    05746
    05747
    05748
    05749 ID
    05750 rsock_intern_family(int val)
    05751 {
    05752     st_data_t name;
    05753     if (st_lookup(rsock_intern_family_hash, (st_data_t)val, &name))
    05754         return (ID)name;
    05755     return 0;
    05756 }
    05757
    05758 ID
    05759 rsock_intern_family_noprefix(int val)
    05760 {
    05761     st_data_t name;
    05762     if (st_lookup(rsock_intern_family_noprefix_hash, (st_data_t)val, &name))
    05763         return (ID)name;
    05764     return 0;
    05765 }
    05766
    05767 ID
    05768 rsock_intern_protocol_family(int val)
    05769 {
    05770     st_data_t name;
    05771     if (st_lookup(rsock_intern_protocol_family_hash, (st_data_t)val, &name))
    05772         return (ID)name;
    05773     return 0;
    05774 }
    05775
    05776 ID
    05777 rsock_intern_socktype(int val)
    05778 {
    05779     st_data_t name;
    05780     if (st_lookup(rsock_intern_socktype_hash, (st_data_t)val, &name))
    05781         return (ID)name;
    05782     return 0;
    05783 }
    05784
    05785 ID
    05786 rsock_intern_ipproto(int val)
    05787 {
    05788     st_data_t name;
    05789     if (st_lookup(rsock_intern_ipproto_hash, (st_data_t)val, &name))
    05790         return (ID)name;
    05791     return 0;
    05792 }
    05793
    05794 ID
    05795 rsock_intern_iplevel(int val)
    05796 {
    05797     st_data_t name;
    05798     if (st_lookup(rsock_intern_iplevel_hash, (st_data_t)val, &name))
    05799         return (ID)name;
    05800     return 0;
    05801 }
    05802
    05803 ID
    05804 rsock_intern_so_optname(int val)
    05805 {
    05806     st_data_t name;
    05807     if (st_lookup(rsock_intern_so_optname_hash, (st_data_t)val, &name))
    05808         return (ID)name;
    05809     return 0;
    05810 }
    05811
    05812 ID
    05813 rsock_intern_ip_optname(int val)
    05814 {
    05815     st_data_t name;
    05816     if (st_lookup(rsock_intern_ip_optname_hash, (st_data_t)val, &name))
    05817         return (ID)name;
    05818     return 0;
    05819 }
    05820
    05821 ID
    05822 rsock_intern_ipv6_optname(int val)
    05823 {
    05824     st_data_t name;
    05825     if (st_lookup(rsock_intern_ipv6_optname_hash, (st_data_t)val, &name))
    05826         return (ID)name;
    05827     return 0;
    05828 }
    05829
    05830 ID
    05831 rsock_intern_tcp_optname(int val)
    05832 {
    05833     st_data_t name;
    05834     if (st_lookup(rsock_intern_tcp_optname_hash, (st_data_t)val, &name))
    05835         return (ID)name;
    05836     return 0;
    05837 }
    05838
    05839 ID
    05840 rsock_intern_udp_optname(int val)
    05841 {
    05842     st_data_t name;
    05843     if (st_lookup(rsock_intern_udp_optname_hash, (st_data_t)val, &name))
    05844         return (ID)name;
    05845     return 0;
    05846 }
    05847
    05848 ID
    05849 rsock_intern_scm_optname(int val)
    05850 {
    05851     st_data_t name;
    05852     if (st_lookup(rsock_intern_scm_optname_hash, (st_data_t)val, &name))
    05853         return (ID)name;
    05854     return 0;
    05855 }
    05856
    05857 ID
    05858 rsock_intern_local_optname(int val)
    05859 {
    05860     st_data_t name;
    05861     if (st_lookup(rsock_intern_local_optname_hash, (st_data_t)val, &name))
    05862         return (ID)name;
    05863     return 0;
    05864 }
    05865
    05866
    05867