Unit GlobalSock

From Ultibo.org
Revision as of 02:33, 30 December 2016 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


Ultibo Global Socket Definitions

To be documented

Constants



Global socket constants FD_*
FD_SETSIZE = 64;  
 
IOCPARM_MASK = $7f;  
IOC_VOID = $20000000;  
IOC_OUT = $40000000;  
IOC_IN = $80000000;  
IOC_INOUT = (IOC_IN or IOC_OUT);  
 
FIONREAD = Cardinal( IOC_OUT or get # bytes to read
((4 and IOCPARM_MASK) shl 16) or (102 shl 8) or 127);  
FIONBIO = Cardinal(IOC_IN or set/clear non-blocking i/o
((4 and IOCPARM_MASK) shl 16) or (102 shl 8) or 126);  
FIOASYNC = Cardinal(IOC_IN or set/clear async i/o
((4 and IOCPARM_MASK) shl 16) or (102 shl 8) or 125);  
 
SIOCSHIWAT = Cardinal( IOC_IN or set high watermark
((4 and IOCPARM_MASK) shl 16) or (115 shl 8) or 0);  
SIOCGHIWAT = Cardinal( IOC_OUT or get high watermark
((4 and IOCPARM_MASK) shl 16) or (115 shl 8) or 1);  
SIOCSLOWAT = Cardinal( IOC_IN or set low watermark
((4 and IOCPARM_MASK) shl 16) or (115 shl 8) or 2);  
SIOCGLOWAT = Cardinal( IOC_OUT or get low watermark
((4 and IOCPARM_MASK) shl 16) or (115 shl 8) or 3);  
SIOCATMARK = Cardinal( IOC_OUT or at oob mark
((4 and IOCPARM_MASK) shl 16) or (115 shl 8) or 7);  
 
IMPLINK_IP = 155;  
IMPLINK_LOWEXPER = 156;  
IMPLINK_HIGHEXPER = 158;  
 
TF_DISCONNECT = $01;  
TF_REUSE_SOCKET = $02;  
TF_WRITE_BEHIND = $04;  
 
INVALID_SOCKET = TSocket(NOT(0)); This is used instead of -1, since the TSocket type is unsigned.
SOCKET_ERROR = -1;  
 
Level number for (get/set)sockopt() to apply to socket itself
SOL_SOCKET = $ffff; options for socket level
 
Maximum queue length specifiable by listen
SOMAXCONN = 5;  
 
Define constant based on rfc883, used by gethostbyxxxx() calls
MAXGETHOSTSTRUCT = 1024;  
 
Define flags to be used with the WSAAsyncSelect() call
FD_READ = $01;  
FD_WRITE = $02;  
FD_OOB = $04;  
FD_ACCEPT = $08;  
FD_CONNECT = $10;  
FD_CLOSE = $20;  
 
WSADESCRIPTION_LEN = 256;  
WSASYS_STATUS_LEN = 128;  
 
Global Socket constants for enhanced Winsock functions
MAX_NAME_SIZE = 80;  
MAX_NAME_ALIASES = 5;  
MAX_NAME_SERVERS = 5;  
MAX_HOST_ALIASES = 16;  
 
INET_ADDRSTR_ANY = '0.0.0.0';  
INET6_ADDRSTR_INIT = '0::0';  
 
INET_ADDRSTR_BROADCAST = '255.255.255.255';  
 
INET_ADDRSTRLEN = 16; Max size of numeric form of IPv4 address
INET6_ADDRSTRLEN = 46; Max size of numeric form of IPv6 address


IP protocol constants IPPROTO_*
IPPROTO_IP = 0; dummy for IP
IPPROTO_ICMP = 1; control message protocol
IPPROTO_IGMP = 2; group management protocol
IPPROTO_GGP = 3; gateway^2 (deprecated)
IPPROTO_TCP = 6; tcp
IPPROTO_EGP = 8; egp
IPPROTO_PUP =12; pup
IPPROTO_UDP =17; user datagram protocol
IPPROTO_HMP =20; hmp
IPPROTO_IDP =22; xns idp
IPPROTO_RDP =27; rdp
IPPROTO_IPV6 = 41; IP6 header
IPPROTO_ROUTING = 43; IP6 routing header
IPPROTO_FRAGMENT = 44; IP6 fragmentation header
IPPROTO_ICMPV6 = 58; ICMP6
IPPROTO_RVD = 66; rvd
IPPROTO_ND = 77; UNOFFICIAL net disk proto
IPPROTO_RAW = 255; raw IP packet
IPPROTO_MAX = 256;  
 
