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.

123456789101112131415161718192021222324252627282930313233343536373839
  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 int arp_resolve ( struct net_device *netdev,
  28. struct net_protocol *net_protocol,
  29. const void *dest_net_addr,
  30. const void *source_net_addr,
  31. void *dest_ll_addr );
  32. #endif /* _GPXE_ARP_H */