From 7426177d631c0fd8b2ef3ffae4449637d5bca32a Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Fri, 1 Mar 2013 16:32:15 +0100 Subject: [netdevice] Add vlan_tag() to get the VLAN tag of a network device The iBFT has a VLAN field that should be filled in. Add the vlan_tag() function to extract the VLAN tag of a network device. Since VLAN support is optional, define a weak function that returns 0 when iPXE is built without VLAN support. Signed-off-by: Stefan Hajnoczi Modified-by: Michael Brown Signed-off-by: Michael Brown --- src/include/ipxe/vlan.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/ipxe/vlan.h') diff --git a/src/include/ipxe/vlan.h b/src/include/ipxe/vlan.h index d9f4484e6..083c21916 100644 --- a/src/include/ipxe/vlan.h +++ b/src/include/ipxe/vlan.h @@ -61,6 +61,7 @@ struct vlan_header { 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 ); -- cgit v1.2.3-55-g7522