FD.io VPP  v18.04-17-g3a0d853
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 (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 298 of file types.hpp.

Constructor & Destructor Documentation

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

Definition at line 115 of file types.cpp.

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

Definition at line 125 of file types.cpp.

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

Definition at line 120 of file types.cpp.

Member Function Documentation

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

less than operator

Definition at line 175 of file types.cpp.

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

Comparison operator.

Definition at line 170 of file types.cpp.

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

Convert to byte array.

Definition at line 143 of file types.cpp.

+ Here is the caller graph for this function:

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

String conversion.

Definition at line 151 of file types.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

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

Underlying bytes array.

Definition at line 336 of file types.hpp.

const mac_address_t VOM::mac_address_t::ONE
static

An all 1's MAC address.

Definition at line 311 of file types.hpp.

const mac_address_t VOM::mac_address_t::ZERO
static

An all 0's MAC address.

Definition at line 316 of file types.hpp.


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