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.

ethernet.h 619B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _GPXE_ETHERNET_H
  2. #define _GPXE_ETHERNET_H
  3. /** @file
  4. *
  5. * Ethernet protocol
  6. *
  7. */
  8. #include <stdint.h>
  9. #include <gpxe/netdevice.h>
  10. extern struct ll_protocol ethernet_protocol;
  11. extern const char * eth_ntoa ( const void *ll_addr );
  12. /**
  13. * Allocate Ethernet device
  14. *
  15. * @v priv_size Size of driver private data
  16. * @ret netdev Network device, or NULL
  17. */
  18. static inline struct net_device * alloc_etherdev ( size_t priv_size ) {
  19. struct net_device *netdev;
  20. netdev = alloc_netdev ( priv_size );
  21. if ( netdev ) {
  22. netdev->ll_protocol = &ethernet_protocol;
  23. }
  24. return netdev;
  25. }
  26. #endif /* _GPXE_ETHERNET_H */