Difference between revisions of "Unit GlobalSock"

From Ultibo.org
Jump to: navigation, search
Line 1,671: Line 1,671:
 
----
 
----
  
''To be documented''
+
 
 +
'''Integer types'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>tOS_INT = LongInt;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>tOS_UINT = DWORD;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>ptOS_INT = ^tOS_INT;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>ptOS_UINT = ^tOS_UINT;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>u_int = tOS_UINT;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>pu_int = ^u_int;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Character types'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>u_char = Char;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>pu_char = ^u_char;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Numeric types'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>u_short = Word;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>pu_short = ^u_short;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>u_long = DWORD;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>pu_long = ^u_long;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Socket types'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TSocket = GlobalTypes.TSocket;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''WSA event'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>WSAEVENT = GlobalTypes.WSAEVENT;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>PWSAEVENT = ^WSAEVENT;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>LPWSAEVENT = PWSAEVENT;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''MB character'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>PMBChar = PChar;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''FD set'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TFDSet = fdset;</code>
 +
 
 +
<code>PFDSet = ^TFDSet;</code>
 +
 
 +
<code>fdset = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>fd_count: u_int;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>fd_array: array[0..FD_SETSIZE-1] of TSocket;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Time value'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TTimeVal = timeval;</code>
 +
 
 +
<code>PTimeVal = ^TTimeVal;</code>
 +
 
 +
<code>timeval = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>tv_sec: LongInt;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>tv_usec: LongInt;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Host entry'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>THostEnt = hostent;</code>
 +
 
 +
<code>PHostEnt = ^THostEnt;</code>
 +
 
 +
<code>hostent = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>h_name: PChar;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>h_aliases: ^PChar;</code>
 +
| &nbsp;
 +
|-
 +
| <code>h_addrtype: Smallint;</code>
 +
| &nbsp;
 +
|-
 +
| <code>h_length: Smallint;</code>
 +
| &nbsp;
 +
|-
 +
| <code>case Byte of</code>
 +
| &nbsp;
 +
|-
 +
| <code>0: (h_addr_list: ^PChar);</code>
 +
| &nbsp;
 +
|-
 +
| <code>1: (h_addr: ^PChar)</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Network entry''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TNetEnt = netent;</code>
 +
 
 +
<code>PNetEnt = ^TNetEnt;</code>
 +
 
 +
<code>netent = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>n_name: PChar;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>n_aliases: ^PChar;</code>
 +
| &nbsp;
 +
|-
 +
| <code>n_addrtype: Smallint;</code>
 +
| &nbsp;
 +
|-
 +
| <code>n_net: u_long;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''Service entry''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TServEnt = servent;</code>
 +
 
 +
<code>PServEnt = ^TServEnt;</code>
 +
 
 +
<code>servent = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>s_name: PChar;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>s_aliases: ^PChar;</code>
 +
| &nbsp;
 +
|-
 +
| <code>s_port: Smallint;</code>
 +
| &nbsp;
 +
|-
 +
| <code>s_proto: PChar;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''Protocol entry''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TProtoEnt = protoent;</code>
 +
 
 +
<code>PProtoEnt = ^TProtoEnt;</code>
 +
 
 +
<code>protoent = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>p_name: PChar;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>p_aliases: ^Pchar;</code>
 +
| &nbsp;
 +
|-
 +
| <code>p_proto: Smallint;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Address types'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
 
 +
<code>SunB = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>s_b1, s_b2, s_b3, s_b4: u_char;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
 
 +
<code>SunW = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>s_w1, s_w2: u_short;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''IPv4 address'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TInAddr = in_addr;</code>
 +
 
 +
<code>PInAddr = ^TInAddr;</code>
 +
 
 +
<code>in_addr = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>case integer of</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>0: (S_un_b: SunB);</code>
 +
| &nbsp;
 +
|-
 +
| <code>1: (S_un_w: SunW);</code>
 +
| &nbsp;
 +
|-
 +
| <code>2: (S_addr: u_long);</code>
 +
| &nbsp;
 +
|-
 +
| <code>3: (S_bytes: packed array[1..4] of Byte);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''IPv6 address'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TIn6Addr = in6_addr;</code>
 +
 
 +
<code>PIn6Addr = ^TIn6Addr;</code>
 +
 
 +
<code>in6_addr = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: IPv6 version of above
 +
|-
 +
| <code>case byte of</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>0: (u6_addr8 : array[0..15] of byte);</code>
 +
| &nbsp;
 +
|-
 +
| <code>1: (u6_addr16 : array[0..7] of Word);</code>
 +
| &nbsp;
 +
|-
 +
| <code>2: (u6_addr32 : array[0..3] of Cardinal);</code>
 +
| &nbsp;
 +
|-
 +
| <code>3: (s6_addr8 : array[0..15] of shortint);</code>
 +
| &nbsp;
 +
|-
 +
| <code>4: (s6_addr : array[0..15] of shortint);</code>
 +
| &nbsp;
 +
|-
 +
| <code>5: (s6_addr16 : array[0..7] of smallint);</code>
 +
| &nbsp;
 +
|-
 +
| <code>6: (s6_addr32 : array[0..3] of LongInt);</code>
 +
| &nbsp;
 +
|-
 +
| <code>case integer of</code>
 +
| &nbsp;
 +
|-
 +
| <code>0: (S6_u8: array[0..15] of u_char);</code>
 +
| &nbsp;
 +
|-
 +
| <code>1: (S6_u32: array[0..3] of u_int);</code>
 +
| &nbsp;
 +
|-
 +
| <code>2: (S6_u64: array[0..1] of Int64);</code>
 +
| &nbsp;
 +
|-
 +
| <code>S6_addr: array [0..15] of Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''IPX address'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TIpxAddr = ipx_addr;</code>
 +
 
 +
<code>PIpxAddr = ^TIpxAddr;</code>
 +
 
 +
<code>ipx_addr = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: IPX version of above
 +
|-
 +
| <code>S_net: array [0..3] of Byte;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>S_node: array [0..5] of Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>S_socket: Word;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''Socket address in IPv4'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TSockAddrIn = sockaddr_in;</code>
 +
 
 +
<code>PSockAddrIn = ^TSockAddrIn;</code>
 +
 
 +
<code>sockaddr_in = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>case Integer of</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>0: (sin_family: u_short;</code>
 +
| &nbsp;
 +
|-
 +
| <code>sin_port: u_short;</code>
 +
| &nbsp;
 +
|-
 +
| <code>sin_addr: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>sin_zero: array[0..7] of Char);</code>
 +
| &nbsp;
 +
|-
 +
| <code>1: (sa_family: u_short;</code>
 +
| &nbsp;
 +
|-
 +
| <code>sa_data: array[0..13] of Char)</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>  
 +
 
 +
'''Socket address in IPv6'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TSockAddrIn6 = sockaddr_in6;</code>
 +
 
 +
