21 #ifndef INCLUDE_OLA_NETWORK_MACADDRESS_H_ 22 #define INCLUDE_OLA_NETWORK_MACADDRESS_H_ 67 bool operator==(
const MACAddress &other)
const;
69 bool operator!=(
const MACAddress &other)
const {
70 return !(*
this == other);
84 void Get(uint8_t ptr[LENGTH])
const;
92 bool Pack(uint8_t *buffer,
unsigned int length)
const {
105 friend std::ostream& operator<< (std::ostream &out,
128 static MACAddress FromStringOrDie(
const std::string &address);
131 uint8_t m_address[LENGTH];
138 #endif // INCLUDE_OLA_NETWORK_MACADDRESS_H_ bool Pack(uint8_t *buffer, unsigned int length) const
Write the binary representation of the MAC address to memory.
Definition: MACAddress.h:92
bool operator<(const MACAddress &other) const
Order addresses. Note that this won't order how humans expect because ether_addr is in network byte o...
Definition: MACAddress.cpp:106
Represents a MAC Address.
Definition: MACAddress.h:50
static MACAddress * FromString(const std::string &address)
Convert a string to a MACAddress object.
Definition: MACAddress.cpp:161
std::string ToString() const
Convert a mac address to a human readable string.
Definition: MACAddress.cpp:118
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44