userver: userver/utils/macaddr.hpp File Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
macaddr.hpp File Reference

Detailed Description

MAC address types.

Definition in file macaddr.hpp.

Go to the source code of this file.

#include <array>
#include <stdexcept>
#include <string>
#include <utility>
#include <userver/utils/encoding/hex.hpp>
+ This graph shows which files directly or indirectly include this file:

Classes

class  utils::MacaddrBase< N >
 Base class for Macaddr/Macaddr8. More...
 

Namespaces

namespace  utils
 Utilities.
 

Typedefs

using utils::Macaddr = MacaddrBase<6>
 48-bit MAC address
 
using utils::Macaddr8 = MacaddrBase<8>
 64-bit MAC address
 

Functions

std::string utils::MacaddrToString (Macaddr macaddr)
 Get 48-bit MAC address as a string in "xx:xx:.." format.
 
std::string utils::Macaddr8ToString (Macaddr8 macaddr)
 Get 64-bit MAC address as a string in "xx:xx:.." format.
 
Macaddr utils::MacaddrFromString (const std::string &str)
 Get 48-bit MAC address from std::string.
 
Macaddr8 utils::Macaddr8FromString (const std::string &str)
 Get 64-bit MAC address from std::string.