* add TCP and UDP setsockopt option constants to all unix-likes

git-svn-id: trunk@11148 -
This commit is contained in:
Almindor 2008-05-31 22:06:56 +00:00
parent cbe2bf359f
commit 355c4c7c53
6 changed files with 106 additions and 0 deletions

View File

@ -324,3 +324,16 @@ Const
MSG_COMPAT = $8000; { used in sendit() }
MSG_NEEDSA = $10000; { Fail receive if socket address cannot be allocated }
TCP_NODELAY = $01;
{ set maximum segment size }
TCP_MAXSEG = $02;
{ don't push last block of write }
TCP_NOPUSH = $04;
{ don't use TCP options }
TCP_NOOPT = $08;
{ idle time used when SO_KEEPALIVE is enabled }
TCP_KEEPALIVE = $10;
{ don't checksum outbound payloads }
UDP_NOCKSUM = $01;

View File

@ -349,3 +349,17 @@ Const
INVALID_SOCKET = -1;
SOCKET_ERROR = -1;
TCP_NODELAY = $01;
{ set maximum segment size }
TCP_MAXSEG = $02;
{ don't push last block of write }
TCP_NOPUSH = $04;
{ don't use TCP options }
TCP_NOOPT = $08;
{ use MD5 digests (RFC2385) }
TCP_MD5SIG = $10;
{ retrieve tcp_info structure }
TCP_INFO = $20;

View File

@ -349,3 +349,12 @@ Const
INVALID_SOCKET = -1;
SOCKET_ERROR = -1;
TCP_NODELAY = $01;
{ don't delay sending smaller packets }
TCP_MAXSEG = $02;
{ set maximum segment size }
TCP_NOPUSH = $04;
{ don't use TH_PUSH }
TCP_NOOPT = $08;
{ don't use any TCP options }

View File

@ -368,4 +368,31 @@ Const
MSG_COMPAT = $8000;
MSG_SOCALLBCK = $10000;
MSG_NOSIGNAL = $20000; { Do not generate SIGPIPE }
TCP_NODELAY = 1;
{ set maximum segment size }
TCP_MAXSEG = 2;
TCP_KEEPIDLE = 3;
{ reserved for FreeBSD compat }
TCP_NOPUSH = 4;
TCP_KEEPINTVL = 5;
TCP_KEEPCNT = 6;
TCP_KEEPINIT = 7;
{ reserved for FreeBSD compat }
TCP_NOOPT = 8;
{ use MD5 digests (RFC2385) }
TCP_MD5SIG = $10;
{ selected congestion control }
TCP_CONGCTL = $20;
{ socket options for UDP }
UDP_ENCAP = 100;
{ Encapsulation types }
{ draft-ietf-ipsec-nat-t-ike-00/01 }
UDP_ENCAP_ESPINUDP_NON_IKE = 1;
{ draft-ietf-ipsec-udp-encaps-06 }
UDP_ENCAP_ESPINUDP = 2;
{ Default encapsulation port }
UDP_ENCAP_ESPINUDP_PORT = 500;
{ Maximum UDP fragment size for ESP over UDP }
UDP_ENCAP_ESPINUDP_MAXFRAGLEN = 552;

View File

@ -118,4 +118,32 @@ const
PF_BPF = pseudo_AF_HDRCMPLT;
PF_BLUETOOTH = AF_BLUETOOTH;
PF_MAX = AF_MAX;
MSG_OOB = $1;
{ peek at incoming message }
MSG_PEEK = $2;
{ send without using routing tables }
MSG_DONTROUTE = $4;
{ data completes record }
MSG_EOR = $8;
{ data discarded before delivery }
MSG_TRUNC = $10;
{ control data lost before delivery }
MSG_CTRUNC = $20;
{ wait for full request or error }
MSG_WAITALL = $40;
{ this message should be nonblocking }
MSG_DONTWAIT = $80;
{ this message rec'd as broadcast }
MSG_BCAST = $100;
{ this message rec'd as multicast }
MSG_MCAST = $200;
TCP_NODELAY = $01;
{ set maximum segment size }
TCP_MAXSEG = $02;
{ enable TCP MD5 signature option }
TCP_MD5SIG = $04;
{ enable SACKs (if disabled by def.) }
TCP_SACK_ENABLE = $08;

View File

@ -167,4 +167,19 @@ const
MSG_NOTIFICATION = $0100; { Notification, not data }
MSG_XPG4_2 = $8000; { Private: XPG4.2 flag }
MSG_MAXIOVLEN = 16;
TCP_NODELAY = $01;
{ set maximum segment size }
TCP_MAXSEG = $02;
{ set keepalive timer }
TCP_KEEPALIVE = $8;
TCP_NOTIFY_THRESHOLD = $10;
TCP_ABORT_THRESHOLD = $11;
TCP_CONN_NOTIFY_THRESHOLD = $12;
TCP_CONN_ABORT_THRESHOLD = $13;
TCP_RECVDSTADDR = $14;
TCP_INIT_CWND = $15;
TCP_KEEPALIVE_THRESHOLD = $16;
TCP_KEEPALIVE_ABORT_THRESHOLD = $17;
TCP_CORK = $18;