#include <senf/Ext/NetEmu/VLanId.hh>

Inheritance diagram for senf::emu::VLanId:

Public Types

enum  Type { NoTag = 0, CTag, STag }
 

Public Member Functions

 VLanId (std::uint16_t id=0, Type type=NoTag)
 
 VLanId (senf::EthernetPacket const &eth)
 
 operator bool () const
 
bool operator< (VLanId const &other) const
 
bool operator== (VLanId const &other) const
 
std::uint16_t id () const
 
Type type () const
 
bool ctag () const
 
bool stag () const
 
bool sameTagType (VLanId const &other) const
 

Static Public Member Functions

static bool hasSTag (senf::EthernetPacket const &eth)
 
static bool hasCTag (senf::EthernetPacket const &eth)
 
static bool hasTag (senf::EthernetPacket const &eth)
 
static std::uint16_t payloadTypeLength (senf::EthernetPacket const &eth)
 
template<class PKT >
static PKT payload (senf::EthernetPacket const &eth)
 
static Packet payloadPkt (senf::EthernetPacket const &eth)
 

Static Public Attributes

static VLanId const None = senf::emu::VLanId(0x0, NoTag)
 

Detailed Description

Definition at line 31 of file VLanId.hh.

Member Enumeration Documentation

◆ Type

Enumerator
NoTag 
CTag 
STag 

Definition at line 37 of file VLanId.hh.

Constructor & Destructor Documentation

◆ VLanId() [1/2]

senf::emu::VLanId::VLanId ( std::uint16_t  id = 0,
Type  type = NoTag 
)

Definition at line 24 of file VLanId.cc.

◆ VLanId() [2/2]

senf::emu::VLanId::VLanId ( senf::EthernetPacket const &  eth)

Member Function Documentation

◆ ctag()

bool senf::emu::VLanId::ctag ( ) const

◆ hasCTag()

static bool senf::emu::VLanId::hasCTag ( senf::EthernetPacket const &  eth)
static

◆ hasSTag()

static bool senf::emu::VLanId::hasSTag ( senf::EthernetPacket const &  eth)
static

◆ hasTag()

static bool senf::emu::VLanId::hasTag ( senf::EthernetPacket const &  eth)
static

◆ id()

std::uint16_t senf::emu::VLanId::id ( ) const

◆ operator bool()

senf::emu::VLanId::operator bool ( ) const
explicit

◆ operator<()

bool senf::emu::VLanId::operator< ( VLanId const &  other) const

◆ operator==()

bool senf::emu::VLanId::operator== ( VLanId const &  other) const

◆ payload()

template<class PKT >
static PKT senf::emu::VLanId::payload ( senf::EthernetPacket const &  eth)
static

◆ payloadPkt()

static Packet senf::emu::VLanId::payloadPkt ( senf::EthernetPacket const &  eth)
static

◆ payloadTypeLength()

static std::uint16_t senf::emu::VLanId::payloadTypeLength ( senf::EthernetPacket const &  eth)
static

◆ sameTagType()

bool senf::emu::VLanId::sameTagType ( VLanId const &  other) const

◆ stag()

bool senf::emu::VLanId::stag ( ) const

◆ type()

Type senf::emu::VLanId::type ( ) const

Member Data Documentation

◆ None

senf::emu::VLanId const senf::emu::VLanId::None = senf::emu::VLanId(0x0, NoTag)
static

Definition at line 35 of file VLanId.hh.


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