<code>PSockAddrIn6 = ^TSockAddrIn6;</code>
 +
 
 +
<code>sockaddr_in6 = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: IPv6 version of above
 +
|-
 +
| <code>sin6_family: u_short;</code>
 +
| AF_INET6
 +
|-
 +
| <code>sin6_port: u_short;</code>
 +
| transport layer port #
 +
|-
 +
| <code>sin6_flowinfo: u_int;</code>
 +
| IPv6 flow information
 +
|-
 +
| <code>sin6_addr: in6_addr;</code>
 +
| IPv6 address
 +
|-
 +
| <code>sin6_scope_id: u_int;</code>
 +
| set of interfaces for a scope
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Socket address IPX'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TSockAddrIpx = sockaddr_ipx;</code>
 +
 
 +
<code>PSockAddrIpx = ^TSockAddrIpx;</code>
 +
 
 +
<code>sockaddr_ipx = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: IPX version of above
 +
|-
 +
| <code>sipx_family: u_short;</code>
 +
| AF_IPX
 +
|-
 +
| <code>sipx_addr: ipx_addr;</code>
 +
| IPX address
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Socket address'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
|colspan="2"|Note: Structure used by kernel to store most addresses.
 +
|-
 +
| <code>PSOCKADDR = ^TSockAddr;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>TSockAddr = sockaddr_in;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Socket address IPv6'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>PSOCKADDR6 = ^TSockAddr6;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>TSockAddr6 = sockaddr_in6;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Socket protocol'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TSockProto = sockproto;</code>
 +
 
 +
<code>PSockProto = ^TSockProto;</code>
 +
 
 +
<code>sockproto = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Structure used by kernel to pass protocol information in raw sockets
 +
|-
 +
| <code>sp_family: u_short;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>sp_protocol: u_short;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Linger'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TLinger = linger;</code>
 +
 
 +
