Difference between revisions of "Unit Transport"

From Ultibo.org
Jump to: navigation, search
 
(14 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
'''Ultibo Network Transport interface unit'''
+
'''Ultibo Network Transport Interface unit'''
  
 
''Notes:''
 
''Notes:''
Line 115: Line 115:
 
| <code>MAX_ADDRESS_LIFE = 300000;</code>
 
| <code>MAX_ADDRESS_LIFE = 300000;</code>
 
| 5 min Address (ARP) lifespan
 
| 5 min Address (ARP) lifespan
|-
 
|}
 
</div></div>
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div style="font-size: 14px; padding-left: 12px;">'''IP4 transport constants''' <code> IP_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
 
|-
 
|-
 
| <code>IP_ADDRESS_SIZE = 4;</code>
 
| <code>IP_ADDRESS_SIZE = 4;</code>
 
| SizeOf(TInAddr)
 
| SizeOf(TInAddr)
|-
 
|}
 
</div></div>
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div style="font-size: 14px; padding-left: 12px;">'''IP6 transport constants''' <code> IP6_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
 
|-
 
|-
 
| <code>IP6_ADDRESS_SIZE = 16;</code>
 
| <code>IP6_ADDRESS_SIZE = 16;</code>
 
| SizeOf(TIn6Addr)
 
| SizeOf(TIn6Addr)
|-
 
|}
 
</div></div>
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div style="font-size: 14px; padding-left: 12px;">'''IPX transport constants''' <code> IPX_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
 
|-
 
|-
 
| <code>IPX_ADDRESS_SIZE = 12;</code>
 
| <code>IPX_ADDRESS_SIZE = 12;</code>
Line 153: Line 129:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''Transport socket constants''' <code> TTL_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Transport socket''' <code> TTL_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 222: Line 198:
 
|-
 
|-
 
| <code>SELECT_ERROR = 2;</code>
 
| <code>SELECT_ERROR = 2;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SELECT_UNKNOWN = -1;</code>
 
| &nbsp;
 
| &nbsp;
 
|-
 
|-
Line 228: Line 209:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''Socket state constants''' <code> SS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Socket state''' <code> SS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 290: Line 271:
 
</div></div>
 
</div></div>
 
<br />
 
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''IPv4 transport''' <code> IP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>IP_LOOPBACK_ADDRESS:TInAddr = (S_addr: $7F000001);</code>
 +
| 127.0.0.1
 +
|-
 +
| <code>IP_LOOPBACK_NETWORK:TInAddr = (S_addr: $7F000000);</code>
 +
| 127.0.0.0
 +
|-
 +
| <code>IP_LOOPBACK_NETMASK:TInAddr = (S_addr: $FF000000);</code>
 +
| 255.0.0.0
 +
|-
 +
| <code>IP_BROADCAST_ADDRESS:TInAddr = (S_addr: $FFFFFFFF);</code>
 +
| 255.255.255.255
 +
|-
 +
| <code>IP_BROADCAST_NETWORK:TInAddr = (S_addr: $FFFFFFFF);</code>
 +
| 255.255.255.255
 +
|-
 +
| <code>IP_BROADCAST_NETMASK:TInAddr = (S_addr: $FFFFFFFF);</code>
 +
| 255.255.255.255
 +
|-
 +
| <code>IP_DEFAULT_ADDRESS:TInAddr = (S_addr: $00000000);</code>
 +
| 0.0.0.0
 +
|-
 +
| <code>IP_DEFAULT_NETWORK:TInAddr = (S_addr: $00000000);</code>
 +
| 0.0.0.0
 +
|-
 +
| <code>IP_DEFAULT_NETMASK:TInAddr = (S_addr: $00000000);</code>
 +
| 0.0.0.0
 +
|-
 +
| <code>IP_MULTICAST_HOSTS:TInAddr = (S_addr: $E0000001);</code>
 +
| 224.0.0.1 (All Hosts)
 +
|-
 +
| <code>IP_MULTICAST_ROUTERS:TInAddr = (S_addr: $E0000002);</code>
 +
| 224.0.0.2 (All Routers)
 +
|-
 +
| <code>IP_MULTICAST_NETWORK:TInAddr = (S_addr: $E0000000);</code>
 +
| 224.0.0.0
 +
|-
 +
| <code>IP_MULTICAST_NETMASK:TInAddr = (S_addr: $F0000000);</code>
 +
| 240.0.0.0
 +
|-
 +
|colspan="2"|Note: The recommended range for general use is 234.0.0.0 to 238.255.255.255
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IP_CLASSA_NETMASK:TInAddr = (S_addr: $FF000000);</code>
 +
| 255.0.0.0
 +
|-
 +
| <code>IP_CLASSB_NETMASK:TInAddr = (S_addr: $FFFF0000);</code>
 +
| 255.255.0.0
 +
|-
 +
| <code>IP_CLASSC_NETMASK:TInAddr = (S_addr: $FFFFFF00);</code>
 +
| 255.255.255.0
 +
|-
 +
| <code>IP_CLASSD_NETMASK:TInAddr = (S_addr: $F0000000);</code>
 +
| 240.0.0.0
 +
|-
 +
| <code>IP_CLASSE_NETMASK:TInAddr = (S_addr: $F0000000);</code>
 +
| 240.0.0.0
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''IPv6 transport''' <code> IP6_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>IP6_LOOPBACK_ADDRESS:TIn6Addr = (S6_addr: ($00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01));</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>IP6_DEFAULT_ADDRESS:TIn6Addr = (S6_addr: ($00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00));</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
Line 330: Line 391:
 
