13#ifndef KERNEL_NET_ARP_H
14#define KERNEL_NET_ARP_H
20#define ARP_PACKET_SIZE \
21 (sizeof(struct ethernet_header) + sizeof(struct arp_header))
arp_hw_type
The different accepted types of hardware addresses.
Definition: arp.h:41
error_t arp_add(__be ipv4_t, mac_address_t)
Add a new entry inside the ARP table.
Definition: arp.c:60
error_t arp_receive_packet(struct packet *)
Handle a received ARP packet.
Definition: arp.c:105
static size_t arp_header_size(struct arp_header *hdr)
Compute the size of an ARP header.
Definition: arp.h:56
arp_operation
The different ARP operations.
Definition: arp.h:46
error_t arp_send_packet(struct arp_header *)
Send an ARP request/reply.
Definition: arp.c:87
const mac_address_t * arp_get(__be ipv4_t)
Retreive the MAC address associated with an IPv4 address.
Definition: arp.c:48
@ ARP_HW_ETHERNET
Ethernet MAC address.
Definition: arp.h:42
@ ARP_REPLY
Reply. Sent back to the sender if a match was found.
Definition: arp.h:48
@ ARP_REQUEST
Request. Sent first to try and find a MAC address.
Definition: arp.h:47
uint8_t mac_address_t[ETHERNET_ADDR_SIZE]
Represents an ethernet MAC address.
Definition: ethernet.h:29
IPv4 - Internet Protocol.
Structure of the page fault's error code https://wiki.osdev.org/Exceptions#Page_Fault.
Definition: mmu.c:587
A network packet.
Definition: packet.h:51