sys/net: move DOT1Q_VID_* constants to ethernet.h
These are generally useful to anything dealing with 802.1q and aren't specific to if_vlan, so move them to <net/ethernet.h> and remove the _KERNEL gate. While here, document what they actually mean. Reviewed by: kp, des Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50570
This commit is contained in:
@@ -80,6 +80,23 @@ struct ether_addr {
|
||||
(((addr)[0] | (addr)[1] | (addr)[2] | \
|
||||
(addr)[3] | (addr)[4] | (addr)[5]) == 0x00)
|
||||
|
||||
/*
|
||||
* 802.1q VID constants from IEEE 802.1Q-2014, table 9-2.
|
||||
*/
|
||||
|
||||
/* Null VID: The tag contains only PCP (priority) and DEI information. */
|
||||
#define DOT1Q_VID_NULL 0x0
|
||||
/* The default PVID for a bridge port. NB: bridge(4) does not honor this. */
|
||||
#define DOT1Q_VID_DEF_PVID 0x1
|
||||
/* The default SR_PVID for SRP Stream related traffic. */
|
||||
#define DOT1Q_VID_DEF_SR_PVID 0x2
|
||||
/* A VID reserved for implementation use, not permitted on the wire. */
|
||||
#define DOT1Q_VID_RSVD_IMPL 0xfff
|
||||
/* The lowest valid VID. */
|
||||
#define DOT1Q_VID_MIN 0x1
|
||||
/* The highest valid VID. */
|
||||
#define DOT1Q_VID_MAX 0xffe
|
||||
|
||||
/*
|
||||
* This is the type of the VLAN ID inside the tag, not the tag itself.
|
||||
*/
|
||||
|
||||
@@ -126,13 +126,6 @@ struct vlanreq {
|
||||
|
||||
#define VLAN_PCP_MAX 7
|
||||
|
||||
#define DOT1Q_VID_NULL 0x0
|
||||
#define DOT1Q_VID_DEF_PVID 0x1
|
||||
#define DOT1Q_VID_DEF_SR_PVID 0x2
|
||||
#define DOT1Q_VID_RSVD_IMPL 0xfff
|
||||
#define DOT1Q_VID_MIN 1 /* minimum valid vlan id */
|
||||
#define DOT1Q_VID_MAX 4094 /* maximum valid vlan id */
|
||||
|
||||
/*
|
||||
* 802.1q full tag. Proto and vid are stored in host byte order.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user