NSPROTO_IPX = 1000; ipx protocol
NSPROTO_SPX = 1256; spx protocol
NSPROTO_SPXII = 1257; spxii protocol


IP port constants IPPORT_*
Port/socket numbers: network standard functions
IPPORT_ANY = 0;  
IPPORT_ECHO = 7;  
IPPORT_DISCARD = 9;  
IPPORT_SYSTAT = 11;  
IPPORT_DAYTIME = 13;  
IPPORT_NETSTAT = 15;  
IPPORT_FTP = 21;  
IPPORT_TELNET = 23;  
IPPORT_SMTP = 5;  
IPPORT_TIMESERVER = 37;  
IPPORT_NAMESERVER = 42;  
IPPORT_WHOIS = 43;  
IPPORT_DNS = 53;  
IPPORT_MTP = 57;  
IPPORT_BOOTPS = 67;  
IPPORT_BOOTPC = 68;  
 
Port/socket numbers: host specific functions
IPPORT_TFTP = 69;  
IPPORT_RJE = 77;  
IPPORT_FINGER = 79;  
IPPORT_TTYLINK = 87;  
IPPORT_SUPDUP = 95;  
 
UNIX TCP sockets
IPPORT_EXECSERVER = 512;  
IPPORT_LOGINSERVER = 513;  
IPPORT_CMDSERVER = 514;  
IPPORT_EFSSERVER = 520;  
 
UNIX UDP sockets
IPPORT_BIFFUDP = 512;  
IPPORT_WHOSERVER = 513;  
IPPORT_ROUTESERVER = 520;  
 
Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root)
IPPORT_RESERVED = 1024;  


IP options constants IP_*
Options for use with [gs]etsockopt at the IP level
 
IP_OPTIONS = 1;  
IP_MULTICAST_IF = 2; set/get IP multicast interface
IP_MULTICAST_TTL = 3; set/get IP multicast timetolive
IP_MULTICAST_LOOP = 4; set/get IP multicast loopback
IP_ADD_MEMBERSHIP = 5; add an IP group membership
IP_DROP_MEMBERSHIP = 6; drop an IP group membership
IP_TTL = 7; set/get IP Time To Live
IP_TOS = 8; set/get IP Type Of Service
IP_DONTFRAGMENT = 9; set/get IP Don't Fragment flag
IP_HDRINCL = 10; set/get IP Header include
 
IP_DEFAULT_MULTICAST_TTL = 1; normally limit m'casts to 1 hop
IP_DEFAULT_MULTICAST_LOOP = 1; normally hear sends if a member
IP_MAX_MEMBERSHIPS = 20; per socket; must fit in one mbuf


Socket type constants SOCK_*
SOCK_UNSPEC = 0; unspecified
SOCK_STREAM = 1; stream socket
SOCK_DGRAM = 2; datagram socket
SOCK_RAW = 3; raw-protocol interface
SOCK_RDM = 4; reliably-delivered message
SOCK_SEQPACKET = 5; sequenced packet stream
SOCK_PACKET = 10; linux specific way of getting packets at the dev level. For writing rarp and other similar things on the user level.


Socket option constants SO_*
Option flags per-socket
 
SO_DEBUG = $0001; turn on debugging info recording
SO_ACCEPTCONN = $0002; socket has had listen()
SO_REUSEADDR = $0004; allow local address reuse
SO_KEEPALIVE = $0008; keep connections alive
SO_DONTROUTE = $0010; just use interface addresses
SO_BROADCAST = $0020; permit sending of broadcast msgs
SO_USELOOPBACK = $0040; bypass hardware when possible
SO_LINGER = $0080; linger on close if data present
SO_OOBINLINE = $0100; leave received OOB data in line
 
SO_DONTLINGER = $ff7f;  
 
