odtone::net::link::address_mac
// In header: </home/carlos/Projectos/odtone/inc/odtone/net/link/address_mac.hpp> class address_mac { public: // types typedef boost::array< uint8, 6 > bytes_type; // construct/copy/destruct address_mac(); explicit address_mac(const uint8); explicit address_mac(const bytes_type &); // public static functions static address_mac from_string(const char *); static address_mac from_string(const std::string &); // public member functions bool operator<(const address_mac &) const; std::string to_string() const; bytes_type to_bytes() const; // friend functions friend std::ostream & operator<<(std::ostream &, const address_mac &); // public data members bytes_type _address; };
This class represents the MAC address.
address_mac
public static functionsstatic address_mac from_string(const char * str);
Get the MAC address from a string.
Parameters: |
|
||
Returns: |
The extracted MAC address. |
static address_mac from_string(const std::string & str);
Get the MAC address from a string.
Parameters: |
|
||
Returns: |
The extracted MAC address. |
address_mac
public member functionsbool operator<(const address_mac & lhs) const;
Check if the MAC address is smaller than another MAC address.
Parameters: |
|
||
Returns: |
True if they are equal or false otherwise. |
std::string to_string() const;
Convert the MAC address to a string.
Returns: |
A string representation of this object. |
bytes_type to_bytes() const;
Get the MAC address raw bytes.
Returns: |
The MAC address raw bytes. |
address_mac
friend functionsfriend std::ostream & operator<<(std::ostream & out, const address_mac & mac);
MAC address output.
Parameters: |
|
||||
Returns: |
ostream reference. |