山本です。

[ruby-core:4491] を見て作ったんですが、こんなのどうですか?
定数を追加しやすいんじゃないかと思います。

Index: depend
===================================================================
RCS file: /src/ruby/ext/socket/depend,v
retrieving revision 1.2
diff -u -w -b -p -r1.2 depend
--- depend	13 Aug 1999 05:37:50 -0000	1.2
+++ depend	26 Feb 2005 09:23:47 -0000
@@ -1,3 +1,9 @@
-socket.o : socket.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/rubyio.h $(hdrdir)/rubysig.h sockport.h
+DISTCLEANFILES = $(srcdir)/constants.h
+
+socket.o: socket.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/rubyio.h $(hdrdir)/rubysig.h sockport.h constants.h
 getnameinfo.o: getnameinfo.c $(topdir)/config.h addrinfo.h sockport.h
 getaddrinfo.o: getaddrinfo.c $(topdir)/config.h addrinfo.h sockport.h
+
+constants.h: $(srcdir)/mkconstants.rb
+	@echo "generating constants.h"
+	@$(RUBY) $(srcdir)/mkconstants.rb > $@

Index: socket.c
===================================================================
RCS file: /src/ruby/ext/socket/socket.c,v
retrieving revision 1.140
diff -u -w -b -p -r1.140 socket.c
--- socket.c	9 Feb 2005 07:34:56 -0000	1.140
+++ socket.c	26 Feb 2005 09:13:50 -0000
@@ -2643,445 +2643,5 @@ Init_socket()
 
     /* constants */
     mConst = rb_define_module_under(rb_cSocket, "Constants");