<code>PLinger = ^TLinger;</code>
 +
 
 +
<code>linger = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Structure used for manipulating linger option
 +
|-
 +
| <code>l_onoff: u_short;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>l_linger: u_short;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''WSA data''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAData = WSAData;</code>
 +
 
 +
<code>PWSAData = ^TWSAData;</code>
 +
 
 +
<code>WSAData = record </code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Also WSDATA
 +
|-
 +
| <code>wVersion: Word;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>wHighVersion: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>szDescription: array[0..WSADESCRIPTION_LEN] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>szSystemStatus: array[0..WSASYS_STATUS_LEN] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>iMaxSockets: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>iMaxUdpDg: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>lpVendorInfo: PChar;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''Transmit file buffers''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TTransmitFileBuffers = _TRANSMIT_FILE_BUFFERS;</code>
 +
 
 +
<code>TRANSMIT_FILE_BUFFERS = _TRANSMIT_FILE_BUFFERS;</code>
 +
 
 +
<code>PTransmitFileBuffers = ^TTransmitFileBuffers;</code>
 +
 
 +
<code>_TRANSMIT_FILE_BUFFERS = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Head: Pointer;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HeadLength: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Tail: Pointer;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TailLength: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Multicast request'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TMulticastRequest = ip_mreq;</code>
 +
 
 +
<code>PMulticastRequest = ^TMulticastRequest;</code>
 +
 
 +
<code>ip_mreq = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP
 +
|-
 +
| <code>IMRMultiAddr : TInAddr;</code>
 +
| IP multicast address of group
 +
|-
 +
| <code>IMRInterface : TInAddr;</code>
 +
| local IP address of interface
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''WSA interface row'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAIfRow = WSA_IFROW;</code>
 +
 
 +
<code>PWSAIfRow = PWSA_IFROW;</code>
 +
 
 +
<code>PWSA_IFROW = ^WSA_IFROW;</code>
 +
 
 +
<code>WSA_IFROW = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Structures for WsControlEx (Note: Must be same as IP Helper)
 +
|-
 +
| <code>wszName: array [0..WSA_MAX_INTERFACE_NAME_LEN - 1] of WideChar;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>dwIndex: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwType: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwMtu: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwSpeed: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwPhysAddrLen: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bPhysAddr: array [0..WSA_MAXLEN_PHYSADDR - 1] of Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwAdminStatus: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOperStatus: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwLastChange: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInOctets: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInUcastPkts: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInNUcastPkts: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInDiscards: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInErrors: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInUnknownProtos: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOutOctets: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOutUcastPkts: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOutNUcastPkts: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOutDiscards: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOutErrors: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOutQLen: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwDescrLen: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescr: array[0..WSA_MAXLEN_IFDESCR - 1] of Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''WSA interface table''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAIftable = WSA_IFTABLE;</code>
 +
 
 +
<code>PWSAIftable = PWSA_IFTABLE;</code>
 +
 
 +
<code>PWSA_IFTABLE = ^WSA_IFTABLE;</code>
 +
 
 +
<code>WSA_IFTABLE = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>dwNumEntries: DWORD;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>table: array [0..WSA_ANY_SIZE - 1] of WSA_IFROW;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''WSA IP statistics''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAIpStats = WSA_IPSTATS;</code>
 +
 
 +
<code>PWSAIpStats = PWSA_IPSTATS;</code>
 +
 
 +
<code>PWSA_IPSTATS = ^WSA_IPSTATS;</code>
 +
 
 +
<code>WSA_IPSTATS = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>dwForwarding: DWORD;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>dwDefaultTTL: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInReceives: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInHdrErrors: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInAddrErrors: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwForwDatagrams: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInUnknownProtos: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInDiscards: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwInDelivers: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOutRequests: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwRoutingDiscards: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOutDiscards: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwOutNoRoutes: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwReasmTimeout: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwReasmReqds: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwReasmOks: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwReasmFails: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwFragOks: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwFragFails: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwFragCreates: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwNumIf: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwNumAddr: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwNumRoutes: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''WSA IP address row''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAIpAddrRow = WSA_IPADDRROW;</code>
 +
 
 +
<code>PWSAIpAddrRow = PWSA_IPADDRROW;</code>
 +
 
 +
<code>PWSA_IPADDRROW = ^WSA_IPADDRROW;</code>
 +
 
 +
