|
|
Line 162: |
Line 162: |
| | | |
| | | |
− | '''ARP transport adapter''' | + | '''ARP specific classes''' |
− |
| + | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | |
| | | |
− | <code>TARPTransportAdapter = class(TTransportAdapter)</code>
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;" | + | |
| |- | | |- |
− | | <code>constructor Create;</code> | + | | [[TARPTransportAdapter|<code>TARPTransportAdapter = class(TTransportAdapter)</code>]] |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
| + | |
− | |-
| + | |
− | | <code>UseCount:Integer;</code>
| + | |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− | | + | |
− | '''ARP transport'''
| + | |
− | | + | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | |
− | | + | |
− | <code> TARPTransport = class(TNetworkTransport)</code>
| + | |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| + | |
| |- | | |- |
− | | <code>constructor Create(AManager:TTransportManager; const AName:String);</code> | + | | [[TARPTransport|<code>TARPTransport = class(TNetworkTransport)</code>]] |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | | <code>destructor Destroy; override;</code> | + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
| + | |
− | |-
| + | |
− | | <code>FAddresses:TNetworkList;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FAddressAdd:TEventHandle;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FAddressRemove:TEventHandle;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function PacketHandler(AHandle:THandle; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function SendARPRequest(AAdapter:TARPTransportAdapter; ASource:TARPAddressEntry; const ATarget:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function SendARPReply(AAdapter:TARPTransportAdapter; ASource,ATarget:TARPAddressEntry):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function SendINARPRequest(AAdapter:TARPTransportAdapter; ASource:TARPAddressEntry; const ATarget:THardwareAddress):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function SendINARPReply(AAdapter:TARPTransportAdapter; ASource,ATarget:TARPAddressEntry):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
| + | |
− | |-
| + | |
− | | <code>function AddAdapter(AAdapter:TNetworkAdapter; AConfigType:Word; AAddress,ANetmask,AGateway,AServer:Pointer):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function RemoveAdapter(AAdapter:TNetworkAdapter):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function StartTransport:Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function StopTransport:Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function ProcessTransport:Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function BindTransport(AAdapter:TNetworkAdapter):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function UnbindTransport(AAdapter:TNetworkAdapter):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function GetAddressByAddress(const AAddress:TInAddr; AAdapter:TNetworkAdapter; ALock:Boolean; AState:LongWord):TARPAddressEntry;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function GetAddressByHardware(const AHardware:THardwareAddress; AAdapter:TNetworkAdapter; ALock:Boolean; AState:LongWord):TARPAddressEntry;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function GetAddressByNext(APrevious:TARPAddressEntry; ALock,AUnlock:Boolean; AState:LongWord):TARPAddressEntry;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function AddAddress(const AAddress:TInAddr; const AHardware:THardwareAddress; AAdapter:TNetworkAdapter; AType:Word; ALock:Boolean; AState:LongWord):TARPAddressEntry;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function RemoveAddress(const AAddress:TInAddr; AAdapter:TNetworkAdapter):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure FlushAddresses(All:Boolean);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function LoadAddress(AAdapter:TNetworkAdapter; const AAddress:TInAddr; const AHardware:THardwareAddress; AType:Word):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function UnloadAddress(AAdapter:TNetworkAdapter; const AAddress:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function ResolveAddress(AAdapter:TNetworkAdapter; const ASource,AAddress:TInAddr; var AHardware:THardwareAddress):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function ResolveHardware(AAdapter:TNetworkAdapter; const ASource:TInAddr; const AHardware:THardwareAddress; var AAddress:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function ConfirmAddress(AAdapter:TNetworkAdapter; const ASource,AAddress:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function AdvertiseAddress(AAdapter:TNetworkAdapter; const ASource:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function CompareDefault(const AAddress:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function CompareAddress(const AAddress1,AAddress2:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− | | + | |
− | '''ARP address entry'''
| + | |
− | | + | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | |
− | | + | |
− | <code>TARPAddressEntry = class(TAddressEntry)</code>
| + | |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| + | |
| |- | | |- |
− | | <code>constructor Create;</code> | + | | [[TARPAddressEntry|<code>TARPAddressEntry = class(TAddressEntry)</code>]] |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
| + | |
− | |-
| + | |
− | | <code>FAddress:TInAddr;</code> | + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FProtocolType:Word;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FHardware:THardwareAddress;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>procedure SetAddress(const AAddress:TInAddr);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure SetProtocolType(AProtocolType:Word);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure SetHardware(const AHardware:THardwareAddress);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
| + | |
− | |-
| + | |
− | | <code>property Address:TInAddr read FAddress write SetAddress;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>property ProtocolType:Word read FProtocolType write SetProtocolType;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>property Hardware:THardwareAddress read FHardware write SetHardware;</code>
| + | |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− | | + | |
− | '''RARP transport adapter'''
| + | |
− | | + | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | |
− | | + | |
− | <code>TRARPTransportAdapter = class(TTransportAdapter)</code>
| + | |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| + | |
| |- | | |- |
− | | <code>constructor Create;</code> | + | | [[TRARPTransportAdapter|<code>TRARPTransportAdapter = class(TTransportAdapter)</code>]] |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
| + | |
− | |-
| + | |
− | | <code>UseCount:Integer;</code>
| + | |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− |
| + | |
− | '''RARP transport'''
| + | |
− | | + | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | |
− | | + | |
− | <code>TRARPTransport = class(TNetworkTransport)</code>
| + | |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| + | |
| |- | | |- |
− | | <code>constructor Create(AManager:TTransportManager; const AName:String);</code> | + | | [[TRARPTransport|<code>TRARPTransport = class(TNetworkTransport)</code>]] |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | | <code>destructor Destroy; override;</code> | + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
| + | |
− | |-
| + | |
− | | <code>FAddresses:TNetworkList;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FAddressAdd:TEventHandle;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FAddressRemove:TEventHandle;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function PacketHandler(AHandle:THandle; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function SendRARPRequest(AAdapter:TRARPTransportAdapter):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function SendRARPReply(AAdapter:TRARPTransportAdapter; ASource,ATarget:TRARPAddressEntry):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
| + | |
− | |-
| + | |
− | | <code>function AddAdapter(AAdapter:TNetworkAdapter; AConfigType:Word; AAddress,ANetmask,AGateway,AServer:Pointer):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function RemoveAdapter(AAdapter:TNetworkAdapter):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function StartTransport:Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function StopTransport:Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function ProcessTransport:Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function BindTransport(AAdapter:TNetworkAdapter):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function UnbindTransport(AAdapter:TNetworkAdapter):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function GetAddressByAddress(const AAddress:TInAddr; AAdapter:TNetworkAdapter; ALock:Boolean; AState:LongWord):TRARPAddressEntry; </code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function GetAddressByHardware(const AHardware:THardwareAddress; AAdapter:TNetworkAdapter; ALock:Boolean; AState:LongWord):TRARPAddressEntry;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function GetAddressByNext(APrevious:TRARPAddressEntry; ALock,AUnlock:Boolean; AState:LongWord):TRARPAddressEntry;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function AddAddress(const AAddress:TInAddr; const AHardware:THardwareAddress; AAdapter:TNetworkAdapter; AType:Word; ALock:Boolean; AState:LongWord):TRARPAddressEntry;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function RemoveAddress(const AAddress:TInAddr; AAdapter:TNetworkAdapter):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure FlushAddresses(All:Boolean);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function LoadAddress(AAdapter:TNetworkAdapter; const AAddress:TInAddr; const AHardware:THardwareAddress; AType:Word):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function UnloadAddress(AAdapter:TNetworkAdapter; const AAddress:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function ResolveHardware(AAdapter:TNetworkAdapter; var AAddress:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function CompareDefault(const AAddress:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function CompareAddress(const AAddress1,AAddress2:TInAddr):Boolean;</code>
| + | |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− | | + | |
− | '''RARP address entry'''
| + | |
− | | + | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | |
− | | + | |
− | <code>TRARPAddressEntry = class(TAddressEntry)</code>
| + | |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;" | + | |
− | |-
| + | |
− | | <code>constructor Create;</code>
| + | |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
| + | |
− | |-
| + | |
− | | <code>FAddress:TInAddr;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FProtocolType:Word;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FHardware:THardwareAddress;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>procedure SetAddress(const AAddress:TInAddr);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure SetProtocolType(AProtocolType:Word);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure SetHardware(const AHardware:THardwareAddress);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
| + | |
− | |-
| + | |
− | | <code>property Address:TInAddr read FAddress write SetAddress;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>property ProtocolType:Word read FProtocolType write SetProtocolType;</code>
| + | |
− | |
| + | |
| |- | | |- |
− | | <code>property Hardware:THardwareAddress read FHardware write SetHardware;</code> | + | | [[TRARPAddressEntry|<code>TRARPAddressEntry = class(TAddressEntry)</code>]] |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| |
| <br /> | | <br /> |
| | | |