-    sock_define_const("SOCK_STREAM", SOCK_STREAM);
-    sock_define_const("SOCK_DGRAM", SOCK_DGRAM);
-#ifdef SOCK_RAW
-    sock_define_const("SOCK_RAW", SOCK_RAW);
-#endif
-#ifdef SOCK_RDM
-    sock_define_const("SOCK_RDM", SOCK_RDM);
-#endif
-#ifdef SOCK_SEQPACKET
-    sock_define_const("SOCK_SEQPACKET", SOCK_SEQPACKET);
-#endif
-#ifdef SOCK_PACKET
-    sock_define_const("SOCK_PACKET", SOCK_PACKET);
-#endif
-
-    sock_define_const("AF_INET", AF_INET);
-#ifdef PF_INET
-    sock_define_const("PF_INET", PF_INET);
-#endif
-#ifdef AF_UNIX
-    sock_define_const("AF_UNIX", AF_UNIX);
-    sock_define_const("PF_UNIX", PF_UNIX);
-#endif
-#ifdef AF_AX25
-    sock_define_const("AF_AX25", AF_AX25);
-    sock_define_const("PF_AX25", PF_AX25);
-#endif
-#ifdef AF_IPX
-    sock_define_const("AF_IPX", AF_IPX);
-    sock_define_const("PF_IPX", PF_IPX);
-#endif
-#ifdef AF_APPLETALK
-    sock_define_const("AF_APPLETALK", AF_APPLETALK);
-    sock_define_const("PF_APPLETALK", PF_APPLETALK);
-#endif
-#ifdef AF_UNSPEC
-    sock_define_const("AF_UNSPEC", AF_UNSPEC);
-    sock_define_const("PF_UNSPEC", PF_UNSPEC);
-#endif
-#ifdef INET6
-    sock_define_const("AF_INET6", AF_INET6);
-#endif
-#ifdef INET6
-    sock_define_const("PF_INET6", PF_INET6);
-#endif
-
-    sock_define_const("MSG_OOB", MSG_OOB);
-#ifdef MSG_PEEK
-    sock_define_const("MSG_PEEK", MSG_PEEK);
-#endif
-#ifdef MSG_DONTROUTE
-    sock_define_const("MSG_DONTROUTE", MSG_DONTROUTE);
-#endif
-
-    sock_define_const("SOL_SOCKET", SOL_SOCKET);
-#ifdef SOL_IP
-    sock_define_const("SOL_IP", SOL_IP);
-#endif
-#ifdef SOL_IPX
-    sock_define_const("SOL_IPX", SOL_IPX);
-#endif
-#ifdef SOL_AX25
-    sock_define_const("SOL_AX25", SOL_AX25);
-#endif
-#ifdef SOL_ATALK
-    sock_define_const("SOL_ATALK", SOL_ATALK);
-#endif
-#ifdef SOL_TCP
-    sock_define_const("SOL_TCP", SOL_TCP);
-#endif
-#ifdef SOL_UDP
-    sock_define_const("SOL_UDP", SOL_UDP);
-#endif
-
-#ifdef	IPPROTO_IP
-    sock_define_const("IPPROTO_IP", IPPROTO_IP);
-#else
-    sock_define_const("IPPROTO_IP", 0);
-#endif
-#ifdef	IPPROTO_ICMP
-    sock_define_const("IPPROTO_ICMP", IPPROTO_ICMP);
-#else
-    sock_define_const("IPPROTO_ICMP", 1);
-#endif
-#ifdef	IPPROTO_IGMP
-    sock_define_const("IPPROTO_IGMP", IPPROTO_IGMP);
-#endif
-#ifdef	IPPROTO_GGP
-    sock_define_const("IPPROTO_GGP", IPPROTO_GGP);
-#endif
-#ifdef	IPPROTO_TCP
-    sock_define_const("IPPROTO_TCP", IPPROTO_TCP);
-#else
-    sock_define_const("IPPROTO_TCP", 6);
-#endif
-#ifdef	IPPROTO_EGP
-    sock_define_const("IPPROTO_EGP", IPPROTO_EGP);
-#endif
-#ifdef	IPPROTO_PUP
-    sock_define_const("IPPROTO_PUP", IPPROTO_PUP);
-#endif
-#ifdef	IPPROTO_UDP
-    sock_define_const("IPPROTO_UDP", IPPROTO_UDP);
-#else
-    sock_define_const("IPPROTO_UDP", 17);
-#endif
-#ifdef	IPPROTO_IDP
-    sock_define_const("IPPROTO_IDP", IPPROTO_IDP);
-#endif
-#ifdef	IPPROTO_HELLO
-    sock_define_const("IPPROTO_HELLO", IPPROTO_HELLO);
-#endif
-#ifdef	IPPROTO_ND
-    sock_define_const("IPPROTO_ND", IPPROTO_ND);
-#endif
-#ifdef	IPPROTO_TP
-    sock_define_const("IPPROTO_TP", IPPROTO_TP);
-#endif
-#ifdef	IPPROTO_XTP
-    sock_define_const("IPPROTO_XTP", IPPROTO_XTP);
-#endif
-#ifdef	IPPROTO_EON
-    sock_define_const("IPPROTO_EON", IPPROTO_EON);
-#endif
-#ifdef	IPPROTO_BIP
-    sock_define_const("IPPROTO_BIP", IPPROTO_BIP);
-#endif
-/**/
-#ifdef	IPPROTO_RAW
-    sock_define_const("IPPROTO_RAW", IPPROTO_RAW);
-#else
-    sock_define_const("IPPROTO_RAW", 255);
-#endif
-#ifdef	IPPROTO_MAX
-    sock_define_const("IPPROTO_MAX", IPPROTO_MAX);
-#endif
-
-	/* Some port configuration */
-#ifdef	IPPORT_RESERVED
-    sock_define_const("IPPORT_RESERVED", IPPORT_RESERVED);
-#else
-    sock_define_const("IPPORT_RESERVED", 1024);
-#endif
-#ifdef	IPPORT_USERRESERVED
-    sock_define_const("IPPORT_USERRESERVED", IPPORT_USERRESERVED);
-#else
-    sock_define_const("IPPORT_USERRESERVED", 5000);
-#endif
-	/* Some reserved IP v.4 addresses */
-#ifdef	INADDR_ANY
-    sock_define_const("INADDR_ANY", INADDR_ANY);
-#else
-    sock_define_const("INADDR_ANY", 0x00000000);
-#endif
-#ifdef	INADDR_BROADCAST
-    sock_define_const("INADDR_BROADCAST", INADDR_BROADCAST);
-#else
-    sock_define_const("INADDR_BROADCAST", 0xffffffff);
-#endif
-#ifdef	INADDR_LOOPBACK
-    sock_define_const("INADDR_LOOPBACK", INADDR_LOOPBACK);
-#else
-    sock_define_const("INADDR_LOOPBACK", 0x7F000001);
-#endif
-#ifdef	INADDR_UNSPEC_GROUP
-    sock_define_const("INADDR_UNSPEC_GROUP", INADDR_UNSPEC_GROUP);
-#else
-    sock_define_const("INADDR_UNSPEC_GROUP", 0xe0000000);
-#endif
-#ifdef	INADDR_ALLHOSTS_GROUP
-    sock_define_const("INADDR_ALLHOSTS_GROUP", INADDR_ALLHOSTS_GROUP);
-#else
-    sock_define_const("INADDR_ALLHOSTS_GROUP", 0xe0000001);
-#endif
-#ifdef	INADDR_MAX_LOCAL_GROUP
-    sock_define_const("INADDR_MAX_LOCAL_GROUP", INADDR_MAX_LOCAL_GROUP);
-#else
-    sock_define_const("INADDR_MAX_LOCAL_GROUP", 0xe00000ff);
-#endif
-#ifdef	INADDR_NONE
-    sock_define_const("INADDR_NONE", INADDR_NONE);
-#else
-    sock_define_const("INADDR_NONE", 0xffffffff);
-#endif
-	/* IP [gs]etsockopt options */
-#ifdef	IP_OPTIONS
-    sock_define_const("IP_OPTIONS", IP_OPTIONS);
-#endif
-#ifdef	IP_HDRINCL
-    sock_define_const("IP_HDRINCL", IP_HDRINCL);
-#endif
-#ifdef	IP_TOS
-    sock_define_const("IP_TOS", IP_TOS);
-#endif
-#ifdef	IP_TTL
-    sock_define_const("IP_TTL", IP_TTL);
-#endif
-#ifdef	IP_RECVOPTS
-    sock_define_const("IP_RECVOPTS", IP_RECVOPTS);
-#endif
-#ifdef	IP_RECVRETOPTS
-    sock_define_const("IP_RECVRETOPTS", IP_RECVRETOPTS);
-#endif
-#ifdef	IP_RECVDSTADDR
-    sock_define_const("IP_RECVDSTADDR", IP_RECVDSTADDR);
-#endif
-#ifdef	IP_RETOPTS
-    sock_define_const("IP_RETOPTS", IP_RETOPTS);
-#endif
-#ifdef	IP_MULTICAST_IF
-    sock_define_const("IP_MULTICAST_IF", IP_MULTICAST_IF);
-#endif
-#ifdef	IP_MULTICAST_TTL
-    sock_define_const("IP_MULTICAST_TTL", IP_MULTICAST_TTL);
-#endif
-#ifdef	IP_MULTICAST_LOOP
-    sock_define_const("IP_MULTICAST_LOOP", IP_MULTICAST_LOOP);
-#endif
-#ifdef	IP_ADD_MEMBERSHIP
-    sock_define_const("IP_ADD_MEMBERSHIP", IP_ADD_MEMBERSHIP);
-#endif
-#ifdef	IP_DROP_MEMBERSHIP
-    sock_define_const("IP_DROP_MEMBERSHIP", IP_DROP_MEMBERSHIP);
-#endif
-#ifdef	IP_DEFAULT_MULTICAST_TTL
-    sock_define_const("IP_DEFAULT_MULTICAST_TTL", IP_DEFAULT_MULTICAST_TTL);
-#endif
-#ifdef	IP_DEFAULT_MULTICAST_LOOP
-    sock_define_const("IP_DEFAULT_MULTICAST_LOOP", IP_DEFAULT_MULTICAST_LOOP);
-#endif
-#ifdef	IP_MAX_MEMBERSHIPS
-    sock_define_const("IP_MAX_MEMBERSHIPS", IP_MAX_MEMBERSHIPS);
-#endif
-#ifdef SO_DEBUG
-    sock_define_const("SO_DEBUG", SO_DEBUG);
-#endif
-    sock_define_const("SO_REUSEADDR", SO_REUSEADDR);
-#ifdef SO_TYPE
-    sock_define_const("SO_TYPE", SO_TYPE);
-#endif
-#ifdef SO_ERROR
-    sock_define_const("SO_ERROR", SO_ERROR);
-#endif
-#ifdef SO_DONTROUTE
-    sock_define_const("SO_DONTROUTE", SO_DONTROUTE);
-#endif
-#ifdef SO_BROADCAST
-    sock_define_const("SO_BROADCAST", SO_BROADCAST);
-#endif
-#ifdef SO_SNDBUF
-    sock_define_const("SO_SNDBUF", SO_SNDBUF);
-#endif
-#ifdef SO_RCVBUF
-    sock_define_const("SO_RCVBUF", SO_RCVBUF);
-#endif
-#ifdef SO_KEEPALIVE
-    sock_define_const("SO_KEEPALIVE", SO_KEEPALIVE);
-#endif
-#ifdef SO_OOBINLINE
-    sock_define_const("SO_OOBINLINE", SO_OOBINLINE);
-#endif
-#ifdef SO_NO_CHECK
-    sock_define_const("SO_NO_CHECK", SO_NO_CHECK);
-#endif
-#ifdef SO_PRIORITY
-    sock_define_const("SO_PRIORITY", SO_PRIORITY);
-#endif
-#ifdef SO_LINGER
-    sock_define_const("SO_LINGER", SO_LINGER);
-#endif
-#ifdef SO_PASSCRED
-    sock_define_const("SO_PASSCRED", SO_PASSCRED);
-#endif
-#ifdef SO_PEERCRED
-    sock_define_const("SO_PEERCRED", SO_PEERCRED);
-#endif
-#ifdef SO_RCVLOWAT
-    sock_define_const("SO_RCVLOWAT", SO_RCVLOWAT);
-#endif
-#ifdef SO_SNDLOWAT
-    sock_define_const("SO_SNDLOWAT", SO_SNDLOWAT);
-#endif
-#ifdef SO_RCVTIMEO
-    sock_define_const("SO_RCVTIMEO", SO_RCVTIMEO);
-#endif
-#ifdef SO_SNDTIMEO
-    sock_define_const("SO_SNDTIMEO", SO_SNDTIMEO);
-#endif
-
-#ifdef SO_SECURITY_AUTHENTICATION
-    sock_define_const("SO_SECURITY_AUTHENTICATION", SO_SECURITY_AUTHENTICATION);
-#endif
-#ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
-    sock_define_const("SO_SECURITY_ENCRYPTION_TRANSPORT", SO_SECURITY_ENCRYPTION_TRANSPORT);
-#endif
-#ifdef SO_SECURITY_ENCRYPTION_NETWORK
-    sock_define_const("SO_SECURITY_ENCRYPTION_NETWORK", SO_SECURITY_ENCRYPTION_NETWORK);
-#endif
-
-#ifdef SO_BINDTODEVICE
-    sock_define_const("SO_BINDTODEVICE", SO_BINDTODEVICE);
-#endif
-#ifdef SO_ATTACH_FILTER
-    sock_define_const("SO_ATTACH_FILTER", SO_ATTACH_FILTER);
-#endif
-#ifdef SO_DETACH_FILTER
-    sock_define_const("SO_DETACH_FILTER", SO_DETACH_FILTER);
-#endif
-#ifdef SO_PEERNAME
-    sock_define_const("SO_PEERNAME", SO_PEERNAME);
-#endif
-#ifdef SO_TIMESTAMP
-    sock_define_const("SO_TIMESTAMP", SO_TIMESTAMP);
-#endif
-
-#ifdef SOPRI_INTERACTIVE
-    sock_define_const("SOPRI_INTERACTIVE", SOPRI_INTERACTIVE);
-#endif
-#ifdef SOPRI_NORMAL
-    sock_define_const("SOPRI_NORMAL", SOPRI_NORMAL);
-#endif
-#ifdef SOPRI_BACKGROUND
-    sock_define_const("SOPRI_BACKGROUND", SOPRI_BACKGROUND);
-#endif
-
-#ifdef IPX_TYPE
-    sock_define_const("IPX_TYPE", IPX_TYPE);
-#endif
-
-#ifdef TCP_NODELAY
-    sock_define_const("TCP_NODELAY", TCP_NODELAY);
-#endif
-#ifdef TCP_MAXSEG
-    sock_define_const("TCP_MAXSEG", TCP_MAXSEG);
-#endif
-
-#ifdef EAI_ADDRFAMILY
-    sock_define_const("EAI_ADDRFAMILY", EAI_ADDRFAMILY);
-#endif
-#ifdef EAI_AGAIN
-    sock_define_const("EAI_AGAIN", EAI_AGAIN);
-#endif
-#ifdef EAI_BADFLAGS
-    sock_define_const("EAI_BADFLAGS", EAI_BADFLAGS);
-#endif
-#ifdef EAI_FAIL
-    sock_define_const("EAI_FAIL", EAI_FAIL);
-#endif
-#ifdef EAI_FAMILY
-    sock_define_const("EAI_FAMILY", EAI_FAMILY);
-#endif
-#ifdef EAI_MEMORY
-    sock_define_const("EAI_MEMORY", EAI_MEMORY);
-#endif
-#ifdef EAI_NODATA
-    sock_define_const("EAI_NODATA", EAI_NODATA);
-#endif
-#ifdef EAI_NONAME
-    sock_define_const("EAI_NONAME", EAI_NONAME);
-#endif
-#ifdef EAI_SERVICE
-    sock_define_const("EAI_SERVICE", EAI_SERVICE);
-#endif
-#ifdef EAI_SOCKTYPE
-    sock_define_const("EAI_SOCKTYPE", EAI_SOCKTYPE);
-#endif
-#ifdef EAI_SYSTEM
-    sock_define_const("EAI_SYSTEM", EAI_SYSTEM);
-#endif
-#ifdef EAI_BADHINTS
-    sock_define_const("EAI_BADHINTS", EAI_BADHINTS);
-#endif
-#ifdef EAI_PROTOCOL
-    sock_define_const("EAI_PROTOCOL", EAI_PROTOCOL);
-#endif
-#ifdef EAI_MAX
-    sock_define_const("EAI_MAX", EAI_MAX);
-#endif
-#ifdef AI_PASSIVE
-    sock_define_const("AI_PASSIVE", AI_PASSIVE);
-#endif
-#ifdef AI_CANONNAME
-    sock_define_const("AI_CANONNAME", AI_CANONNAME);
-#endif
-#ifdef AI_NUMERICHOST
-    sock_define_const("AI_NUMERICHOST", AI_NUMERICHOST);
-#endif
-#ifdef AI_MASK
-    sock_define_const("AI_MASK", AI_MASK);
-#endif
-#ifdef AI_ALL
-    sock_define_const("AI_ALL", AI_ALL);
-#endif
-#ifdef AI_V4MAPPED_CFG
-    sock_define_const("AI_V4MAPPED_CFG", AI_V4MAPPED_CFG);
-#endif
-#ifdef AI_ADDRCONFIG
-    sock_define_const("AI_ADDRCONFIG", AI_ADDRCONFIG);
-#endif
-#ifdef AI_V4MAPPED
-    sock_define_const("AI_V4MAPPED", AI_V4MAPPED);
-#endif
-#ifdef AI_DEFAULT
-    sock_define_const("AI_DEFAULT", AI_DEFAULT);
-#endif
-#ifdef NI_MAXHOST
-    sock_define_const("NI_MAXHOST", NI_MAXHOST);
-#endif
-#ifdef NI_MAXSERV
-    sock_define_const("NI_MAXSERV", NI_MAXSERV);
-#endif
-#ifdef NI_NOFQDN
-    sock_define_const("NI_NOFQDN", NI_NOFQDN);
-#endif
-#ifdef NI_NUMERICHOST
-    sock_define_const("NI_NUMERICHOST", NI_NUMERICHOST);
-#endif
-#ifdef NI_NAMEREQD
-    sock_define_const("NI_NAMEREQD", NI_NAMEREQD);
-#endif
-#ifdef NI_NUMERICSERV
-    sock_define_const("NI_NUMERICSERV", NI_NUMERICSERV);
-#endif
-#ifdef NI_DGRAM
-    sock_define_const("NI_DGRAM", NI_DGRAM);
-#endif
-#ifdef SHUT_RD
-    sock_define_const("SHUT_RD", SHUT_RD);
-#else
-    sock_define_const("SHUT_RD", 0);
-#endif
-#ifdef SHUT_WR
-    sock_define_const("SHUT_WR", SHUT_WR);
-#else
-    sock_define_const("SHUT_WR", 1);
-#endif
-#ifdef SHUT_RDWR
-    sock_define_const("SHUT_RDWR", SHUT_RDWR);
-#else
-    sock_define_const("SHUT_RDWR", 2);
-#endif
+    #include "constants.h"
 }

