|  | 
odtone::mih::mac_addr
// In header: </home/carlos/Projectos/odtone/inc/odtone/mih/types/address.hpp> class mac_addr : public odtone::mih::transport_addr { public: // construct/copy/destruct mac_addr(); explicit mac_addr(const octet_string &); mac_addr(const void *, size_t); // public member functions octet_string address() const; void address(const octet_string &); bool operator==(const mac_addr &) const; // friend functions friend std::ostream & operator<<(std::ostream &, const mac_addr &); };
MAC_ADDR data type.
mac_addr 
        public
       construct/copy/destructmac_addr();
Construct an empty MAC_ADDR data type.
| ![[Note]](../../images/note.png) | Note | 
|---|---|
| Transport address type = 6 | 
explicit mac_addr(const octet_string & addr);
Construct an empty MAC_ADDR data type.
| ![[Note]](../../images/note.png) | Note | 
|---|---|
| Transport address type = 6 | 
| Parameters: | 
 | 
mac_addr(const void * raw, size_t len);
Construct an empty MAC_ADDR data type.
| ![[Note]](../../images/note.png) | Note | 
|---|---|
| Transport address type = 6 | 
| Parameters: | 
 | 
mac_addr public member functionsoctet_string address() const;
Get the MAC address string (format: XX:XX:XX:XX:XX:XX).
| Returns: | The MAC address string. | 
void address(const octet_string & addr);
Set the MAC address.
| Parameters: | 
 | 
bool operator==(const mac_addr & other) const;
Check if the MAC_ADDR is equal to another MAC_ADDR.
| Parameters: | 
 | ||
| Returns: | True if they are equal or false otherwise. | 
mac_addr friend functionsfriend std::ostream & operator<<(std::ostream & out, const mac_addr & tp);
MAC_ADDR data type output.
| Parameters: | 
 | ||||
| Returns: | ostream reference. |