<code>WSA_IPADDRROW = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>dwAddr: DWORD;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>dwIndex: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwMask: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwBCastAddr: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>dwReasmSize: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>unused1: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>unused2: Word;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''WSA IP address table''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAIpAddrTable = WSA_IPADDRTABLE;</code>
 +
 
 +
<code>PWSAIpAddrTable = PWSA_IPADDRTABLE;</code>
 +
 
 +
<code>PWSA_IPADDRTABLE = ^WSA_IPADDRTABLE;</code>
 +
 
 +
<code>WSA_IPADDRTABLE = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>dwNumEntries: DWORD;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>table: array [0..WSA_ANY_SIZE - 1] of WSA_IPADDRROW;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''WSA IP adapter index map''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAIpAdapterIndexMap = WSA_IP_ADAPTER_INDEX_MAP;</code>
 +
 
 +
<code>PWSAIpAdapterIndexMap = PWSA_IP_ADAPTER_INDEX_MAP;</code>
 +
 
 +
<code>PWSA_IP_ADAPTER_INDEX_MAP = ^WSA_IP_ADAPTER_INDEX_MAP;</code>
 +
 
 +
<code>WSA_IP_ADAPTER_INDEX_MAP = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Index: ULONG;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Name: array [0..WSA_MAX_ADAPTER_NAME - 1] of WideChar;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''WSA IP interface information''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAIpInterfaceInfo = WSA_IP_INTERFACE_INFO;</code>
 +
 
 +
<code>PWSAIpInterfaceInfo = PWSA_IP_INTERFACE_INFO;</code>
 +
 
 +
<code>PWSA_IP_INTERFACE_INFO = ^WSA_IP_INTERFACE_INFO;</code>
 +
 
 +
<code>WSA_IP_INTERFACE_INFO = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NumAdapters: DWORD;</code>
 +
| LongInt
 +
|-
 +
| <code>Adapter: array [0..0] of WSA_IP_ADAPTER_INDEX_MAP;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''WSA IP address string''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PWSA_IP_ADDRESS_STRING = ^WSA_IP_ADDRESS_STRING;</code>
 +
 
 +
<code>WSA_IP_MASK_STRING = WSA_IP_ADDRESS_STRING;</code>
 +
 
 +
<code>TWSAIpAddressString = WSA_IP_ADDRESS_STRING;</code>
 +
 
 +
<code>PWSAIpAddressString = PWSA_IP_MASK_STRING;</code>
 +
 
 +
<code>PWSA_IP_MASK_STRING = ^WSA_IP_MASK_STRING;</code>
 +
 
 +
<code>WSA_IP_ADDRESS_STRING = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>S: array [0..15] of Char;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''WSA IP address string''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAIpAddrString = WSA_IP_ADDR_STRING;</code>
 +
 
 +
<code>PWSAIpAddrString = PWSA_IP_ADDR_STRING;</code>
 +
 
 +
<code>PWSA_IP_ADDR_STRING = ^WSA_IP_ADDR_STRING;</code>
 +
 
 +
<code>WSA_IP_ADDR_STRING = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Next: PWSA_IP_ADDR_STRING;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>IpAddress: WSA_IP_ADDRESS_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IpMask: WSA_IP_MASK_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Context: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''WSA IP adapter information''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAIpAdapterInfo = WSA_IP_ADAPTER_INFO;</code>
 +
 
 +
<code>PWSAIpAdapterInfo = PWSA_IP_ADAPTER_INFO;</code>
 +
 
 +
<code>PWSA_IP_ADAPTER_INFO = ^WSA_IP_ADAPTER_INFO;</code>
 +
 
 +
<code>WSA_IP_ADAPTER_INFO = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Next: PWSA_IP_ADAPTER_INFO;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>ComboIndex: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterName: array [0..WSA_MAX_ADAPTER_NAME_LENGTH + 3] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Description: array [0..WSA_MAX_ADAPTER_DESCRIPTION_LENGTH + 3] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AddressLength: UINT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Address: array [0..WSA_MAX_ADAPTER_ADDRESS_LENGTH - 1] of BYTE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Index: DWORD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Type_: UINT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DhcpEnabled: UINT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CurrentIpAddress: PWSA_IP_ADDR_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IpAddressList: WSA_IP_ADDR_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GatewayList: WSA_IP_ADDR_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DhcpServer: WSA_IP_ADDR_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HaveWins: BOOL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PrimaryWinsServer: WSA_IP_ADDR_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SecondaryWinsServer: WSA_IP_ADDR_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LeaseObtained: LongInt;</code>
 +