///////////////////////////////////////////////////////
// ext/socket/mkconstants.rb

$out ||= $stdout

def parse(doc) # skip empty lines and comment lines
  doc.each_line do |s|
    name, value = s.scan(/\S+/)
    if name && name[0] != ?#
      $out.puts("#ifdef #{name}")
      $out.puts("    sock_define_const(\"#{name}\", #{name});")
      if value
      $out.puts("#else")
      $out.puts("    sock_define_const(\"#{name}\", #{value});")
      end
      $out.puts("#endif")
      $out.puts
    end
  end
end

parse(<<EOS)

SOCK_STREAM
SOCK_DGRAM
SOCK_RAW
SOCK_RDM
SOCK_SEQPACKET
SOCK_PACKET

AF_INET
PF_INET
AF_UNIX
PF_UNIX
AF_AX25
PF_AX25
AF_IPX
PF_IPX
AF_APPLETALK
PF_APPLETALK
AF_UNSPEC
PF_UNSPEC
AF_INET6
PF_INET6

MSG_OOB
MSG_PEEK
MSG_DONTROUTE

SOL_SOCKET
SOL_IP
SOL_IPX
SOL_AX25
SOL_ATALK
SOL_TCP
SOL_UDP

IPPROTO_IP	0
IPPROTO_ICMP	1
IPPROTO_IGMP
IPPROTO_GGP
IPPROTO_TCP	6
IPPROTO_EGP
IPPROTO_PUP
IPPROTO_UDP	17
IPPROTO_IDP
IPPROTO_HELLO
IPPROTO_ND
IPPROTO_TP
IPPROTO_XTP
IPPROTO_EON
IPPROTO_BIP