Additional options
SO_SNDBUF = $1001; send buffer size
SO_RCVBUF = $1002; receive buffer size
SO_SNDLOWAT = $1003; send low-water mark
SO_RCVLOWAT = $1004; receive low-water mark
SO_SNDTIMEO = $1005; send timeout
SO_RCVTIMEO = $1006; receive timeout
SO_ERROR = $1007; get error status and clear
SO_TYPE = $1008; get socket type
SO_CONNTIMEO = $1009; connection timeout
 
Options for connect and disconnect data and options. Used only by non-TCP/IP transports such as DECNet, OSI TP4, etc.
SO_CONNDATA = $7000;  
SO_CONNOPT = $7001;  
SO_DISCDATA = $7002;  
SO_DISCOPT = $7003;  
SO_CONNDATALEN = $7004;  
SO_CONNOPTLEN = $7005;  
SO_DISCDATALEN = $7006;  
SO_DISCOPTLEN = $7007;  
 
Option for opening sockets for synchronous access
SO_OPENTYPE = $7008;  
SO_SYNCHRONOUS_ALERT = $10;  
SO_SYNCHRONOUS_NONALERT = $20;  
 
Other NT-specific options
SO_MAXDG = $7009;  
SO_MAXPATHDG = $700A;  
SO_UPDATE_ACCEPT_CONTEXT = $700B;  
SO_CONNECT_TIME = $700C;  


TCP option constants TCP_*
TCP_NODELAY = $0001;  
TCP_MAXSEG = $0002;  
TCP_NOPUSH = $0004;  
TCP_NOOPT = $0008;  
TCP_BSDURGENT = $7000; Implement BSD Urgent instead of RFC793/1122
 
TCP_WSCALE = $0010;  
TCP_NOSACK = $0020;  


UDP option constants UDP_*
UDP_NOCHECKSUM = $0001;  


Address family constants AF_*
AF_UNSPEC = 0; unspecified
AF_UNIX = 1; local to host (pipes, portals)
AF_INET = 2; internetwork: UDP, TCP, etc.
AF_IMPLINK = 3; arpanet imp addresses
AF_PUP = 4; pup protocols: e.g. BSP
AF_CHAOS = 5; mit CHAOS protocols
AF_IPX = 6; IPX and SPX
AF_NS = 6; XEROX NS protocols
AF_ISO = 7; ISO protocols
AF_OSI = AF_ISO; OSI is ISO
AF_ECMA = 8; european computer manufacturers
AF_DATAKIT = 9; datakit protocols
AF_CCITT = 10; CCITT protocols, X.25 etc
AF_SNA = 11; IBM SNA
AF_DECnet = 12; DECnet
AF_DLI = 13; Direct data link interface
AF_LAT = 14; LAT
AF_HYLINK = 15; NSC Hyperchannel
AF_APPLETALK = 16; AppleTalk
AF_NETBIOS = 17; NetBios-style addresses
AF_VOICEVIEW = 18; VoiceView
AF_FIREFOX = 19; FireFox
AF_UNKNOWN1 = 20; Somebody is using this!
AF_BAN = 21; Banyan
AF_ATM = 22; Native ATM Services
AF_INET6 = 23; Internetwork Version 6
AF_CLUSTER = 24; Microsoft Wolfpack
AF_12844 = 25; IEEE 1284.4 WG AF
AF_IRDA = 26; IrDA
AF_NETDES = 28; Network Designers OSI & gateway enabled
 
AF_MAX = 29;  


Protocol family constants PF_*
PF_UNSPEC = AF_UNSPEC;  
PF_UNIX = AF_UNIX;  
PF_INET = AF_INET;  
PF_IMPLINK = AF_IMPLINK;  
PF_PUP = AF_PUP;  
PF_CHAOS = AF_CHAOS;  
PF_NS = AF_NS;  
PF_IPX = AF_IPX;  
PF_OSI = AF_OSI;  
PF_ECMA = AF_ECMA;  
PF_DATAKIT = AF_DATAKIT;  
PF_CCITT = AF_CCITT;  
PF_SNA = AF_SNA;  
PF_DECnet = AF_DECnet;  
PF_DLI = AF_DLI;  
PF_LAT = AF_LAT;  
PF_HYLINK = AF_HYLINK;  
PF_APPLETALK = AF_APPLETALK;  
PF_VOICEVIEW = AF_VOICEVIEW;  
PF_FIREFOX = AF_FIREFOX;  
PF_UNKNOWN1 = AF_UNKNOWN1;  
PF_BAN = AF_BAN;  
PF_ATM = AF_ATM;  
PF_INET6 = AF_INET6;  
PF_CLUSTER = AF_CLUSTER;  
PF_12844 = AF_12844;  
PF_IRDA = AF_IRDA;  
PF_NETDES = AF_NETDES;  
 
