Go to the documentation of this file.
18 #ifndef __LIB_LIBNET_ARP_H
19 #define __LIB_LIBNET_ARP_H
Network protocol abstraction class.
Efficient key -> value lookups.
FileSystem::Result lookupAddress(const IPV4::Address *ipAddr, Ethernet::Address *ethAddr)
Lookup Ethernet address for an IP.
ARPSocket * m_sock
The single ARP socket.
virtual FileSystem::Result process(const NetworkQueue::Packet *pkt, const Size offset)
Process incoming network packet.
FileSystem::Result sendReply(const Ethernet::Address *ethaddr, const IPV4::Address ipAddr)
Send ARP reply.
Network Device abstract class.
HashTable< IPV4::Address, ARPCache * > m_cache
Contains a cached mapping from IP to Ethernet addresses.
void setIP(::IPV4 *ip)
Set IPV4 instance.
Address Resolution Protocol (ARP) socket.
Provides the timer of the kernel.
struct ARP::Header Header
ARP network packet header.
Timer information structure.
Ethernet networking protocol.
Operation
ARP message types (operation codes)
KernelTimer m_kernelTimer
Provides access to the kernel timer.
ARPCache * getCacheEntry(const IPV4::Address ipAddr)
Retrieve cache entry by IP.
#define PACKED
Ensures strict minimum memory requirements.
Ethernet network address.
virtual FileSystem::Result initialize()
Perform initialization.
ProtocolType
ARP inter-network protocol types.
unsigned short u16
Unsigned 16-bit number.
::IPV4 * m_ip
IPV4 instance object.
unsigned int Size
Any sane size indicator cannot go negative.
Internet Protocol Version 4.
Result
Result code for filesystem Actions.
unsigned char u8
Unsigned 8-bit number.
static const Size MaxRetries
Maximum number of retries for ARP lookup.
Ethernet::Address ethAddr
Represents a network packet.
void updateCacheEntry(const IPV4::Address ipAddr, const Ethernet::Address *ethAddr)
Update cache entry.
Address Resolution Protocol.
HardwareType
ARP hardware types.
virtual ~ARP()
Destructor.
FileSystem::Result sendRequest(const IPV4::Address address)
Send ARP request.
struct ARP::ARPCache ARPCache
ARP table cache entry.
ARPCache * insertCacheEntry(const IPV4::Address ipAddr)
Insert a new entry to the ARP cache.