</div></div>   
 
</div></div>   
 
   
 
   
'''IP4 nameservers'''
+
'''IPv4 nameservers'''
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
Line 347: Line 408:
 
</div></div>
 
</div></div>
  
'''IP6 nameservers'''
+
'''IPv6 nameservers'''
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
Line 362: Line 423:
 
|-
 
|-
 
|}
 
|}
</div></div>  
+
</div></div>
 +
 
 +
'''Transport callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTransportCallback = function(ATransport:TNetworkTransport):Boolean of object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Monitor callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMonitorCallback = function(AMonitor:TNetworkMonitor):Boolean of object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Authenticator callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TAuthenticatorCallback = function(AAuthenticator:TNetworkAuthenticator):Boolean of object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Transport packet handler'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTransportPacketHandler = function(AHandle:THandle; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean of object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Transport control handler'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTransportControlHandler = function(AHandle:THandle; ASource,ADest:Pointer; AProtocol,ACommand,ACode:Word; AAddress,AData:Pointer; ASize:Integer):Boolean of object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Transport filter handler'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTransportFilterHandler = function(AHandle:THandle; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean of object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Transport configuration handler'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTransportConfigHandler = function(AHandle:THandle; AAdapter:TTransportAdapter; ACommand:Word):Boolean of object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 
<br />
 
<br />
  
Line 368: Line 492:
 
----
 
----
  
''To be documented''
+
 
 +
'''Transport specific classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportManager|<code>TTransportManager = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportBuffer|<code>TTransportBuffer = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportBufferEx|<code>TTransportBufferEx = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportAdapter|<code>TTransportAdapter = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportBinding|<code>TTransportBinding = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportProtocol|<code>TTransportProtocol = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportFilter|<code>TTransportFilter = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportConfig|<code>TTransportConfig = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TNetworkTransport|<code>TNetworkTransport = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TMonitorAdapter|<code>TMonitorAdapter = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TNetworkMonitor|<code>TNetworkMonitor = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TAuthenticatorAdapter|<code>TAuthenticatorAdapter = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TNetworkAuthenticator|<code>TNetworkAuthenticator = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportSocket|<code>TTransportSocket = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TSocketList|<code>TSocketList = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TSocketState|<code>TSocketState = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TSocketBuffer|<code>TSocketBuffer = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TSocketOptions|<code>TSocketOptions = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportState|<code>TTransportState = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TTransportOptions|<code>TTransportOptions = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THostEntry|<code>THostEntry = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TRouteEntry|<code>TRouteEntry = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TAddressEntry|<code>TAddressEntry = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TNetworkEntry|<code>TNetworkEntry = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TServEntry|<code>TServEntry = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TProtoEntry|<code>TProtoEntry = class(TListObject)</code>]]
 +
