26#include <freeradius-devel/util/packet.h>
27#include <freeradius-devel/util/rand.h>
28#include <freeradius-devel/util/log.h>
29#include <freeradius-devel/util/net.h>
31#include <freeradius-devel/protocol/arp/dictionary.h>
32#include <freeradius-devel/protocol/arp/rfc826.h>
37#define FR_ARP_PACKET_SIZE (28)
38#define ETH_TYPE_ARP (0x0806)
73#define FR_ARP_PACKET_CODE_VALID(_code) (((_code) > 0) && ((_code) < FR_ARP_CODE_MAX))
uint8_t hlen
Length of hardware address.
void fr_arp_global_free(void)
int fr_arp_global_init(void)
uint8_t plen
Length of protocol address.
ssize_t fr_arp_decode(TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *packet, size_t packet_len)
Decode a raw ARP packet into VPs.
char const * fr_arp_packet_codes[FR_ARP_CODE_MAX]
ssize_t fr_arp_encode(fr_dbuff_t *dbuff, uint8_t const *original, fr_pair_list_t *vps)
Encode VPS into a raw ARP packet.
int fr_arp_entry_add(int fd, char const *interface, uint8_t ipaddr[static 4], uint8_t macaddr[static 6])
static size_t char ** out