Difference between revisions of "Unit ARP"

From Ultibo.org
Jump to: navigation, search
 
(11 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ultibo ARP (Address Resolution Protocol) unit'''
  
 
=== Constants ===
 
=== Constants ===
Line 93: Line 93:
 
----
 
----
  
''To be documented''
+
 
 +
'''ARP specific types'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PARPHeader = ^TARPHeader;</code>
 +
 
 +
<code>TARPHeader = packed 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: 46 Bytes
 +
|-
 +
| <code>HardwareType:Word;</code>
 +
| Hardware address space (Network Order)
 +
|-
 +
| <code>ProtocolType:Word;</code>
 +
| Protocol address space (Network Order)
 +
|-
 +
| <code>HardwareLength:Byte;</code>
 +
| Byte length of hardware address
 +
|-
 +
| <code>ProtocolLength:Byte;</code>
 +
| Byte length of each protocol address
 +
|-
 +
| <code>Opcode:Word;</code>
 +
| Op code (eg ARP_REQUEST or ARP_REPLY) (Network Order)
 +
|-
 +
| <code>SourceHardware:THardwareAddress;</code>
 +
| Source hardware address (of sender)
 +
|-
 +
| <code>SourceIP:TInAddr;</code>
 +
| Source protocol address (of sender) (Network Order)
 +
|-
 +
| <code>TargetHardware:THardwareAddress;</code>
 +
| Target hardware address (if known)
 +
|-
 +
| <code>TargetIP:TInAddr;</code>
 +
| Target protocol address (Network Order)
 +
|-
 +
| <code>Reserved:array[0..17] of Word;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''RARP specific types'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRARPHeader = ^TRARPHeader;</code>
 +
 
 +
<code>TRARPHeader = TARPHeader;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: 46 Bytes
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
=== Class definitions ===
 +
----
 +
 
 +
 
 +
'''ARP specific classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TARPTransportAdapter|<code>TARPTransportAdapter = class(TTransportAdapter)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TARPTransport|<code>TARPTransport = class(TNetworkTransport)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TARPAddressEntry|<code>TARPAddressEntry = class(TAddressEntry)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TRARPTransportAdapter|<code>TRARPTransportAdapter = class(TTransportAdapter)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TRARPTransport|<code>TRARPTransport = class(TNetworkTransport)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TRARPAddressEntry|<code>TRARPAddressEntry = class(TAddressEntry)</code>]]
 +
|-
 +
|}
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
''None defined''
  
 
=== Function declarations ===
 
=== Function declarations ===
Line 112: Line 211:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 127: Line 226:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Buffer'''
+
! Buffer
 
| Buffer points to the complete packet without Adapter header
 
| Buffer points to the complete packet without Adapter header
 
|-
 
|-
Line 139: Line 238:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Buffer'''
+
! Buffer
 
| Buffer points to the complete packet without Adapter header
 
| Buffer points to the complete packet without Adapter header
 
|-
 
|-

Latest revision as of 05:20, 31 August 2021

Return to Unit Reference


Description


Ultibo ARP (Address Resolution Protocol) unit

Constants



[Expand]
ARP specific constants ARP_TRANSPORT_*, RARP_TRANSPORT_*


[Expand]
ARP and RARP constants MIN_*, MAX_*, ARP_*, RARP_*


[Expand]
ARP and RARP messages ARP_*, RARP_*, INARP_*


Type definitions



ARP specific types

[Expand]

PARPHeader = ^TARPHeader;

TARPHeader = packed record

RARP specific types

[Expand]

PRARPHeader = ^TRARPHeader;

TRARPHeader = TARPHeader;


Class definitions



ARP specific classes

TARPTransportAdapter = class(TTransportAdapter)
TARPTransport = class(TNetworkTransport)
TARPAddressEntry = class(TAddressEntry)
TRARPTransportAdapter = class(TTransportAdapter)
TRARPTransport = class(TNetworkTransport)
TRARPAddressEntry = class(TAddressEntry)


Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure ARPInit;
Description: To be documented


ARP functions

[Expand]
function CheckARP(ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid ARP packet


[Expand]
function CheckRARP(ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid RARP packet


Return to Unit Reference