mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
net/vlan: add some macro for vlan
Refer: https://github.com/torvalds/linux/blob/v6.8/include/linux/if_vlan.h#L73-L76 Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
* include/nuttx/net/ethernet.h
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2007, 2009-2012, 2015 Gregory Nutt. All rights reserved.
|
||||
* SPDX-FileCopyrightText: 2007, 2009-2012, 2015 Gregory Nutt. All rights
|
||||
* reserved.
|
||||
* SPDX-FileCopyrightText: 2001-2003, Adam Dunkels. All rights reserved.
|
||||
* SPDX-FileContributor: Gregory Nutt <gnutt@nuttx.org>
|
||||
* SPDX-FileContributor: Adam Dunkels <adam@dunkels.com>
|
||||
@@ -63,6 +64,16 @@
|
||||
|
||||
#define TPID_8021QVLAN ETHERTYPE_VLAN
|
||||
|
||||
/* These are some control information associated with QVLAN tagged
|
||||
* Ethernet packets.
|
||||
*/
|
||||
|
||||
#define VLAN_PRIO_MASK 0xe000 /* Priority Code Point */
|
||||
#define VLAN_PRIO_SHIFT 13
|
||||
#define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator / Drop Eligible Indicator */
|
||||
#define VLAN_VID_MASK 0x0fff /* VLAN Identifier */
|
||||
#define VLAN_N_VID 4096
|
||||
|
||||
/* These are some of the types associated with QVLAN tagged
|
||||
* Ethernet packets.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user