* ext/socket/mkconstants.rb: add documents for constants.

patch by Eric Hodel.  [ruby-core:37853] [Bug #4989]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-07-29 10:03:25 +00:00
parent 18f03623a3
commit 8ef6a22144
2 changed files with 341 additions and 330 deletions

View File

@ -1,3 +1,8 @@
Fri Jul 29 18:59:07 2011 Tanaka Akira <akr@fsij.org>
* ext/socket/mkconstants.rb: add documents for constants.
patch by Eric Hodel. [ruby-core:37853] [Bug #4989]
Fri Jul 29 16:00:43 2011 NARUSE, Yui <naruse@ruby-lang.org> Fri Jul 29 16:00:43 2011 NARUSE, Yui <naruse@ruby-lang.org>
* configure.in (enable_pthread): use -pthread on OpenBSD without * configure.in (enable_pthread): use -pthread on OpenBSD without

View File

@ -37,14 +37,20 @@ opt.parse!
h = {} h = {}
COMMENTS = Hash.new { |h, name| h[name] = name }
DATA.each_line {|s| DATA.each_line {|s|
name, default_value = s.scan(/\S+/) name, default_value, comment = s.chomp.split "\t"
next unless name && name[0] != ?# next unless name && name[0] != ?#
default_value = nil if default_value == 'nil'
if h.has_key? name if h.has_key? name
warn "#{$.}: warning: duplicate name: #{name}" warn "#{$.}: warning: duplicate name: #{name}"
next next
end end
h[name] = default_value h[name] = default_value
COMMENTS[name] = comment
} }
DEFS = h.to_a DEFS = h.to_a
@ -87,9 +93,9 @@ EOS
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_defs_in_guard(make_value, name, default_value)") ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_defs_in_guard(make_value, name, default_value)")
#if defined(<%=name%>) #if defined(<%=name%>)
/* <%=name%>: */ /* <%= COMMENTS[name] %> */
rb_define_const(rb_cSocket, <%=c_str name%>, <%=make_value%>(<%=name%>)); rb_define_const(rb_cSocket, <%=c_str name%>, <%=make_value%>(<%=name%>));
/* <%=name%>: */ /* <%= COMMENTS[name] %> */
rb_define_const(rb_mSockConst, <%=c_str name%>, <%=make_value%>(<%=name%>)); rb_define_const(rb_mSockConst, <%=c_str name%>, <%=make_value%>(<%=name%>));
#endif #endif
EOS EOS
@ -327,371 +333,371 @@ end
__END__ __END__
SOCK_STREAM SOCK_STREAM nil A stream socket provides a sequenced, reliable two-way connection for a byte stream.
SOCK_DGRAM SOCK_DGRAM nil A datagram socket provides connectionless, unreliable messaging3
SOCK_RAW SOCK_RAW nil A raw socket provides low-level access for direct access or implementing network protocols.
SOCK_RDM SOCK_RDM nil A reliable datagram socket provides reliable delivery of messages3
SOCK_SEQPACKET SOCK_SEQPACKET nil A sequential packet socket provides sequenced, reliable two-way connection for datagrams3
SOCK_PACKET SOCK_PACKET nil Device-level packet access
AF_UNSPEC AF_UNSPEC nil Unspecified protocol, any supported address family
PF_UNSPEC PF_UNSPEC nil Unspecified protocol, any supported address family
AF_INET AF_INET nil IPv4 protocol
PF_INET PF_INET nil IPv4 protocol
AF_INET6 AF_INET6 nil IPv6 protocol
PF_INET6 PF_INET6 nil IPv6 protocol
AF_UNIX AF_UNIX nil UNIX sockets
PF_UNIX PF_UNIX nil UNIX sockets
AF_AX25 AF_AX25 nil AX.25 protocol
PF_AX25 PF_AX25 nil AX.25 protocol
AF_IPX AF_IPX nil IPX protocol
PF_IPX PF_IPX nil IPX protocol
AF_APPLETALK AF_APPLETALK nil AppleTalk protocol
PF_APPLETALK PF_APPLETALK nil AppleTalk protocol
AF_LOCAL AF_LOCAL nil Host-internal protocols
PF_LOCAL PF_LOCAL nil Host-internal protocols
AF_IMPLINK AF_IMPLINK nil ARPANET IMP protocol
PF_IMPLINK PF_IMPLINK nil ARPANET IMP protocol
AF_PUP AF_PUP nil PARC Universal Packet protocol
PF_PUP PF_PUP nil PARC Universal Packet protocol
AF_CHAOS AF_CHAOS nil MIT CHAOS protocols
PF_CHAOS PF_CHAOS nil MIT CHAOS protocols
AF_NS AF_NS nil XEROX NS protocols
PF_NS PF_NS nil XEROX NS protocols
AF_ISO AF_ISO nil ISO Open Systems Interconnection protocols
PF_ISO PF_ISO nil ISO Open Systems Interconnection protocols
AF_OSI AF_OSI nil ISO Open Systems Interconnection protocols
PF_OSI PF_OSI nil ISO Open Systems Interconnection protocols
AF_ECMA AF_ECMA nil European Computer Manufacturers protocols
PF_ECMA PF_ECMA nil European Computer Manufacturers protocols
AF_DATAKIT AF_DATAKIT nil Datakit protocol
PF_DATAKIT PF_DATAKIT nil Datakit protocol
AF_CCITT AF_CCITT nil CCITT (now ITU-T) protocols
PF_CCITT PF_CCITT nil CCITT (now ITU-T) protocols
AF_SNA AF_SNA nil IBM SNA protocol
PF_SNA PF_SNA nil IBM SNA protocol
AF_DEC AF_DEC nil DECnet protocol
PF_DEC PF_DEC nil DECnet protocol
AF_DLI AF_DLI nil DEC Direct Data Link Interface protocol
PF_DLI PF_DLI nil DEC Direct Data Link Interface protocol
AF_LAT AF_LAT nil Local Area Transport protocol
PF_LAT PF_LAT nil Local Area Transport protocol
AF_HYLINK AF_HYLINK nil NSC Hyperchannel protocol
PF_HYLINK PF_HYLINK nil NSC Hyperchannel protocol
AF_ROUTE AF_ROUTE nil Internal routing protocol
PF_ROUTE PF_ROUTE nil Internal routing protocol
AF_LINK AF_LINK nil Link layer interface
PF_LINK PF_LINK nil Link layer interface
AF_COIP AF_COIP nil Connection-oriented IP
PF_COIP PF_COIP nil Connection-oriented IP
AF_CNT AF_CNT nil Computer Network Technology
PF_CNT PF_CNT nil Computer Network Technology
AF_SIP AF_SIP nil Simple Internet Protocol
PF_SIP PF_SIP nil Simple Internet Protocol
AF_NDRV AF_NDRV nil Network driver raw access
PF_NDRV PF_NDRV nil Network driver raw access
AF_ISDN AF_ISDN nil Integrated Services Digital Network
PF_ISDN PF_ISDN nil Integrated Services Digital Network
AF_NATM AF_NATM nil Native ATM acces
PF_NATM PF_NATM nil Native ATM acces
AF_SYSTEM AF_SYSTEM
PF_SYSTEM PF_SYSTEM
AF_NETBIOS AF_NETBIOS nil NetBIOS
PF_NETBIOS PF_NETBIOS nil NetBIOS
AF_PPP AF_PPP nil Point-to-Point Protocol
PF_PPP PF_PPP nil Point-to-Point Protocol
AF_ATM AF_ATM nil Asynchronous Transfer Mode
PF_ATM PF_ATM nil Asynchronous Transfer Mode
AF_NETGRAPH AF_NETGRAPH nil Netgraph sockets
PF_NETGRAPH PF_NETGRAPH nil Netgraph sockets
AF_MAX AF_MAX nil Maximum address family for this platform
PF_MAX PF_MAX nil Maximum address family for this platform
AF_PACKET AF_PACKET nil Direct link-layer access
PF_PACKET PF_PACKET nil Direct link-layer access
AF_E164 AF_E164 nil CCITT (ITU-T) E.164 recommendation
PF_XTP PF_XTP nil eXpress Transfor Protocol
PF_RTIP PF_RTIP
PF_PIP PF_PIP
PF_KEY PF_KEY
MSG_OOB MSG_OOB nil Proces out-of-band data
MSG_PEEK MSG_PEEK nil Peek at incoming message
MSG_DONTROUTE MSG_DONTROUTE nil Send without using the routing tables
MSG_EOR MSG_EOR nil Data completes record
MSG_TRUNC MSG_TRUNC nil Data discarded before delivery
MSG_CTRUNC MSG_CTRUNC nil Control data lost before delivery
MSG_WAITALL MSG_WAITALL nil Wait for full request or error
MSG_DONTWAIT MSG_DONTWAIT nil This message should be non-blocking
MSG_EOF MSG_EOF nil Data completes connection
MSG_FLUSH MSG_FLUSH nil Start of a hold sequence. Dumps to so_temp
MSG_HOLD MSG_HOLD nil Hold fragment in so_temp
MSG_SEND MSG_SEND nil Send the packet in so_temp
MSG_HAVEMORE MSG_HAVEMORE nil Data ready to be read
MSG_RCVMORE MSG_RCVMORE nil Data remains in the current packet
MSG_COMPAT MSG_COMPAT nil End of record
MSG_PROXY MSG_PROXY nil Wait for full request
MSG_FIN MSG_FIN
MSG_SYN MSG_SYN
MSG_CONFIRM MSG_CONFIRM nil Confirm path validity
MSG_RST MSG_RST
MSG_ERRQUEUE MSG_ERRQUEUE nil Fetch message from error queue
MSG_NOSIGNAL MSG_NOSIGNAL nil Do not generate SIGPIPE
MSG_MORE MSG_MORE nil Sender will send more
SOL_SOCKET SOL_SOCKET nil Socket-level options
SOL_IP SOL_IP nil IP socket options
SOL_IPX SOL_IPX nil IPX socket options
SOL_AX25 SOL_AX25 nil AX.25 socket options
SOL_ATALK SOL_ATALK nil AppleTalk socket options
SOL_TCP SOL_TCP nil TCP socket options
SOL_UDP SOL_UDP nil UDP socket options
IPPROTO_IP 0 IPPROTO_IP 0 Dummy protocol for IP
IPPROTO_ICMP 1 IPPROTO_ICMP 1 Control message protocol
IPPROTO_IGMP IPPROTO_IGMP nil Group Management Protocol
IPPROTO_GGP IPPROTO_GGP nil Gateway to Gateway Protocol
IPPROTO_TCP 6 IPPROTO_TCP 6 TCP
IPPROTO_EGP IPPROTO_EGP nil Exterior Gateway Protocol
IPPROTO_PUP IPPROTO_PUP nil PARC Universal Packet protocol
IPPROTO_UDP 17 IPPROTO_UDP 17 UDP
IPPROTO_IDP IPPROTO_IDP nil XNS IDP
IPPROTO_HELLO IPPROTO_HELLO nil "hello" routing protocol
IPPROTO_ND IPPROTO_ND nil Sun net disk protocol
IPPROTO_TP IPPROTO_TP nil ISO transport protocol class 4
IPPROTO_XTP IPPROTO_XTP nil Xpress Transport Protocol
IPPROTO_EON IPPROTO_EON nil ISO cnlp
IPPROTO_BIP IPPROTO_BIP
IPPROTO_AH IPPROTO_AH nil IP6 auth header
IPPROTO_DSTOPTS IPPROTO_DSTOPTS nil IP6 destination option
IPPROTO_ESP IPPROTO_ESP nil IP6 Encapsulated Security Payload
IPPROTO_FRAGMENT IPPROTO_FRAGMENT nil IP6 fragmentation header
IPPROTO_HOPOPTS IPPROTO_HOPOPTS nil IP6 hop-by-hop options
IPPROTO_ICMPV6 IPPROTO_ICMPV6 nil ICMP6
IPPROTO_IPV6 IPPROTO_IPV6 nil IP6 header
IPPROTO_NONE IPPROTO_NONE nil IP6 no next header
IPPROTO_ROUTING IPPROTO_ROUTING nil IP6 routing header
IPPROTO_RAW 255 IPPROTO_RAW 255 Raw IP packet
IPPROTO_MAX IPPROTO_MAX nil Maximum IPPROTO constant
# Some port configuration # Some port configuration
IPPORT_RESERVED 1024 IPPORT_RESERVED 1024 Default minimum address for bind or connect
IPPORT_USERRESERVED 5000 IPPORT_USERRESERVED 5000 Default maximum address for bind or connect
# Some reserved IP v.4 addresses # Some reserved IP v.4 addresses
INADDR_ANY 0x00000000 INADDR_ANY 0x00000000 A socket bound to INADDR_ANY receives packets from all interfaces and sends from the default IP address
INADDR_BROADCAST 0xffffffff INADDR_BROADCAST 0xffffffff The network broadcast address
INADDR_LOOPBACK 0x7F000001 INADDR_LOOPBACK 0x7F000001 The loopback address
INADDR_UNSPEC_GROUP 0xe0000000 INADDR_UNSPEC_GROUP 0xe0000000 The reserved multicast group
INADDR_ALLHOSTS_GROUP 0xe0000001 INADDR_ALLHOSTS_GROUP 0xe0000001 Multicast group for all systems on this subset
INADDR_MAX_LOCAL_GROUP 0xe00000ff INADDR_MAX_LOCAL_GROUP 0xe00000ff The last local network multicast group
INADDR_NONE 0xffffffff INADDR_NONE 0xffffffff A bitmask for matching no valid IP address
# IP [gs]etsockopt options # IP [gs]etsockopt options
IP_OPTIONS IP_OPTIONS nil IP options to be included in packets
IP_HDRINCL IP_HDRINCL nil Header is included with data
IP_TOS IP_TOS nil IP type-of-service
IP_TTL IP_TTL nil IP time-to-live
IP_RECVOPTS IP_RECVOPTS nil Receive all IP options with datagrapm
IP_RECVRETOPTS IP_RECVRETOPTS nil Receive all IP options for response
IP_RECVDSTADDR IP_RECVDSTADDR nil Receive IP destination address with datagram
IP_RETOPTS IP_RETOPTS nil IP options to be included in datagrams
IP_MINTTL IP_MINTTL nil Minimum TTL allowed for received packets
IP_DONTFRAG IP_DONTFRAG nil Don't fragment packets
IP_SENDSRCADDR IP_SENDSRCADDR nil Source address for outgoing UDP datagrams
IP_ONESBCAST IP_ONESBCAST nil Force outgoing broadcast datagrams to have the undirected broadcast address
IP_RECVTTL IP_RECVTTL nil Receive IP TTL with datagrams
IP_RECVIF IP_RECVIF nil Receive interface information with datagrams
IP_RECVSLLA IP_RECVSLLA nil Receive link-layer address with datagrams
IP_PORTRANGE IP_PORTRANGE nil Set the port range for sockets with unspecified port numbers
IP_MULTICAST_IF IP_MULTICAST_IF nil IP multicast interface
IP_MULTICAST_TTL IP_MULTICAST_TTL nil IP multicast TTL
IP_MULTICAST_LOOP IP_MULTICAST_LOOP nil IP multicast loopback
IP_ADD_MEMBERSHIP IP_ADD_MEMBERSHIP nil Add a multicast group membership
IP_DROP_MEMBERSHIP IP_DROP_MEMBERSHIP nil Drop a multicast group membership
IP_DEFAULT_MULTICAST_TTL IP_DEFAULT_MULTICAST_TTL nil Default multicast TTL
IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_LOOP nil Default multicast loopback
IP_MAX_MEMBERSHIPS IP_MAX_MEMBERSHIPS nil Maximum number multicast groups a socket can join
IP_ROUTER_ALERT IP_ROUTER_ALERT nil Notify transit routers to more closely examine the contents of an IP packet
IP_PKTINFO IP_PKTINFO nil Receive packet information with datagrams
IP_PKTOPTIONS IP_PKTOPTIONS nil Receive packet options with datagrams
IP_MTU_DISCOVER IP_MTU_DISCOVER nil Path MTU discovery
IP_RECVERR IP_RECVERR nil Enable extended reliable error mesage passing
IP_RECVTOS IP_RECVTOS nil Receive TOS with incoming packets
IP_MTU IP_MTU nil The Maximum Transmission Unit of the socket
IP_FREEBIND IP_FREEBIND nil Allow binding to nonexistent IP addresses
IP_IPSEC_POLICY IP_IPSEC_POLICY nil IPSec security policy
IP_XFRM_POLICY IP_XFRM_POLICY
IP_PASSSEC IP_PASSSEC nil Retrieve security context with datagram
IP_PMTUDISC_DONT IP_PMTUDISC_DONT nil Never send DF frames
IP_PMTUDISC_WANT IP_PMTUDISC_WANT nil Use per-route hints
IP_PMTUDISC_DO IP_PMTUDISC_DO nil Always send DF frames
IP_UNBLOCK_SOURCE IP_UNBLOCK_SOURCE nil Unblock IPv4 multicast packets with a give source address
IP_BLOCK_SOURCE IP_BLOCK_SOURCE nil Block IPv4 multicast packets with a give source address
IP_ADD_SOURCE_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP nil Add a multicast group membership
IP_DROP_SOURCE_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP nil Drop a multicast group membership
IP_MSFILTER IP_MSFILTER nil Multicast source filtering
MCAST_JOIN_GROUP MCAST_JOIN_GROUP nil Join a multicast group
MCAST_BLOCK_SOURCE MCAST_BLOCK_SOURCE nil Block multicast packets from this source
MCAST_UNBLOCK_SOURCE MCAST_UNBLOCK_SOURCE nil Unblock multicast packets from this source
MCAST_LEAVE_GROUP MCAST_LEAVE_GROUP nil Leave a multicast group
MCAST_JOIN_SOURCE_GROUP MCAST_JOIN_SOURCE_GROUP nil Join a multicast source group
MCAST_LEAVE_SOURCE_GROUP MCAST_LEAVE_SOURCE_GROUP nil Leave a multicast source group
MCAST_MSFILTER MCAST_MSFILTER nil Multicast source filtering
MCAST_EXCLUDE MCAST_EXCLUDE nil Exclusive multicast source filter
MCAST_INCLUDE MCAST_INCLUDE nil Inclusive multicast source filter
SO_DEBUG SO_DEBUG nil Debug info recording
SO_REUSEADDR SO_REUSEADDR nil Allow local address reuse
SO_REUSEPORT SO_REUSEPORT nil Allow local address and port reuse
SO_TYPE SO_TYPE nil Get the socket type
SO_ERROR SO_ERROR nil Get and clear the error status
SO_DONTROUTE SO_DONTROUTE nil Use interface addresses
SO_BROADCAST SO_BROADCAST nil Permit sending of broadcast messages
SO_SNDBUF SO_SNDBUF nil Send buffer size
SO_RCVBUF SO_RCVBUF nil Receive buffer size
SO_KEEPALIVE SO_KEEPALIVE nil Keep connections alive
SO_OOBINLINE SO_OOBINLINE nil Leave received out-of-band data in-line
SO_NO_CHECK SO_NO_CHECK nil Disable checksums
SO_PRIORITY SO_PRIORITY nil The protocol-defined priority for all packets on this socket
SO_LINGER SO_LINGER nil Linger on close if data is present
SO_PASSCRED SO_PASSCRED nil Receive SCM_CREDENTIALS messages
SO_PEERCRED SO_PEERCRED nil The credentials of the foreign process connected to this socket
SO_RCVLOWAT SO_RCVLOWAT nil Receive low-water mark
SO_SNDLOWAT SO_SNDLOWAT nil Send low-water mark
SO_RCVTIMEO SO_RCVTIMEO nil Receive timeout
SO_SNDTIMEO SO_SNDTIMEO nil Send timeout
SO_ACCEPTCONN SO_ACCEPTCONN nil Socket has had listen() called on it
SO_USELOOPBACK SO_USELOOPBACK nil Bypass hardware when possible
SO_ACCEPTFILTER SO_ACCEPTFILTER nil There is an accept filter
SO_DONTTRUNC SO_DONTTRUNC nil Retain unread data
SO_WANTMORE SO_WANTMORE nil Give a hint when more data is ready
SO_WANTOOBFLAG SO_WANTOOBFLAG nil OOB data is wanted in MSG_FLAG on receive
SO_NREAD SO_NREAD nil Get first packet byte count
SO_NKE SO_NKE nil Install socket-level Network Kernel Extension
SO_NOSIGPIPE SO_NOSIGPIPE nil Don't SIGPIPE on EPIPE
SO_SECURITY_AUTHENTICATION SO_SECURITY_AUTHENTICATION
SO_SECURITY_ENCRYPTION_TRANSPORT SO_SECURITY_ENCRYPTION_TRANSPORT
SO_SECURITY_ENCRYPTION_NETWORK SO_SECURITY_ENCRYPTION_NETWORK
SO_BINDTODEVICE SO_BINDTODEVICE nil Only send packets from the given interface
SO_ATTACH_FILTER SO_ATTACH_FILTER nil Attach an accept filter
SO_DETACH_FILTER SO_DETACH_FILTER nil Detach an accept filter
SO_PEERNAME SO_PEERNAME nil Name of the connecting user
SO_TIMESTAMP SO_TIMESTAMP nil Receive timestamp with datagrams (timeval)
SO_TIMESTAMPNS SO_TIMESTAMPNS nil Receive nanosecond timestamp with datagrams (timespec)
SO_BINTIME SO_BINTIME nil Receive timestamp with datagrams (bintime)
SO_RECVUCRED SO_RECVUCRED nil Receive user credentials with datagram
SO_MAC_EXEMPT SO_MAC_EXEMPT nil Mandatory Access Control exemption for unlabled peers
SO_ALLZONES SO_ALLZONES nil Bypass zone boundaries
SOPRI_INTERACTIVE SOPRI_INTERACTIVE nil Interactive socket priority
SOPRI_NORMAL SOPRI_NORMAL nil Normal socket priority
SOPRI_BACKGROUND SOPRI_BACKGROUND nil Background socket priority
IPX_TYPE IPX_TYPE
TCP_NODELAY TCP_NODELAY nil Don't delay sending to coalesce packets
TCP_MAXSEG TCP_MAXSEG nil Set maximum segment size
TCP_CORK TCP_CORK nil Don't send partial frames
TCP_DEFER_ACCEPT TCP_DEFER_ACCEPT nil Don't notify a listening socket until data is ready
TCP_INFO TCP_INFO nil Retreive information about this socket
TCP_KEEPCNT TCP_KEEPCNT nil Makimum number of keepalive probes allowed before dropping a connection
TCP_KEEPIDLE TCP_KEEPIDLE nil Idle time before keepalive probes are sent
TCP_KEEPINTVL TCP_KEEPINTVL nil Time between keepalive probes
TCP_LINGER2 TCP_LINGER2 nil Lifetime of orphaned FIN_WAIT2 sockets
TCP_MD5SIG TCP_MD5SIG nil Use MD5 digests (RFC2385)
TCP_NOOPT TCP_NOOPT nil Don't use TCP options
TCP_NOPUSH TCP_NOPUSH nil Don't push the last block of write
TCP_QUICKACK TCP_QUICKACK nil Enable quickack mode
TCP_SYNCNT TCP_SYNCNT nil Number of SYN retransmits before a connection i sdropped
TCP_WINDOW_CLAMP TCP_WINDOW_CLAMP nil Clamp the size of the advertised window
UDP_CORK UDP_CORK nil Don't send partial frames
EAI_ADDRFAMILY EAI_ADDRFAMILY nil Address family for hostname not supported
EAI_AGAIN EAI_AGAIN nil Temporary failure in name resolution
EAI_BADFLAGS EAI_BADFLAGS nil Invalid flags
EAI_FAIL EAI_FAIL nil Non-recoverable failure in name resolution
EAI_FAMILY EAI_FAMILY nil Address family not supported
EAI_MEMORY EAI_MEMORY nil Memory allocation failure
EAI_NODATA EAI_NODATA nil No address associated with hostname
EAI_NONAME EAI_NONAME nil Hostname nor servname, or not known
EAI_OVERFLOW EAI_OVERFLOW nil Argument buffer overflow
EAI_SERVICE EAI_SERVICE nil Servname not supported for socket type
EAI_SOCKTYPE EAI_SOCKTYPE nil Socket type not supported
EAI_SYSTEM EAI_SYSTEM nil System error returned in errno
EAI_BADHINTS EAI_BADHINTS nil Invalid value for hints
EAI_PROTOCOL EAI_PROTOCOL nil Resolved protocol is unknown
EAI_MAX EAI_MAX nil Maximum error code from getaddrinfo
AI_PASSIVE AI_PASSIVE nil Get address to use with bind()
AI_CANONNAME AI_CANONNAME nil Fill in the canonical name
AI_NUMERICHOST AI_NUMERICHOST nil Prevent host name resolution
AI_NUMERICSERV AI_NUMERICSERV nil Prevent service name resolution
AI_MASK AI_MASK nil Valid flag mask for getaddrinfo (not for application use)
AI_ALL AI_ALL nil Allow all addresses
AI_V4MAPPED_CFG AI_V4MAPPED_CFG nil Accept IPv4 mapped addresses if the kernel supports it
AI_ADDRCONFIG AI_ADDRCONFIG nil Accept only if any address is assigned
AI_V4MAPPED AI_V4MAPPED nil Accept IPv4-mapped IPv6 addresses
AI_DEFAULT AI_DEFAULT nil Default flags for getaddrinfo
NI_MAXHOST NI_MAXHOST nil Maximum length of a hostname
NI_MAXSERV NI_MAXSERV nil Maximum length of a service name
NI_NOFQDN NI_NOFQDN nil An FQDN is not required for local hosts, return only the local part
NI_NUMERICHOST NI_NUMERICHOST nil Return a numeric address
NI_NAMEREQD NI_NAMEREQD nil A name is required
NI_NUMERICSERV NI_NUMERICSERV nil Return the service name as a digit string
NI_DGRAM NI_DGRAM nil The service specified is a datagram service (looks up udp ports)
SHUT_RD 0 SHUT_RD 0 Shut down the reading side of the socket
SHUT_WR 1 SHUT_WR 1 Shut down the writing side of the socket
SHUT_RDWR 2 SHUT_RDWR 2 Shut down the both sides of the socket
IPV6_JOIN_GROUP IPV6_JOIN_GROUP nil Join a group membership
IPV6_LEAVE_GROUP IPV6_LEAVE_GROUP nil Leave a group membership
IPV6_MULTICAST_HOPS IPV6_MULTICAST_HOPS nil IP6 multicast hops
IPV6_MULTICAST_IF IPV6_MULTICAST_IF nil IP6 multicast interface
IPV6_MULTICAST_LOOP IPV6_MULTICAST_LOOP nil IP6 multicast loopback
IPV6_UNICAST_HOPS IPV6_UNICAST_HOPS nil IP6 unicast hops
IPV6_V6ONLY IPV6_V6ONLY nil Only bind IPv6 with a wildcard bind
IPV6_CHECKSUM IPV6_CHECKSUM nil Checksum offset for raw sockets
IPV6_DONTFRAG IPV6_DONTFRAG nil Don't fragment packets
IPV6_DSTOPTS IPV6_DSTOPTS nil Destination option
IPV6_HOPLIMIT IPV6_HOPLIMIT nil Hop limit
IPV6_HOPOPTS IPV6_HOPOPTS nil Hop-by-hop option
IPV6_NEXTHOP IPV6_NEXTHOP nil Next hop address
IPV6_PATHMTU IPV6_PATHMTU nil Retrieve current path MTU
IPV6_PKTINFO IPV6_PKTINFO nil Receive packet information with datagram
IPV6_RECVDSTOPTS IPV6_RECVDSTOPTS nil Receive all IP6 options for response
IPV6_RECVHOPLIMIT IPV6_RECVHOPLIMIT nil Receive hop limit with datagram
IPV6_RECVHOPOPTS IPV6_RECVHOPOPTS nil Receive hop-by-hop options
IPV6_RECVPKTINFO IPV6_RECVPKTINFO nil Receive destination IP address and incoming interface
IPV6_RECVRTHDR IPV6_RECVRTHDR nil Receive routing header
IPV6_RECVTCLASS IPV6_RECVTCLASS nil Receive traffic class
IPV6_RTHDR IPV6_RTHDR nil Allows removal of sticky routing headers
IPV6_RTHDRDSTOPTS IPV6_RTHDRDSTOPTS nil Allows removal of sticky destination options header
IPV6_RTHDR_TYPE_0 IPV6_RTHDR_TYPE_0 nil Routing header type 0
IPV6_RECVPATHMTU IPV6_RECVPATHMTU nil Receive current path MTU with datagram
IPV6_TCLASS IPV6_TCLASS nil Specify the traffic class
IPV6_USE_MIN_MTU IPV6_USE_MIN_MTU nil Use the minimum MTU size
INET_ADDRSTRLEN 16 INET_ADDRSTRLEN 16 Maximum length of an IPv4 address string
INET6_ADDRSTRLEN 46 INET6_ADDRSTRLEN 46 Maximum length of an IPv6 address string
IFNAMSIZ IFNAMSIZ nil Maximum interface name size
IF_NAMESIZE IF_NAMESIZE nil Maximum interface name size
SOMAXCONN SOMAXCONN nil Maximum connection requests that may be queued for a socket
SCM_RIGHTS SCM_RIGHTS nil Access rights
SCM_TIMESTAMP SCM_TIMESTAMP nil Timestamp (timeval)
SCM_TIMESTAMPNS SCM_TIMESTAMPNS nil Timespec (timespec)
SCM_BINTIME SCM_BINTIME nil Timestamp (bintime)
SCM_CREDENTIALS SCM_CREDENTIALS nil The sender's credentials
SCM_CREDS SCM_CREDS nil Process credentials
SCM_UCRED SCM_UCRED nil User credentials
LOCAL_PEERCRED LOCAL_PEERCRED nil Retrieve peer credentials
LOCAL_CREDS LOCAL_CREDS nil Pass credentials to receiver
LOCAL_CONNWAIT LOCAL_CONNWAIT nil Connect blocks until accepted