socket.constants.patch

Eric Hodel, 07/08/2011 05:43 AM

Download (21.1 KB)

View differences:

ext/socket/mkconstants.rb (working copy)
37 37

  
38 38

  
39 39
h = {}
40
COMMENTS = Hash.new { |h, name| h[name] = name }
41

  
40 42
DATA.each_line {|s|
41
  name, default_value = s.scan(/\S+/)
43
  name, default_value, comment = s.chomp.split "\t"
42 44
  next unless name && name[0] != ?#
45

  
46
  default_value = nil if default_value == 'nil'
47

  
43 48
  if h.has_key? name
44 49
    warn "#{$.}: warning: duplicate name: #{name}"
45 50
    next
46 51
  end
47 52
  h[name] = default_value
53
  COMMENTS[name] = comment
48 54
}
49 55
DEFS = h.to_a
50 56

  
......
87 93

  
88 94
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_defs_in_guard(make_value, name, default_value)")
89 95
#if defined(<%=name%>)
90
    /* <%=name%>: */
96
    /* <%= COMMENTS[name] %> */
91 97
    rb_define_const(rb_cSocket, <%=c_str name%>, <%=make_value%>(<%=name%>));
92
    /* <%=name%>: */
98
    /* <%= COMMENTS[name] %> */
93 99
    rb_define_const(rb_mSockConst, <%=c_str name%>, <%=make_value%>(<%=name%>));
