50 explicit MAC(
const std::string& mac);
58 explicit MAC(uint8_t mac[6]);
83 explicit MAC(uint64_t mac);
121 #if __cplusplus > 199711L
128 template<>
struct hash<opflex::modb::MAC> {
bool operator==(const MAC &lhs, const MAC &rhs)
Check for MAC equality.
std::ostream & operator<<(std::ostream &os, const MAC &mac)
Stream insertion operator.
std::string toString() const
Get the MAC represented as a string.
friend size_t hash_value(MAC const &mac)
Compute a hash value for the MAC, making MAC suitable as a key in a boost::unordered_map.
bool operator!=(const MAC &lhs, const MAC &rhs)
Check for MAC inequality.
friend bool operator!=(const MAC &lhs, const MAC &rhs)
Check for MAC inequality.
MAC()
Construct a MAC consisting of all zeroes.
void toUIntArray(uint8_t mac[6]) const
Get the MAC represented as an array of 6 bytes in network byte order.
friend bool operator==(const MAC &lhs, const MAC &rhs)
Check for MAC equality.
A MAC address is used to identify devices on an ethernet network.
Definition: MAC.h:37
size_t hash_value(MAC const &mac)
Compute a hash value for the MAC, making MAC suitable as a key in a boost::unordered_map.