You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

arp.h 894B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _GPXE_ARP_H
  2. #define _GPXE_ARP_H
  3. /** @file
  4. *
  5. * Address Resolution Protocol
  6. *
  7. */
  8. #include <gpxe/tables.h>
  9. struct net_device;
  10. struct net_protocol;
  11. /** A network-layer protocol that relies upon ARP */
  12. struct arp_net_protocol {
  13. /** Network-layer protocol */
  14. struct net_protocol *net_protocol;
  15. /** Check existence of address
  16. *
  17. * @v netdev Network device
  18. * @v net_addr Network-layer address
  19. * @ret rc Return status code
  20. */
  21. int ( * check ) ( struct net_device *netdev,
  22. const void *net_addr );
  23. };
  24. /** Declare an ARP protocol */
  25. #define __arp_net_protocol \
  26. __table ( struct arp_net_protocol, arp_net_protocols, 01 )
  27. extern struct net_protocol arp_protocol;
  28. extern int arp_resolve ( struct net_device *netdev,
  29. struct net_protocol *net_protocol,
  30. const void *dest_net_addr,
  31. const void *source_net_addr,
  32. void *dest_ll_addr );
  33. #endif /* _GPXE_ARP_H */