david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/include/gpxe/ethernet.h
Michael Brown 3c8aafa209 Simplify RX data path.
Kill off the static single net device and move to proper dynamic
registration (which we need with the new device model).

Break the (flawed) assumption that all network-layer protocols can use
ARP; such network-layer protocols (i.e. IPv4) must now register as an ARP
protocol using ARP_NET_PROTOCOL() and provide a single method for checking
the existence of a local network-layer address.
2006-06-17 22:36:27 +00:00

32 lines
564 B
C

#ifndef _GPXE_ETHERNET_H
#define _GPXE_ETHERNET_H
/** @file
*
* Ethernet protocol
*
*/
#include <stdint.h>
#include <gpxe/netdevice.h>
extern struct ll_protocol ethernet_protocol;
/**
* Allocate Ethernet device
*
* @v priv_size Size of driver private data
* @ret netdev Network device, or NULL
*/
static inline struct net_device * alloc_etherdev ( size_t priv_size ) {
struct net_device *netdev;
netdev = alloc_netdev ( priv_size );
if ( netdev ) {
netdev->ll_protocol = &ethernet_protocol;
}
return netdev;
}
#endif /* _GPXE_ETHERNET_H */