13#ifndef ZEPHYR_INCLUDE_NET_ETHERNET_VLAN_H_
14#define ZEPHYR_INCLUDE_NET_ETHERNET_VLAN_H_
32#define NET_VLAN_TAG_UNSPEC 0x0fff
55 return (tci >> 12) & 0x01;
67 return (tci >> 13) & 0x07;
80 return (tci & 0xf000) | (vid & 0x0fff);
93 return (tci & 0xefff) | ((!!dei) << 12);
106 return (tci & 0x1fff) | ((pcp & 0x07) << 13);
static uint16_t net_eth_vlan_set_vid(uint16_t tci, uint16_t vid)
Set VLAN identifier to TCI.
Definition ethernet_vlan.h:78
static uint8_t net_eth_vlan_get_dei(uint16_t tci)
Get Drop Eligible Indicator from TCI.
Definition ethernet_vlan.h:53
static uint16_t net_eth_vlan_set_dei(uint16_t tci, bool dei)
Set Drop Eligible Indicator to TCI.
Definition ethernet_vlan.h:91
static uint16_t net_eth_vlan_get_vid(uint16_t tci)
Get VLAN identifier from TCI.
Definition ethernet_vlan.h:41
static uint16_t net_eth_vlan_set_pcp(uint16_t tci, uint8_t pcp)
Set Priority Code Point to TCI.
Definition ethernet_vlan.h:104
static uint8_t net_eth_vlan_get_pcp(uint16_t tci)
Get Priority Code Point from TCI.
Definition ethernet_vlan.h:65
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89