Difference between revisions of "TIPTransport"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit IP __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-collapsed" s...")
 
 
Line 231: Line 231:
 
|-
 
|-
 
| <code>function GetHostByNext(APrevious:TIPHostEntry; ALock,AUnlock:Boolean):TIPHostEntry;</code>
 
| <code>function GetHostByNext(APrevious:TIPHostEntry; ALock,AUnlock:Boolean):TIPHostEntry;</code>
 +
| &nbsp;
 +
|-
 +
| <code>function CheckHost(AHost:TIPHostEntry; ALock:Boolean):Boolean;</code>
 
| &nbsp;
 
| &nbsp;
 
|-
 
|-
Line 251: Line 254:
 
|-
 
|-
 
| <code>function GetRouteByNext(APrevious:TIPRouteEntry; ALock,AUnlock:Boolean; AState:LongWord):TIPRouteEntry;</code>
 
| <code>function GetRouteByNext(APrevious:TIPRouteEntry; ALock,AUnlock:Boolean; AState:LongWord):TIPRouteEntry;</code>
 +
| &nbsp;
 +
|-
 +
| <code>function CheckRoute(ARoute:TIPRouteEntry; ALock:Boolean; AState:LongWord):Boolean;</code>
 
| &nbsp;
 
| &nbsp;
 
|-
 
|-
Line 268: Line 274:
 
|-
 
|-
 
| <code>function GetAddressByNext(APrevious:TIPAddressEntry; ALock,AUnlock:Boolean; AState:LongWord):TIPAddressEntry;</code>
 
| <code>function GetAddressByNext(APrevious:TIPAddressEntry; ALock,AUnlock:Boolean; AState:LongWord):TIPAddressEntry;</code>
 +
| &nbsp;
 +
|-
 +
| <code>function CheckAddress(AAddress:TIPAddressEntry; ALock:Boolean; AState:LongWord):Boolean;</code>
 
| &nbsp;
 
| &nbsp;
 
|-
 
|-
Line 940: Line 949:
 
! Note
 
! Note
 
| None documented
 
| 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 TIPTransport.CheckHost(AHost:TIPHostEntry; ALock:Boolean):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check a host entry in the host cache</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Host
 +
| The host entry to check
 +
|-
 +
! Lock
 +
| If True then lock the found entry before returning
 +
|-
 +
! Note
 +
| This allows safely obtaining a lock on an existing object in case it has been freed
 
|-
 
|-
 
|}
 
|}
Line 1,030: Line 1,057:
 
! Note
 
! Note
 
| None documented
 
| 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 TIPTransport.CheckRoute(ARoute:TIPRouteEntry; ALock:Boolean; AState:LongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check a route entry in the route cache</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Route
 +
| The route entry to check
 +
|-
 +
! Lock
 +
| If True then lock the found entry before returning
 +
|-
 +
! State
 +
| The lock type if Lock is True (NETWORK_LOCK_READ or NETWORK_LOCK_WRITE)
 +
|-
 +
! Note
 +
| This allows safely obtaining a lock on an existing object in case it has been freed
 
|-
 
|-
 
|}
 
|}
Line 1,111: Line 1,159:
 
! Note
 
! Note
 
| None documented
 
| 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 TIPTransport.CheckAddress(AAddress:TIPAddressEntry; ALock:Boolean; AState:LongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check an address entry in the address cache</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Address
 +
| The address entry to check
 +
|-
 +
! Lock
 +
| If True then lock the found entry before returning
 +
|-
 +
! State
 +
| The lock type if Lock is True (NETWORK_LOCK_READ or NETWORK_LOCK_WRITE)
 +
|-
 +
! Note
 +
| This allows safely obtaining a lock on an existing object in case it has been freed
 
|-
 
|-
 
|}
 
|}

Latest revision as of 23:30, 12 October 2022

Return to Unit IP


Description


To be documented

Class definitions



[Expand]

TIPTransport = class(TNetworkTransport)