PF_MAX = AF_MAX;  


Message flag constants MSG_*
MSG_OOB = $1; process out-of-band data
MSG_PEEK = $2; peek at incoming message
MSG_DONTROUTE = $4; send without using routing tables
 
MSG_INTERRUPT = $10; send/recv in the interrupt context
MSG_MAXIOVLEN = 16;  
 
MSG_PARTIAL = $8000; partial send or recv for message xport


Socket error constants WSAE*, EAI_*
All Windows Sockets error constants are biased by WSABASEERR from the "normal"
 
WSABASEERR = 10000;  
 
Windows Sockets definitions of regular Microsoft C error constants
WSAEINTR = (WSABASEERR+4);  
WSAEBADF = (WSABASEERR+9);  
WSAEACCES = (WSABASEERR+13);  
WSAEFAULT = (WSABASEERR+14);  
WSAEINVAL = (WSABASEERR+22);  
WSAEMFILE = (WSABASEERR+24);  
 
Windows Sockets definitions of regular Berkeley error constants
WSAEWOULDBLOCK = (WSABASEERR+35);  
WSAEINPROGRESS = (WSABASEERR+36);  
WSAEALREADY = (WSABASEERR+37);  
WSAENOTSOCK = (WSABASEERR+38);  
WSAEDESTADDRREQ = (WSABASEERR+39);  
WSAEMSGSIZE = (WSABASEERR+40);  
WSAEPROTOTYPE = (WSABASEERR+41);  
WSAENOPROTOOPT = (WSABASEERR+42);  
WSAEPROTONOSUPPORT = (WSABASEERR+43);  
WSAESOCKTNOSUPPORT = (WSABASEERR+44);  
WSAEOPNOTSUPP = (WSABASEERR+45);  
WSAEPFNOSUPPORT = (WSABASEERR+46);  
WSAEAFNOSUPPORT = (WSABASEERR+47);  
WSAEADDRINUSE = (WSABASEERR+48);  
WSAEADDRNOTAVAIL = (WSABASEERR+49);  
WSAENETDOWN = (WSABASEERR+50);  
WSAENETUNREACH = (WSABASEERR+51);  
WSAENETRESET = (WSABASEERR+52);  
WSAECONNABORTED = (WSABASEERR+53);  
WSAECONNRESET = (WSABASEERR+54);  
WSAENOBUFS = (WSABASEERR+55);  
WSAEISCONN = (WSABASEERR+56);  
WSAENOTCONN = (WSABASEERR+57);  
WSAESHUTDOWN = (WSABASEERR+58);  
WSAETOOMANYREFS = (WSABASEERR+59);  
WSAETIMEDOUT = (WSABASEERR+60);  
WSAECONNREFUSED = (WSABASEERR+61);  
WSAELOOP = (WSABASEERR+62);  
WSAENAMETOOLONG = (WSABASEERR+63);  
WSAEHOSTDOWN = (WSABASEERR+64);  
WSAEHOSTUNREACH = (WSABASEERR+65);  
WSAENOTEMPTY = (WSABASEERR+66);  
WSAEPROCLIM = (WSABASEERR+67);  
WSAEUSERS = (WSABASEERR+68);  
WSAEDQUOT = (WSABASEERR+69);  
WSAESTALE = (WSABASEERR+70);  
WSAEREMOTE = (WSABASEERR+71);  
 
WSAEDISCON = (WSABASEERR+101);  
 
Extended Windows Sockets error constant definitions
WSASYSNOTREADY = (WSABASEERR+91);  
WSAVERNOTSUPPORTED = (WSABASEERR+92);  
WSANOTINITIALISED = (WSABASEERR+93);  
 
