ARP Library Documentation ¶ Company 3S - Smart Software Solutions GmbH Title ARP Version 3.5.17.0 Categories Intern|Networking Namespace ARP Author 3S - Smart Software Solutions GmbH Placeholder ARP Description 1 ¶ Library implements the Address Resolution Protocol. The following Interfaces have to be implemented: 1. IEthernet: Interface to the Ethernet Adapter. SendARP() shall send the given Ethernet II Frame (CmpSysEthernet.sendethframe()). 2. IARPCallback: The Interface Method RequestCallback() is called as soon as the Request has received the response to its ARP request (requested MAC and IP). Program Sequence: 1. Call Request.Send() one time (each call generates an ARP Request on the network). 2. Call IEthernetClient.Receive() (= Request.Receive()) until RequestCallback() gets called by the Request FB. If more than one response is expected on a single request, IEthernetClient.Receive() can be called continuously. Contents: ¶ Constants CONSTANTS (GVL) Function Blocks Request (FunctionBlock) Functions MAC_ADDRESS_COMPARE (Function) Interfaces IARPCallback (Interface) IARPEthernetClient (Interface) IEthernet (Interface) Structs ARP_Packet (Struct) Indices and tables ¶ 1 Based on ARP.library, last modified 20.04.2021, 15:08:48. LibDoc 4.4.0.0-b.27 The content file ARP.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 15:08:48.
CONSTANTS (GVL) ¶ InOut: Name Type Initial Comment abyBroadcastMAC ARRAY [0..5] OF BYTE [16#FF, 16#FF, 16#FF, 16#FF, 16#FF, 16#FF] wHardwareType WORD 16#1 wProtocolType WORD 16#800 wOpcodeRequest WORD 16#1 wOpcodeResponse WORD 16#2 wARPEthType WORD 16#806 Ether types wVLANEthType WORD 16#8100
Constants ¶ CONSTANTS (GVL)
Function Blocks ¶ Request (FunctionBlock) ReceiveARP (Method) Send (Method)
Request (FB) ¶ FUNCTION_BLOCK Request IMPLEMENTS IARPEthernetClient Methods: ReceiveARP Send Structure: ReceiveARP (Method) Send (Method)
Request.ReceiveARP (METH) ¶ METHOD ReceiveARP : BOOL Returns TRUE, if the ethernet frame was the arp response to the request sent before. InOut: Scope Name Type Comment Return ReceiveARP BOOL Input pstrARPResponse POINTER TO ARP_Packet Ethernet II frame diLength DINT length of received data
Request.Send (METH) ¶ METHOD Send : UDINT Creates and sends an arp request InOut: Scope Name Type Comment Return Send UDINT Input abySenderMAC ARRAY [0..5] OF BYTE MAC Address of the sender (…? Tell abySenderIP, abySenderMAC) abySenderIP ARRAY [0..3] OF BYTE IP Address of the sender (…? Tell abySenderIP, abySenderMAC) abyTargetIP ARRAY [0..3] OF BYTE IP Address of the requested host (Who has abyTargetIP?) itfARPCallback IARPCallback Interface to the instance which shall receive the response (abyTargetIP is at abyTargetMAC ) itfEthernet IEthernet Interface to the Ethernet adapter which shall send the request
Functions ¶ MAC_ADDRESS_COMPARE (Function)
MAC_ADDRESS_COMPARE (FUN) ¶ FUNCTION MAC_ADDRESS_COMPARE : BOOL InOut: Scope Name Type Return MAC_ADDRESS_COMPARE BOOL Input abyMacAddress1 ARRAY [1..6] OF BYTE abyMacAddress2 ARRAY [1..6] OF BYTE
Interfaces ¶ IARPCallback (Interface) ARP_RequestCallback (Method) IARPEthernetClient (Interface) ReceiveARP (Method) IEthernet (Interface) SendARP (Method)