| time_t
 +
|-
 +
| <code>LeaseExpires: LongInt;</code>
 +
| time_t
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''WSA fixed information''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAFixedInfo = WSA_FIXED_INFO;</code>
 +
 
 +
<code>PWSAFixedInfo = PWSA_FIXED_INFO;</code>
 +
 
 +
<code>PWSA_FIXED_INFO = ^WSA_FIXED_INFO;</code>
 +
 
 +
<code>WSA_FIXED_INFO = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HostName: array [0..WSA_MAX_HOSTNAME_LEN + 3] of Char;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DomainName: array[0..WSA_MAX_DOMAIN_NAME_LEN + 3] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CurrentDnsServer: PWSA_IP_ADDR_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DnsServerList: WSA_IP_ADDR_STRING;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NodeType: UINT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ScopeId: array [0..WSA_MAX_SCOPE_ID_LEN + 3] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EnableRouting: UINT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EnableProxy: UINT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EnableDns: UINT;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Net to address'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>PNetToAddr = ^TNetToAddr;</code>
 +
| style="width: 40%;"|
 +
|-
 +
| <code>TNetToAddr = array[0..MAX_NAME_SIZE - 1] of Char;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''WSA binding'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSABinding = WSABinding;</code>
 +
 
 +
<code>PWSABinding = ^TWSABinding;</code>
 +
 
 +
<code>WSABinding = record </code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: A network Binding (Address)
 +
|-
 +
| <code>Version: Word;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>ConfigType: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigServer: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BindingAddress: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BindingNetmask: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BindingGateway: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NextBinding: PWSABinding;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''WSA provider''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAProvider = WSAProvider;</code>
 +
 
 +
<code>PWSAProvider = ^TWSAProvider;</code>
 +
 
 +
<code>WSAProvider = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: A network Provider (Transport)
 +
|-
 +
| <code>Version: Word;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>TransportFamily: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TransportType: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TransportHandle: Pointer;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigType: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigServer: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ProviderAddress: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ProviderNetmask: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ProviderGateway: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ProviderName: array[0..MAX_NAME_SIZE] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NextProvider: PWSAProvider;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''WSA interface''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAInterface = WSAInterface;</code>
 +
 
 +
<code>PWSAInterface = ^TWSAInterface;</code>
 +
 
 +
<code>WSAInterface = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: A network Interface (Adapter)
 +
|-
 +
| <code>Version: Word;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>AdapterType: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterInt: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterPort: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterName: array[0..MAX_NAME_SIZE] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterHandle: Pointer;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FirstProvider: PWSAProvider;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NextInterface: PWSAInterface;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''WSA configuration''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAConfig = WSAConfig;</code>
 +
 
 +
<code>PWSAConfig = ^TWSAConfig;</code>
 +
 
 +
<code>WSAConfig = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: General Network Configuration
 +
|-
 +
| <code>Version: Word;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Hostname: array[0..MAX_NAME_SIZE - 1] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Namesuffix: array[0..MAX_NAME_SIZE - 1] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Nameservers: array[0..MAX_NAME_SERVERS - 1] of TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FirstInterface: PWSAInterface;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''WSA network binding''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAExtendedBinding = WSAExtendedBinding;</code>
 +
 
 +
<code>PWSAExtendedBinding = ^TWSAExtendedBinding;</code>
 +
 
 +
<code>WSAExtendedBinding = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: A network Binding (Address)
 +
|-
 +
| <code>Size: LongWord;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Version: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigType: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigServer: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigServer6: TIn6Addr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigInitDelay: LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigRetryCount: LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigRetryTimeout: LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BindingAddress: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BindingNetmask: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BindingGateway: TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BindingAddress6: TIn6Addr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BindingNetmask6: TIn6Addr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BindingGateway6: TIn6Addr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Namesuffix: array[0..MAX_NAME_SIZE - 1] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Nameservers: array[0..MAX_NAME_SERVERS - 1] of TInAddr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Nameservers6: array[0..MAX_NAME_SERVERS - 1] of TIn6Addr;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NextBinding: PWSAExtendedBinding;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''WSA network provider''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAExtendedProvider = WSAExtendedProvider;</code>
 +
 
 +