94 100
#endif
95 101
EOS
......
327 333

  
328 334
__END__
329 335

  
330
SOCK_STREAM
331
SOCK_DGRAM
332
SOCK_RAW
333
SOCK_RDM
334
SOCK_SEQPACKET
335
SOCK_PACKET
336

  
337
AF_UNSPEC
338
PF_UNSPEC
339
AF_INET
340
PF_INET
341
AF_INET6
342
PF_INET6
343
AF_UNIX
344
PF_UNIX
345
AF_AX25
346
PF_AX25
347
AF_IPX
348
PF_IPX
349
AF_APPLETALK
350
PF_APPLETALK
351
AF_LOCAL
352
PF_LOCAL
353
AF_IMPLINK
354
PF_IMPLINK
355
AF_PUP
356
PF_PUP
357
AF_CHAOS
358
PF_CHAOS
359
AF_NS
360
PF_NS
361
AF_ISO
362
PF_ISO
363
AF_OSI
364
PF_OSI
365
AF_ECMA
366
PF_ECMA
367
AF_DATAKIT
368
PF_DATAKIT
369
AF_CCITT
370
PF_CCITT
371
AF_SNA
372
PF_SNA
373
AF_DEC
374
PF_DEC
375
AF_DLI
376
PF_DLI
377
AF_LAT
378
PF_LAT
379
AF_HYLINK
380
PF_HYLINK
381
AF_ROUTE
382
PF_ROUTE
383
AF_LINK
384
PF_LINK
385
AF_COIP
386
PF_COIP
387
AF_CNT
388
PF_CNT
389
AF_SIP
390
PF_SIP
391
AF_NDRV
392
PF_NDRV
393
AF_ISDN
394
PF_ISDN
395
AF_NATM
396
PF_NATM
336
SOCK_STREAM	nil	A stream socket provides a sequenced, reliable two-way connection for a byte stream.
337
SOCK_DGRAM	nil	A datagram socket provides connectionless, unreliable messaging3
338
SOCK_RAW	nil	A raw socket provides low-level access for direct access or implementing network protocols.
339
SOCK_RDM	nil	A reliable datagram socket provides reliable delivery of messages3
340
SOCK_SEQPACKET	nil	A sequential packet socket provides sequenced, reliable two-way connection for datagrams3
341
SOCK_PACKET	nil	Device-level packet access
342

  
343
AF_UNSPEC	nil	Unspecified protocol, any supported address family
344
PF_UNSPEC	nil	Unspecified protocol, any supported address family
345
AF_INET	nil	IPv4 protocol
346
PF_INET	nil	IPv4 protocol
347
AF_INET6	nil	IPv6 protocol
348
PF_INET6	nil	IPv6 protocol
349
AF_UNIX	nil	UNIX sockets
350
PF_UNIX	nil	UNIX sockets
351
AF_AX25	nil	AX.25 protocol
352
PF_AX25	nil	AX.25 protocol
353
AF_IPX	nil	IPX protocol
354
PF_IPX	nil	IPX protocol
355
AF_APPLETALK	nil	AppleTalk protocol
356
PF_APPLETALK	nil	AppleTalk protocol
357
AF_LOCAL	nil	Host-internal protocols
358
PF_LOCAL	nil	Host-internal protocols
359
AF_IMPLINK	nil	ARPANET IMP protocol
360
PF_IMPLINK	nil	ARPANET IMP protocol
361
AF_PUP	nil	PARC Universal Packet protocol
362
PF_PUP	nil	PARC Universal Packet protocol
363
AF_CHAOS	nil	MIT CHAOS protocols
364
PF_CHAOS	nil	MIT CHAOS protocols
365
AF_NS	nil	XEROX NS protocols
366
PF_NS	nil	XEROX NS protocols
367
AF_ISO	nil	ISO Open Systems Interconnection protocols
368
PF_ISO	nil	ISO Open Systems Interconnection protocols
369
AF_OSI	nil	ISO Open Systems Interconnection protocols
370
PF_OSI	nil	ISO Open Systems Interconnection protocols
371
AF_ECMA	nil	European Computer Manufacturers protocols
372
PF_ECMA	nil	European Computer Manufacturers protocols
373
AF_DATAKIT	nil	Datakit protocol
374
PF_DATAKIT	nil	Datakit protocol
375
AF_CCITT	nil	CCITT (now ITU-T) protocols
376
PF_CCITT	nil	CCITT (now ITU-T) protocols
377
AF_SNA	nil	IBM SNA protocol
378
PF_SNA	nil	IBM SNA protocol
379
AF_DEC	nil	DECnet protocol
380
PF_DEC	nil	DECnet protocol
381
AF_DLI	nil	DEC Direct Data Link Interface protocol
382
PF_DLI	nil	DEC Direct Data Link Interface protocol
383
AF_LAT	nil	Local Area Transport protocol
384
PF_LAT	nil	Local Area Transport protocol
385
AF_HYLINK	nil	NSC Hyperchannel protocol
386
PF_HYLINK	nil	NSC Hyperchannel protocol
387
AF_ROUTE	nil	Internal routing protocol
388
PF_ROUTE	nil	Internal routing protocol
389
AF_LINK	nil	Link layer interface
390
PF_LINK	nil	Link layer interface
391
AF_COIP	nil	Connection-oriented IP
392
PF_COIP	nil	Connection-oriented IP
393
AF_CNT	nil	Computer Network Technology
394
PF_CNT	nil	Computer Network Technology
395
AF_SIP	nil	Simple Internet Protocol
396
PF_SIP	nil	Simple Internet Protocol
397
AF_NDRV	nil	Network driver raw access
398
PF_NDRV	nil	Network driver raw access
399
AF_ISDN	nil	Integrated Services Digital Network
400
PF_ISDN	nil	Integrated Services Digital Network
401
AF_NATM	nil	Native ATM acces
402
PF_NATM	nil	Native ATM acces
397 403
AF_SYSTEM
398 404
PF_SYSTEM
399
AF_NETBIOS
400
PF_NETBIOS
401
AF_PPP
402
PF_PPP
403
AF_ATM
404
PF_ATM
405
AF_NETGRAPH
406
PF_NETGRAPH
407
AF_MAX
408
PF_MAX
409
AF_PACKET
410
PF_PACKET
405
AF_NETBIOS	nil	NetBIOS
406
PF_NETBIOS	nil	NetBIOS
407
AF_PPP	nil	Point-to-Point Protocol
408
PF_PPP	nil	Point-to-Point Protocol
409
AF_ATM	nil	Asynchronous Transfer Mode
410
PF_ATM	nil	Asynchronous Transfer Mode
411
AF_NETGRAPH	nil	Netgraph sockets
412
PF_NETGRAPH	nil	Netgraph sockets
413
AF_MAX	nil	Maximum address family for this platform
414
PF_MAX	nil	Maximum address family for this platform
415
AF_PACKET	nil	Direct link-layer access
416
PF_PACKET	nil	Direct link-layer access
411 417

  
412
AF_E164
413
PF_XTP
418
AF_E164	nil	CCITT (ITU-T) E.164 recommendation
419
PF_XTP	nil	eXpress Transfor Protocol
414 420
PF_RTIP
415 421
PF_PIP
416 422
PF_KEY
417 423

  
418
MSG_OOB
419
MSG_PEEK
420
MSG_DONTROUTE
421
MSG_EOR
422
MSG_TRUNC
423
MSG_CTRUNC
424
MSG_WAITALL
425
MSG_DONTWAIT
426
MSG_EOF
427
MSG_FLUSH
428
MSG_HOLD
429
MSG_SEND
430
MSG_HAVEMORE
431
MSG_RCVMORE
432
MSG_COMPAT
433
MSG_PROXY
424
MSG_OOB	nil	Proces out-of-band data
425
MSG_PEEK	nil	Peek at incoming message
426
MSG_DONTROUTE	nil	Send without using the routing tables
427
MSG_EOR	nil	Data completes record
428
MSG_TRUNC	nil	Data discarded before delivery
429
MSG_CTRUNC	nil	Control data lost before delivery
430
MSG_WAITALL	nil	Wait for full request or error
431
MSG_DONTWAIT	nil	This message should be non-blocking
432
MSG_EOF	nil	Data completes connection
433
MSG_FLUSH	nil	Start of a hold sequence.  Dumps to so_temp
434
MSG_HOLD	nil	Hold fragment in so_temp
435
MSG_SEND	nil	Send the packet in so_temp
436
MSG_HAVEMORE	nil	Data ready to be read
437
MSG_RCVMORE	nil	Data remains in the current packet
438
MSG_COMPAT	nil	End of record
439
MSG_PROXY	nil	Wait for full request
434 440
MSG_FIN
435 441
MSG_SYN
436
MSG_CONFIRM
442
MSG_CONFIRM	nil	Confirm path validity
437 443
MSG_RST
438
MSG_ERRQUEUE
439
MSG_NOSIGNAL
440
MSG_MORE
441

  
442
SOL_SOCKET
443
SOL_IP
444
SOL_IPX
445
SOL_AX25
446
SOL_ATALK
447
SOL_TCP
448
SOL_UDP
449

  
450
IPPROTO_IP	0
451
IPPROTO_ICMP	1
452
IPPROTO_IGMP
453
IPPROTO_GGP
454
IPPROTO_TCP	6
455
IPPROTO_EGP
456
IPPROTO_PUP
457
IPPROTO_UDP	17
458
IPPROTO_IDP
459
IPPROTO_HELLO
460
IPPROTO_ND
461
IPPROTO_TP
462
IPPROTO_XTP
463
IPPROTO_EON
444
MSG_ERRQUEUE	nil	Fetch message from error queue
445
MSG_NOSIGNAL	nil	Do not generate SIGPIPE
446
MSG_MORE	nil	Sender will send more
447

  
448
SOL_SOCKET	nil	Socket-level options
449
SOL_IP	nil	IP socket options
450
SOL_IPX	nil	IPX socket options
451
SOL_AX25	nil	AX.25 socket options
452
SOL_ATALK	nil	AppleTalk socket options
453
SOL_TCP	nil	TCP socket options
454
SOL_UDP	nil	UDP socket options
455

  
456
IPPROTO_IP	0	Dummy protocol for IP
457
IPPROTO_ICMP	1	Control message protocol
458
IPPROTO_IGMP	nil	Group Management Protocol
459
IPPROTO_GGP	nil	Gateway to Gateway Protocol
460
IPPROTO_TCP	6	TCP
461
IPPROTO_EGP	nil	Exterior Gateway Protocol
462
IPPROTO_PUP	nil	PARC Universal Packet protocol
463
IPPROTO_UDP	17	UDP
464
IPPROTO_IDP	nil	XNS IDP
465
IPPROTO_HELLO	nil	"hello" routing protocol
466
IPPROTO_ND	nil	Sun net disk protocol
467
IPPROTO_TP	nil	ISO transport protocol class 4
468
IPPROTO_XTP	nil	Xpress Transport Protocol
469
IPPROTO_EON	nil	ISO cnlp
464 470
IPPROTO_BIP
465
IPPROTO_AH
466
IPPROTO_DSTOPTS
467
IPPROTO_ESP
468
IPPROTO_FRAGMENT
469
IPPROTO_HOPOPTS
470
IPPROTO_ICMPV6
471
IPPROTO_IPV6
472
IPPROTO_NONE
473
IPPROTO_ROUTING
471
IPPROTO_AH	nil	IP6 auth header
472
IPPROTO_DSTOPTS	nil	IP6 destination option
473
IPPROTO_ESP	nil	IP6 Encapsulated Security Payload
474
IPPROTO_FRAGMENT	nil	IP6 fragmentation header
475
IPPROTO_HOPOPTS	nil	IP6 hop-by-hop options
476
IPPROTO_ICMPV6	nil	ICMP6
477
IPPROTO_IPV6	nil	IP6 header
478
IPPROTO_NONE	nil	IP6 no next header
479
IPPROTO_ROUTING	nil	IP6 routing header
474 480

  
475
IPPROTO_RAW	255
476
IPPROTO_MAX
481
IPPROTO_RAW	255	Raw IP packet
482
IPPROTO_MAX	nil	Maximum IPPROTO constant
477 483

  
478 484
# Some port configuration
479
IPPORT_RESERVED		1024
480
IPPORT_USERRESERVED	5000
485
IPPORT_RESERVED		1024	Default minimum address for bind or connect
486
IPPORT_USERRESERVED	5000	Default maximum address for bind or connect
481 487

  
482 488
# Some reserved IP v.4 addresses
483
INADDR_ANY		0x00000000
484
INADDR_BROADCAST	0xffffffff
485
INADDR_LOOPBACK		0x7F000001
486
INADDR_UNSPEC_GROUP	0xe0000000
487
INADDR_ALLHOSTS_GROUP	0xe0000001
488
INADDR_MAX_LOCAL_GROUP	0xe00000ff
489
INADDR_NONE		0xffffffff
489
INADDR_ANY		0x00000000	A socket bound to INADDR_ANY receives packets from all interfaces and sends from the default IP address
490
INADDR_BROADCAST	0xffffffff	The network broadcast address
491
INADDR_LOOPBACK		0x7F000001	The loopback address
492
INADDR_UNSPEC_GROUP	0xe0000000	The reserved multicast group
493
INADDR_ALLHOSTS_GROUP	0xe0000001	Multicast group for all systems on this subset
494
INADDR_MAX_LOCAL_GROUP	0xe00000ff	The last local network multicast group
495
INADDR_NONE		0xffffffff	A bitmask for matching no valid IP address
490 496

  
491 497
# IP [gs]etsockopt options
492
IP_OPTIONS
493
IP_HDRINCL
494
IP_TOS
495
IP_TTL
496
IP_RECVOPTS
497
IP_RECVRETOPTS
498
IP_RECVDSTADDR
499
IP_RETOPTS
500
IP_MINTTL
501
IP_DONTFRAG
502
IP_SENDSRCADDR
503
IP_ONESBCAST
504
IP_RECVTTL
505
IP_RECVIF
506
IP_RECVSLLA
507
IP_PORTRANGE
508
IP_MULTICAST_IF
509
IP_MULTICAST_TTL
510
IP_MULTICAST_LOOP
511
IP_ADD_MEMBERSHIP
512
IP_DROP_MEMBERSHIP
513
IP_DEFAULT_MULTICAST_TTL
514
IP_DEFAULT_MULTICAST_LOOP
515
IP_MAX_MEMBERSHIPS
516
IP_ROUTER_ALERT
517
IP_PKTINFO
518
IP_PKTOPTIONS
519
IP_MTU_DISCOVER
520
IP_RECVERR
521
IP_RECVTOS
522
IP_MTU
523
IP_FREEBIND
524
IP_IPSEC_POLICY
498
IP_OPTIONS	nil	IP options to be included in packets
499
IP_HDRINCL	nil	Header is included with data
500
IP_TOS	nil	IP type-of-service
501
IP_TTL	nil	IP time-to-live
502
IP_RECVOPTS	nil	Receive all IP options with datagrapm
503
IP_RECVRETOPTS	nil	Receive all IP options for response
504
IP_RECVDSTADDR	nil	Receive IP destination address with datagram
505
IP_RETOPTS	nil	IP options to be included in datagrams
506
IP_MINTTL	nil	Minimum TTL allowed for received packets
507
IP_DONTFRAG	nil	Don't fragment packets
508
IP_SENDSRCADDR	nil	Source address for outgoing UDP datagrams
509
IP_ONESBCAST	nil	Force outgoing broadcast datagrams to have the undirected broadcast address
510
IP_RECVTTL	nil	Receive IP TTL with datagrams
511
IP_RECVIF	nil	Receive interface information with datagrams
512
IP_RECVSLLA	nil	Receive link-layer address with datagrams
513
IP_PORTRANGE	nil	Set the port range for sockets with unspecified port numbers
514
IP_MULTICAST_IF	nil	IP multicast interface
515
IP_MULTICAST_TTL	nil	IP multicast TTL
516
IP_MULTICAST_LOOP	nil	IP multicast loopback
517
IP_ADD_MEMBERSHIP	nil	Add a multicast group membership
518
IP_DROP_MEMBERSHIP	nil	Drop a multicast group membership
519
IP_DEFAULT_MULTICAST_TTL	nil	Default multicast TTL
520
IP_DEFAULT_MULTICAST_LOOP	nil	Default multicast loopback
521
IP_MAX_MEMBERSHIPS	nil	Maximum number multicast groups a socket can join
522
IP_ROUTER_ALERT	nil	Notify transit routers to more closely examine the contents of an IP packet
523
IP_PKTINFO	nil	Receive packet information with datagrams
524
IP_PKTOPTIONS	nil	Receive packet options with datagrams
525
IP_MTU_DISCOVER	nil	Path MTU discovery
526
IP_RECVERR	nil	Enable extended reliable error mesage passing
527
IP_RECVTOS	nil	Receive TOS with incoming packets
528
IP_MTU	nil	The Maximum Transmission Unit of the socket
529
IP_FREEBIND	nil	Allow binding to nonexistent IP addresses
530
IP_IPSEC_POLICY	nil	IPSec security policy
525 531
IP_XFRM_POLICY
526
IP_PASSSEC
527
IP_PMTUDISC_DONT
528
IP_PMTUDISC_WANT
529
IP_PMTUDISC_DO
530
IP_UNBLOCK_SOURCE
531
IP_BLOCK_SOURCE
532
IP_ADD_SOURCE_MEMBERSHIP
533
IP_DROP_SOURCE_MEMBERSHIP
534
IP_MSFILTER
535

  
536
MCAST_JOIN_GROUP
537
MCAST_BLOCK_SOURCE
538
MCAST_UNBLOCK_SOURCE
539
MCAST_LEAVE_GROUP
540
MCAST_JOIN_SOURCE_GROUP
541
MCAST_LEAVE_SOURCE_GROUP
542
MCAST_MSFILTER
543
MCAST_EXCLUDE
544
MCAST_INCLUDE
545

  
546
SO_DEBUG
547
SO_REUSEADDR
548
SO_REUSEPORT
549
SO_TYPE
550
SO_ERROR
551
SO_DONTROUTE
552
SO_BROADCAST
553
SO_SNDBUF
554
SO_RCVBUF
555
SO_KEEPALIVE
556
SO_OOBINLINE
557
SO_NO_CHECK
558
SO_PRIORITY
559
SO_LINGER
560
SO_PASSCRED
561
SO_PEERCRED
562
SO_RCVLOWAT
563
SO_SNDLOWAT
564
SO_RCVTIMEO
565
SO_SNDTIMEO
566
SO_ACCEPTCONN
567
SO_USELOOPBACK
568
SO_ACCEPTFILTER
569
SO_DONTTRUNC
570
SO_WANTMORE
571
SO_WANTOOBFLAG
572
SO_NREAD
573
SO_NKE
574
SO_NOSIGPIPE
532
IP_PASSSEC	nil	Retrieve security context with datagram
533
IP_PMTUDISC_DONT	nil	Never send DF frames
534
IP_PMTUDISC_WANT	nil	Use per-route hints
535
IP_PMTUDISC_DO	nil	Always send DF frames
536
IP_UNBLOCK_SOURCE	nil	Unblock IPv4 multicast packets with a give source address
537
IP_BLOCK_SOURCE	nil	Block IPv4 multicast packets with a give source address
538
IP_ADD_SOURCE_MEMBERSHIP	nil	Add a multicast group membership
539
IP_DROP_SOURCE_MEMBERSHIP	nil	Drop a multicast group membership
540
IP_MSFILTER	nil	Multicast source filtering
541

  
542
MCAST_JOIN_GROUP	nil	Join a multicast group
543
MCAST_BLOCK_SOURCE	nil	Block multicast packets from this source
544
MCAST_UNBLOCK_SOURCE	nil	Unblock multicast packets from this source
545
MCAST_LEAVE_GROUP	nil	Leave a multicast group
546
MCAST_JOIN_SOURCE_GROUP	nil	Join a multicast source group
547
MCAST_LEAVE_SOURCE_GROUP	nil	Leave a multicast source group
548
MCAST_MSFILTER	nil	Multicast source filtering
549
MCAST_EXCLUDE	nil	Exclusive multicast source filter
550
MCAST_INCLUDE	nil	Inclusive multicast source filter
551

  
552
SO_DEBUG	nil	Debug info recording
553
SO_REUSEADDR	nil	Allow local address reuse
554
SO_REUSEPORT	nil	Allow local address and port reuse
555
SO_TYPE	nil	Get the socket type
556
SO_ERROR	nil	Get and clear the error status
557
SO_DONTROUTE	nil	Use interface addresses
558
SO_BROADCAST	nil	Permit sending of broadcast messages
559
SO_SNDBUF	nil	Send buffer size
560
SO_RCVBUF	nil	Receive buffer size
561
SO_KEEPALIVE	nil	Keep connections alive
562
SO_OOBINLINE	nil	Leave received out-of-band data in-line
563
SO_NO_CHECK	nil	Disable checksums
564
SO_PRIORITY	nil	The protocol-defined priority for all packets on this socket
565
SO_LINGER	nil	Linger on close if data is present
566
SO_PASSCRED	nil	Receive SCM_CREDENTIALS messages
567
SO_PEERCRED	nil	The credentials of the foreign process connected to this socket
568
SO_RCVLOWAT	nil	Receive low-water mark
569
SO_SNDLOWAT	nil	Send low-water mark
570
SO_RCVTIMEO	nil	Receive timeout
571
SO_SNDTIMEO	nil	Send timeout
572
SO_ACCEPTCONN	nil	Socket has had listen() called on it
573
SO_USELOOPBACK	nil	Bypass hardware when possible
574
SO_ACCEPTFILTER	nil	There is an accept filter
575
SO_DONTTRUNC	nil	Retain unread data
576
SO_WANTMORE	nil	Give a hint when more data is ready
577
SO_WANTOOBFLAG	nil	OOB data is wanted in MSG_FLAG on receive
578
SO_NREAD	nil	Get first packet byte count
579
SO_NKE	nil	Install socket-level Network Kernel Extension
580
SO_NOSIGPIPE	nil	Don't SIGPIPE on EPIPE
575 581
SO_SECURITY_AUTHENTICATION
576 582
SO_SECURITY_ENCRYPTION_TRANSPORT
577 583
SO_SECURITY_ENCRYPTION_NETWORK
578
SO_BINDTODEVICE
579
SO_ATTACH_FILTER
580
SO_DETACH_FILTER
581
SO_PEERNAME
582
SO_TIMESTAMP
583
SO_TIMESTAMPNS
584
SO_BINTIME
585
SO_RECVUCRED
586
SO_MAC_EXEMPT
587
SO_ALLZONES
588

  
589
SOPRI_INTERACTIVE
590
SOPRI_NORMAL
591
SOPRI_BACKGROUND
584
SO_BINDTODEVICE	nil	Only send packets from the given interface
585
SO_ATTACH_FILTER	nil	Attach an accept filter
586
SO_DETACH_FILTER	nil	Detach an accept filter
587
SO_PEERNAME	nil	Name of the connecting user
588
SO_TIMESTAMP	nil	Receive timestamp with datagrams (timeval)
589
SO_TIMESTAMPNS	nil	Receive nanosecond timestamp with datagrams (timespec)
590
SO_BINTIME	nil	Receive timestamp with datagrams (bintime)
591
SO_RECVUCRED	nil	Receive user credentials with datagram
592
SO_MAC_EXEMPT	nil	Mandatory Access Control exemption for unlabled peers
593
SO_ALLZONES	nil	Bypass zone boundaries
594

  
595
SOPRI_INTERACTIVE	nil	Interactive socket priority
596
SOPRI_NORMAL	nil	Normal socket priority
597
SOPRI_BACKGROUND	nil	Background socket priority
592 598

  
593 599
IPX_TYPE
594 600

  
595
TCP_NODELAY
596
TCP_MAXSEG
597
TCP_CORK
598
TCP_DEFER_ACCEPT
599
TCP_INFO
600
TCP_KEEPCNT
601
TCP_KEEPIDLE
602
TCP_KEEPINTVL
603
TCP_LINGER2
604
TCP_MD5SIG
605
TCP_NOOPT
606
TCP_NOPUSH
607
TCP_QUICKACK
608
TCP_SYNCNT
609
TCP_WINDOW_CLAMP
610

  
611
UDP_CORK
612

  
613
EAI_ADDRFAMILY
614
EAI_AGAIN
615
EAI_BADFLAGS
616
EAI_FAIL
617
EAI_FAMILY
618
EAI_MEMORY
619
EAI_NODATA
620
EAI_NONAME
621
EAI_OVERFLOW
622
EAI_SERVICE
623
EAI_SOCKTYPE
624
EAI_SYSTEM
625
EAI_BADHINTS
626
EAI_PROTOCOL
627
EAI_MAX
628

  
629
AI_PASSIVE
630
AI_CANONNAME
631
AI_NUMERICHOST
632
AI_NUMERICSERV
633
AI_MASK
634
AI_ALL
635
AI_V4MAPPED_CFG
636
AI_ADDRCONFIG
637
AI_V4MAPPED
638
AI_DEFAULT
639

  
640
NI_MAXHOST
641
NI_MAXSERV
642
NI_NOFQDN
643
NI_NUMERICHOST
644
NI_NAMEREQD
645
NI_NUMERICSERV
646
NI_DGRAM
647

  
648
SHUT_RD		0
649
SHUT_WR		1
650
SHUT_RDWR	2
651

  
652
IPV6_JOIN_GROUP
653
IPV6_LEAVE_GROUP
654
IPV6_MULTICAST_HOPS
655
IPV6_MULTICAST_IF
656
IPV6_MULTICAST_LOOP
657
IPV6_UNICAST_HOPS
658
IPV6_V6ONLY
659
IPV6_CHECKSUM
660
IPV6_DONTFRAG
661
IPV6_DSTOPTS
662
IPV6_HOPLIMIT
663
IPV6_HOPOPTS
664
IPV6_NEXTHOP
665
IPV6_PATHMTU
666
IPV6_PKTINFO
667
IPV6_RECVDSTOPTS
668
IPV6_RECVHOPLIMIT
669
IPV6_RECVHOPOPTS
670
IPV6_RECVPKTINFO
671
IPV6_RECVRTHDR
672
IPV6_RECVTCLASS
673
IPV6_RTHDR
674
IPV6_RTHDRDSTOPTS
675
IPV6_RTHDR_TYPE_0
676
IPV6_RECVPATHMTU
677
IPV6_TCLASS
678
IPV6_USE_MIN_MTU
679

  
680
INET_ADDRSTRLEN         16
681
INET6_ADDRSTRLEN        46
682
IFNAMSIZ
683
IF_NAMESIZE
684

  
685
SOMAXCONN
686

  
687
SCM_RIGHTS
688
SCM_TIMESTAMP
689
SCM_TIMESTAMPNS
690
SCM_BINTIME
691
SCM_CREDENTIALS
692
SCM_CREDS
693
SCM_UCRED
694

  
695
LOCAL_PEERCRED
696
LOCAL_CREDS
697
LOCAL_CONNWAIT
601
TCP_NODELAY	nil	Don't delay sending to coalesce packets
602
TCP_MAXSEG	nil	Set maximum segment size
603
TCP_CORK	nil	Don't send partial frames
604
TCP_DEFER_ACCEPT	nil	Don't notify a listening socket until data is ready
605
TCP_INFO	nil	Retreive information about this socket
606
TCP_KEEPCNT	nil	Makimum number of keepalive probes allowed before dropping a connection
607
TCP_KEEPIDLE	nil	Idle time before keepalive probes are sent
608
TCP_KEEPINTVL	nil	Time between keepalive probes
609
TCP_LINGER2	nil	Lifetime of orphaned FIN_WAIT2 sockets
610
TCP_MD5SIG	nil	Use MD5 digests (RFC2385)
611
TCP_NOOPT	nil	Don't use TCP options
612
TCP_NOPUSH	nil	Don't push the last block of write
613
TCP_QUICKACK	nil	Enable quickack mode
614
TCP_SYNCNT	nil	Number of SYN retransmits before a connection i sdropped
615
TCP_WINDOW_CLAMP	nil	Clamp the size of the advertised window
616

  
617
UDP_CORK	nil	Don't send partial frames
618

  
619
EAI_ADDRFAMILY	nil	Address family for hostname not supported
620
EAI_AGAIN	nil	Temporary failure in name resolution
621
EAI_BADFLAGS	nil	Invalid flags
622
EAI_FAIL	nil	Non-recoverable failure in name resolution
623
EAI_FAMILY	nil	Address family not supported
624
EAI_MEMORY	nil	Memory allocation failure
625
EAI_NODATA	nil	No address associated with hostname
626
EAI_NONAME	nil	Hostname nor servname, or not known
627
EAI_OVERFLOW	nil	Argument buffer overflow
628
EAI_SERVICE	nil	Servname not supported for socket type
629
EAI_SOCKTYPE	nil	Socket type not supported
630
EAI_SYSTEM	nil	System error returned in errno
631
EAI_BADHINTS	nil	Invalid value for hints
632
EAI_PROTOCOL	nil	Resolved protocol is unknown
633
EAI_MAX	nil	Maximum error code from getaddrinfo
634

  
635
AI_PASSIVE	nil	Get address to use with bind()
636
AI_CANONNAME	nil	Fill in the canonical name
637
AI_NUMERICHOST	nil	Prevent host name resolution
638
AI_NUMERICSERV	nil	Prevent service name resolution
639
AI_MASK	nil	Valid flag mask for getaddrinfo (not for application use)
640
AI_ALL	nil	Allow all addresses
641
AI_V4MAPPED_CFG	nil	Accept IPv4 mapped addresses if the kernel supports it
642
AI_ADDRCONFIG	nil	Accept only if any address is assigned
643
AI_V4MAPPED	nil	Accept IPv4-mapped IPv6 addresses
644
AI_DEFAULT	nil	Default flags for getaddrinfo
645

  
646
NI_MAXHOST	nil	Maximum length of a hostname
647
NI_MAXSERV	nil	Maximum length of a service name
648
NI_NOFQDN	nil	An FQDN is not required for local hosts, return only the local part
649
NI_NUMERICHOST	nil	Return a numeric address
650
NI_NAMEREQD	nil	A name is required
651
NI_NUMERICSERV	nil	Return the service name as a digit string
652
NI_DGRAM	nil	The service specified is a datagram service (looks up udp ports)
653

  
654
SHUT_RD		0	Shut down the reading side of the socket
655
SHUT_WR		1	Shut down the writing side of the socket
656
SHUT_RDWR	2	Shut down the both sides of the socket
657

  
658
IPV6_JOIN_GROUP	nil	Join a group membership
659
IPV6_LEAVE_GROUP	nil	Leave a group membership
660
IPV6_MULTICAST_HOPS	nil	IP6 multicast hops
661
IPV6_MULTICAST_IF	nil	IP6 multicast interface
662
IPV6_MULTICAST_LOOP	nil	IP6 multicast loopback
663
IPV6_UNICAST_HOPS	nil	IP6 unicast hops
664
IPV6_V6ONLY	nil	Only bind IPv6 with a wildcard bind
665
IPV6_CHECKSUM	nil	Checksum offset for raw sockets
666
IPV6_DONTFRAG	nil	Don't fragment packets
667
IPV6_DSTOPTS	nil	Destination option
668
IPV6_HOPLIMIT	nil	Hop limit
669
IPV6_HOPOPTS	nil	Hop-by-hop option
670
IPV6_NEXTHOP	nil	Next hop address
671
IPV6_PATHMTU	nil	Retrieve current path MTU
672
IPV6_PKTINFO	nil	Receive packet information with datagram
673
IPV6_RECVDSTOPTS	nil	Receive all IP6 options for response
674
IPV6_RECVHOPLIMIT	nil	Receive hop limit with datagram
675
IPV6_RECVHOPOPTS	nil	Receive hop-by-hop options
676
IPV6_RECVPKTINFO	nil	Receive destination IP address and incoming interface
677
IPV6_RECVRTHDR	nil	Receive routing header
678
IPV6_RECVTCLASS	nil	Receive traffic class
679
IPV6_RTHDR	nil	Allows removal of sticky routing headers
680
IPV6_RTHDRDSTOPTS	nil	Allows removal of sticky destination options header
681
IPV6_RTHDR_TYPE_0	nil	Routing header type 0
682
IPV6_RECVPATHMTU	nil	Receive current path MTU with datagram
683
IPV6_TCLASS	nil	Specify the traffic class
684
IPV6_USE_MIN_MTU	nil	Use the minimum MTU size
685

  
686
INET_ADDRSTRLEN	16	Maximum length of an IPv4 address string
687
INET6_ADDRSTRLEN	46	Maximum length of an IPv6 address string
688
IFNAMSIZ	nil	Maximum interface name size
689
IF_NAMESIZE	nil	Maximum interface name size
690

  
691
SOMAXCONN	nil	Maximum connection requests that may be queued for a socket
692

  
693
SCM_RIGHTS	nil	Access rights
694
SCM_TIMESTAMP	nil	Timestamp (timeval)
695
SCM_TIMESTAMPNS	nil	Timespec (timespec)
696
SCM_BINTIME	nil	Timestamp (bintime)
697
SCM_CREDENTIALS	nil	The sender's credentials
698
SCM_CREDS	nil	Process credentials
699
SCM_UCRED	nil	User credentials
700

  
701
LOCAL_PEERCRED	nil	Retrieve peer credentials
702
LOCAL_CREDS	nil	Pass credentials to receiver
703
LOCAL_CONNWAIT	nil	Connect blocks until accepted