13#ifndef ZEPHYR_INCLUDE_NET_ETHERNET_VLAN_H_
14#define ZEPHYR_INCLUDE_NET_ETHERNET_VLAN_H_
30#define NET_VLAN_TAG_UNSPEC 0x0fff
53 return (tci >> 12) & 0x01;
65 return (tci >> 13) & 0x07;
78 return (tci & 0xf000) | (vid & 0x0fff);
91 return (tci & 0xefff) | ((!!dei) << 12);
104 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:76
static uint8_t net_eth_vlan_get_dei(uint16_t tci)
Get Drop Eligible Indicator from TCI.
Definition ethernet_vlan.h:51
static uint16_t net_eth_vlan_set_dei(uint16_t tci, bool dei)
Set Drop Eligible Indicator to TCI.
Definition ethernet_vlan.h:89
static uint16_t net_eth_vlan_get_vid(uint16_t tci)
Get VLAN identifier from TCI.
Definition ethernet_vlan.h:39
static uint16_t net_eth_vlan_set_pcp(uint16_t tci, uint8_t pcp)
Set Priority Code Point to TCI.
Definition ethernet_vlan.h:102
static uint8_t net_eth_vlan_get_pcp(uint16_t tci)
Get Priority Code Point from TCI.
Definition ethernet_vlan.h:63
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89