WSAENOMORE = (WSABASEERR+102);  
WSAECANCELLED = (WSABASEERR+103);  
WSAEINVALIDPROCTABLE = (WSABASEERR+104);  
WSAEINVALIDPROVIDER = (WSABASEERR+105);  
WSAEPROVIDERFAILEDINIT = (WSABASEERR+106);  
WSASYSCALLFAILURE = (WSABASEERR+107);  
WSASERVICE_NOT_FOUND = (WSABASEERR+108);  
WSATYPE_NOT_FOUND = (WSABASEERR+109);  
WSA_E_NO_MORE = (WSABASEERR+110);  
WSA_E_CANCELLED = (WSABASEERR+111);  
WSAEREFUSED = (WSABASEERR+112);  
 
Error return codes from gethostbyname() and gethostbyaddr() (when using the resolver). Note that these errors are retrieved via WSAGetLastError() and must therefore follow the rules for avoiding clashes with error numbers from specific implementations or language run-time systems. For this reason the codes are based at WSABASEERR+1001. Note also that [WSA]NO_ADDRESS is defined only for compatibility purposes.
 
Authoritative Answer: Host not found
WSAHOST_NOT_FOUND = (WSABASEERR+1001);  
HOST_NOT_FOUND = WSAHOST_NOT_FOUND;  
 
Non-Authoritative: Host not found, or SERVERFAIL
WSATRY_AGAIN = (WSABASEERR+1002);  
TRY_AGAIN = WSATRY_AGAIN;  
 
Non recoverable errors, FORMERR, REFUSED, NOTIMP
WSANO_RECOVERY = (WSABASEERR+1003)  
NO_RECOVERY = WSANO_RECOVERY;  
 
Valid name, no data record of requested type
WSANO_DATA = (WSABASEERR+1004);  
NO_DATA = WSANO_DATA;  
 
no address, look for MX record
WSANO_ADDRESS = WSANO_DATA;  
NO_ADDRESS = WSANO_ADDRESS;  
 
WinSock 2 extension -- new error codes and type definition
WSA_IO_PENDING = ERROR_IO_PENDING;  
WSA_IO_INCOMPLETE = ERROR_IO_INCOMPLETE;  
WSA_INVALID_HANDLE = ERROR_INVALID_HANDLE;  
WSA_INVALID_PARAMETER = ERROR_INVALID_PARAMETER;  
WSA_NOT_ENOUGH_MEMORY = ERROR_NOT_ENOUGH_MEMORY;  
WSA_OPERATION_ABORTED = ERROR_OPERATION_ABORTED;  
WSA_INVALID_EVENT = WSAEVENT(nil);  
WSA_MAXIMUM_WAIT_EVENTS = MAXIMUM_WAIT_OBJECTS;  
WSA_WAIT_FAILED = $ffffffff;  
WSA_WAIT_EVENT_0 = WAIT_OBJECT_0;  
WSA_WAIT_IO_COMPLETION = WAIT_IO_COMPLETION;  
WSA_WAIT_TIMEOUT = WAIT_TIMEOUT;  
WSA_INFINITE = INFINITE;  
 
Windows Sockets errors redefined as regular Berkeley error constants. These are commented out in Windows NT to avoid conflicts with errno.h. Use the WSA constants instead.
EWOULDBLOCK = WSAEWOULDBLOCK;  
EINPROGRESS = WSAEINPROGRESS;  
EALREADY = WSAEALREADY;  
ENOTSOCK = WSAENOTSOCK;  
EDESTADDRREQ = WSAEDESTADDRREQ;  
EMSGSIZE = WSAEMSGSIZE;  
EPROTOTYPE = WSAEPROTOTYPE;  
ENOPROTOOPT = WSAENOPROTOOPT;  
EPROTONOSUPPORT = WSAEPROTONOSUPPORT;  
ESOCKTNOSUPPORT = WSAESOCKTNOSUPPORT;  
EOPNOTSUPP = WSAEOPNOTSUPP;  
EPFNOSUPPORT = WSAEPFNOSUPPORT;  
EAFNOSUPPORT = WSAEAFNOSUPPORT;  
EADDRINUSE = WSAEADDRINUSE;  
EADDRNOTAVAIL = WSAEADDRNOTAVAIL;  
ENETDOWN = WSAENETDOWN;  
ENETUNREACH = WSAENETUNREACH;  
ENETRESET = WSAENETRESET;  
ECONNABORTED = WSAECONNABORTED;  
ECONNRESET = WSAECONNRESET;  
ENOBUFS = WSAENOBUFS;  
EISCONN = WSAEISCONN;  
ENOTCONN = WSAENOTCONN;  
ESHUTDOWN = WSAESHUTDOWN;  
ETOOMANYREFS = WSAETOOMANYREFS;  
ETIMEDOUT = WSAETIMEDOUT;  
ECONNREFUSED = WSAECONNREFUSED;  
ELOOP = WSAELOOP;  
ENAMETOOLONG = WSAENAMETOOLONG;  
EHOSTDOWN = WSAEHOSTDOWN;  
EHOSTUNREACH = WSAEHOSTUNREACH;  
ENOTEMPTY = WSAENOTEMPTY;  
EPROCLIM = WSAEPROCLIM;  
EUSERS = WSAEUSERS;  
EDQUOT = WSAEDQUOT;  
ESTALE = WSAESTALE;  
EREMOTE = WSAEREMOTE;  
 
