FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
VOM::mac_address_t Struct Reference

Type def of a Ethernet address. More...

+ Collaboration diagram for VOM::mac_address_t:

Public Member Functions

 mac_address_t (const uint8_t bytes[6])
 
 mac_address_t (const std::string &str)
 
 mac_address_t (std::initializer_list< uint8_t > bytes)
 
void to_bytes (uint8_t *array, uint8_t len) const
 Convert to byte array. More...
 
bool operator== (const mac_address_t &m) const
 Comparison operator. More...
 
bool operator< (const mac_address_t &m) const
 less than operator More...
 
std::string to_string () const
 String conversion. More...
 

Data Fields

std::array< uint8_t, 6 > bytes
 Underlying bytes array. More...
 

Static Public Attributes

static const mac_address_t ONE
 An all 1's MAC address. More...
 
static const mac_address_t ZERO
 An all 0's MAC address. More...
 

Detailed Description

Type def of a Ethernet address.

Definition at line 295 of file types.hpp.

Constructor & Destructor Documentation

◆ mac_address_t() [1/3]

VOM::mac_address_t::mac_address_t ( const uint8_t  bytes[6])

Definition at line 112 of file types.cpp.

◆ mac_address_t() [2/3]

VOM::mac_address_t::mac_address_t ( const std::string &  str)

Definition at line 122 of file types.cpp.

◆ mac_address_t() [3/3]

VOM::mac_address_t::mac_address_t ( std::initializer_list< uint8_t >  bytes)

Definition at line 117 of file types.cpp.

Member Function Documentation

◆ operator<()

bool VOM::mac_address_t::operator< ( const mac_address_t m) const

less than operator

Definition at line 172 of file types.cpp.

◆ operator==()

bool VOM::mac_address_t::operator== ( const mac_address_t m) const

Comparison operator.

Definition at line 167 of file types.cpp.

◆ to_bytes()

void VOM::mac_address_t::to_bytes ( uint8_t *  array,
uint8_t  len 
) const

Convert to byte array.

Definition at line 140 of file types.cpp.

+ Here is the caller graph for this function:

◆ to_string()

std::string VOM::mac_address_t::to_string ( void  ) const

String conversion.

Definition at line 148 of file types.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ bytes

std::array<uint8_t, 6> VOM::mac_address_t::bytes

Underlying bytes array.

Definition at line 333 of file types.hpp.

◆ ONE

const mac_address_t VOM::mac_address_t::ONE
static

An all 1's MAC address.

Definition at line 308 of file types.hpp.

◆ ZERO

const mac_address_t VOM::mac_address_t::ZERO
static

An all 0's MAC address.

Definition at line 313 of file types.hpp.


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