2
0
mirror of https://github.com/xcat2/xNBA.git synced 2026-03-26 08:13:29 +00:00
Files
xNBA/src/include/ipxe/arp.h
Piotr Jaroszyński b9eaf24df2 [build] Fix misaligned table entries when using gcc 4.5
Declarations without the accompanying __table_entry cause misalignment
of the table entries when using gcc 4.5.  Fix by adding the
appropriate __table_entry macro or (where possible) by removing
unnecessary forward declarations.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-20 10:13:04 +01:00

45 lines
1020 B
C

#ifndef _IPXE_ARP_H
#define _IPXE_ARP_H
/** @file
*
* Address Resolution Protocol
*
*/
FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/tables.h>
#include <ipxe/netdevice.h>
/** 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 );
};
/** ARP protocol table */
#define ARP_NET_PROTOCOLS \
__table ( struct arp_net_protocol, "arp_net_protocols" )
/** Declare an ARP protocol */
#define __arp_net_protocol __table_entry ( ARP_NET_PROTOCOLS, 01 )
extern struct net_protocol arp_protocol __net_protocol;
extern int arp_resolve ( struct net_device *netdev,
struct net_protocol *net_protocol,
const void *dest_net_addr,
const void *source_net_addr,
void *dest_ll_addr );
#endif /* _IPXE_ARP_H */