friendev EtherDune TCP/IP library
Public Member Functions | List of all members
ARPService Class Reference

Implements the ARP protocol as an EtherDune service. More...

#include <ARP.h>

Inheritance diagram for ARPService:
NetworkService

Public Member Functions

MACAddresswhoHas (IPAddress &ip)
 Attempts to return the MAC address associated with the provided IP address. More...
 
 ARPService ()
 

Detailed Description

Implements the ARP protocol as an EtherDune service.

This class maintains the ARP table, handles incoming ARP requests and allows to perform ARP queries in the network to discover other hosts

This service is instantiated by default, meaning you do not need to do anything to make it work. You can configure ARP settings in the ARP configuration section of the configuration file

Definition at line 31 of file ARP.h.

Constructor & Destructor Documentation

ARPService::ARPService ( )

Definition at line 28 of file ARP.cpp.

Member Function Documentation

MACAddress * ARPService::whoHas ( IPAddress ip)

Attempts to return the MAC address associated with the provided IP address.

If the result is found in the cache, it is returned, otherwise, an ARP query is issued and whoHas returns NULL

Parameters
ipIP to search
Returns
NULL if the IP address was not in the cache (a query is immediately issued). Otherwise, a pointer to a MAC address within the ARP table.

Definition at line 95 of file ARP.cpp.


The documentation for this class was generated from the following files: