My Kernel v0.1.0
arp.h File Reference
Include dependency graph for arp.h:

Go to the source code of this file.

Data Structures

struct  arp_header
 An ARP header. More...
 

Macros

#define ARP_PACKET_SIZE    (sizeof(struct ethernet_header) + sizeof(struct arp_header))
 The maximum total size of an ARP packet.
 

Enumerations

enum  arp_hw_type { ARP_HW_ETHERNET = 1 }
 The different accepted types of hardware addresses. More...
 
enum  arp_operation { ARP_REQUEST = 1 , ARP_REPLY = 2 }
 The different ARP operations. More...
 

Functions

static size_t arp_header_size (struct arp_header *hdr)
 Compute the size of an ARP header. More...
 
error_t arp_add (__be ipv4_t, mac_address_t)
 Add a new entry inside the ARP table. More...
 
const mac_address_tarp_get (__be ipv4_t)
 Retreive the MAC address associated with an IPv4 address. More...
 
error_t arp_receive_packet (struct packet *)
 Handle a received ARP packet.
 
error_t arp_send_packet (struct arp_header *)
 Send an ARP request/reply.