ENOTREADY = WSASYSNOTREADY;  
EVERNOTSUPPORTED = WSAVERNOTSUPPORTED;  
ENOTINITIALISED = WSANOTINITIALISED;  
 
Error codes from getaddrinfo()
EAI_AGAIN = WSATRY_AGAIN;  
EAI_BADFLAGS = WSAEINVAL;  
EAI_FAIL = WSANO_RECOVERY;  
EAI_FAMILY = WSAEAFNOSUPPORT;  
EAI_MEMORY = WSA_NOT_ENOUGH_MEMORY;  
EAI_NODATA = WSANO_DATA;  
EAI_NONAME = WSAHOST_NOT_FOUND;  
EAI_SERVICE = WSATYPE_NOT_FOUND;  
EAI_SOCKTYPE = WSAESOCKTNOSUPPORT;  
 
EAI_NODATA = EAI_NONAME;  


Shutdown options SD_*
SD_RECEIVE = $00;  
SD_SEND = $01;  
SD_BOTH = $02;  


WsControlEx option constants WSA_*
Global Socket constants for undocumented Winsock functions
 
WSA_MAX_INTERFACE_NAME_LEN = 256;  
WSA_ANY_SIZE = 1;  
 
WSA_MAX_ADAPTER_NAME = 128;  
 
WSA_MAX_ADAPTER_DESCRIPTION_LENGTH = 128;  
WSA_MAX_ADAPTER_NAME_LENGTH = 256;  
WSA_MAX_ADAPTER_ADDRESS_LENGTH = 8;  
WSA_MAX_HOSTNAME_LEN = 128;  
WSA_MAX_DOMAIN_NAME_LEN = 128;  
WSA_MAX_SCOPE_ID_LEN = 256;  
 
WSA_MAXLEN_IFDESCR = 256;  
WSA_MAXLEN_PHYSADDR = 8;  
 
WSA_USE_CURRENT_TTL = DWORD(-1);  
WSA_USE_CURRENT_FORWARDING = DWORD(-1);  
 
WSA_IP_FORWARDING = 1;  
WSA_IP_NOT_FORWARDING = 2;  
 
WSA_GETNUMBEROFINTERFACES = 1;  
WSA_GETIFENTRY = 2;  
WSA_GETIFTABLE = 3;  
WSA_GETIPADDRTABLE = 4;  
WSA_GETIPNETTABLE = 5;  
WSA_GETIPFORWARDTABLE = 6;  
WSA_GETTCPTABLE = 7;  
WSA_GETUDPTABLE = 8;  
 
WSA_GETIPSTATISTICS = 9;  
WSA_GETICMPSTATISTICS = 10;  
WSA_GETTCPSTATISTICS = 11;  
WSA_GETUDPSTATISTICS = 12;  
 
WSA_SETIFENTRY = 13;  
WSA_CREATEIPFORWARDENTRY = 14;  
WSA_SETIPFORWARDENTRY = 15;  
WSA_DELETEIPFORWARDENTRY = 16;  
 
WSA_SETIPSTATISTICS = 17;  
WSA_SETIPTTL = 18;  
 
WSA_CREATEIPNETENTRY = 19;  
WSA_SETIPNETENTRY = 20;  
WSA_DELETEIPNETENTRY = 21;  
WSA_FLUSHIPNETTABLE = 22;  
 
