odtone::mih::ip_addr
// In header: </home/carlos/Projectos/odtone/inc/odtone/mih/types/address.hpp> class ip_addr : public odtone::mih::transport_addr { public: enum type_ip_enum; // construct/copy/destruct ip_addr(type_ip_enum = none); ip_addr(type_ip_enum, const void *, size_t); explicit ip_addr(type_ip_enum, const octet_string &); // public member functions octet_string address() const; void address(const octet_string &); bool operator==(const ip_addr &) const; // friend functions friend std::ostream & operator<<(std::ostream &, const ip_addr &); };
IP_ADDR data type.
ip_addr
public
construct/copy/destructip_addr(type_ip_enum tp = none);
Construct a IP_ADDR data type.
Parameters: |
|
ip_addr(type_ip_enum tp, const void * raw, size_t len);
Construct a IP_ADDR data type.
Parameters: |
|
explicit ip_addr(type_ip_enum tp, const octet_string & addr);
Construct a IP_ADDR data type.
Parameters: |
|
ip_addr
public member functionsoctet_string address() const;
Get the IP address string.
Returns: |
The IP address string. |
void address(const octet_string & addr);
Set the IP address.
Parameters: |
|
bool operator==(const ip_addr & other) const;
Check if the IP_ADDR is equal to another IP_ADDR.
Parameters: |
|
||
Returns: |
True if they are equal or false otherwise. |
ip_addr
friend functionsfriend std::ostream & operator<<(std::ostream & out, const ip_addr & tp);
IP_ADDR data type output.
Parameters: |
|
||||
Returns: |
ostream reference. |