25#ifndef __JOIN_ARP_HPP__
26#define __JOIN_ARP_HPP__
35#include <linux/if_arp.h>
54 Arp (
const std::string& interface);
127 struct __attribute__ ((packed)) ArpPacket
134 uint8_t ar_sha[ETH_ALEN];
136 uint8_t ar_tha[ETH_ALEN];
143 struct __attribute__ ((packed)) Packet
150 std::string _interface;
ARP protocol class.
Definition arp.hpp:43
int add(const MacAddress &mac, const IpAddress &ip)
add entry the MAC address of the given IP address to ARP cache.
Definition arp.cpp:200
MacAddress request(const IpAddress &ip)
get the MAC address for the given IP address using ARP request.
Definition arp.cpp:87
Arp()=delete
create the Arp instance.
MacAddress get(const IpAddress &ip)
get the MAC address for the given IP address using ARP cache or ARP request.
Definition arp.cpp:56
MacAddress cache(const IpAddress &ip)
get the MAC address for the given IP address using ARP cache.
Definition arp.cpp:247
virtual ~Arp()=default
destroy the Arp instance.
IPv6, IPv4 address class.
Definition ipaddress.hpp:51
MAC address class.
Definition macaddress.hpp:46
Definition acceptor.hpp:32