Function declarations



[Expand]
constructor TIPTransport.Create(AManager:TTransportManager; const AName:String);
Description: To be documented


[Expand]
destructor TIPTransport.Destroy;
Description: To be documented


[Expand]
function TIPTransport.PacketHandler(AHandle:THandle; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean;
Description: Process a packet received by an Adapter


[Expand]
function TIPTransport.FragmentHandler(ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean;
Description: Process a received fragment by adding it to the buffer and if completed process the packet


[Expand]
function TIPTransport.CheckFragment(ABuffer:Pointer):Boolean;
Description: Check if a packet is a fragment and return True if it is


[Expand]
function TIPTransport.GetNextIPId(AIncrement:Boolean):Word;
Description: Get the next IP packet id number


[Expand]
function TIPTransport.GetIPNameserver(ACount:LongWord):TInAddr;
Description: Get the nameserver address from the network settings


[Expand]
function TIPTransport.GetAdapterConfigType(const AName:String):Word;
Description: Get the adapter config type from the network settings


[Expand]
function TIPTransport.GetAdapterConfigAddress(const AName:String):TInAddr;
Description: Get the adapter address from the network settings


[Expand]
function TIPTransport.GetAdapterConfigNetmask(const AName:String):TInAddr;
Description: Get the adapter netmask from the network settings


[Expand]
function TIPTransport.GetAdapterConfigGateway(const AName:String):TInAddr;
Description: Get the adapter gateway from the network settings


[Expand]
function TIPTransport.GetAdapterConfigServer(const AName:String):TInAddr;
Description: Get the adapter server from the network settings


[Expand]
function TIPTransport.FilterPacket(ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean;
Description: Filter a received packet


[Expand]
function TIPTransport.ForwardPacket(AAdapter:TTransportAdapter; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean;
Description: Forward a received packet


[Expand]
function TIPTransport.AddAdapter(AAdapter:TNetworkAdapter; AConfigType:Word; AAddress,ANetmask,AGateway,AServer:Pointer):Boolean;
Description: Add an adapter to this transport


[Expand]
function TIPTransport.RemoveAdapter(AAdapter:TNetworkAdapter):Boolean;
Description: Remove an adapter from this transport


[Expand]
function TIPTransport.AddProtocol(AProtocol:Word; APacketHandler:TTransportPacketHandler; AControlHandler:TTransportControlHandler):THandle;
Description: Add a protocol to this transport


[Expand]
function TIPTransport.RemoveProtocol(AHandle:THandle; AProtocol:Word):Boolean;
Description: Remove a protocol from this transport


[Expand]
function TIPTransport.AddFilter(AProtocol:Word; AFilterHandler:TTransportFilterHandler):THandle;
Description: Add a filter to this transport


[Expand]
function TIPTransport.RemoveFilter(AHandle:THandle; AProtocol:Word):Boolean;
Description: Remove a filter from this transport


[Expand]
function TIPTransport.AddConfig(AConfigType:Word; AConfigAuto:Boolean; AConfigHandler:TTransportConfigHandler):THandle;
Description: Add a config to this transport


[Expand]
function TIPTransport.RemoveConfig(AHandle:THandle; AConfigType:Word):Boolean;
Description: Remove a config from this transport


[Expand]
function TIPTransport.SendPacket(ASocket:TTransportSocket; ASource,ADest:Pointer; APacket:PPacketFragment; ASize,AFlags:Integer):Integer;
Description: Send a Packet by adding the Transport Header and other details to the Data


[Expand]
function TIPTransport.SendControl(ASource,ADest:Pointer; AProtocol,ACommand,ACode:Word; AAddress,AData:Pointer; ASize:Integer):Boolean;
Description: To be documented


[Expand]
function TIPTransport.GetSockOpt(ASocket:TTransportSocket; ALevel,AOptName:Integer; AOptValue:PChar; var AOptLength:Integer):Integer;
Description: BSD compatible Get Socket Option


[Expand]
function TIPTransport.SetSockOpt(ASocket:TTransportSocket; ALevel,AOptName:Integer; AOptValue:PChar; AOptLength:Integer):Integer;
Description: BSD compatible Set Socket Option


[Expand]
function TIPTransport.StartTransport:Boolean;
Description: Start this transport ready for sending and receiving


[Expand]
function TIPTransport.StopTransport:Boolean;
Description: Stop this transport ready for removal


[Expand]
function TIPTransport.ProcessTransport:Boolean;
Description: Process periodic tasks for this transport


[Expand]
function TIPTransport.BindTransport(AAdapter:TNetworkAdapter):Boolean;
Description: Bind this transport to an adapter if appropriate


[Expand]
function TIPTransport.UnbindTransport(AAdapter:TNetworkAdapter):Boolean;
Description: Unbind this transport from an adapter if appropriate


[Expand]
function TIPTransport.AddNameserver(const AAddress:TInAddr):Boolean;
Description: Add a nameserver IP address to the list of available nameservers


[Expand]
function TIPTransport.RemoveNameserver(const AAddress:TInAddr):Boolean;
Description: Remove a nameserver IP address from the list of available nameservers


[Expand]
function TIPTransport.GetHostByName(const AName:String; ALock:Boolean):TIPHostEntry;
Description: Find the name in the host cache


[Expand]
function TIPTransport.GetHostByAddress(const AAddress:TInAddr; ALock:Boolean):TIPHostEntry;
Description: Find the IP address in the host cache


[Expand]
function TIPTransport.GetHostByNext(APrevious:TIPHostEntry; ALock,AUnlock:Boolean):TIPHostEntry;
Description: To be documented


[Expand]
function TIPTransport.CheckHost(AHost:TIPHostEntry; ALock:Boolean):Boolean;
Description: Check a host entry in the host cache


[Expand]
function TIPTransport.AddHost(const AAddress:TInAddr; const AName:String; AType:Word; ALock:Boolean):TIPHostEntry;
Description: Add an IP address and name to the host cache


[Expand]
function TIPTransport.RemoveHost(const AAddress:TInAddr):Boolean;
Description: Remove an IP address from the host cache


[Expand]
procedure TIPTransport.FlushHosts(All:Boolean);
Description: Flush hosts from the host cache


[Expand]
function TIPTransport.GetRouteByAddress(const AAddress:TInAddr; ALock:Boolean; AState:LongWord):TIPRouteEntry;
Description: Find the IP route in the route cache


[Expand]
function TIPTransport.GetRouteByNetwork(const ANetwork,AAddress:TInAddr; ALock:Boolean; AState:LongWord):TIPRouteEntry;
Description: Find the IP network and address in the route cache


[Expand]
function TIPTransport.GetRouteByNext(APrevious:TIPRouteEntry; ALock,AUnlock:Boolean; AState:LongWord):TIPRouteEntry;
Description: To be documented


[Expand]
function TIPTransport.CheckRoute(ARoute:TIPRouteEntry; ALock:Boolean; AState:LongWord):Boolean;
Description: Check a route entry in the route cache


[Expand]
function TIPTransport.AddRoute(const ANetwork,ANetmask,AGateway,AAddress:TInAddr; AType:Word; ALock:Boolean; AState:LongWord):TIPRouteEntry;
Description: Add an IP route to the route cache


[Expand]
function TIPTransport.RemoveRoute(const ANetwork,AAddress:TInAddr):Boolean;
Description: Remove an IP route from the route cache


[Expand]
procedure TIPTransport.FlushRoutes(All:Boolean);
Description: Flush routes from the route cache


[Expand]
function TIPTransport.GetAddressByAddress(const AAddress:TInAddr; ALock:Boolean; AState:LongWord):TIPAddressEntry;
Description: Find the IP address in the address cache


[Expand]
function TIPTransport.GetAddressByNext(APrevious:TIPAddressEntry; ALock,AUnlock:Boolean; AState:LongWord):TIPAddressEntry;
Description: To be documented


[Expand]
function TIPTransport.CheckAddress(AAddress:TIPAddressEntry; ALock:Boolean; AState:LongWord):Boolean;
Description: Check an address entry in the address cache


[Expand]
function TIPTransport.AddAddress(const AAddress:TInAddr; AAdapter:TNetworkAdapter; AType:Word; ALock:Boolean; AState:LongWord):TIPAddressEntry;
Description: Add an IP address to the address cache


[Expand]
function TIPTransport.RemoveAddress(const AAddress:TInAddr):Boolean;
Description: Remove an IP address from the address cache


[Expand]
procedure TIPTransport.FlushAddresses(All:Boolean);
Description: Flush addresses from the adresses cache


[Expand]
function TIPTransport.GetNetworkByName(const AName:String; ALock:Boolean):TIPNetworkEntry;
Description: Find the name in the network cache


[Expand]
function TIPTransport.GetNetworkByAddress(const ANetwork:TInAddr; ALock:Boolean):TIPNetworkEntry;
Description: Find the network address in the network cache


[Expand]
function TIPTransport.AddNetwork(const AName:String; const ANetwork:TInAddr; ALock:Boolean):TIPNetworkEntry;
Description: Add a network address and name to the network cache


[Expand]
function TIPTransport.RemoveNetwork(const AName:String):Boolean;
Description: Remove a network from the network cache


[Expand]
function TIPTransport.GetServByName(const AName,AProtocol:String; ALock:Boolean):TIPServEntry;
Description: Find the name in the service cache


[Expand]
function TIPTransport.GetServByPort(APort:Word; const AProtocol:String; ALock:Boolean):TIPServEntry;
Description: Find the port in the service cache


[Expand]
function TIPTransport.AddServ(const AName,AProtocol:String; APort:Word; ALock:Boolean):TIPServEntry;
Description: Add a service to the service cache


[Expand]
function TIPTransport.RemoveServ(const AName,AProtocol:String):Boolean;
Description: Remove a service from the service cache


[Expand]
function TIPTransport.GetProtoByName(const AName:String; ALock:Boolean):TIPProtoEntry;
Description: Find the name in the protocol cache


[Expand]
function TIPTransport.GetProtoByNumber(ANumber:Word; ALock:Boolean):TIPProtoEntry;
Description: Find the protocol number in the protocol cache


[Expand]
function TIPTransport.AddProto(const AName:String; ANumber:Word; ALock:Boolean):TIPProtoEntry;
Description: Add a protocol to the protocol cache


[Expand]
function TIPTransport.RemoveProto(const AName:String):Boolean;
Description: Remove a protocol from the protocol cache


[Expand]
function TIPTransport.CompareLocal(const AAddress:TInAddr):Boolean;
Description: Compare the supplied address with the local IP addresses


[Expand]
function TIPTransport.CompareDefault(const AAddress:TInAddr):Boolean;
Description: Compare the supplied address with the default IP address


[Expand]
function TIPTransport.CompareLoopback(const AAddress:TInAddr):Boolean;
Description: Compare the supplied address with the loopback IP address


[Expand]
function TIPTransport.CompareDirected(const AAddress:TInAddr):Boolean;
Description: Compare the supplied address with the directed broadcast IP addresses


[Expand]
function TIPTransport.CompareBroadcast(const AAddress:TInAddr):Boolean;
Description: Compare the supplied address with the broadcast IP address


[Expand]
function TIPTransport.CompareMulticast(const AAddress:TInAddr):Boolean;
Description: Compare the supplied address with the multicast IP address


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


[Expand]
function TIPTransport.CompareSubnet(const AAddress,ANetwork,ANetmask:TInAddr):Boolean;
Description: Compare the supplied address to see if it is in the supplied subnet


Return to Unit Reference