VBVX 0.1.0
Header-only C++23 library for safe, zero-copy parsing of packet buffers.
Loading...
Searching...
No Matches
vbvx::VlanHeader Struct Reference

VLAN (802.1Q) header (4 bytes after Ethernet header). More...

#include <ether.hxx>

Public Member Functions

constexpr auto tci () const noexcept -> uint16_t
constexpr auto type () const noexcept -> uint16_t
constexpr void set_tci (uint16_t tci) noexcept
constexpr void set_type (uint16_t type) noexcept

Public Attributes

uint16_t tci_be
uint16_t type_be

Detailed Description

VLAN (802.1Q) header (4 bytes after Ethernet header).

See also
IANA (EtherType 802.1Q / 0x8100): https://www.iana.org/assignments/ethernet-numbers/ethernet-numbers.xhtml
IEEE 802.1Q for 802.1Q VLAN tag format: https://standards.ieee.org/standard/802_1Q-2018.html

Member Function Documentation

◆ set_tci()

void vbvx::VlanHeader::set_tci ( uint16_t tci)
inlineconstexprnoexcept

◆ set_type()

void vbvx::VlanHeader::set_type ( uint16_t type)
inlineconstexprnoexcept

◆ tci()

auto vbvx::VlanHeader::tci ( ) const -> uint16_t
inlineconstexprnoexcept

◆ type()

auto vbvx::VlanHeader::type ( ) const -> uint16_t
inlineconstexprnoexcept

Member Data Documentation

◆ tci_be

uint16_t vbvx::VlanHeader::tci_be

◆ type_be

uint16_t vbvx::VlanHeader::type_be

The documentation for this struct was generated from the following file: