FD.io VPP  v18.07.1-19-g511ce25
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 290 of file types.hpp.

Constructor & Destructor Documentation

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

Definition at line 112 of file types.cpp.

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

Definition at line 122 of file types.cpp.

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

Definition at line 117 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 172 of file types.cpp.

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

Comparison operator.

Definition at line 167 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 140 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 148 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 328 of file types.hpp.

const mac_address_t VOM::mac_address_t::ONE
static

An all 1's MAC address.

Definition at line 303 of file types.hpp.

const mac_address_t VOM::mac_address_t::ZERO
static

An all 0's MAC address.

Definition at line 308 of file types.hpp.


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