From 93cbad2b4a45de2919b2ee0dfefde21fb2472453 Mon Sep 17 00:00:00 2001 From: ksss Date: Wed, 26 Oct 2022 21:59:46 +0900 Subject: [PATCH] Add missing constants for Socket Refer to https://github.com/ruby/ruby/blob/131c31a9209c61f84d318aa18b61f468f48b8219/ext/socket/mkconstants.rb --- stdlib/socket/0/constants.rbs | 2295 +++++++++++++++++++++++++++++++++ stdlib/socket/0/socket.rbs | 906 ++++++++++++- 2 files changed, 3193 insertions(+), 8 deletions(-) create mode 100644 stdlib/socket/0/constants.rbs diff --git a/stdlib/socket/0/constants.rbs b/stdlib/socket/0/constants.rbs new file mode 100644 index 000000000..89d1b3f5a --- /dev/null +++ b/stdlib/socket/0/constants.rbs @@ -0,0 +1,2295 @@ +# +# 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. +# +module Socket::Constants + # + # Interface to kernel crypto API + # + AF_ALG: Integer + + # + # AppleTalk protocol + # + AF_APPLETALK: Integer + + # + # Asynchronous Transfer Mode + # + AF_ATM: Integer + + # + # AX.25 protocol + # + AF_AX25: Integer + + # + # Bluetooth low-level socket protocol + # + AF_BLUETOOTH: Integer + + # + # Controller Area Network automotive bus protocol + # + AF_CAN: Integer + + # + # CCITT (now ITU-T) protocols + # + AF_CCITT: Integer + + # + # MIT CHAOS protocols + # + AF_CHAOS: Integer + + # + # Computer Network Technology + # + AF_CNT: Integer + + # + # Connection-oriented IP + # + AF_COIP: Integer + + # + # Datakit protocol + # + AF_DATAKIT: Integer + + # + # DECnet protocol + # + AF_DEC: Integer + + # + # DECnet protocol + # + AF_DECnet: Integer + + # + # DEC Direct Data Link Interface protocol + # + AF_DLI: Integer + + # + # CCITT (ITU-T) E.164 recommendation + # + AF_E164: Integer + + # + # European Computer Manufacturers protocols + # + AF_ECMA: Integer + + # + # NSC Hyperchannel protocol + # + AF_HYLINK: Integer + + # + # InfiniBand native addressing + # + AF_IB: Integer + + # + # ARPANET IMP protocol + # + AF_IMPLINK: Integer + + # + # IPv4 protocol + # + AF_INET: Integer + + # + # IPv6 protocol + # + AF_INET6: Integer + + # + # IPX protocol + # + AF_IPX: Integer + + # + # Integrated Services Digital Network + # + AF_ISDN: Integer + + # + # ISO Open Systems Interconnection protocols + # + AF_ISO: Integer + + # + # KCM (kernel connection multiplexor) interface + # + AF_KCM: Integer + + # + # Key management protocol, originally developed for usage with IPsec + # + AF_KEY: Integer + + # + # Local Area Transport protocol + # + AF_LAT: Integer + + # + # Link layer interface + # + AF_LINK: Integer + + # + # Logical link control (IEEE 802.2 LLC) protocol + # + AF_LLC: Integer + + # + # Host-internal protocols + # + AF_LOCAL: Integer + + # + # Maximum address family for this platform + # + AF_MAX: Integer + + # + # Multiprotocol Label Switching + # + AF_MPLS: Integer + + # + # Native ATM access + # + AF_NATM: Integer + + # + # Network driver raw access + # + AF_NDRV: Integer + + # + # NetBIOS + # + AF_NETBIOS: Integer + + # + # Netgraph sockets + # + AF_NETGRAPH: Integer + + # + # Kernel user interface device + # + AF_NETLINK: Integer + + # + # XEROX NS protocols + # + AF_NS: Integer + + # + # ISO Open Systems Interconnection protocols + # + AF_OSI: Integer + + # + # Direct link-layer access + # + AF_PACKET: Integer + + # + # Point-to-Point Protocol + # + AF_PPP: Integer + + # + # Generic PPP transport layer, for setting up L2 tunnels (L2TP and PPPoE) + # + AF_PPPOX: Integer + + # + # PARC Universal Packet protocol + # + AF_PUP: Integer + + # + # Reliable Datagram Sockets (RDS) protocol + # + AF_RDS: Integer + + # + # Internal routing protocol + # + AF_ROUTE: Integer + + # + # Simple Internet Protocol + # + AF_SIP: Integer + + # + # IBM SNA protocol + # + AF_SNA: Integer + + AF_SYSTEM: Integer + + # + # TIPC, "cluster domain sockets" protocol + # + AF_TIPC: Integer + + # + # UNIX sockets + # + AF_UNIX: Integer + + # + # Unspecified protocol, any supported address family + # + AF_UNSPEC: Integer + + # + # VSOCK (originally "VMWare VSockets") protocol for hypervisor-guest + # communication + # + AF_VSOCK: Integer + + # + # XDP (express data path) interface + # + AF_XDP: Integer + + # + # Accept only if any address is assigned + # + AI_ADDRCONFIG: Integer + + # + # Allow all addresses + # + AI_ALL: Integer + + # + # Fill in the canonical name + # + AI_CANONNAME: Integer + + # + # Default flags for getaddrinfo + # + AI_DEFAULT: Integer + + # + # Valid flag mask for getaddrinfo (not for application use) + # + AI_MASK: Integer + + # + # Prevent host name resolution + # + AI_NUMERICHOST: Integer + + # + # Prevent service name resolution + # + AI_NUMERICSERV: Integer + + # + # Get address to use with bind() + # + AI_PASSIVE: Integer + + # + # Accept IPv4-mapped IPv6 addresses + # + AI_V4MAPPED: Integer + + # + # Accept IPv4 mapped addresses if the kernel supports it + # + AI_V4MAPPED_CFG: Integer + + # + # Address family for hostname not supported + # + EAI_ADDRFAMILY: Integer + + # + # Temporary failure in name resolution + # + EAI_AGAIN: Integer + + # + # Invalid flags + # + EAI_BADFLAGS: Integer + + # + # Invalid value for hints + # + EAI_BADHINTS: Integer + + # + # Non-recoverable failure in name resolution + # + EAI_FAIL: Integer + + # + # Address family not supported + # + EAI_FAMILY: Integer + + # + # Maximum error code from getaddrinfo + # + EAI_MAX: Integer + + # + # Memory allocation failure + # + EAI_MEMORY: Integer + + # + # No address associated with hostname + # + EAI_NODATA: Integer + + # + # Hostname nor servname, or not known + # + EAI_NONAME: Integer + + # + # Argument buffer overflow + # + EAI_OVERFLOW: Integer + + # + # Resolved protocol is unknown + # + EAI_PROTOCOL: Integer + + # + # Servname not supported for socket type + # + EAI_SERVICE: Integer + + # + # Socket type not supported + # + EAI_SOCKTYPE: Integer + + # + # System error returned in errno + # + EAI_SYSTEM: Integer + + # + # 802.1Q VLAN device + # + IFF_802_1Q_VLAN: Integer + + # + # receive all multicast packets + # + IFF_ALLMULTI: Integer + + # + # use alternate physical connection + # + IFF_ALTPHYS: Integer + + # + # auto media select active + # + IFF_AUTOMEDIA: Integer + + # + # bonding master or slave + # + IFF_BONDING: Integer + + # + # device used as bridge port + # + IFF_BRIDGE_PORT: Integer + + # + # broadcast address valid + # + IFF_BROADCAST: Integer + + # + # flags not changeable + # + IFF_CANTCHANGE: Integer + + # + # unconfigurable using ioctl(2) + # + IFF_CANTCONFIG: Integer + + # + # turn on debugging + # + IFF_DEBUG: Integer + + # + # disable netpoll at run-time + # + IFF_DISABLE_NETPOLL: Integer + + # + # disallow bridging this ether dev + # + IFF_DONT_BRIDGE: Integer + + # + # driver signals dormant + # + IFF_DORMANT: Integer + + # + # tx hardware queue is full + # + IFF_DRV_OACTIVE: Integer + + # + # resources allocated + # + IFF_DRV_RUNNING: Integer + + # + # interface is winding down + # + IFF_DYING: Integer + + # + # dialup device with changing addresses + # + IFF_DYNAMIC: Integer + + # + # ethernet bridging device + # + IFF_EBRIDGE: Integer + + # + # echo sent packets + # + IFF_ECHO: Integer + + # + # ISATAP interface (RFC4214) + # + IFF_ISATAP: Integer + + # + # per link layer defined bit 0 + # + IFF_LINK0: Integer + + # + # per link layer defined bit 1 + # + IFF_LINK1: Integer + + # + # per link layer defined bit 2 + # + IFF_LINK2: Integer + + # + # hardware address change when it's running + # + IFF_LIVE_ADDR_CHANGE: Integer + + # + # loopback net + # + IFF_LOOPBACK: Integer + + # + # driver signals L1 up + # + IFF_LOWER_UP: Integer + + # + # device used as macvlan port + # + IFF_MACVLAN_PORT: Integer + + # + # master of a load balancer + # + IFF_MASTER: Integer + + # + # bonding master, 802.3ad. + # + IFF_MASTER_8023AD: Integer + + # + # bonding master, balance-alb. + # + IFF_MASTER_ALB: Integer + + # + # bonding master, ARP mon in use + # + IFF_MASTER_ARPMON: Integer + + # + # user-requested monitor mode + # + IFF_MONITOR: Integer + + # + # supports multicast + # + IFF_MULTICAST: Integer + + # + # no address resolution protocol + # + IFF_NOARP: Integer + + # + # avoid use of trailers + # + IFF_NOTRAILERS: Integer + + # + # transmission in progress + # + IFF_OACTIVE: Integer + + # + # device used as Open vSwitch datapath port + # + IFF_OVS_DATAPATH: Integer + + # + # point-to-point link + # + IFF_POINTOPOINT: Integer + + # + # can set media type + # + IFF_PORTSEL: Integer + + # + # user-requested promisc mode + # + IFF_PPROMISC: Integer + + # + # receive all packets + # + IFF_PROMISC: Integer + + # + # interface is being renamed + # + IFF_RENAMING: Integer + + # + # routing entry installed + # + IFF_ROUTE: Integer + + # + # resources allocated + # + IFF_RUNNING: Integer + + # + # can't hear own transmissions + # + IFF_SIMPLEX: Integer + + # + # slave of a load balancer + # + IFF_SLAVE: Integer + + # + # bonding slave not the curr. active + # + IFF_SLAVE_INACTIVE: Integer + + # + # need ARPs for validation + # + IFF_SLAVE_NEEDARP: Integer + + # + # interface manages own routes + # + IFF_SMART: Integer + + # + # static ARP + # + IFF_STATICARP: Integer + + # + # sending custom FCS + # + IFF_SUPP_NOFCS: Integer + + # + # used as team port + # + IFF_TEAM_PORT: Integer + + # + # sharing skbs on transmit + # + IFF_TX_SKB_SHARING: Integer + + # + # unicast filtering + # + IFF_UNICAST_FLT: Integer + + # + # interface is up + # + IFF_UP: Integer + + # + # volatile flags + # + IFF_VOLATILE: Integer + + # + # WAN HDLC device + # + IFF_WAN_HDLC: Integer + + # + # dev_hard_start_xmit() is allowed to release skb->dst + # + IFF_XMIT_DST_RELEASE: Integer + + # + # Maximum interface name size + # + IFNAMSIZ: Integer + + # + # Maximum interface name size + # + IF_NAMESIZE: Integer + + # + # Multicast group for all systems on this subset + # + INADDR_ALLHOSTS_GROUP: Integer + + # + # A socket bound to INADDR_ANY receives packets from all interfaces and sends + # from the default IP address + # + INADDR_ANY: Integer + + # + # The network broadcast address + # + INADDR_BROADCAST: Integer + + # + # The loopback address + # + INADDR_LOOPBACK: Integer + + # + # The last local network multicast group + # + INADDR_MAX_LOCAL_GROUP: Integer + + # + # A bitmask for matching no valid IP address + # + INADDR_NONE: Integer + + # + # The reserved multicast group + # + INADDR_UNSPEC_GROUP: Integer + + # + # Maximum length of an IPv6 address string + # + INET6_ADDRSTRLEN: Integer + + # + # Maximum length of an IPv4 address string + # + INET_ADDRSTRLEN: Integer + + # + # Default minimum address for bind or connect + # + IPPORT_RESERVED: Integer + + # + # Default maximum address for bind or connect + # + IPPORT_USERRESERVED: Integer + + # + # IP6 auth header + # + IPPROTO_AH: Integer + + IPPROTO_BIP: Integer + + # + # IP6 destination option + # + IPPROTO_DSTOPTS: Integer + + # + # Exterior Gateway Protocol + # + IPPROTO_EGP: Integer + + # + # ISO cnlp + # + IPPROTO_EON: Integer + + # + # IP6 Encapsulated Security Payload + # + IPPROTO_ESP: Integer + + # + # IP6 fragmentation header + # + IPPROTO_FRAGMENT: Integer + + # + # Gateway to Gateway Protocol + # + IPPROTO_GGP: Integer + + # + # "hello" routing protocol + # + IPPROTO_HELLO: Integer + + # + # IP6 hop-by-hop options + # + IPPROTO_HOPOPTS: Integer + + # + # Control message protocol + # + IPPROTO_ICMP: Integer + + # + # ICMP6 + # + IPPROTO_ICMPV6: Integer + + # + # XNS IDP + # + IPPROTO_IDP: Integer + + # + # Group Management Protocol + # + IPPROTO_IGMP: Integer + + # + # Dummy protocol for IP + # + IPPROTO_IP: Integer + + # + # IP6 header + # + IPPROTO_IPV6: Integer + + # + # Maximum IPPROTO constant + # + IPPROTO_MAX: Integer + + # + # Sun net disk protocol + # + IPPROTO_ND: Integer + + # + # IP6 no next header + # + IPPROTO_NONE: Integer + + # + # PARC Universal Packet protocol + # + IPPROTO_PUP: Integer + + # + # Raw IP packet + # + IPPROTO_RAW: Integer + + # + # IP6 routing header + # + IPPROTO_ROUTING: Integer + + # + # TCP + # + IPPROTO_TCP: Integer + + # + # ISO transport protocol class 4 + # + IPPROTO_TP: Integer + + # + # UDP + # + IPPROTO_UDP: Integer + + # + # Xpress Transport Protocol + # + IPPROTO_XTP: Integer + + # + # Checksum offset for raw sockets + # + IPV6_CHECKSUM: Integer + + # + # Don't fragment packets + # + IPV6_DONTFRAG: Integer + + # + # Destination option + # + IPV6_DSTOPTS: Integer + + # + # Hop limit + # + IPV6_HOPLIMIT: Integer + + # + # Hop-by-hop option + # + IPV6_HOPOPTS: Integer + + # + # Join a group membership + # + IPV6_JOIN_GROUP: Integer + + # + # Leave a group membership + # + IPV6_LEAVE_GROUP: Integer + + # + # IP6 multicast hops + # + IPV6_MULTICAST_HOPS: Integer + + # + # IP6 multicast interface + # + IPV6_MULTICAST_IF: Integer + + # + # IP6 multicast loopback + # + IPV6_MULTICAST_LOOP: Integer + + # + # Next hop address + # + IPV6_NEXTHOP: Integer + + # + # Retrieve current path MTU + # + IPV6_PATHMTU: Integer + + # + # Receive packet information with datagram + # + IPV6_PKTINFO: Integer + + # + # Receive all IP6 options for response + # + IPV6_RECVDSTOPTS: Integer + + # + # Receive hop limit with datagram + # + IPV6_RECVHOPLIMIT: Integer + + # + # Receive hop-by-hop options + # + IPV6_RECVHOPOPTS: Integer + + # + # Receive current path MTU with datagram + # + IPV6_RECVPATHMTU: Integer + + # + # Receive destination IP address and incoming interface + # + IPV6_RECVPKTINFO: Integer + + # + # Receive routing header + # + IPV6_RECVRTHDR: Integer + + # + # Receive traffic class + # + IPV6_RECVTCLASS: Integer + + # + # Allows removal of sticky routing headers + # + IPV6_RTHDR: Integer + + # + # Allows removal of sticky destination options header + # + IPV6_RTHDRDSTOPTS: Integer + + # + # Routing header type 0 + # + IPV6_RTHDR_TYPE_0: Integer + + # + # Specify the traffic class + # + IPV6_TCLASS: Integer + + # + # IP6 unicast hops + # + IPV6_UNICAST_HOPS: Integer + + # + # Use the minimum MTU size + # + IPV6_USE_MIN_MTU: Integer + + # + # Only bind IPv6 with a wildcard bind + # + IPV6_V6ONLY: Integer + + IPX_TYPE: Integer + + # + # Add a multicast group membership + # + IP_ADD_MEMBERSHIP: Integer + + # + # Add a multicast group membership + # + IP_ADD_SOURCE_MEMBERSHIP: Integer + + # + # Block IPv4 multicast packets with a give source address + # + IP_BLOCK_SOURCE: Integer + + # + # Default multicast loopback + # + IP_DEFAULT_MULTICAST_LOOP: Integer + + # + # Default multicast TTL + # + IP_DEFAULT_MULTICAST_TTL: Integer + + # + # Don't fragment packets + # + IP_DONTFRAG: Integer + + # + # Drop a multicast group membership + # + IP_DROP_MEMBERSHIP: Integer + + # + # Drop a multicast group membership + # + IP_DROP_SOURCE_MEMBERSHIP: Integer + + # + # Allow binding to nonexistent IP addresses + # + IP_FREEBIND: Integer + + # + # Header is included with data + # + IP_HDRINCL: Integer + + # + # IPsec security policy + # + IP_IPSEC_POLICY: Integer + + # + # Maximum number multicast groups a socket can join + # + IP_MAX_MEMBERSHIPS: Integer + + # + # Minimum TTL allowed for received packets + # + IP_MINTTL: Integer + + # + # Multicast source filtering + # + IP_MSFILTER: Integer + + # + # The Maximum Transmission Unit of the socket + # + IP_MTU: Integer + + # + # Path MTU discovery + # + IP_MTU_DISCOVER: Integer + + # + # IP multicast interface + # + IP_MULTICAST_IF: Integer + + # + # IP multicast loopback + # + IP_MULTICAST_LOOP: Integer + + # + # IP multicast TTL + # + IP_MULTICAST_TTL: Integer + + # + # Force outgoing broadcast datagrams to have the undirected broadcast address + # + IP_ONESBCAST: Integer + + # + # IP options to be included in packets + # + IP_OPTIONS: Integer + + # + # Retrieve security context with datagram + # + IP_PASSSEC: Integer + + # + # Receive packet information with datagrams + # + IP_PKTINFO: Integer + + # + # Receive packet options with datagrams + # + IP_PKTOPTIONS: Integer + + # + # Always send DF frames + # + IP_PMTUDISC_DO: Integer + + # + # Never send DF frames + # + IP_PMTUDISC_DONT: Integer + + # + # Use per-route hints + # + IP_PMTUDISC_WANT: Integer + + # + # Set the port range for sockets with unspecified port numbers + # + IP_PORTRANGE: Integer + + # + # Receive IP destination address with datagram + # + IP_RECVDSTADDR: Integer + + # + # Enable extended reliable error message passing + # + IP_RECVERR: Integer + + # + # Receive interface information with datagrams + # + IP_RECVIF: Integer + + # + # Receive all IP options with datagram + # + IP_RECVOPTS: Integer + + # + # Receive all IP options for response + # + IP_RECVRETOPTS: Integer + + # + # Receive link-layer address with datagrams + # + IP_RECVSLLA: Integer + + # + # Receive TOS with incoming packets + # + IP_RECVTOS: Integer + + # + # Receive IP TTL with datagrams + # + IP_RECVTTL: Integer + + # + # IP options to be included in datagrams + # + IP_RETOPTS: Integer + + # + # Notify transit routers to more closely examine the contents of an IP packet + # + IP_ROUTER_ALERT: Integer + + # + # Source address for outgoing UDP datagrams + # + IP_SENDSRCADDR: Integer + + # + # IP type-of-service + # + IP_TOS: Integer + + # + # Transparent proxy + # + IP_TRANSPARENT: Integer + + # + # IP time-to-live + # + IP_TTL: Integer + + # + # Unblock IPv4 multicast packets with a give source address + # + IP_UNBLOCK_SOURCE: Integer + + IP_XFRM_POLICY: Integer + + # + # Connect blocks until accepted + # + LOCAL_CONNWAIT: Integer + + # + # Pass credentials to receiver + # + LOCAL_CREDS: Integer + + # + # Retrieve peer credentials + # + LOCAL_PEERCRED: Integer + + # + # Block multicast packets from this source + # + MCAST_BLOCK_SOURCE: Integer + + # + # Exclusive multicast source filter + # + MCAST_EXCLUDE: Integer + + # + # Inclusive multicast source filter + # + MCAST_INCLUDE: Integer + + # + # Join a multicast group + # + MCAST_JOIN_GROUP: Integer + + # + # Join a multicast source group + # + MCAST_JOIN_SOURCE_GROUP: Integer + + # + # Leave a multicast group + # + MCAST_LEAVE_GROUP: Integer + + # + # Leave a multicast source group + # + MCAST_LEAVE_SOURCE_GROUP: Integer + + # + # Multicast source filtering + # + MCAST_MSFILTER: Integer + + # + # Unblock multicast packets from this source + # + MCAST_UNBLOCK_SOURCE: Integer + + # + # End of record + # + MSG_COMPAT: Integer + + # + # Confirm path validity + # + MSG_CONFIRM: Integer + + # + # Control data lost before delivery + # + MSG_CTRUNC: Integer + + # + # Send without using the routing tables + # + MSG_DONTROUTE: Integer + + # + # This message should be non-blocking + # + MSG_DONTWAIT: Integer + + # + # Data completes connection + # + MSG_EOF: Integer + + # + # Data completes record + # + MSG_EOR: Integer + + # + # Fetch message from error queue + # + MSG_ERRQUEUE: Integer + + # + # Reduce step of the handshake process + # + MSG_FASTOPEN: Integer + + MSG_FIN: Integer + + # + # Start of a hold sequence. Dumps to so_temp + # + MSG_FLUSH: Integer + + # + # Data ready to be read + # + MSG_HAVEMORE: Integer + + # + # Hold fragment in so_temp + # + MSG_HOLD: Integer + + # + # Sender will send more + # + MSG_MORE: Integer + + # + # Do not generate SIGPIPE + # + MSG_NOSIGNAL: Integer + + # + # Process out-of-band data + # + MSG_OOB: Integer + + # + # Peek at incoming message + # + MSG_PEEK: Integer + + # + # Wait for full request + # + MSG_PROXY: Integer + + # + # Data remains in the current packet + # + MSG_RCVMORE: Integer + + MSG_RST: Integer + + # + # Send the packet in so_temp + # + MSG_SEND: Integer + + MSG_SYN: Integer + + # + # Data discarded before delivery + # + MSG_TRUNC: Integer + + # + # Wait for full request or error + # + MSG_WAITALL: Integer + + # + # The service specified is a datagram service (looks up UDP ports) + # + NI_DGRAM: Integer + + # + # Maximum length of a hostname + # + NI_MAXHOST: Integer + + # + # Maximum length of a service name + # + NI_MAXSERV: Integer + + # + # A name is required + # + NI_NAMEREQD: Integer + + # + # An FQDN is not required for local hosts, return only the local part + # + NI_NOFQDN: Integer + + # + # Return a numeric address + # + NI_NUMERICHOST: Integer + + # + # Return the service name as a digit string + # + NI_NUMERICSERV: Integer + + # + # Interface to kernel crypto API + # + PF_ALG: Integer + + # + # AppleTalk protocol + # + PF_APPLETALK: Integer + + # + # Asynchronous Transfer Mode + # + PF_ATM: Integer + + # + # AX.25 protocol + # + PF_AX25: Integer + + # + # Bluetooth low-level socket protocol + # + PF_BLUETOOTH: Integer + + # + # Controller Area Network automotive bus protocol + # + PF_CAN: Integer + + # + # CCITT (now ITU-T) protocols + # + PF_CCITT: Integer + + # + # MIT CHAOS protocols + # + PF_CHAOS: Integer + + # + # Computer Network Technology + # + PF_CNT: Integer + + # + # Connection-oriented IP + # + PF_COIP: Integer + + # + # Datakit protocol + # + PF_DATAKIT: Integer + + # + # DECnet protocol + # + PF_DEC: Integer + + # + # DECnet protocol + # + PF_DECnet: Integer + + # + # DEC Direct Data Link Interface protocol + # + PF_DLI: Integer + + # + # European Computer Manufacturers protocols + # + PF_ECMA: Integer + + # + # NSC Hyperchannel protocol + # + PF_HYLINK: Integer + + # + # InfiniBand native addressing + # + PF_IB: Integer + + # + # ARPANET IMP protocol + # + PF_IMPLINK: Integer + + # + # IPv4 protocol + # + PF_INET: Integer + + # + # IPv6 protocol + # + PF_INET6: Integer + + # + # IPX protocol + # + PF_IPX: Integer + + # + # Integrated Services Digital Network + # + PF_ISDN: Integer + + # + # ISO Open Systems Interconnection protocols + # + PF_ISO: Integer + + # + # KCM (kernel connection multiplexor) interface + # + PF_KCM: Integer + + # + # Key management protocol, originally developed for usage with IPsec + # + PF_KEY: Integer + + # + # Local Area Transport protocol + # + PF_LAT: Integer + + # + # Link layer interface + # + PF_LINK: Integer + + # + # Logical link control (IEEE 802.2 LLC) protocol + # + PF_LLC: Integer + + # + # Host-internal protocols + # + PF_LOCAL: Integer + + # + # Maximum address family for this platform + # + PF_MAX: Integer + + # + # Multiprotocol Label Switching + # + PF_MPLS: Integer + + # + # Native ATM access + # + PF_NATM: Integer + + # + # Network driver raw access + # + PF_NDRV: Integer + + # + # NetBIOS + # + PF_NETBIOS: Integer + + # + # Netgraph sockets + # + PF_NETGRAPH: Integer + + # + # Kernel user interface device + # + PF_NETLINK: Integer + + # + # XEROX NS protocols + # + PF_NS: Integer + + # + # ISO Open Systems Interconnection protocols + # + PF_OSI: Integer + + # + # Direct link-layer access + # + PF_PACKET: Integer + + PF_PIP: Integer + + # + # Point-to-Point Protocol + # + PF_PPP: Integer + + # + # Generic PPP transport layer, for setting up L2 tunnels (L2TP and PPPoE) + # + PF_PPPOX: Integer + + # + # PARC Universal Packet protocol + # + PF_PUP: Integer + + # + # Reliable Datagram Sockets (RDS) protocol + # + PF_RDS: Integer + + # + # Internal routing protocol + # + PF_ROUTE: Integer + + PF_RTIP: Integer + + # + # Simple Internet Protocol + # + PF_SIP: Integer + + # + # IBM SNA protocol + # + PF_SNA: Integer + + PF_SYSTEM: Integer + + # + # TIPC, "cluster domain sockets" protocol + # + PF_TIPC: Integer + + # + # UNIX sockets + # + PF_UNIX: Integer + + # + # Unspecified protocol, any supported address family + # + PF_UNSPEC: Integer + + # + # VSOCK (originally "VMWare VSockets") protocol for hypervisor-guest + # communication + # + PF_VSOCK: Integer + + # + # XDP (express data path) interface + # + PF_XDP: Integer + + # + # eXpress Transfer Protocol + # + PF_XTP: Integer + + # + # Timestamp (bintime) + # + SCM_BINTIME: Integer + + # + # The sender's credentials + # + SCM_CREDENTIALS: Integer + + # + # Process credentials + # + SCM_CREDS: Integer + + # + # Access rights + # + SCM_RIGHTS: Integer + + # + # Timestamp (timeval) + # + SCM_TIMESTAMP: Integer + + # + # Timestamp (timespec list) (Linux 2.6.30) + # + SCM_TIMESTAMPING: Integer + + # + # Timespec (timespec) + # + SCM_TIMESTAMPNS: Integer + + # + # User credentials + # + SCM_UCRED: Integer + + # + # Wifi status (Linux 3.3) + # + SCM_WIFI_STATUS: Integer + + # + # Shut down the reading side of the socket + # + SHUT_RD: Integer + + # + # Shut down the both sides of the socket + # + SHUT_RDWR: Integer + + # + # Shut down the writing side of the socket + # + SHUT_WR: Integer + + # + # Set the close-on-exec (FD_CLOEXEC) flag on the new file descriptor. + # + SOCK_CLOEXEC: Integer + + # + # A datagram socket provides connectionless, unreliable messaging + # + SOCK_DGRAM: Integer + + # + # Set the O_NONBLOCK file status flag on the open file description (see open(2)) + # referred to by the new file descriptor. + # + SOCK_NONBLOCK: Integer + + # + # Device-level packet access + # + SOCK_PACKET: Integer + + # + # A raw socket provides low-level access for direct access or implementing + # network protocols + # + SOCK_RAW: Integer + + # + # A reliable datagram socket provides reliable delivery of messages + # + SOCK_RDM: Integer + + # + # A sequential packet socket provides sequenced, reliable two-way connection for + # datagrams + # + SOCK_SEQPACKET: Integer + + # + # A stream socket provides a sequenced, reliable two-way connection for a byte + # stream + # + SOCK_STREAM: Integer + + # + # AppleTalk socket options + # + SOL_ATALK: Integer + + # + # AX.25 socket options + # + SOL_AX25: Integer + + # + # IP socket options + # + SOL_IP: Integer + + # + # IPX socket options + # + SOL_IPX: Integer + + # + # Socket-level options + # + SOL_SOCKET: Integer + + # + # TCP socket options + # + SOL_TCP: Integer + + # + # UDP socket options + # + SOL_UDP: Integer + + # + # Maximum connection requests that may be queued for a socket + # + SOMAXCONN: Integer + + # + # Background socket priority + # + SOPRI_BACKGROUND: Integer + + # + # Interactive socket priority + # + SOPRI_INTERACTIVE: Integer + + # + # Normal socket priority + # + SOPRI_NORMAL: Integer + + # + # Socket has had listen() called on it + # + SO_ACCEPTCONN: Integer + + # + # There is an accept filter + # + SO_ACCEPTFILTER: Integer + + # + # Bypass zone boundaries + # + SO_ALLZONES: Integer + + # + # Attach an accept filter + # + SO_ATTACH_FILTER: Integer + + # + # Only send packets from the given interface + # + SO_BINDTODEVICE: Integer + + # + # Receive timestamp with datagrams (bintime) + # + SO_BINTIME: Integer + + # + # Query supported BPF extensions (Linux 3.14) + # + SO_BPF_EXTENSIONS: Integer + + # + # Permit sending of broadcast messages + # + SO_BROADCAST: Integer + + # + # Set the threshold in microseconds for low latency polling (Linux 3.11) + # + SO_BUSY_POLL: Integer + + # + # Debug info recording + # + SO_DEBUG: Integer + + # + # Detach an accept filter + # + SO_DETACH_FILTER: Integer + + # + # Domain given for socket() (Linux 2.6.32) + # + SO_DOMAIN: Integer + + # + # Use interface addresses + # + SO_DONTROUTE: Integer + + # + # Retain unread data + # + SO_DONTTRUNC: Integer + + # + # Get and clear the error status + # + SO_ERROR: Integer + + # + # Obtain filter set by SO_ATTACH_FILTER (Linux 3.8) + # + SO_GET_FILTER: Integer + + # + # Keep connections alive + # + SO_KEEPALIVE: Integer + + # + # Linger on close if data is present + # + SO_LINGER: Integer + + # + # Lock the filter attached to a socket (Linux 3.9) + # + SO_LOCK_FILTER: Integer + + # + # Mandatory Access Control exemption for unlabeled peers + # + SO_MAC_EXEMPT: Integer + + # + # Set the mark for mark-based routing (Linux 2.6.25) + # + SO_MARK: Integer + + # + # Cap the rate computed by transport layer. [bytes per second] (Linux 3.13) + # + SO_MAX_PACING_RATE: Integer + + # + # Install socket-level Network Kernel Extension + # + SO_NKE: Integer + + # + # Set netns of a socket (Linux 3.4) + # + SO_NOFCS: Integer + + # + # Don't SIGPIPE on EPIPE + # + SO_NOSIGPIPE: Integer + + # + # Disable checksums + # + SO_NO_CHECK: Integer + + # + # Get first packet byte count + # + SO_NREAD: Integer + + # + # Leave received out-of-band data in-line + # + SO_OOBINLINE: Integer + + # + # Receive SCM_CREDENTIALS messages + # + SO_PASSCRED: Integer + + # + # Toggle security context passing (Linux 2.6.18) + # + SO_PASSSEC: Integer + + # + # Set the peek offset (Linux 3.4) + # + SO_PEEK_OFF: Integer + + # + # The credentials of the foreign process connected to this socket + # + SO_PEERCRED: Integer + + # + # Name of the connecting user + # + SO_PEERNAME: Integer + + # + # Obtain the security credentials (Linux 2.6.2) + # + SO_PEERSEC: Integer + + # + # The protocol-defined priority for all packets on this socket + # + SO_PRIORITY: Integer + + # + # Protocol given for socket() (Linux 2.6.32) + # + SO_PROTOCOL: Integer + + # + # Receive buffer size + # + SO_RCVBUF: Integer + + # + # Receive buffer size without rmem_max limit (Linux 2.6.14) + # + SO_RCVBUFFORCE: Integer + + # + # Receive low-water mark + # + SO_RCVLOWAT: Integer + + # + # Receive timeout + # + SO_RCVTIMEO: Integer + + # + # Receive user credentials with datagram + # + SO_RECVUCRED: Integer + + # + # Allow local address reuse + # + SO_REUSEADDR: Integer + + # + # Allow local address and port reuse + # + SO_REUSEPORT: Integer + + # + # Toggle cmsg for number of packets dropped (Linux 2.6.33) + # + SO_RXQ_OVFL: Integer + + SO_SECURITY_AUTHENTICATION: Integer + + SO_SECURITY_ENCRYPTION_NETWORK: Integer + + SO_SECURITY_ENCRYPTION_TRANSPORT: Integer + + # + # Make select() detect socket error queue with errorfds (Linux 3.10) + # + SO_SELECT_ERR_QUEUE: Integer + + # + # Send buffer size + # + SO_SNDBUF: Integer + + # + # Send buffer size without wmem_max limit (Linux 2.6.14) + # + SO_SNDBUFFORCE: Integer + + # + # Send low-water mark + # + SO_SNDLOWAT: Integer + + # + # Send timeout + # + SO_SNDTIMEO: Integer + + # + # Receive timestamp with datagrams (timeval) + # + SO_TIMESTAMP: Integer + + # + # Time stamping of incoming and outgoing packets (Linux 2.6.30) + # + SO_TIMESTAMPING: Integer + + # + # Receive nanosecond timestamp with datagrams (timespec) + # + SO_TIMESTAMPNS: Integer + + # + # Get the socket type + # + SO_TYPE: Integer + + # + # Bypass hardware when possible + # + SO_USELOOPBACK: Integer + + # + # Give a hint when more data is ready + # + SO_WANTMORE: Integer + + # + # OOB data is wanted in MSG_FLAG on receive + # + SO_WANTOOBFLAG: Integer + + # + # Toggle cmsg for wifi status (Linux 3.3) + # + SO_WIFI_STATUS: Integer + + # + # TCP congestion control algorithm (Linux 2.6.13, glibc 2.6) + # + TCP_CONGESTION: Integer + + # + # TCP Cookie Transactions (Linux 2.6.33, glibc 2.18) + # + TCP_COOKIE_TRANSACTIONS: Integer + + # + # Don't send partial frames (Linux 2.2, glibc 2.2) + # + TCP_CORK: Integer + + # + # Don't notify a listening socket until data is ready (Linux 2.4, glibc 2.2) + # + TCP_DEFER_ACCEPT: Integer + + # + # Reduce step of the handshake process (Linux 3.7, glibc 2.18) + # + TCP_FASTOPEN: Integer + + # + # Retrieve information about this socket (Linux 2.4, glibc 2.2) + # + TCP_INFO: Integer + + # + # Maximum number of keepalive probes allowed before dropping a connection (Linux + # 2.4, glibc 2.2) + # + TCP_KEEPCNT: Integer + + # + # Idle time before keepalive probes are sent (Linux 2.4, glibc 2.2) + # + TCP_KEEPIDLE: Integer + + # + # Time between keepalive probes (Linux 2.4, glibc 2.2) + # + TCP_KEEPINTVL: Integer + + # + # Lifetime of orphaned FIN_WAIT2 sockets (Linux 2.4, glibc 2.2) + # + TCP_LINGER2: Integer + + # + # Set maximum segment size + # + TCP_MAXSEG: Integer + + # + # Use MD5 digests (RFC2385, Linux 2.6.20, glibc 2.7) + # + TCP_MD5SIG: Integer + + # + # Don't delay sending to coalesce packets + # + TCP_NODELAY: Integer + + # + # Don't use TCP options + # + TCP_NOOPT: Integer + + # + # Don't push the last block of write + # + TCP_NOPUSH: Integer + + # + # Sequence of a queue for repair mode (Linux 3.5, glibc 2.18) + # + TCP_QUEUE_SEQ: Integer + + # + # Enable quickack mode (Linux 2.4.4, glibc 2.3) + # + TCP_QUICKACK: Integer + + # + # Repair mode (Linux 3.5, glibc 2.18) + # + TCP_REPAIR: Integer + + # + # Options for repair mode (Linux 3.5, glibc 2.18) + # + TCP_REPAIR_OPTIONS: Integer + + # + # Queue for repair mode (Linux 3.5, glibc 2.18) + # + TCP_REPAIR_QUEUE: Integer + + # + # Number of SYN retransmits before a connection is dropped (Linux 2.4, glibc + # 2.2) + # + TCP_SYNCNT: Integer + + # + # Duplicated acknowledgments handling for thin-streams (Linux 2.6.34, glibc + # 2.18) + # + TCP_THIN_DUPACK: Integer + + # + # Linear timeouts for thin-streams (Linux 2.6.34, glibc 2.18) + # + TCP_THIN_LINEAR_TIMEOUTS: Integer + + # + # TCP timestamp (Linux 3.9, glibc 2.18) + # + TCP_TIMESTAMP: Integer + + # + # Max timeout before a TCP connection is aborted (Linux 2.6.37, glibc 2.18) + # + TCP_USER_TIMEOUT: Integer + + # + # Clamp the size of the advertised window (Linux 2.4, glibc 2.2) + # + TCP_WINDOW_CLAMP: Integer + + # + # Don't send partial frames (Linux 2.5.44, glibc 2.11) + # + UDP_CORK: Integer +end diff --git a/stdlib/socket/0/socket.rbs b/stdlib/socket/0/socket.rbs index a4f0bf1d1..681408509 100644 --- a/stdlib/socket/0/socket.rbs +++ b/stdlib/socket/0/socket.rbs @@ -1418,11 +1418,36 @@ class Socket < BasicSocket def initialize: (Symbol domain, Symbol socktype, ?Integer protocol) -> untyped end +# +# Interface to kernel crypto API +# +Socket::AF_ALG: Integer + # # AppleTalk protocol # Socket::AF_APPLETALK: Integer +# +# Asynchronous Transfer Mode +# +Socket::AF_ATM: Integer + +# +# AX.25 protocol +# +Socket::AF_AX25: Integer + +# +# Bluetooth low-level socket protocol +# +Socket::AF_BLUETOOTH: Integer + +# +# Controller Area Network automotive bus protocol +# +Socket::AF_CAN: Integer + # # CCITT (now ITU-T) protocols # @@ -1448,6 +1473,16 @@ Socket::AF_COIP: Integer # Socket::AF_DATAKIT: Integer +# +# DECnet protocol +# +Socket::AF_DEC: Integer + +# +# DECnet protocol +# +Socket::AF_DECnet: Integer + # # DEC Direct Data Link Interface protocol # @@ -1468,6 +1503,11 @@ Socket::AF_ECMA: Integer # Socket::AF_HYLINK: Integer +# +# InfiniBand native addressing +# +Socket::AF_IB: Integer + # # ARPANET IMP protocol # @@ -1498,6 +1538,16 @@ Socket::AF_ISDN: Integer # Socket::AF_ISO: Integer +# +# KCM (kernel connection multiplexor) interface +# +Socket::AF_KCM: Integer + +# +# Key management protocol, originally developed for usage with IPsec +# +Socket::AF_KEY: Integer + # # Local Area Transport protocol # @@ -1508,6 +1558,11 @@ Socket::AF_LAT: Integer # Socket::AF_LINK: Integer +# +# Logical link control (IEEE 802.2 LLC) protocol +# +Socket::AF_LLC: Integer + # # Host-internal protocols # @@ -1518,6 +1573,11 @@ Socket::AF_LOCAL: Integer # Socket::AF_MAX: Integer +# +# Multiprotocol Label Switching +# +Socket::AF_MPLS: Integer + # # Native ATM access # @@ -1533,6 +1593,16 @@ Socket::AF_NDRV: Integer # Socket::AF_NETBIOS: Integer +# +# Netgraph sockets +# +Socket::AF_NETGRAPH: Integer + +# +# Kernel user interface device +# +Socket::AF_NETLINK: Integer + # # XEROX NS protocols # @@ -1543,16 +1613,31 @@ Socket::AF_NS: Integer # Socket::AF_OSI: Integer +# +# Direct link-layer access +# +Socket::AF_PACKET: Integer + # # Point-to-Point Protocol # Socket::AF_PPP: Integer +# +# Generic PPP transport layer, for setting up L2 tunnels (L2TP and PPPoE) +# +Socket::AF_PPPOX: Integer + # # PARC Universal Packet protocol # Socket::AF_PUP: Integer +# +# Reliable Datagram Sockets (RDS) protocol +# +Socket::AF_RDS: Integer + # # Internal routing protocol # @@ -1567,9 +1652,13 @@ Socket::AF_SIP: Integer # IBM SNA protocol # Socket::AF_SNA: Integer - Socket::AF_SYSTEM: Integer +# +# TIPC, "cluster domain sockets" protocol +# +Socket::AF_TIPC: Integer + # # UNIX sockets # @@ -1580,6 +1669,17 @@ Socket::AF_UNIX: Integer # Socket::AF_UNSPEC: Integer +# +# VSOCK (originally "VMWare VSockets") protocol for hypervisor-guest +# communication +# +Socket::AF_VSOCK: Integer + +# +# XDP (express data path) interface +# +Socket::AF_XDP: Integer + # # Accept only if any address is assigned # @@ -1705,6 +1805,11 @@ Socket::EAI_SOCKTYPE: Integer # Socket::EAI_SYSTEM: Integer +# +# 802.1Q VLAN device +# +Socket::IFF_802_1Q_VLAN: Integer + # # receive all multicast packets # @@ -1715,16 +1820,91 @@ Socket::IFF_ALLMULTI: Integer # Socket::IFF_ALTPHYS: Integer +# +# auto media select active +# +Socket::IFF_AUTOMEDIA: Integer + +# +# bonding master or slave +# +Socket::IFF_BONDING: Integer + +# +# device used as bridge port +# +Socket::IFF_BRIDGE_PORT: Integer + # # broadcast address valid # Socket::IFF_BROADCAST: Integer +# +# flags not changeable +# +Socket::IFF_CANTCHANGE: Integer + +# +# unconfigurable using ioctl(2) +# +Socket::IFF_CANTCONFIG: Integer + # # turn on debugging # Socket::IFF_DEBUG: Integer +# +# disable netpoll at run-time +# +Socket::IFF_DISABLE_NETPOLL: Integer + +# +# disallow bridging this ether dev +# +Socket::IFF_DONT_BRIDGE: Integer + +# +# driver signals dormant +# +Socket::IFF_DORMANT: Integer + +# +# tx hardware queue is full +# +Socket::IFF_DRV_OACTIVE: Integer + +# +# resources allocated +# +Socket::IFF_DRV_RUNNING: Integer + +# +# interface is winding down +# +Socket::IFF_DYING: Integer + +# +# dialup device with changing addresses +# +Socket::IFF_DYNAMIC: Integer + +# +# ethernet bridging device +# +Socket::IFF_EBRIDGE: Integer + +# +# echo sent packets +# +Socket::IFF_ECHO: Integer + +# +# ISATAP interface (RFC4214) +# +Socket::IFF_ISATAP: Integer + # # per link layer defined bit 0 # @@ -1740,11 +1920,51 @@ Socket::IFF_LINK1: Integer # Socket::IFF_LINK2: Integer +# +# hardware address change when it's running +# +Socket::IFF_LIVE_ADDR_CHANGE: Integer + # # loopback net # Socket::IFF_LOOPBACK: Integer +# +# driver signals L1 up +# +Socket::IFF_LOWER_UP: Integer + +# +# device used as macvlan port +# +Socket::IFF_MACVLAN_PORT: Integer + +# +# master of a load balancer +# +Socket::IFF_MASTER: Integer + +# +# bonding master, 802.3ad. +# +Socket::IFF_MASTER_8023AD: Integer + +# +# bonding master, balance-alb. +# +Socket::IFF_MASTER_ALB: Integer + +# +# bonding master, ARP mon in use +# +Socket::IFF_MASTER_ARPMON: Integer + +# +# user-requested monitor mode +# +Socket::IFF_MONITOR: Integer + # # supports multicast # @@ -1765,16 +1985,41 @@ Socket::IFF_NOTRAILERS: Integer # Socket::IFF_OACTIVE: Integer +# +# device used as Open vSwitch datapath port +# +Socket::IFF_OVS_DATAPATH: Integer + # # point-to-point link # Socket::IFF_POINTOPOINT: Integer +# +# can set media type +# +Socket::IFF_PORTSEL: Integer + +# +# user-requested promisc mode +# +Socket::IFF_PPROMISC: Integer + # # receive all packets # Socket::IFF_PROMISC: Integer +# +# interface is being renamed +# +Socket::IFF_RENAMING: Integer + +# +# routing entry installed +# +Socket::IFF_ROUTE: Integer + # # resources allocated # @@ -1785,11 +2030,71 @@ Socket::IFF_RUNNING: Integer # Socket::IFF_SIMPLEX: Integer +# +# slave of a load balancer +# +Socket::IFF_SLAVE: Integer + +# +# bonding slave not the curr. active +# +Socket::IFF_SLAVE_INACTIVE: Integer + +# +# need ARPs for validation +# +Socket::IFF_SLAVE_NEEDARP: Integer + +# +# interface manages own routes +# +Socket::IFF_SMART: Integer + +# +# static ARP +# +Socket::IFF_STATICARP: Integer + +# +# sending custom FCS +# +Socket::IFF_SUPP_NOFCS: Integer + +# +# used as team port +# +Socket::IFF_TEAM_PORT: Integer + +# +# sharing skbs on transmit +# +Socket::IFF_TX_SKB_SHARING: Integer + +# +# unicast filtering +# +Socket::IFF_UNICAST_FLT: Integer + # # interface is up # Socket::IFF_UP: Integer +# +# volatile flags +# +Socket::IFF_VOLATILE: Integer + +# +# WAN HDLC device +# +Socket::IFF_WAN_HDLC: Integer + +# +# dev_hard_start_xmit() is allowed to release skb->dst +# +Socket::IFF_XMIT_DST_RELEASE: Integer + # # Maximum interface name size # @@ -1860,6 +2165,7 @@ Socket::IPPORT_USERRESERVED: Integer # IP6 auth header # Socket::IPPROTO_AH: Integer +Socket::IPPROTO_BIP: Integer # # IP6 destination option @@ -2115,6 +2421,7 @@ Socket::IPV6_USE_MIN_MTU: Integer # Only bind IPv6 with a wildcard bind # Socket::IPV6_V6ONLY: Integer +Socket::IPX_TYPE: Integer # # Add a multicast group membership @@ -2141,6 +2448,11 @@ Socket::IP_DEFAULT_MULTICAST_LOOP: Integer # Socket::IP_DEFAULT_MULTICAST_TTL: Integer +# +# Don't fragment packets +# +Socket::IP_DONTFRAG: Integer + # # Drop a multicast group membership # @@ -2151,6 +2463,11 @@ Socket::IP_DROP_MEMBERSHIP: Integer # Socket::IP_DROP_SOURCE_MEMBERSHIP: Integer +# +# Allow binding to nonexistent IP addresses +# +Socket::IP_FREEBIND: Integer + # # Header is included with data # @@ -2166,11 +2483,26 @@ Socket::IP_IPSEC_POLICY: Integer # Socket::IP_MAX_MEMBERSHIPS: Integer +# +# Minimum TTL allowed for received packets +# +Socket::IP_MINTTL: Integer + # # Multicast source filtering # Socket::IP_MSFILTER: Integer +# +# The Maximum Transmission Unit of the socket +# +Socket::IP_MTU: Integer + +# +# Path MTU discovery +# +Socket::IP_MTU_DISCOVER: Integer + # # IP multicast interface # @@ -2186,16 +2518,46 @@ Socket::IP_MULTICAST_LOOP: Integer # Socket::IP_MULTICAST_TTL: Integer +# +# Force outgoing broadcast datagrams to have the undirected broadcast address +# +Socket::IP_ONESBCAST: Integer + # # IP options to be included in packets # Socket::IP_OPTIONS: Integer +# +# Retrieve security context with datagram +# +Socket::IP_PASSSEC: Integer + # # Receive packet information with datagrams # Socket::IP_PKTINFO: Integer +# +# Receive packet options with datagrams +# +Socket::IP_PKTOPTIONS: Integer + +# +# Always send DF frames +# +Socket::IP_PMTUDISC_DO: Integer + +# +# Never send DF frames +# +Socket::IP_PMTUDISC_DONT: Integer + +# +# Use per-route hints +# +Socket::IP_PMTUDISC_WANT: Integer + # # Set the port range for sockets with unspecified port numbers # @@ -2206,6 +2568,11 @@ Socket::IP_PORTRANGE: Integer # Socket::IP_RECVDSTADDR: Integer +# +# Enable extended reliable error message passing +# +Socket::IP_RECVERR: Integer + # # Receive interface information with datagrams # @@ -2221,6 +2588,11 @@ Socket::IP_RECVOPTS: Integer # Socket::IP_RECVRETOPTS: Integer +# +# Receive link-layer address with datagrams +# +Socket::IP_RECVSLLA: Integer + # # Receive TOS with incoming packets # @@ -2236,11 +2608,26 @@ Socket::IP_RECVTTL: Integer # Socket::IP_RETOPTS: Integer +# +# Notify transit routers to more closely examine the contents of an IP packet +# +Socket::IP_ROUTER_ALERT: Integer + +# +# Source address for outgoing UDP datagrams +# +Socket::IP_SENDSRCADDR: Integer + # # IP type-of-service # Socket::IP_TOS: Integer +# +# Transparent proxy +# +Socket::IP_TRANSPARENT: Integer + # # IP time-to-live # @@ -2250,6 +2637,17 @@ Socket::IP_TTL: Integer # Unblock IPv4 multicast packets with a give source address # Socket::IP_UNBLOCK_SOURCE: Integer +Socket::IP_XFRM_POLICY: Integer + +# +# Connect blocks until accepted +# +Socket::LOCAL_CONNWAIT: Integer + +# +# Pass credentials to receiver +# +Socket::LOCAL_CREDS: Integer # # Retrieve peer credentials @@ -2291,11 +2689,26 @@ Socket::MCAST_LEAVE_GROUP: Integer # Socket::MCAST_LEAVE_SOURCE_GROUP: Integer +# +# Multicast source filtering +# +Socket::MCAST_MSFILTER: Integer + # # Unblock multicast packets from this source # Socket::MCAST_UNBLOCK_SOURCE: Integer +# +# End of record +# +Socket::MSG_COMPAT: Integer + +# +# Confirm path validity +# +Socket::MSG_CONFIRM: Integer + # # Control data lost before delivery # @@ -2322,20 +2735,41 @@ Socket::MSG_EOF: Integer Socket::MSG_EOR: Integer # -# Start of a hold sequence. Dumps to so_temp +# Fetch message from error queue # -Socket::MSG_FLUSH: Integer +Socket::MSG_ERRQUEUE: Integer # -# Data ready to be read +# Reduce step of the handshake process # -Socket::MSG_HAVEMORE: Integer +Socket::MSG_FASTOPEN: Integer +Socket::MSG_FIN: Integer # -# Hold fragment in so_temp +# Start of a hold sequence. Dumps to so_temp +# +Socket::MSG_FLUSH: Integer + +# +# Data ready to be read +# +Socket::MSG_HAVEMORE: Integer + +# +# Hold fragment in so_temp # Socket::MSG_HOLD: Integer +# +# Sender will send more +# +Socket::MSG_MORE: Integer + +# +# Do not generate SIGPIPE +# +Socket::MSG_NOSIGNAL: Integer + # # Process out-of-band data # @@ -2346,15 +2780,22 @@ Socket::MSG_OOB: Integer # Socket::MSG_PEEK: Integer +# +# Wait for full request +# +Socket::MSG_PROXY: Integer + # # Data remains in the current packet # Socket::MSG_RCVMORE: Integer +Socket::MSG_RST: Integer # # Send the packet in so_temp # Socket::MSG_SEND: Integer +Socket::MSG_SYN: Integer # # Data discarded before delivery @@ -2401,11 +2842,36 @@ Socket::NI_NUMERICHOST: Integer # Socket::NI_NUMERICSERV: Integer +# +# Interface to kernel crypto API +# +Socket::PF_ALG: Integer + # # AppleTalk protocol # Socket::PF_APPLETALK: Integer +# +# Asynchronous Transfer Mode +# +Socket::PF_ATM: Integer + +# +# AX.25 protocol +# +Socket::PF_AX25: Integer + +# +# Bluetooth low-level socket protocol +# +Socket::PF_BLUETOOTH: Integer + +# +# Controller Area Network automotive bus protocol +# +Socket::PF_CAN: Integer + # # CCITT (now ITU-T) protocols # @@ -2431,6 +2897,16 @@ Socket::PF_COIP: Integer # Socket::PF_DATAKIT: Integer +# +# DECnet protocol +# +Socket::PF_DEC: Integer + +# +# DECnet protocol +# +Socket::PF_DECnet: Integer + # # DEC Direct Data Link Interface protocol # @@ -2446,6 +2922,11 @@ Socket::PF_ECMA: Integer # Socket::PF_HYLINK: Integer +# +# InfiniBand native addressing +# +Socket::PF_IB: Integer + # # ARPANET IMP protocol # @@ -2476,6 +2957,11 @@ Socket::PF_ISDN: Integer # Socket::PF_ISO: Integer +# +# KCM (kernel connection multiplexor) interface +# +Socket::PF_KCM: Integer + # # Key management protocol, originally developed for usage with IPsec # @@ -2491,6 +2977,11 @@ Socket::PF_LAT: Integer # Socket::PF_LINK: Integer +# +# Logical link control (IEEE 802.2 LLC) protocol +# +Socket::PF_LLC: Integer + # # Host-internal protocols # @@ -2501,6 +2992,11 @@ Socket::PF_LOCAL: Integer # Socket::PF_MAX: Integer +# +# Multiprotocol Label Switching +# +Socket::PF_MPLS: Integer + # # Native ATM access # @@ -2516,6 +3012,16 @@ Socket::PF_NDRV: Integer # Socket::PF_NETBIOS: Integer +# +# Netgraph sockets +# +Socket::PF_NETGRAPH: Integer + +# +# Kernel user interface device +# +Socket::PF_NETLINK: Integer + # # XEROX NS protocols # @@ -2526,6 +3032,10 @@ Socket::PF_NS: Integer # Socket::PF_OSI: Integer +# +# Direct link-layer access +# +Socket::PF_PACKET: Integer Socket::PF_PIP: Integer # @@ -2533,16 +3043,25 @@ Socket::PF_PIP: Integer # Socket::PF_PPP: Integer +# +# Generic PPP transport layer, for setting up L2 tunnels (L2TP and PPPoE) +# +Socket::PF_PPPOX: Integer + # # PARC Universal Packet protocol # Socket::PF_PUP: Integer +# +# Reliable Datagram Sockets (RDS) protocol +# +Socket::PF_RDS: Integer + # # Internal routing protocol # Socket::PF_ROUTE: Integer - Socket::PF_RTIP: Integer # @@ -2554,9 +3073,13 @@ Socket::PF_SIP: Integer # IBM SNA protocol # Socket::PF_SNA: Integer - Socket::PF_SYSTEM: Integer +# +# TIPC, "cluster domain sockets" protocol +# +Socket::PF_TIPC: Integer + # # UNIX sockets # @@ -2567,11 +3090,32 @@ Socket::PF_UNIX: Integer # Socket::PF_UNSPEC: Integer +# +# VSOCK (originally "VMWare VSockets") protocol for hypervisor-guest +# communication +# +Socket::PF_VSOCK: Integer + +# +# XDP (express data path) interface +# +Socket::PF_XDP: Integer + # # eXpress Transfer Protocol # Socket::PF_XTP: Integer +# +# Timestamp (bintime) +# +Socket::SCM_BINTIME: Integer + +# +# The sender's credentials +# +Socket::SCM_CREDENTIALS: Integer + # # Process credentials # @@ -2587,6 +3131,26 @@ Socket::SCM_RIGHTS: Integer # Socket::SCM_TIMESTAMP: Integer +# +# Timestamp (timespec list) (Linux 2.6.30) +# +Socket::SCM_TIMESTAMPING: Integer + +# +# Timespec (timespec) +# +Socket::SCM_TIMESTAMPNS: Integer + +# +# User credentials +# +Socket::SCM_UCRED: Integer + +# +# Wifi status (Linux 3.3) +# +Socket::SCM_WIFI_STATUS: Integer + # # Shut down the reading side of the socket # @@ -2602,11 +3166,27 @@ Socket::SHUT_RDWR: Integer # Socket::SHUT_WR: Integer +# +# Set the close-on-exec (FD_CLOEXEC) flag on the new file descriptor. +# +Socket::SOCK_CLOEXEC: Integer + # # A datagram socket provides connectionless, unreliable messaging # Socket::SOCK_DGRAM: Integer +# +# Set the O_NONBLOCK file status flag on the open file description (see open(2)) +# referred to by the new file descriptor. +# +Socket::SOCK_NONBLOCK: Integer + +# +# Device-level packet access +# +Socket::SOCK_PACKET: Integer + # # A raw socket provides low-level access for direct access or implementing # network protocols @@ -2630,31 +3210,121 @@ Socket::SOCK_SEQPACKET: Integer # Socket::SOCK_STREAM: Integer +# +# AppleTalk socket options +# +Socket::SOL_ATALK: Integer + +# +# AX.25 socket options +# +Socket::SOL_AX25: Integer + +# +# IP socket options +# +Socket::SOL_IP: Integer + +# +# IPX socket options +# +Socket::SOL_IPX: Integer + # # Socket-level options # Socket::SOL_SOCKET: Integer +# +# TCP socket options +# +Socket::SOL_TCP: Integer + +# +# UDP socket options +# +Socket::SOL_UDP: Integer + # # Maximum connection requests that may be queued for a socket # Socket::SOMAXCONN: Integer +# +# Background socket priority +# +Socket::SOPRI_BACKGROUND: Integer + +# +# Interactive socket priority +# +Socket::SOPRI_INTERACTIVE: Integer + +# +# Normal socket priority +# +Socket::SOPRI_NORMAL: Integer + # # Socket has had listen() called on it # Socket::SO_ACCEPTCONN: Integer +# +# There is an accept filter +# +Socket::SO_ACCEPTFILTER: Integer + +# +# Bypass zone boundaries +# +Socket::SO_ALLZONES: Integer + +# +# Attach an accept filter +# +Socket::SO_ATTACH_FILTER: Integer + +# +# Only send packets from the given interface +# +Socket::SO_BINDTODEVICE: Integer + +# +# Receive timestamp with datagrams (bintime) +# +Socket::SO_BINTIME: Integer + +# +# Query supported BPF extensions (Linux 3.14) +# +Socket::SO_BPF_EXTENSIONS: Integer + # # Permit sending of broadcast messages # Socket::SO_BROADCAST: Integer +# +# Set the threshold in microseconds for low latency polling (Linux 3.11) +# +Socket::SO_BUSY_POLL: Integer + # # Debug info recording # Socket::SO_DEBUG: Integer +# +# Detach an accept filter +# +Socket::SO_DETACH_FILTER: Integer + +# +# Domain given for socket() (Linux 2.6.32) +# +Socket::SO_DOMAIN: Integer + # # Use interface addresses # @@ -2670,6 +3340,11 @@ Socket::SO_DONTTRUNC: Integer # Socket::SO_ERROR: Integer +# +# Obtain filter set by SO_ATTACH_FILTER (Linux 3.8) +# +Socket::SO_GET_FILTER: Integer + # # Keep connections alive # @@ -2680,16 +3355,46 @@ Socket::SO_KEEPALIVE: Integer # Socket::SO_LINGER: Integer +# +# Lock the filter attached to a socket (Linux 3.9) +# +Socket::SO_LOCK_FILTER: Integer + +# +# Mandatory Access Control exemption for unlabeled peers +# +Socket::SO_MAC_EXEMPT: Integer + +# +# Set the mark for mark-based routing (Linux 2.6.25) +# +Socket::SO_MARK: Integer + +# +# Cap the rate computed by transport layer. [bytes per second] (Linux 3.13) +# +Socket::SO_MAX_PACING_RATE: Integer + # # Install socket-level Network Kernel Extension # Socket::SO_NKE: Integer +# +# Set netns of a socket (Linux 3.4) +# +Socket::SO_NOFCS: Integer + # # Don't SIGPIPE on EPIPE # Socket::SO_NOSIGPIPE: Integer +# +# Disable checksums +# +Socket::SO_NO_CHECK: Integer + # # Get first packet byte count # @@ -2700,11 +3405,56 @@ Socket::SO_NREAD: Integer # Socket::SO_OOBINLINE: Integer +# +# Receive SCM_CREDENTIALS messages +# +Socket::SO_PASSCRED: Integer + +# +# Toggle security context passing (Linux 2.6.18) +# +Socket::SO_PASSSEC: Integer + +# +# Set the peek offset (Linux 3.4) +# +Socket::SO_PEEK_OFF: Integer + +# +# The credentials of the foreign process connected to this socket +# +Socket::SO_PEERCRED: Integer + +# +# Name of the connecting user +# +Socket::SO_PEERNAME: Integer + +# +# Obtain the security credentials (Linux 2.6.2) +# +Socket::SO_PEERSEC: Integer + +# +# The protocol-defined priority for all packets on this socket +# +Socket::SO_PRIORITY: Integer + +# +# Protocol given for socket() (Linux 2.6.32) +# +Socket::SO_PROTOCOL: Integer + # # Receive buffer size # Socket::SO_RCVBUF: Integer +# +# Receive buffer size without rmem_max limit (Linux 2.6.14) +# +Socket::SO_RCVBUFFORCE: Integer + # # Receive low-water mark # @@ -2715,6 +3465,11 @@ Socket::SO_RCVLOWAT: Integer # Socket::SO_RCVTIMEO: Integer +# +# Receive user credentials with datagram +# +Socket::SO_RECVUCRED: Integer + # # Allow local address reuse # @@ -2725,11 +3480,29 @@ Socket::SO_REUSEADDR: Integer # Socket::SO_REUSEPORT: Integer +# +# Toggle cmsg for number of packets dropped (Linux 2.6.33) +# +Socket::SO_RXQ_OVFL: Integer +Socket::SO_SECURITY_AUTHENTICATION: Integer +Socket::SO_SECURITY_ENCRYPTION_NETWORK: Integer +Socket::SO_SECURITY_ENCRYPTION_TRANSPORT: Integer + +# +# Make select() detect socket error queue with errorfds (Linux 3.10) +# +Socket::SO_SELECT_ERR_QUEUE: Integer + # # Send buffer size # Socket::SO_SNDBUF: Integer +# +# Send buffer size without wmem_max limit (Linux 2.6.14) +# +Socket::SO_SNDBUFFORCE: Integer + # # Send low-water mark # @@ -2745,6 +3518,16 @@ Socket::SO_SNDTIMEO: Integer # Socket::SO_TIMESTAMP: Integer +# +# Time stamping of incoming and outgoing packets (Linux 2.6.30) +# +Socket::SO_TIMESTAMPING: Integer + +# +# Receive nanosecond timestamp with datagrams (timespec) +# +Socket::SO_TIMESTAMPNS: Integer + # # Get the socket type # @@ -2765,27 +3548,72 @@ Socket::SO_WANTMORE: Integer # Socket::SO_WANTOOBFLAG: Integer +# +# Toggle cmsg for wifi status (Linux 3.3) +# +Socket::SO_WIFI_STATUS: Integer + +# +# TCP congestion control algorithm (Linux 2.6.13, glibc 2.6) +# +Socket::TCP_CONGESTION: Integer + +# +# TCP Cookie Transactions (Linux 2.6.33, glibc 2.18) +# +Socket::TCP_COOKIE_TRANSACTIONS: Integer + +# +# Don't send partial frames (Linux 2.2, glibc 2.2) +# +Socket::TCP_CORK: Integer + +# +# Don't notify a listening socket until data is ready (Linux 2.4, glibc 2.2) +# +Socket::TCP_DEFER_ACCEPT: Integer + # # Reduce step of the handshake process (Linux 3.7, glibc 2.18) # Socket::TCP_FASTOPEN: Integer +# +# Retrieve information about this socket (Linux 2.4, glibc 2.2) +# +Socket::TCP_INFO: Integer + # # Maximum number of keepalive probes allowed before dropping a connection (Linux # 2.4, glibc 2.2) # Socket::TCP_KEEPCNT: Integer +# +# Idle time before keepalive probes are sent (Linux 2.4, glibc 2.2) +# +Socket::TCP_KEEPIDLE: Integer + # # Time between keepalive probes (Linux 2.4, glibc 2.2) # Socket::TCP_KEEPINTVL: Integer +# +# Lifetime of orphaned FIN_WAIT2 sockets (Linux 2.4, glibc 2.2) +# +Socket::TCP_LINGER2: Integer + # # Set maximum segment size # Socket::TCP_MAXSEG: Integer +# +# Use MD5 digests (RFC2385, Linux 2.6.20, glibc 2.7) +# +Socket::TCP_MD5SIG: Integer + # # Don't delay sending to coalesce packets # @@ -2801,6 +3629,68 @@ Socket::TCP_NOOPT: Integer # Socket::TCP_NOPUSH: Integer +# +# Sequence of a queue for repair mode (Linux 3.5, glibc 2.18) +# +Socket::TCP_QUEUE_SEQ: Integer + +# +# Enable quickack mode (Linux 2.4.4, glibc 2.3) +# +Socket::TCP_QUICKACK: Integer + +# +# Repair mode (Linux 3.5, glibc 2.18) +# +Socket::TCP_REPAIR: Integer + +# +# Options for repair mode (Linux 3.5, glibc 2.18) +# +Socket::TCP_REPAIR_OPTIONS: Integer + +# +# Queue for repair mode (Linux 3.5, glibc 2.18) +# +Socket::TCP_REPAIR_QUEUE: Integer + +# +# Number of SYN retransmits before a connection is dropped (Linux 2.4, glibc +# 2.2) +# +Socket::TCP_SYNCNT: Integer + +# +# Duplicated acknowledgments handling for thin-streams (Linux 2.6.34, glibc +# 2.18) +# +Socket::TCP_THIN_DUPACK: Integer + +# +# Linear timeouts for thin-streams (Linux 2.6.34, glibc 2.18) +# +Socket::TCP_THIN_LINEAR_TIMEOUTS: Integer + +# +# TCP timestamp (Linux 3.9, glibc 2.18) +# +Socket::TCP_TIMESTAMP: Integer + +# +# Max timeout before a TCP connection is aborted (Linux 2.6.37, glibc 2.18) +# +Socket::TCP_USER_TIMEOUT: Integer + +# +# Clamp the size of the advertised window (Linux 2.4, glibc 2.2) +# +Socket::TCP_WINDOW_CLAMP: Integer + +# +# Don't send partial frames (Linux 2.5.44, glibc 2.11) +# +Socket::UDP_CORK: Integer + # # Socket::Ifaddr represents a result of getifaddrs() function. #