IPPROTO_RAW	255
IPPROTO_MAX

# Some port configuration
IPPORT_RESERVED		1024
IPPORT_USERRESERVED	5000

# Some reserved IP v.4 addresses
INADDR_ANY		0x00000000
INADDR_BROADCAST	0xffffffff
INADDR_LOOPBACK		0x7F000001
INADDR_UNSPEC_GROUP	0xe0000000
INADDR_ALLHOSTS_GROUP	0xe0000001
INADDR_MAX_LOCAL_GROUP	0xe00000ff
INADDR_NONE		0xffffffff

# IP [gs]etsockopt options
IP_OPTIONS
IP_HDRINCL
IP_TOS
IP_TTL
IP_RECVOPTS
IP_RECVRETOPTS
IP_RECVDSTADDR
IP_RETOPTS
IP_MULTICAST_IF
IP_MULTICAST_TTL
IP_MULTICAST_LOOP
IP_ADD_MEMBERSHIP
IP_DROP_MEMBERSHIP
IP_DEFAULT_MULTICAST_TTL
IP_DEFAULT_MULTICAST_LOOP
IP_MAX_MEMBERSHIPS
SO_DEBUG
SO_REUSEADDR
SO_TYPE
SO_ERROR
SO_DONTROUTE
SO_BROADCAST
SO_SNDBUF
SO_RCVBUF
SO_KEEPALIVE
SO_OOBINLINE
SO_NO_CHECK
SO_PRIORITY
SO_LINGER
SO_PASSCRED
SO_PEERCRED
SO_RCVLOWAT
SO_SNDLOWAT
SO_RCVTIMEO
SO_SNDTIMEO

