Socket::Constants
provides socket-related constants. All possible socket constants are listed in the documentation but they may not all be present on your platform.
If the underlying platform doesn't define a constant the corresponding Ruby constant is not defined.
Interface to kernel crypto API
AppleTalk protocol
Asynchronous Transfer Mode
AX.25 protocol
Bluetooth low-level socket protocol
Controller Area Network automotive bus protocol
CCITT (now ITU-T) protocols
MIT CHAOS protocols
Computer Network Technology
Connection-oriented IP
Datakit protocol
DECnet protocol
DECnet protocol
DEC Direct Data Link Interface protocol
CCITT (ITU-T) E.164 recommendation
European Computer Manufacturers protocols
NSC Hyperchannel protocol
InfiniBand native addressing
ARPANET IMP protocol
IPv4 protocol
IPv6 protocol
IPX protocol
Integrated Services Digital Network
ISO Open Systems Interconnection protocols
KCM (kernel connection multiplexor) interface
Key management protocol, originally developed for usage with IPsec
Local Area Transport protocol
Link layer interface
Logical link control (IEEE 802.2 LLC) protocol
Host-internal protocols
Maximum address family for this platform
Multiprotocol Label Switching
Native ATM access
Network driver raw access
NetBIOS
Netgraph sockets
Kernel user interface device
XEROX NS protocols
ISO Open Systems Interconnection protocols
Direct link-layer access
Point-to-Point Protocol
Generic PPP transport layer, for setting up L2 tunnels (L2TP and PPPoE)
PARC Universal Packet protocol
Reliable Datagram Sockets (RDS) protocol
Internal routing protocol
Simple Internet Protocol
IBM SNA protocol
TIPC, “cluster domain sockets” protocol
UNIX sockets
Unspecified protocol, any supported address family
VSOCK (originally “VMWare VSockets”) protocol for hypervisor-guest communication
XDP (express data path) interface
Accept only if any address is assigned
Allow all addresses
Fill in the canonical name
Default flags for getaddrinfo
Valid flag mask for getaddrinfo (not for application use)
Prevent host name resolution
Prevent service name resolution
Get address to use with bind()
Accept IPv4-mapped IPv6 addresses
Accept IPv4 mapped addresses if the kernel supports it
Address family for hostname not supported
Temporary failure in name resolution
Invalid flags
Invalid value for hints
Non-recoverable failure in name resolution
Address family not supported
Maximum error code from getaddrinfo
Memory allocation failure
No address associated with hostname
Hostname nor servname, or not known
Argument buffer overflow
Resolved protocol is unknown
Servname not supported for socket type
Socket
type not supported
System error returned in errno
802.1Q VLAN device
receive all multicast packets
use alternate physical connection
auto media select active
bonding master or slave
device used as bridge port
broadcast address valid
flags not changeable
unconfigurable using ioctl(2)
turn on debugging
disable netpoll at run-time
disallow bridging this ether dev
driver signals dormant
tx hardware queue is full
resources allocated
interface is winding down
dialup device with changing addresses
ethernet bridging device
echo sent packets
ISATAP interface (RFC4214)
per link layer defined bit 0
per link layer defined bit 1
per link layer defined bit 2
hardware address change when it's running
loopback net
driver signals L1 up
device used as macvlan port
master of a load balancer
bonding master, 802.3ad.
bonding master, balance-alb.
bonding master, ARP mon in use
user-requested monitor mode
supports multicast
no address resolution protocol
avoid use of trailers
transmission in progress
device used as Open vSwitch datapath port
point-to-point link
can set media type
user-requested promisc mode
receive all packets
interface is being renamed
routing entry installed
resources allocated
can't hear own transmissions
slave of a load balancer
bonding slave not the curr. active
need ARPs for validation
interface manages own routes
static ARP
sending custom FCS
used as team port
sharing skbs on transmit
unicast filtering
interface is up
volatile flags
WAN HDLC device
dev_hard_start_xmit() is allowed to release skb->dst
Maximum interface name size
Maximum interface name size
Multicast group for all systems on this subset
A socket bound to INADDR_ANY
receives packets from all interfaces and sends from the default IP address
The network broadcast address
The loopback address
The last local network multicast group
A bitmask for matching no valid IP address
The reserved multicast group
Maximum length of an IPv6 address string
Maximum length of an IPv4 address string
Default minimum address for bind or connect
Default maximum address for bind or connect
IP6 auth header
IP6 destination option
Exterior Gateway Protocol
ISO cnlp
IP6 Encapsulated Security Payload
IP6 fragmentation header
Gateway to Gateway Protocol
“hello” routing protocol
IP6 hop-by-hop options
Control message protocol
ICMP6
XNS IDP
Group Management Protocol
Dummy protocol for IP
IP6 header
Maximum IPPROTO constant
Sun net disk protocol
IP6 no next header
PARC Universal Packet protocol
Raw IP packet
IP6 routing header
TCP
ISO transport protocol class 4
UDP
Xpress Transport Protocol
Checksum offset for raw sockets
Don't fragment packets
Destination option
Hop limit
Hop-by-hop option
Join a group membership
Leave a group membership
IP6 multicast hops
IP6 multicast interface
IP6 multicast loopback
Next hop address
Retrieve current path MTU
Receive packet information with datagram
Receive all IP6 options for response
Receive hop limit with datagram
Receive hop-by-hop options
Receive current path MTU with datagram
Receive destination IP address and incoming interface
Receive routing header
Receive traffic class
Allows removal of sticky routing headers
Allows removal of sticky destination options header
Routing header type 0
Specify the traffic class
IP6 unicast hops
Use the minimum MTU size
Only bind IPv6 with a wildcard bind
Add a multicast group membership
Add a multicast group membership
Block IPv4 multicast packets with a give source address
Default multicast loopback
Default multicast TTL
Don't fragment packets
Drop a multicast group membership
Drop a multicast group membership
Allow binding to nonexistent IP addresses
Header is included with data
IPsec security policy
Maximum number multicast groups a socket can join
Minimum TTL allowed for received packets
Multicast source filtering
The Maximum Transmission Unit of the socket
Path MTU discovery
IP multicast interface
IP multicast loopback
IP multicast TTL
Force outgoing broadcast datagrams to have the undirected broadcast address
IP options to be included in packets
Retrieve security context with datagram
Receive packet information with datagrams
Receive packet options with datagrams
Always send DF frames
Never send DF frames
Use per-route hints
Set the port range for sockets with unspecified port numbers
Receive IP destination address with datagram
Enable extended reliable error message passing
Receive interface information with datagrams
Receive all IP options with datagram
Receive all IP options for response
Receive link-layer address with datagrams
Receive TOS with incoming packets
Receive IP TTL with datagrams
IP options to be included in datagrams
Notify transit routers to more closely examine the contents of an IP packet
Source address for outgoing UDP datagrams
IP type-of-service
Transparent proxy
IP time-to-live
Unblock IPv4 multicast packets with a give source address
Connect blocks until accepted
Pass credentials to receiver
Retrieve peer credentials
Block multicast packets from this source
Exclusive multicast source filter
Inclusive multicast source filter
Join a multicast group
Join a multicast source group
Leave a multicast group
Leave a multicast source group
Multicast source filtering
Unblock multicast packets from this source
End of record
Confirm path validity
Control data lost before delivery
Send without using the routing tables
This message should be non-blocking
Data completes connection
Data completes record
Fetch message from error queue
Reduce step of the handshake process
Start of a hold sequence. Dumps to so_temp
Data ready to be read
Hold fragment in so_temp
Sender will send more
Do not generate SIGPIPE
Process out-of-band data
Peek at incoming message
Wait for full request
Data remains in the current packet
Send the packet in so_temp
Data discarded before delivery
Wait for full request or error
The service specified is a datagram service (looks up UDP ports)
Maximum length of a hostname
Maximum length of a service name
A name is required
An FQDN is not required for local hosts, return only the local part
Return a numeric address
Return the service name as a digit string
Interface to kernel crypto API
AppleTalk protocol
Asynchronous Transfer Mode
AX.25 protocol
Bluetooth low-level socket protocol
Controller Area Network automotive bus protocol
CCITT (now ITU-T) protocols
MIT CHAOS protocols
Computer Network Technology
Connection-oriented IP
Datakit protocol
DECnet protocol
DECnet protocol
DEC Direct Data Link Interface protocol
European Computer Manufacturers protocols
NSC Hyperchannel protocol
InfiniBand native addressing
ARPANET IMP protocol
IPv4 protocol
IPv6 protocol
IPX protocol
Integrated Services Digital Network
ISO Open Systems Interconnection protocols
KCM (kernel connection multiplexor) interface
Key management protocol, originally developed for usage with IPsec
Local Area Transport protocol
Link layer interface
Logical link control (IEEE 802.2 LLC) protocol
Host-internal protocols
Maximum address family for this platform
Multiprotocol Label Switching
Native ATM access
Network driver raw access
NetBIOS
Netgraph sockets
Kernel user interface device
XEROX NS protocols
ISO Open Systems Interconnection protocols
Direct link-layer access
Point-to-Point Protocol
Generic PPP transport layer, for setting up L2 tunnels (L2TP and PPPoE)
PARC Universal Packet protocol
Reliable Datagram Sockets (RDS) protocol
Internal routing protocol
Simple Internet Protocol
IBM SNA protocol
TIPC, “cluster domain sockets” protocol
UNIX sockets
Unspecified protocol, any supported address family
VSOCK (originally “VMWare VSockets”) protocol for hypervisor-guest communication
XDP (express data path) interface
eXpress Transfer Protocol
Timestamp (bintime)
The sender's credentials
Process credentials
Access rights
Timestamp (timeval)
Timestamp (timespec list) (Linux 2.6.30)
Timespec (timespec)
User credentials
Wifi status (Linux 3.3)
Shut down the reading side of the socket
Shut down the both sides of the socket
Shut down the writing side of the socket
Set the close-on-exec (FD_CLOEXEC) flag on the new file descriptor.
A datagram socket provides connectionless, unreliable messaging
Set the O_NONBLOCK file status flag on the open file description (see open(2)) referred to by the new file descriptor.
Device-level packet access
A raw socket provides low-level access for direct access or implementing network protocols
A reliable datagram socket provides reliable delivery of messages
A sequential packet socket provides sequenced, reliable two-way connection for datagrams
A stream socket provides a sequenced, reliable two-way connection for a byte stream
AppleTalk socket options
AX.25 socket options
IP socket options
IPX socket options
Socket-level options
TCP socket options
UDP socket options
Maximum connection requests that may be queued for a socket
Background socket priority
Interactive socket priority
Normal socket priority
Socket
has had listen() called on it
There is an accept filter
Bypass zone boundaries
Attach an accept filter
Only send packets from the given interface
Receive timestamp with datagrams (bintime)
Query supported BPF extensions (Linux 3.14)
Permit sending of broadcast messages
Set the threshold in microseconds for low latency polling (Linux 3.11)
Debug info recording
Detach an accept filter
Domain given for socket() (Linux 2.6.32)
Use interface addresses
Retain unread data
Get and clear the error status
Obtain filter set by SO_ATTACH_FILTER
(Linux 3.8)
Keep connections alive
Linger on close if data is present
Lock the filter attached to a socket (Linux 3.9)
Mandatory Access Control exemption for unlabeled peers
Set the mark for mark-based routing (Linux 2.6.25)
Cap the rate computed by transport layer. [bytes per second] (Linux 3.13)
Install socket-level Network Kernel Extension
Set netns of a socket (Linux 3.4)
Don't SIGPIPE on EPIPE
Disable checksums
Get first packet byte count
Leave received out-of-band data in-line
Receive SCM_CREDENTIALS
messages
Toggle security context passing (Linux 2.6.18)
Set the peek offset (Linux 3.4)
The credentials of the foreign process connected to this socket
Name of the connecting user
Obtain the security credentials (Linux 2.6.2)
The protocol-defined priority for all packets on this socket
Protocol given for socket() (Linux 2.6.32)
Receive buffer size
Receive buffer size without rmem_max limit (Linux 2.6.14)
Receive low-water mark
Receive timeout
Receive user credentials with datagram
Allow local address reuse
Allow local address and port reuse
Toggle cmsg for number of packets dropped (Linux 2.6.33)
Make select() detect socket error queue with errorfds (Linux 3.10)
Send buffer size
Send buffer size without wmem_max limit (Linux 2.6.14)
Send low-water mark
Send timeout
Receive timestamp with datagrams (timeval)
Time stamping of incoming and outgoing packets (Linux 2.6.30)
Receive nanosecond timestamp with datagrams (timespec)
Get the socket type
Bypass hardware when possible
Give a hint when more data is ready
OOB data is wanted in MSG_FLAG on receive
Toggle cmsg for wifi status (Linux 3.3)
TCP congestion control algorithm (Linux 2.6.13, glibc 2.6)
TCP Cookie Transactions (Linux 2.6.33, glibc 2.18)
Don't send partial frames (Linux 2.2, glibc 2.2)
Don't notify a listening socket until data is ready (Linux 2.4, glibc 2.2)
Reduce step of the handshake process (Linux 3.7, glibc 2.18)
Retrieve information about this socket (Linux 2.4, glibc 2.2)
Maximum number of keepalive probes allowed before dropping a connection (Linux 2.4, glibc 2.2)
Idle time before keepalive probes are sent (Linux 2.4, glibc 2.2)
Time between keepalive probes (Linux 2.4, glibc 2.2)
Lifetime of orphaned FIN_WAIT2 sockets (Linux 2.4, glibc 2.2)
Set maximum segment size
Use MD5 digests (RFC2385, Linux 2.6.20, glibc 2.7)
Don't delay sending to coalesce packets
Don't use TCP options
Don't push the last block of write
Sequence of a queue for repair mode (Linux 3.5, glibc 2.18)
Enable quickack mode (Linux 2.4.4, glibc 2.3)
Repair mode (Linux 3.5, glibc 2.18)
Options for repair mode (Linux 3.5, glibc 2.18)
Queue for repair mode (Linux 3.5, glibc 2.18)
Number of SYN retransmits before a connection is dropped (Linux 2.4, glibc 2.2)
Duplicated acknowledgments handling for thin-streams (Linux 2.6.34, glibc 2.18)
Linear timeouts for thin-streams (Linux 2.6.34, glibc 2.18)
TCP timestamp (Linux 3.9, glibc 2.18)
Max timeout before a TCP connection is aborted (Linux 2.6.37, glibc 2.18)
Clamp the size of the advertised window (Linux 2.4, glibc 2.2)
Don't send partial frames (Linux 2.5.44, glibc 2.11)