00001 #ifndef _GPXE_ARP_H 00002 #define _GPXE_ARP_H 00003 00004 /** @file 00005 * 00006 * Address Resolution Protocol 00007 * 00008 */ 00009 00010 FILE_LICENCE ( GPL2_OR_LATER ); 00011 00012 #include <gpxe/tables.h> 00013 00014 struct net_device; 00015 struct net_protocol; 00016 00017 /** A network-layer protocol that relies upon ARP */ 00018 struct arp_net_protocol { 00019 /** Network-layer protocol */ 00020 struct net_protocol *net_protocol; 00021 /** Check existence of address 00022 * 00023 * @v netdev Network device 00024 * @v net_addr Network-layer address 00025 * @ret rc Return status code 00026 */ 00027 int ( * check ) ( struct net_device *netdev, 00028 const void *net_addr ); 00029 }; 00030 00031 /** ARP protocol table */ 00032 #define ARP_NET_PROTOCOLS \ 00033 __table ( struct arp_net_protocol, "arp_net_protocols" ) 00034 00035 /** Declare an ARP protocol */ 00036 #define __arp_net_protocol __table_entry ( ARP_NET_PROTOCOLS, 01 ) 00037 00038 extern struct net_protocol arp_protocol; 00039 00040 extern int arp_resolve ( struct net_device *netdev, 00041 struct net_protocol *net_protocol, 00042 const void *dest_net_addr, 00043 const void *source_net_addr, 00044 void *dest_ll_addr ); 00045 00046 #endif /* _GPXE_ARP_H */
1.5.7.1