SO_SECURITY_AUTHENTICATION
SO_SECURITY_ENCRYPTION_TRANSPORT
SO_SECURITY_ENCRYPTION_NETWORK

SO_BINDTODEVICE
SO_ATTACH_FILTER
SO_DETACH_FILTER
SO_PEERNAME
SO_TIMESTAMP

SOPRI_INTERACTIVE
SOPRI_NORMAL
SOPRI_BACKGROUND

IPX_TYPE

TCP_NODELAY
TCP_MAXSEG

EAI_ADDRFAMILY
EAI_AGAIN
EAI_BADFLAGS
EAI_FAIL
EAI_FAMILY
EAI_MEMORY
EAI_NODATA
EAI_NONAME
EAI_SERVICE
EAI_SOCKTYPE
EAI_SYSTEM
EAI_BADHINTS
EAI_PROTOCOL
EAI_MAX
AI_PASSIVE
AI_CANONNAME
AI_NUMERICHOST
AI_MASK
AI_ALL
AI_V4MAPPED_CFG
AI_ADDRCONFIG
AI_V4MAPPED
AI_DEFAULT
NI_MAXHOST
NI_MAXSERV
NI_NOFQDN
NI_NUMERICHOST
NI_NAMEREQD
NI_NUMERICSERV
NI_DGRAM
SHUT_RD		0
SHUT_WR		1
SHUT_RDWR	2

EOS