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