<code>PWSAExtendedProvider = ^TWSAExtendedProvider;</code>
 +
 
 +
<code>WSAExtendedProvider = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: A network Provider (Transport)
 +
|-
 +
| <code>Size: LongWord;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Version: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TransportFamily: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TransportType: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TransportHandle: Pointer;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ProviderName: array[0..MAX_NAME_SIZE] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FirstBinding: PWSAExtendedBinding;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NextProvider: PWSAExtendedProvider;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''WSA network interface''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAExtendedInterface = WSAExtendedInterface;</code>
 +
 
 +
<code>PWSAExtendedInterface = ^TWSAExtendedInterface;</code>
 +
 
 +
<code>WSAExtendedInterface = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: A network Interface (Adapter)
 +
|-
 +
| <code>Size: LongWord;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Version: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterType: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterInt: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterPort: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterName: array[0..MAX_NAME_SIZE] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AdapterHandle: Pointer;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FirstProvider: PWSAExtendedProvider;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NextInterface: PWSAExtendedInterface;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''WSA network configuration''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>TWSAExtendedConfig = WSAExtendedConfig;</code>
 +
 
 +
<code>PWSAExtendedConfig = ^TWSAExtendedConfig;</code>
 +
 
 +
<code>WSAExtendedConfig = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: General Network Configuration
 +
|-
 +
| <code>Size: LongWord;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Version: Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Hostname: array[0..MAX_NAME_SIZE - 1] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FirstInterface: PWSAExtendedInterface;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Address information'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PAddrInfo = ^TAddrInfo;</code>
 +
 
 +
<code>TAddrInfo = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Structure used in getaddrinfo() call
 +
|-
 +
| <code>ai_flags:LongInt;</code>
 +
| AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
 +
|-
 +
| <code>ai_family:LongInt;</code>
 +
| PF_xxx
 +
|-
 +
| <code>ai_socktype:LongInt;</code>
 +
| SOCK_xxx
 +
|-
 +
| <code>ai_protocol:LongInt;</code>
 +
| 0 or IPPROTO_xxx for IPv4 and IPv6
 +
|-
 +
| <code>ai_addrlen:size_t;</code>
 +
| Length of ai_addr
 +
|-
 +
| <code>ai_canonname:PChar;</code>
 +
| Canonical name for nodename
 +
|-
 +
| <code>ai_addr:PSockAddr;</code>
 +
| Binary address
 +
|-
 +
| <code>ai_next:PAddrInfo;</code>
 +
| Next structure in linked list
 +
|-
 +
|}
 +
</div></div> 
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===

Revision as of 00:26, 3 March 2017

Return to Unit Reference


Description


Ultibo Global Socket Definitions

To be documented

Constants



[Expand]
Global socket constants FD_*


[Expand]
IP protocol constants IPPROTO_*


[Expand]
IP port constants IPPORT_*


[Expand]
IP options constants IP_*


[Expand]
Socket type constants SOCK_*


[Expand]
Socket option constants SO_*


[Expand]
TCP option constants TCP_*


[Expand]
UDP option constants UDP_*


[Expand]
Address family constants AF_*


[Expand]
Protocol family constants PF_*


[Expand]
Message flag constants MSG_*


[Expand]
Socket error constants WSAE*, EAI_*


[Expand]
Shutdown options SD_*


[Expand]
WsControlEx option constants WSA_*


[Expand]
Address info flag constants AI_*


[Expand]
Name info flag constants NI_*


Type definitions



Integer types

tOS_INT = LongInt;
tOS_UINT = DWORD;
ptOS_INT = ^tOS_INT;
ptOS_UINT = ^tOS_UINT;
u_int = tOS_UINT;
pu_int = ^u_int;

Character types

u_char = Char;
pu_char = ^u_char;

Numeric types

u_short = Word;
pu_short = ^u_short;
u_long = DWORD;
pu_long = ^u_long;

Socket types

TSocket = GlobalTypes.TSocket;

WSA event

WSAEVENT = GlobalTypes.WSAEVENT;
PWSAEVENT = ^WSAEVENT;
LPWSAEVENT = PWSAEVENT;

MB character

PMBChar = PChar;

FD set

[Expand]

TFDSet = fdset;

PFDSet = ^TFDSet;

fdset = record

Time value

[Expand]

TTimeVal = timeval;

