2
0
mirror of https://github.com/xcat2/xNBA.git synced 2026-05-15 02:44:10 +00:00
Files
xNBA/src/include/gpxe/ethernet.h
T
Michael Brown 832668105e [netdevice] Add maximum packet length as a net device property
Currently this length is set at device allocation time, and is never
changed.
2008-10-16 05:11:47 +01:00

36 lines
685 B
C

#ifndef _GPXE_ETHERNET_H
#define _GPXE_ETHERNET_H
/** @file
*
* Ethernet protocol
*
*/
#include <stdint.h>
#include <gpxe/netdevice.h>
#include <gpxe/if_ether.h>
extern struct ll_protocol ethernet_protocol;
extern const char * eth_ntoa ( const void *ll_addr );
/**
* 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;
netdev->max_pkt_len = ETH_FRAME_LEN;
}
return netdev;
}
#endif /* _GPXE_ETHERNET_H */