|-
 +
|}
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
 
 +
'''Transport specific variables'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TransportManager:TTransportManager;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Function declarations ===
 
=== Function declarations ===
Line 387: Line 653:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 399: Line 665:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 411: Line 677:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 423: Line 689:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 435: Line 701:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 450: Line 716:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 462: Line 728:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 474: Line 740:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Expects Address to be in Network order
 
| Expects Address to be in Network order
 
|-
 
|-
Line 486: Line 752:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Returns Address in Network order
 
| Returns Address in Network order
 
|-
 
|-
Line 498: Line 764:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 +
| Expects Address to be in Host order
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function InAddrIsNone(const AAddress:TInAddr):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the supplied address to see if it is equal to INADDR_NONE</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 
| Expects Address to be in Host order
 
| Expects Address to be in Host order
 
|-
 
|-
Line 510: Line 788:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Expects Address to be in Host order
 
| Expects Address to be in Host order
 
|-
 
|-
Line 522: Line 800:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Expects Address to be in Host order
 
| Expects Address to be in Host order
 
|-
 
|-
Line 534: Line 812:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Expects Address to be in Host order
 
| Expects Address to be in Host order
 
|-
 
|-
Line 546: Line 824:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Expects Address to be in Host order
 
| Expects Address to be in Host order
 
|-
 
|-
Line 554: Line 832:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function In6AddrToString(const AAddress:TIn6Addr):String;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function In6AddrToString(const AAddress:TIn6Addr):String;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert an In6Addr to a String</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 566: Line 844:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function StringToIn6Addr(const AAddress:String):TIn6Addr;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function StringToIn6Addr(const AAddress:String):TIn6Addr;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a String to an In6Addr</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 582: Line 860:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function In6AddrIsNone(const AAddress:TIn6Addr):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the supplied address to see if it is IN6ADDR_NONE</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 594: Line 884:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 606: Line 896:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 618: Line 908:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 630: Line 920:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 642: Line 932:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 654: Line 944:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 666: Line 956:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 678: Line 968:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 690: Line 980:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 702: Line 992:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 714: Line 1,004:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 726: Line 1,016:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 738: Line 1,028:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 750: Line 1,040:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 762: Line 1,052:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 774: Line 1,064:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Pseudo is expected to start from Offset 0
 
| Pseudo is expected to start from Offset 0
 
|-
 
|-
Line 786: Line 1,076:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Pseudo and Header are expected to start from Offset 0
 
| Pseudo and Header are expected to start from Offset 0
 
|-
 
|-
Line 798: Line 1,088:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Pseudo, Header and Options are expected to start from Offset 0
+
| Pseudo, Header and Options are expected to start from Offset 0.
 
|-
 
|-
 
|}
 
|}
Line 813: Line 1,103:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 825: Line 1,115:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 837: Line 1,127:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 849: Line 1,139:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 861: Line 1,151:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 873: Line 1,163:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-

Latest revision as of 05:06, 5 March 2025

Return to Unit Reference


Description


Ultibo Network Transport Interface unit

Notes:

Includes all global transport definitions plus base class for Network transports.

Currently supported transports are IP, ARP, RARP, IPX and IP6.

All HostToNetwork swaps occur at the level where they are appropriate (ie the level of their header).

Bindings is provided to support Transports (such as IP) which can provide multiple addresses on a single adapter. It is not used by the Protocol or Winsock layer and is only used by the transport where appropriate. In such cases the ConfigType in the Adapter object is not used and the Binding is used instead.

Constants



[Expand]
Transport specific constants *_TYPE_*


[Expand]
Host constants *_HOST_*


[Expand]
Route constants *_ROUTE_*


[Expand]
Address constants *_ADDRESS_*


[Expand]
Transport socket TTL_*


[Expand]
Shutdown constants SHUTDOWN_*


[Expand]
Select constants SELECT_*


[Expand]
Socket state SS_*


[Expand]
IPv4 transport IP_*


[Expand]
IPv6 transport IP6_*


Type definitions



Transport statistics

[Expand]

PTransportStatistics = ^TTransportStatistics;

TTransportStatistics = record

IPv4 nameservers

[Expand]

PIPNameservers = ^TIPNameservers;

TIPNameservers = array[0..MAX_NAME_SERVERS - 1] of TInAddr;

IPv6 nameservers

[Expand]

PIP6Nameservers = ^TIP6Nameservers;

TIP6Nameservers = array[0..MAX_NAME_SERVERS - 1] of TIn6Addr;

Transport callback

TTransportCallback = function(ATransport:TNetworkTransport):Boolean of object;

Monitor callback

TMonitorCallback = function(AMonitor:TNetworkMonitor):Boolean of object;

Authenticator callback

TAuthenticatorCallback = function(AAuthenticator:TNetworkAuthenticator):Boolean of object;

Transport packet handler

TTransportPacketHandler = function(AHandle:THandle; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean of object;

Transport control handler

TTransportControlHandler = function(AHandle:THandle; ASource,ADest:Pointer; AProtocol,ACommand,ACode:Word; AAddress,AData:Pointer; ASize:Integer):Boolean of object;

Transport filter handler

TTransportFilterHandler = function(AHandle:THandle; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean of object;

Transport configuration handler

TTransportConfigHandler = function(AHandle:THandle; AAdapter:TTransportAdapter; ACommand:Word):Boolean of object;


Class definitions



Transport specific classes

TTransportManager = class(TObject)
TTransportBuffer = class(TObject)
TTransportBufferEx = class(TObject)
TTransportAdapter = class(TListObject)
TTransportBinding = class(TListObject)
TTransportProtocol = class(TListObject)
TTransportFilter = class(TListObject)
TTransportConfig = class(TListObject)
TNetworkTransport = class(TListObject)
TMonitorAdapter = class(TListObject)
TNetworkMonitor = class(TListObject)
TAuthenticatorAdapter = class(TListObject)
TNetworkAuthenticator = class(TListObject)
TTransportSocket = class(TListObject)
TSocketList = class(TObject)
TSocketState = class(TObject)
TSocketBuffer = class(TObject)
TSocketOptions = class(TObject)
TTransportState = class(TObject)
TTransportOptions = class(TObject)
THostEntry = class(TListObject)
TRouteEntry = class(TListObject)
TAddressEntry = class(TListObject)
TNetworkEntry = class(TListObject)
TServEntry = class(TListObject)
TProtoEntry = class(TListObject)


Public variables



Transport specific variables

TransportManager:TTransportManager;


Function declarations



Initialization functions

[Expand]
procedure TransportInit;
Description: To be documented


[Expand]
function TransportStart:LongWord;
Description: To be documented


[Expand]
function TransportStop:LongWord;
Description: To be documented


[Expand]
function TransportBind:LongWord;
Description: To be documented


[Expand]
function TransportUnbind:LongWord;
Description: To be documented


Transport functions

[Expand]
function InAddrToHost(const AAddress:TInAddr):TInAddr; inline;
Description: Convert an InAddr in Network order to Host order


[Expand]
function InAddrToNetwork(const AAddress:TInAddr):TInAddr; inline;
Description: Convert an InAddr in Host order to Network order


[Expand]
function InAddrToString(const AAddress:TInAddr):String;
Description: Convert an InAddr to a String


[Expand]
function StringToInAddr(const AAddress:String):TInAddr;
Description: Convert a String to an InAddr


[Expand]
function InAddrIsEqual(const AAddress1,AAddress2:TInAddr):Boolean;
Description: Check the supplied addresses to see if they are the same


[Expand]
function InAddrIsNone(const AAddress:TInAddr):Boolean;
Description: Check the supplied address to see if it is equal to INADDR_NONE


[Expand]
function InAddrIsDefault(const AAddress:TInAddr):Boolean;
Description: Check the supplied address to see if it is the default address


[Expand]
function InAddrIsLoopback(const AAddress:TInAddr):Boolean;
Description: Check the supplied address to see if it is a loopback address


[Expand]
function InAddrIsBroadcast(const AAddress:TInAddr):Boolean;
Description: Check the supplied address to see if it is the broadcast address


[Expand]
function InAddrIsMulticast(const AAddress:TInAddr):Boolean;
Description: Check the supplied address to see if it is a multicast address


[Expand]
function In6AddrToString(const AAddress:TIn6Addr):String;
Description: Convert an In6Addr to a String


[Expand]
function StringToIn6Addr(const AAddress:String):TIn6Addr;
Description: Convert a String to an In6Addr


[Expand]
function In6AddrIsEqual(const AAddress1,AAddress2:TIn6Addr):Boolean;
Description: Check the supplied addresses to see if they are the same


[Expand]
function In6AddrIsNone(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is IN6ADDR_NONE


[Expand]
function In6AddrIsDefault(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is the default address


[Expand]
function In6AddrIsLoopback(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a loopback address


[Expand]
function In6AddrIsLinkLocal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a link local address


[Expand]
function In6AddrIsSiteLocal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a site local address


[Expand]
function In6AddrIsV4Mapped(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a V4 mapped address


[Expand]
function In6AddrIsV4Compatible(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a V4 compatible address


[Expand]
function In6AddrIsMulticast(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a multicast address


[Expand]
function In6AddrIsMulticastNodeLocal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a multicast node local address


[Expand]
function In6AddrIsMulticastLinkLocal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a multicast link local address


[Expand]
function In6AddrIsMulticastSiteLocal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a multicast site local address


[Expand]
function In6AddrIsMulticastOrgLocal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a multicast org local address


[Expand]
function In6AddrIsMulticastGlobal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a multicast global address


[Expand]
function IpxAddrToString(const AAddress:TIpxAddr):String;
Description: To be documented


[Expand]
function StringToIpxAddr(const AAddress:String):TIpxAddr;
Description: To be documented


[Expand]
function GetChecksum(ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Calculate the 1s Compliment Checksum of the Supplied Buffer


[Expand]
function GetChecksum2(APseudo,ABuffer:Pointer; APseudoLength,ABufferOffset,ABufferLength:Word):Word;
Description: Calculate the 1s Compliment Checksum of the Supplied Pseudo and Buffer


[Expand]
function GetChecksum3(APseudo,AHeader,AData:Pointer; APseudoLength,AHeaderLength,ADataOffset,ADataLength:Word):Word;
Description: Calculate the 1s Compliment Checksum of the Supplied Pseudo, Header and Data


[Expand]
function GetChecksum4(APseudo,AHeader,AOptions,AData:Pointer; APseudoLength,AHeaderLength,AOptionsLength,ADataOffset,ADataLength:Word):Word;
Description: Calculate the 1s Compliment Checksum of the Supplied Pseudo, Header, Options and Data


Transport helper functions

[Expand]
function HostTypeToString(AType:Word):String;
Description: To be documented


[Expand]
function RouteTypeToString(AType:Word):String;
Description: To be documented


[Expand]
function AddressTypeToString(AType:Word):String;
Description: To be documented


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


[Expand]
function SocketTypeToString(ASocketType:Word):String;
Description: To be documented


[Expand]
function AddressFamilyToString(AFamily:Word):String;
Description: To be documented


Return to Unit Reference