Unit Transport

From Ultibo.org
Revision as of 05:58, 16 December 2016 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


Network Transport

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


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

procedure TransportInit;
Description: To be documented
Note None documented


function TransportStart:LongWord;
Description: To be documented
Note None documented


function TransportStop:LongWord;
Description: To be documented
Note None documented


function TransportBind:LongWord;
Description: To be documented
Note None documented


function TransportUnbind:LongWord;
Description: To be documented
Note None documented


Transport functions

function InAddrToHost(const AAddress:TInAddr):TInAddr; inline;
Description: Convert an InAddr in Network order to Host order
Note None documented


function InAddrToNetwork(const AAddress:TInAddr):TInAddr; inline;
Description: Convert an InAddr in Host order to Network order
Note None documented


function InAddrToString(const AAddress:TInAddr):String;
Description: Convert an InAddr to a String
Note Expects Address to be in Network order


function StringToInAddr(const AAddress:String):TInAddr;
Description: Convert a String to an InAddr
Note Returns Address in Network order


function InAddrIsEqual(const AAddress1,AAddress2:TInAddr):Boolean;
Description: Check the supplied addresses to see if they are the same
Note Expects Address to be in Host order


function InAddrIsDefault(const AAddress:TInAddr):Boolean;
Description: Check the supplied address to see if it is the default address
Note Expects Address to be in Host order


function InAddrIsLoopback(const AAddress:TInAddr):Boolean;
Description: Check the supplied address to see if it is a loopback address
Note Expects Address to be in Host order


function InAddrIsBroadcast(const AAddress:TInAddr):Boolean;
Description: Check the supplied address to see if it is the broadcast address
Note Expects Address to be in Host order


function InAddrIsMulticast(const AAddress:TInAddr):Boolean;
Description: Check the supplied address to see if it is a multicast address
Note Expects Address to be in Host order


function In6AddrToString(const AAddress:TIn6Addr):String;
Description: To be documented
Note None documented


function StringToIn6Addr(const AAddress:String):TIn6Addr;
Description: To be documented
Note None documented


function In6AddrIsEqual(const AAddress1,AAddress2:TIn6Addr):Boolean;
Description: Check the supplied addresses to see if they are the same
Note None documented


function In6AddrIsDefault(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is the default address
Note None documented


function In6AddrIsLoopback(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a loopback address
Note None documented


function In6AddrIsLinkLocal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a link local address
Note None documented


function In6AddrIsSiteLocal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a site local address
Note None documented


function In6AddrIsV4Mapped(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a V4 mapped address
Note None documented


function In6AddrIsV4Compatible(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a V4 compatible address
Note None documented


function In6AddrIsMulticast(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a multicast address
Note None documented


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


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


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


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


function In6AddrIsMulticastGlobal(const AAddress:TIn6Addr):Boolean;
Description: Check the supplied address to see if it is a multicast global address
Note None documented


function IpxAddrToString(const AAddress:TIpxAddr):String;
Description: To be documented
Note None documented


function StringToIpxAddr(const AAddress:String):TIpxAddr;
Description: To be documented
Note None documented


function GetChecksum(ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Calculate the 1s Compliment Checksum of the Supplied Buffer
Note None documented


function GetChecksum2(APseudo,ABuffer:Pointer; APseudoLength,ABufferOffset,ABufferLength:Word):Word;
Description: Calculate the 1s Compliment Checksum of the Supplied Pseudo and Buffer
Note Pseudo is expected to start from Offset 0


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
Note Pseudo and Header are expected to start from Offset 0


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
Note Pseudo, Header and Options are expected to start from Offset 0


Transport helper functions

function HostTypeToString(AType:Word):String;
Description: To be documented
Note None documented


function RouteTypeToString(AType:Word):String;
Description: To be documented
Note None documented


function AddressTypeToString(AType:Word):String;
Description: To be documented
Note None documented


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


function SocketTypeToString(ASocketType:Word):String;
Description: To be documented
Note None documented


function AddressFamilyToString(AFamily:Word):String;
Description: To be documented
Note None documented


Return to Unit Reference