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 1018B

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