Reference | Class Hierarchy | Class Index | Member Index |
The asio::ip::address_v6 class provides the ability to use and manipulate IP version 6 addresses.
Public Types | |
typedef boost::array< unsigned char, 16 > | bytes_type |
The type used to represent an address as an array of bytes. | |
Public Member Functions | |
address_v6 () | |
Default constructor. | |
address_v6 (const bytes_type &bytes, unsigned long scope_id=0) | |
Construct an address from raw bytes and scope ID. | |
address_v6 (const address_v6 &other) | |
Copy constructor. | |
address_v6 & | operator= (const address_v6 &other) |
Assign from another address. | |
unsigned long | scope_id () const |
Get the scope ID of the address. | |
void | scope_id (unsigned long id) |
Set the scope ID of the address. | |
bytes_type | to_bytes () const |
Get the address in bytes. | |
std::string | to_string () const |
Get the address as a string. | |
template<typename Error_Handler> | |
std::string | to_string (Error_Handler error_handler) const |
Get the address as a string. | |
bool | is_loopback () const |
Determine whether the address is a loopback address. | |
bool | is_unspecified () const |
Determine whether the address is unspecified. | |
bool | is_link_local () const |
Determine whether the address is link local. | |
bool | is_site_local () const |
Determine whether the address is site local. | |
bool | is_ipv4_mapped () const |
Determine whether the address is a mapped IPv4 address. | |
bool | is_ipv4_compatible () const |
Determine whether the address is an IPv4-compatible address. | |
bool | is_multicast () const |
Determine whether the address is a multicast address. | |
bool | is_multicast_global () const |
Determine whether the address is a global multicast address. | |
bool | is_multicast_link_local () const |
Determine whether the address is a link-local multicast address. | |
bool | is_multicast_node_local () const |
Determine whether the address is a node-local multicast address. | |
bool | is_multicast_org_local () const |
Determine whether the address is a org-local multicast address. | |
bool | is_multicast_site_local () const |
Determine whether the address is a site-local multicast address. | |
Static Public Member Functions | |
static address_v6 | from_string (const char *str) |
Create an address from an IP address string. | |
template<typename Error_Handler> | |
static address_v6 | from_string (const char *str, Error_Handler error_handler) |
Create an address from an IP address string. | |
static address_v6 | from_string (const std::string &str) |
Create an address from an IP address string. | |
template<typename Error_Handler> | |
static address_v6 | from_string (const std::string &str, Error_Handler error_handler) |
Create an address from an IP address string. | |
static address_v6 | any () |
Obtain an address object that represents any address. | |
static address_v6 | loopback () |
Obtain an address object that represents the loopback address. | |
Friends | |
bool | operator== (const address_v6 &a1, const address_v6 &a2) |
Compare two addresses for equality. | |
bool | operator!= (const address_v6 &a1, const address_v6 &a2) |
Compare two addresses for inequality. | |
bool | operator< (const address_v6 &a1, const address_v6 &a2) |
Compare addresses for ordering. | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename Elem, typename Traits> | |
std::basic_ostream< Elem, Traits > & | operator<< (std::basic_ostream< Elem, Traits > &os, const address_v6 &addr) |
Output an address as a string. |
typedef boost::array<unsigned char, 16> asio::ip::address_v6::bytes_type |
The type used to represent an address as an array of bytes.
asio::ip::address_v6::address_v6 | ( | ) |
Default constructor.
asio::ip::address_v6::address_v6 | ( | const bytes_type & | bytes, | |
unsigned long | scope_id = 0 | |||
) | [explicit] |
Construct an address from raw bytes and scope ID.
asio::ip::address_v6::address_v6 | ( | const address_v6 & | other | ) |
Copy constructor.
address_v6& asio::ip::address_v6::operator= | ( | const address_v6 & | other | ) |
Assign from another address.
unsigned long asio::ip::address_v6::scope_id | ( | ) | const |
Get the scope ID of the address.
void asio::ip::address_v6::scope_id | ( | unsigned long | id | ) |
Set the scope ID of the address.
bytes_type asio::ip::address_v6::to_bytes | ( | ) | const |
Get the address in bytes.
std::string asio::ip::address_v6::to_string | ( | ) | const |
Get the address as a string.
std::string asio::ip::address_v6::to_string | ( | Error_Handler | error_handler | ) | const |
Get the address as a string.
static address_v6 asio::ip::address_v6::from_string | ( | const char * | str | ) | [static] |
Create an address from an IP address string.
static address_v6 asio::ip::address_v6::from_string | ( | const char * | str, | |
Error_Handler | error_handler | |||
) | [static] |
Create an address from an IP address string.
static address_v6 asio::ip::address_v6::from_string | ( | const std::string & | str | ) | [static] |
Create an address from an IP address string.
static address_v6 asio::ip::address_v6::from_string | ( | const std::string & | str, | |
Error_Handler | error_handler | |||
) | [static] |
Create an address from an IP address string.
bool asio::ip::address_v6::is_loopback | ( | ) | const |
Determine whether the address is a loopback address.
bool asio::ip::address_v6::is_unspecified | ( | ) | const |
Determine whether the address is unspecified.
bool asio::ip::address_v6::is_link_local | ( | ) | const |
Determine whether the address is link local.
bool asio::ip::address_v6::is_site_local | ( | ) | const |
Determine whether the address is site local.
bool asio::ip::address_v6::is_ipv4_mapped | ( | ) | const |
Determine whether the address is a mapped IPv4 address.
bool asio::ip::address_v6::is_ipv4_compatible | ( | ) | const |
Determine whether the address is an IPv4-compatible address.
bool asio::ip::address_v6::is_multicast | ( | ) | const |
Determine whether the address is a multicast address.
bool asio::ip::address_v6::is_multicast_global | ( | ) | const |
Determine whether the address is a global multicast address.
bool asio::ip::address_v6::is_multicast_link_local | ( | ) | const |
Determine whether the address is a link-local multicast address.
bool asio::ip::address_v6::is_multicast_node_local | ( | ) | const |
Determine whether the address is a node-local multicast address.
bool asio::ip::address_v6::is_multicast_org_local | ( | ) | const |
Determine whether the address is a org-local multicast address.
bool asio::ip::address_v6::is_multicast_site_local | ( | ) | const |
Determine whether the address is a site-local multicast address.
static address_v6 asio::ip::address_v6::any | ( | ) | [static] |
Obtain an address object that represents any address.
static address_v6 asio::ip::address_v6::loopback | ( | ) | [static] |
Obtain an address object that represents the loopback address.
bool operator== | ( | const address_v6 & | a1, | |
const address_v6 & | a2 | |||
) | [friend] |
Compare two addresses for equality.
bool operator!= | ( | const address_v6 & | a1, | |
const address_v6 & | a2 | |||
) | [friend] |
Compare two addresses for inequality.
bool operator< | ( | const address_v6 & | a1, | |
const address_v6 & | a2 | |||
) | [friend] |
Compare addresses for ordering.
std::basic_ostream< Elem, Traits > & operator<< | ( | std::basic_ostream< Elem, Traits > & | os, | |
const address_v6 & | addr | |||
) | [related] |
Output an address as a string.
Used to output a human-readable string for a specified address.
os | The output stream to which the string will be written. | |
addr | The address to be written. |