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