17 #include <boost/shared_ptr.hpp>
18 #include <boost/any.hpp>
19 #include <boost/functional/hash.hpp>
53 explicit MAC(
const std::string& mac);
61 explicit MAC(uint8_t mac[6]);
86 explicit MAC(uint64_t 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 an 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:40
size_t hash_value(MAC const &mac)
Compute a hash value for the MAC, making MAC suitable as a key in an unordered_map.