PTimeVal = ^TTimeVal;

timeval = record

Host entry

[Expand]

THostEnt = hostent;

PHostEnt = ^THostEnt;

hostent = record

Network entry

[Expand]

TNetEnt = netent;

PNetEnt = ^TNetEnt;

netent = record

Service entry

[Expand]

TServEnt = servent;

PServEnt = ^TServEnt;

servent = record

Protocol entry

[Expand]

TProtoEnt = protoent;

PProtoEnt = ^TProtoEnt;

protoent = record

Address types

[Expand]

SunB = packed record


[Expand]

SunW = packed record

IPv4 address

[Expand]

TInAddr = in_addr;

PInAddr = ^TInAddr;

in_addr = record

IPv6 address

[Expand]

TIn6Addr = in6_addr;

PIn6Addr = ^TIn6Addr;

in6_addr = record

IPX address

[Expand]

TIpxAddr = ipx_addr;

PIpxAddr = ^TIpxAddr;

ipx_addr = record

Socket address in IPv4

[Expand]

TSockAddrIn = sockaddr_in;

PSockAddrIn = ^TSockAddrIn;

sockaddr_in = record

Socket address in IPv6

[Expand]

TSockAddrIn6 = sockaddr_in6;

PSockAddrIn6 = ^TSockAddrIn6;

sockaddr_in6 = record

Socket address IPX

[Expand]

TSockAddrIpx = sockaddr_ipx;

PSockAddrIpx = ^TSockAddrIpx;

sockaddr_ipx = record

Socket address

Note: Structure used by kernel to store most addresses.
PSOCKADDR = ^TSockAddr;
TSockAddr = sockaddr_in;

Socket address IPv6

PSOCKADDR6 = ^TSockAddr6;
TSockAddr6 = sockaddr_in6;

Socket protocol

[Expand]

TSockProto = sockproto;

PSockProto = ^TSockProto;

sockproto = record

Linger

[Expand]

TLinger = linger;

PLinger = ^TLinger;

linger = record

WSA data

[Expand]

TWSAData = WSAData;

PWSAData = ^TWSAData;

WSAData = record

Transmit file buffers

[Expand]

TTransmitFileBuffers = _TRANSMIT_FILE_BUFFERS;

TRANSMIT_FILE_BUFFERS = _TRANSMIT_FILE_BUFFERS;

PTransmitFileBuffers = ^TTransmitFileBuffers;

_TRANSMIT_FILE_BUFFERS = record

Multicast request

[Expand]

TMulticastRequest = ip_mreq;

PMulticastRequest = ^TMulticastRequest;

ip_mreq = record

WSA interface row

[Expand]

TWSAIfRow = WSA_IFROW;

PWSAIfRow = PWSA_IFROW;

PWSA_IFROW = ^WSA_IFROW;

WSA_IFROW = record

WSA interface table

[Expand]

TWSAIftable = WSA_IFTABLE;

PWSAIftable = PWSA_IFTABLE;

PWSA_IFTABLE = ^WSA_IFTABLE;

WSA_IFTABLE = record

WSA IP statistics

[Expand]

TWSAIpStats = WSA_IPSTATS;

PWSAIpStats = PWSA_IPSTATS;

PWSA_IPSTATS = ^WSA_IPSTATS;

WSA_IPSTATS = record

WSA IP address row

[Expand]

TWSAIpAddrRow = WSA_IPADDRROW;

PWSAIpAddrRow = PWSA_IPADDRROW;

PWSA_IPADDRROW = ^WSA_IPADDRROW;

WSA_IPADDRROW = record

WSA IP address table

[Expand]

TWSAIpAddrTable = WSA_IPADDRTABLE;

PWSAIpAddrTable = PWSA_IPADDRTABLE;

PWSA_IPADDRTABLE = ^WSA_IPADDRTABLE;

WSA_IPADDRTABLE = record

WSA IP adapter index map

[Expand]

TWSAIpAdapterIndexMap = WSA_IP_ADAPTER_INDEX_MAP;

PWSAIpAdapterIndexMap = PWSA_IP_ADAPTER_INDEX_MAP;

PWSA_IP_ADAPTER_INDEX_MAP = ^WSA_IP_ADAPTER_INDEX_MAP;

WSA_IP_ADAPTER_INDEX_MAP = record

WSA IP interface information

[Expand]

