mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 19:49:45 +03:00
[vlan] Provide vlan_netdev_rx() and vlan_netdev_rx_err()
The Hermon driver uses vlan_find() to identify the appropriate VLAN device for packets that are received with the VLAN tag already stripped out by the hardware. Generalise this capability and expose it for use by other network card drivers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <ipxe/netdevice.h>
|
||||
|
||||
/** A VLAN header */
|
||||
struct vlan_header {
|
||||
/** Tag control information */
|
||||
@@ -59,12 +61,14 @@ struct vlan_header {
|
||||
*/
|
||||
#define VLAN_PRIORITY_IS_VALID( priority ) ( (priority) <= 7 )
|
||||
|
||||
extern struct net_device * vlan_find ( struct net_device *trunk,
|
||||
unsigned int tag );
|
||||
extern unsigned int vlan_tag ( struct net_device *netdev );
|
||||
extern int vlan_can_be_trunk ( struct net_device *trunk );
|
||||
extern int vlan_create ( struct net_device *trunk, unsigned int tag,
|
||||
unsigned int priority );
|
||||
extern int vlan_destroy ( struct net_device *netdev );
|
||||
extern void vlan_netdev_rx ( struct net_device *netdev, unsigned int tag,
|
||||
struct io_buffer *iobuf );
|
||||
extern void vlan_netdev_rx_err ( struct net_device *netdev, unsigned int tag,
|
||||
struct io_buffer *iobuf, int rc );
|
||||
|
||||
#endif /* _IPXE_VLAN_H */
|
||||
|
||||
Reference in New Issue
Block a user