2006-04-24 15:33:06 +00:00
|
|
|
#ifndef _GPXE_ARP_H
|
|
|
|
|
#define _GPXE_ARP_H
|
2006-04-19 01:42:03 +00:00
|
|
|
|
|
|
|
|
/** @file
|
|
|
|
|
*
|
|
|
|
|
* Address Resolution Protocol
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2006-06-17 22:36:27 +00:00
|
|
|
#include <gpxe/tables.h>
|
|
|
|
|
|
2006-04-28 14:13:50 +00:00
|
|
|
struct net_device;
|
2006-06-16 00:19:46 +00:00
|
|
|
struct net_protocol;
|
2006-04-19 01:42:03 +00:00
|
|
|
|
2006-06-17 22:36:27 +00:00
|
|
|
/** A network-layer protocol that relies upon ARP */
|
|
|
|
|
struct arp_net_protocol {
|
|
|
|
|
/** Network-layer protocol */
|
|
|
|
|
struct net_protocol *net_protocol;
|
|
|
|
|
/** Check existence of address
|
|
|
|
|
*
|
|
|
|
|
* @v netdev Network device
|
|
|
|
|
* @v net_addr Network-layer address
|
|
|
|
|
* @ret rc Return status code
|
|
|
|
|
*/
|
|
|
|
|
int ( * check ) ( struct net_device *netdev,
|
|
|
|
|
const void *net_addr );
|
|
|
|
|
};
|
|
|
|
|
|
2006-08-08 17:44:25 +00:00
|
|
|
/** Declare an ARP protocol */
|
2007-01-10 04:22:09 +00:00
|
|
|
#define __arp_net_protocol \
|
|
|
|
|
__table ( struct arp_net_protocol, arp_net_protocols, 01 )
|
2006-06-17 22:36:27 +00:00
|
|
|
|
2007-07-02 20:05:58 +01:00
|
|
|
extern struct net_protocol arp_protocol;
|
|
|
|
|
|
2006-04-28 14:13:50 +00:00
|
|
|
extern int arp_resolve ( struct net_device *netdev,
|
2006-06-16 00:19:46 +00:00
|
|
|
struct net_protocol *net_protocol,
|
|
|
|
|
const void *dest_net_addr,
|
|
|
|
|
const void *source_net_addr,
|
|
|
|
|
void *dest_ll_addr );
|
2006-04-19 01:42:03 +00:00
|
|
|
|
2006-04-24 15:33:06 +00:00
|
|
|
#endif /* _GPXE_ARP_H */
|