TWSAIpInterfaceInfo = WSA_IP_INTERFACE_INFO;

PWSAIpInterfaceInfo = PWSA_IP_INTERFACE_INFO;

PWSA_IP_INTERFACE_INFO = ^WSA_IP_INTERFACE_INFO;

WSA_IP_INTERFACE_INFO = record

WSA IP address string

[Expand]

PWSA_IP_ADDRESS_STRING = ^WSA_IP_ADDRESS_STRING;

WSA_IP_MASK_STRING = WSA_IP_ADDRESS_STRING;

TWSAIpAddressString = WSA_IP_ADDRESS_STRING;

PWSAIpAddressString = PWSA_IP_MASK_STRING;

PWSA_IP_MASK_STRING = ^WSA_IP_MASK_STRING;

WSA_IP_ADDRESS_STRING = record

WSA IP address string

[Expand]

TWSAIpAddrString = WSA_IP_ADDR_STRING;

PWSAIpAddrString = PWSA_IP_ADDR_STRING;

PWSA_IP_ADDR_STRING = ^WSA_IP_ADDR_STRING;

WSA_IP_ADDR_STRING = record

WSA IP adapter information

[Expand]

TWSAIpAdapterInfo = WSA_IP_ADAPTER_INFO;

PWSAIpAdapterInfo = PWSA_IP_ADAPTER_INFO;

PWSA_IP_ADAPTER_INFO = ^WSA_IP_ADAPTER_INFO;

WSA_IP_ADAPTER_INFO = record

WSA fixed information

[Expand]

TWSAFixedInfo = WSA_FIXED_INFO;

PWSAFixedInfo = PWSA_FIXED_INFO;

PWSA_FIXED_INFO = ^WSA_FIXED_INFO;

WSA_FIXED_INFO = record

Net to address

PNetToAddr = ^TNetToAddr;
TNetToAddr = array[0..MAX_NAME_SIZE - 1] of Char;

WSA binding

[Expand]

TWSABinding = WSABinding;

PWSABinding = ^TWSABinding;

WSABinding = record

WSA provider

[Expand]

TWSAProvider = WSAProvider;

PWSAProvider = ^TWSAProvider;

WSAProvider = record

WSA interface

[Expand]

TWSAInterface = WSAInterface;

PWSAInterface = ^TWSAInterface;

WSAInterface = record

WSA configuration

[Expand]

TWSAConfig = WSAConfig;

PWSAConfig = ^TWSAConfig;

WSAConfig = record

WSA network binding

[Expand]

TWSAExtendedBinding = WSAExtendedBinding;

PWSAExtendedBinding = ^TWSAExtendedBinding;

WSAExtendedBinding = record

WSA network provider

[Expand]

TWSAExtendedProvider = WSAExtendedProvider;

PWSAExtendedProvider = ^TWSAExtendedProvider;

WSAExtendedProvider = record

WSA network interface

[Expand]

TWSAExtendedInterface = WSAExtendedInterface;

PWSAExtendedInterface = ^TWSAExtendedInterface;

WSAExtendedInterface = record

WSA network configuration

[Expand]

TWSAExtendedConfig = WSAExtendedConfig;

PWSAExtendedConfig = ^TWSAExtendedConfig;

WSAExtendedConfig = record

Address information

[Expand]

PAddrInfo = ^TAddrInfo;

TAddrInfo = record


Public variables


None defined

Function declarations



Global socket functions

[Expand]
procedure FD_CLR(Socket: TSocket; var FDSet: TFDSet);
Description: To be documented


[Expand]
function FD_ISSET(Socket: TSocket; var FDSet: TFDSet): Boolean;
Description: To be documented


[Expand]
procedure FD_SET(Socket: TSocket; var FDSet: TFDSet);
Description: To be documented


[Expand]
procedure FD_ZERO(var FDSet: TFDSet);
Description: To be documented


[Expand]
function SequenceLT(A,B:LongInt):Boolean; inline;
Description: To be documented


[Expand]
function SequenceLEQ(A,B:LongInt):Boolean; inline;
Description: To be documented


[Expand]
function SequenceGT(A,B:LongInt):Boolean; inline;
Description: To be documented


[Expand]
function SequenceGEQ(A,B:LongInt):Boolean; inline;
Description: To be documented


[Expand]
function ProtocolToString(Protocol:Word):String;
Description: To be documented


Return to Unit Reference