WSA_CREATEPROXYARPENTRY = 23;  
WSA_DELETEPROXTARPENTRY = 24;  
 
WSA_SETTCPENTRY = 25;  
WSA_GETINTERFACEINFO = 26;  
WSA_GETUNIDIRECTIONALADAPTERINFO = 27;  
 
WSA_GETBESTINTERFACE = 28;  
WSA_GETBESTROUTE = 29;  
WSA_NOTIFYADDRCHANGE = 30;  
WSA_NOTIFYROUTECHANGE = 31;  
WSA_GETADAPTERINDEX = 32;  
WSA_ADDIPADDRESS = 33;  
WSA_DELETEIPADDRESS = 34;  
WSA_GETNETWORKPARAMS = 35;  
WSA_GETADAPTERSINFO = 36;  
WSA_GETPERADAPTERINFO = 37;  
WSA_IPRELEASEADDRESS = 38;  
WSA_IPRENEWADDRESS = 39;  
WSA_SENDARP = 40;  
WSA_GETRTTANDHOPCOUNT = 41;  
WSA_GETFRIENDLYIFINDEX = 42;  
WSA_ENABLEROUTER = 43;  
WSA_UNENABLEROUTER = 44;  


Address info flag constants AI_*
Flags used in "hints" argument to getaddrinfo()
Note: Under Linux these values may be different
 
AI_PASSIVE = $00000001; Socket address will be used in bind() call
AI_CANONNAME = $00000002; Return canonical name from DNS in the first ai_canonname (Cannot be used with AI_FQDN)
AI_NUMERICHOST = $00000004; Nodename must be a numeric address string
AI_NUMERICSERV = $00000008; Servicename must be a numeric port string
AI_ALL = $00000100; Return both IPv6 and IPv4 addresses
AI_ADDRCONFIG = $00000400; Only return addresses if a global address is configured (IPv4 or IPv6), loopback addresses do not count as global.
AI_V4MAPPED = $00000800; Map returned IPv4 addresses to IPv6 address format
AI_NON_AUTHORITATIVE = $00004000; Allow both autoritive and non authoritive return addresses (NS_EMAIL only)
AI_SECURE = $00008000; Obtain result using enhanced security only (NS_EMAIL only)
AI_RETURN_PREFERRED_NAMES = $00010000; Return preferred names (NS_EMAIL only)
AI_FQDN = $00020000; Return the FQDN for the single name specified on NodeName (Cannot be used with AI_CANONNAME)
AI_FILESERVER = $00040000; The requested name is being used for file sharing (Hint Only)


Name info flag constants NI_*
Flags for getnameinfo()
 
NI_NOFQDN = $01; Only return nodename portion for local hosts
NI_NUMERICHOST = $02; Return numeric form of the host's address
NI_NAMEREQD = $04; Error if the host's name not in DNS
NI_NUMERICSERV = $08; Return numeric form of the service (port #)
NI_DGRAM = $10; Service is a datagram service
 
NI_MAXHOST = 1025; Max size of a fully-qualified domain name
NI_MAXSERV = 32; Max size of a service name


Type definitions


To be documented

Public variables


None defined

Function declarations



Global socket functions

procedure FD_CLR(Socket: TSocket; var FDSet: TFDSet);
Description: To be documented
Note None documented


function FD_ISSET(Socket: TSocket; var FDSet: TFDSet): Boolean;
Description: To be documented
Note None documented


procedure FD_SET(Socket: TSocket; var FDSet: TFDSet);
Description: To be documented
Note None documented


procedure FD_ZERO(var FDSet: TFDSet);
Description: To be documented
Note None documented


function SequenceLT(A,B:LongInt):Boolean; inline;
Description: To be documented
Note None documented


function SequenceLEQ(A,B:LongInt):Boolean; inline;
Description: To be documented
Note None documented


function SequenceGT(A,B:LongInt):Boolean; inline;
Description: To be documented
Note None documented


function SequenceGEQ(A,B:LongInt):Boolean; inline;
Description: To be documented
Note None documented


function ProtocolToString(Protocol:Word):String;
Description: To be documented
Note None documented


Return to Unit Reference