#include <address_v6.hpp>
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 |
| The scope ID of the address. | |
| void | scope_id (unsigned long id) |
| 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. | |
| std::string | to_string (asio::error_code &ec) const |
| Get the address as a string. | |
| address_v4 | to_v4 () const |
| Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. | |
| 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_v4_mapped () const |
| Determine whether the address is a mapped IPv4 address. | |
| bool | is_v4_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. | |
| static address_v6 | from_string (const char *str, asio::error_code &ec) |
| 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. | |
| static address_v6 | from_string (const std::string &str, asio::error_code &ec) |
| 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. | |
| static address_v6 | v4_mapped (const address_v4 &addr) |
| Create an IPv4-mapped IPv6 address. | |
| static address_v6 | v4_compatible (const address_v4 &addr) |
| Create an IPv4-compatible IPv6 address. | |
Private Attributes | |
| asio::detail::in6_addr_type | addr_ |
| unsigned long | scope_id_ |
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. | |
| bool | operator> (const address_v6 &a1, const address_v6 &a2) |
| Compare addresses for ordering. | |
| bool | operator<= (const address_v6 &a1, const address_v6 &a2) |
| Compare addresses for ordering. | |
| 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. | |
The asio::ip::address_v6 class provides the ability to use and manipulate IP version 6 addresses.
Definition at line 47 of file address_v6.hpp.
| typedef boost::array<unsigned char, 16> asio::ip::address_v6::bytes_type |
The type used to represent an address as an array of bytes.
Definition at line 51 of file address_v6.hpp.
| asio::ip::address_v6::address_v6 | ( | ) | [inline] |
Default constructor.
Definition at line 54 of file address_v6.hpp.
References addr_.
Referenced by any(), from_string(), v4_compatible(), and v4_mapped().
| asio::ip::address_v6::address_v6 | ( | const bytes_type & | bytes, | |
| unsigned long | scope_id = 0 | |||
| ) | [inline, explicit] |
Construct an address from raw bytes and scope ID.
Definition at line 62 of file address_v6.hpp.
References addr_.
| asio::ip::address_v6::address_v6 | ( | const address_v6 & | other | ) | [inline] |
| address_v6& asio::ip::address_v6::operator= | ( | const address_v6 & | other | ) | [inline] |
| unsigned long asio::ip::address_v6::scope_id | ( | ) | const [inline] |
The scope ID of the address.
Returns the scope ID associated with the IPv6 address.
Definition at line 88 of file address_v6.hpp.
References scope_id_.
Referenced by asio::ip::basic_endpoint< InternetProtocol >::basic_endpoint().
| void asio::ip::address_v6::scope_id | ( | unsigned long | id | ) | [inline] |
The scope ID of the address.
Modifies the scope ID associated with the IPv6 address.
Definition at line 97 of file address_v6.hpp.
References scope_id_.
| bytes_type asio::ip::address_v6::to_bytes | ( | ) | const [inline] |
Get the address in bytes.
Definition at line 103 of file address_v6.hpp.
References addr_.
Referenced by asio::ip::basic_endpoint< InternetProtocol >::basic_endpoint(), asio::ip::detail::socket_option::multicast_request< IPv4_Level, IPv4_Name, IPv6_Level, IPv6_Name >::multicast_request(), and libtorrent::detail::write_address().
| std::string asio::ip::address_v6::to_string | ( | ) | const [inline] |
Get the address as a string.
Definition at line 112 of file address_v6.hpp.
References asio::detail::throw_error().
Referenced by operator<<(), and asio::ip::address::to_string().
| std::string asio::ip::address_v6::to_string | ( | asio::error_code & | ec | ) | const [inline] |
Get the address as a string.
Definition at line 121 of file address_v6.hpp.
References addr_, asio::detail::socket_ops::inet_ntop(), asio::detail::max_addr_v6_str_len, and scope_id_.
| static address_v6 asio::ip::address_v6::from_string | ( | const char * | str | ) | [inline, static] |
Create an address from an IP address string.
Definition at line 133 of file address_v6.hpp.
References asio::detail::throw_error().
Referenced by from_string(), and asio::ip::address::from_string().
| static address_v6 asio::ip::address_v6::from_string | ( | const char * | str, | |
| asio::error_code & | ec | |||
| ) | [inline, static] |
Create an address from an IP address string.
Definition at line 142 of file address_v6.hpp.
References addr_, address_v6(), asio::detail::socket_ops::inet_pton(), and scope_id_.
| static address_v6 asio::ip::address_v6::from_string | ( | const std::string & | str | ) | [inline, static] |
Create an address from an IP address string.
Definition at line 152 of file address_v6.hpp.
References from_string().
| static address_v6 asio::ip::address_v6::from_string | ( | const std::string & | str, | |
| asio::error_code & | ec | |||
| ) | [inline, static] |
Create an address from an IP address string.
Definition at line 158 of file address_v6.hpp.
References from_string().
| address_v4 asio::ip::address_v6::to_v4 | ( | ) | const [inline] |
Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address.
Definition at line 165 of file address_v6.hpp.
References addr_, is_v4_compatible(), and is_v4_mapped().
| bool asio::ip::address_v6::is_loopback | ( | ) | const [inline] |
Determine whether the address is a loopback address.
Definition at line 175 of file address_v6.hpp.
References addr_.
| bool asio::ip::address_v6::is_unspecified | ( | ) | const [inline] |
Determine whether the address is unspecified.
Definition at line 193 of file address_v6.hpp.
References addr_.
| bool asio::ip::address_v6::is_link_local | ( | ) | const [inline] |
Determine whether the address is link local.
Definition at line 211 of file address_v6.hpp.
References addr_.
| bool asio::ip::address_v6::is_site_local | ( | ) | const [inline] |
Determine whether the address is site local.
Definition at line 218 of file address_v6.hpp.
References addr_.
| bool asio::ip::address_v6::is_v4_mapped | ( | ) | const [inline] |
| bool asio::ip::address_v6::is_v4_compatible | ( | ) | const [inline] |
| bool asio::ip::address_v6::is_multicast | ( | ) | const [inline] |
| bool asio::ip::address_v6::is_multicast_global | ( | ) | const [inline] |
| bool asio::ip::address_v6::is_multicast_link_local | ( | ) | const [inline] |
| bool asio::ip::address_v6::is_multicast_node_local | ( | ) | const [inline] |
| bool asio::ip::address_v6::is_multicast_org_local | ( | ) | const [inline] |
| bool asio::ip::address_v6::is_multicast_site_local | ( | ) | const [inline] |
| static address_v6 asio::ip::address_v6::any | ( | ) | [inline, static] |
Obtain an address object that represents any address.
Definition at line 330 of file address_v6.hpp.
References address_v6().
| static address_v6 asio::ip::address_v6::loopback | ( | ) | [inline, static] |
Obtain an address object that represents the loopback address.
Definition at line 336 of file address_v6.hpp.
References addr_.
| static address_v6 asio::ip::address_v6::v4_mapped | ( | const address_v4 & | addr | ) | [inline, static] |
Create an IPv4-mapped IPv6 address.
Definition at line 345 of file address_v6.hpp.
References address_v6(), and asio::ip::address_v4::to_bytes().
| static address_v6 asio::ip::address_v6::v4_compatible | ( | const address_v4 & | addr | ) | [inline, static] |
Create an IPv4-compatible IPv6 address.
Definition at line 354 of file address_v6.hpp.
References address_v6(), and asio::ip::address_v4::to_bytes().
| bool operator== | ( | const address_v6 & | a1, | |
| const address_v6 & | a2 | |||
| ) | [friend] |
| bool operator!= | ( | const address_v6 & | a1, | |
| const address_v6 & | a2 | |||
| ) | [friend] |
| bool operator< | ( | const address_v6 & | a1, | |
| const address_v6 & | a2 | |||
| ) | [friend] |
| bool operator> | ( | const address_v6 & | a1, | |
| const address_v6 & | a2 | |||
| ) | [friend] |
| bool operator<= | ( | const address_v6 & | a1, | |
| const address_v6 & | a2 | |||
| ) | [friend] |
| bool operator>= | ( | const address_v6 & | a1, | |
| const address_v6 & | a2 | |||
| ) | [friend] |
| 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. |
Definition at line 383 of file address_v6.hpp.
References asio::placeholders::iterator, simple_client::s, and to_string().
Definition at line 364 of file address_v6.hpp.
Referenced by address_v6(), from_string(), is_link_local(), is_loopback(), is_multicast(), is_multicast_global(), is_multicast_link_local(), is_multicast_node_local(), is_multicast_org_local(), is_multicast_site_local(), is_site_local(), is_unspecified(), is_v4_compatible(), is_v4_mapped(), loopback(), operator=(), to_bytes(), to_string(), and to_v4().
unsigned long asio::ip::address_v6::scope_id_ [private] |
Definition at line 367 of file address_v6.hpp.
Referenced by from_string(), operator=(), scope_id(), and to_string().
1.5.6