mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 01:52:08 +03:00
[vlan] Allow external code to identify VLAN priority as well as tag
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -61,7 +61,19 @@ struct vlan_header {
|
||||
*/
|
||||
#define VLAN_PRIORITY_IS_VALID( priority ) ( (priority) <= 7 )
|
||||
|
||||
extern unsigned int vlan_tag ( struct net_device *netdev );
|
||||
extern unsigned int vlan_tci ( struct net_device *netdev );
|
||||
|
||||
/**
|
||||
* Get the VLAN tag
|
||||
*
|
||||
* @v netdev Network device
|
||||
* @ret tag VLAN tag, or 0 if device is not a VLAN device
|
||||
*/
|
||||
static inline __attribute__ (( always_inline )) unsigned int
|
||||
vlan_tag ( struct net_device *netdev ) {
|
||||
return VLAN_TAG ( vlan_tci ( 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 );
|
||||
|
||||
Reference in New Issue
Block a user