aboutsummaryrefslogtreecommitdiff
path: root/src/include/ipxe
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2013-03-01 16:32:15 +0100
committerMichael Brown <mcb30@ipxe.org>2013-03-01 16:11:40 +0000
commit7426177d631c0fd8b2ef3ffae4449637d5bca32a (patch)
tree5d1fd4375b0b51ebcf4278be7974ad2268ba6748 /src/include/ipxe
parent09c5109b8585178172c7608de8d52e9d9af0b680 (diff)
downloadipxe-7426177d631c0fd8b2ef3ffae4449637d5bca32a.zip
ipxe-7426177d631c0fd8b2ef3ffae4449637d5bca32a.tar.gz
ipxe-7426177d631c0fd8b2ef3ffae4449637d5bca32a.tar.bz2
[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 <stefanha@redhat.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/vlan.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/ipxe/vlan.h b/src/include/ipxe/vlan.h
index d9f4484..083c219 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 );