11 #ifndef ASIO_IP_ADDRESS_V6_HPP 12 #define ASIO_IP_ADDRESS_V6_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 20 #include "asio/detail/array.hpp" 21 #include "asio/detail/socket_types.hpp" 22 #include "asio/detail/string_view.hpp" 23 #include "asio/detail/winsock_init.hpp" 24 #include "asio/error_code.hpp" 25 #include "asio/ip/address_v4.hpp" 27 #if !defined(ASIO_NO_IOSTREAM) 29 #endif // !defined(ASIO_NO_IOSTREAM) 31 #include "asio/detail/push_options.hpp" 36 template <
typename>
class basic_address_iterator;
55 #if defined(GENERATING_DOCUMENTATION) 71 #if defined(ASIO_HAS_MOVE) 74 #endif // defined(ASIO_HAS_MOVE) 80 #if defined(ASIO_HAS_MOVE) 83 #endif // defined(ASIO_HAS_MOVE) 104 ASIO_DECL bytes_type
to_bytes()
const ASIO_NOEXCEPT;
109 #if !defined(ASIO_NO_DEPRECATED) 134 #endif // !defined(ASIO_NO_DEPRECATED) 151 #if !defined(ASIO_NO_DEPRECATED) 155 #endif // !defined(ASIO_NO_DEPRECATED) 220 #if !defined(ASIO_NO_DEPRECATED) 226 #endif // !defined(ASIO_NO_DEPRECATED) 232 asio::detail::in6_addr_type addr_;
235 unsigned long scope_id_;
274 #if defined(ASIO_HAS_STRING_VIEW) \ 275 || defined(GENERATING_DOCUMENTATION) 290 #endif // defined(ASIO_HAS_STRING_VIEW) 311 #if !defined(ASIO_NO_IOSTREAM) 325 template <
typename Elem,
typename Traits>
327 std::basic_ostream<Elem, Traits>& os,
const address_v6& addr);
329 #endif // !defined(ASIO_NO_IOSTREAM) 334 #include "asio/detail/pop_options.hpp" 336 #include "asio/ip/impl/address_v6.hpp" 337 #if defined(ASIO_HEADER_ONLY) 338 # include "asio/ip/impl/address_v6.ipp" 339 #endif // defined(ASIO_HEADER_ONLY) 341 #endif // ASIO_IP_ADDRESS_V6_HPP address_v6 make_address_v6(const address_v6::bytes_type &bytes, unsigned long scope_id=0)
Create an IPv6 address from raw bytes and scope ID.
Definition: address_v6.hpp:242
ASIO_DECL bool is_loopback() const ASIO_NOEXCEPT
Determine whether the address is a loopback address.
Definition: address_v6.ipp:141
ASIO_DECL bytes_type to_bytes() const ASIO_NOEXCEPT
Get the address in bytes, in network byte order.
Definition: address_v6.ipp:89
ASIO_DECL bool is_multicast() const ASIO_NOEXCEPT
Determine whether the address is a multicast address.
Definition: address_v6.ipp:201
static ASIO_DECL address_v6 loopback() ASIO_NOEXCEPT
Obtain an address object that represents the loopback address.
Definition: address_v6.ipp:251
friend bool operator!=(const address_v6 &a1, const address_v6 &a2) ASIO_NOEXCEPT
Compare two addresses for inequality.
Definition: address_v6.hpp:180
ASIO_DECL std::string to_string() const
Get the address as a string.
Definition: address_v6.ipp:101
Definition: address_v4_iterator.hpp:26
static ASIO_DECL address_v6 v4_mapped(const address_v4 &addr)
(Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address.
Definition: address_v6.ipp:259
ASIO_DECL friend bool operator<(const address_v6 &a1, const address_v6 &a2) ASIO_NOEXCEPT
Compare addresses for ordering.
Definition: address_v6.ipp:239
Implements IP version 4 style addresses.
Definition: address_v4.hpp:45
ASIO_DECL address_v6 & operator=(const address_v6 &other) ASIO_NOEXCEPT
Assign from another address.
Definition: address_v6.ipp:73
friend bool operator<=(const address_v6 &a1, const address_v6 &a2) ASIO_NOEXCEPT
Compare addresses for ordering.
Definition: address_v6.hpp:198
ASIO_DECL bool is_multicast_node_local() const ASIO_NOEXCEPT
Determine whether the address is a node-local multicast address.
Definition: address_v6.ipp:216
ASIO_DECL address_v4 to_v4() const
(Deprecated: Use make_address_v4().) Converts an IPv4-mapped or IPv4-compatible address to an IPv4 ad...
Definition: address_v6.ipp:127
asio::detail::array< unsigned char, 16 > bytes_type
The type used to represent an address as an array of bytes.
Definition: address_v6.hpp:58
ASIO_DECL bool is_multicast_global() const ASIO_NOEXCEPT
Determine whether the address is a global multicast address.
Definition: address_v6.ipp:206
ASIO_DECL address_v6() ASIO_NOEXCEPT
Default constructor.
Definition: address_v6.ipp:34
ASIO_DECL friend bool operator==(const address_v6 &a1, const address_v6 &a2) ASIO_NOEXCEPT
Compare two addresses for equality.
Definition: address_v6.ipp:231
ASIO_DECL bool is_link_local() const ASIO_NOEXCEPT
Determine whether the address is link local.
Definition: address_v6.ipp:165
friend bool operator>(const address_v6 &a1, const address_v6 &a2) ASIO_NOEXCEPT
Compare addresses for ordering.
Definition: address_v6.hpp:191
friend bool operator>=(const address_v6 &a1, const address_v6 &a2) ASIO_NOEXCEPT
Compare addresses for ordering.
Definition: address_v6.hpp:205
ASIO_DECL bool is_multicast_org_local() const ASIO_NOEXCEPT
Determine whether the address is a org-local multicast address.
Definition: address_v6.ipp:221
static address_v6 from_string(const char *str)
(Deprecated: Use make_address_v6().) Create an IPv6 address from an IP address string.
Definition: address_v6.hpp:29
static address_v6 any() ASIO_NOEXCEPT
Obtain an address object that represents any address.
Definition: address_v6.hpp:212
ASIO_DECL bool is_unspecified() const ASIO_NOEXCEPT
Determine whether the address is unspecified.
Definition: address_v6.ipp:153
ASIO_DECL bool is_multicast_link_local() const ASIO_NOEXCEPT
Determine whether the address is a link-local multicast address.
Definition: address_v6.ipp:211
Class to represent an error code value.
Definition: error_code.hpp:80
Implements IP version 6 style addresses.
Definition: address_v6.hpp:47
unsigned long scope_id() const ASIO_NOEXCEPT
The scope ID of the address.
Definition: address_v6.hpp:89
std::basic_ostream< Elem, Traits > & operator<<(std::basic_ostream< Elem, Traits > &os, const address_v6 &addr)
Output an address as a string.
Definition: address_v6.hpp:54
ASIO_DECL bool is_v4_mapped() const ASIO_NOEXCEPT
Determine whether the address is a mapped IPv4 address.
Definition: address_v6.ipp:175
ASIO_DECL bool is_multicast_site_local() const ASIO_NOEXCEPT
Determine whether the address is a site-local multicast address.
Definition: address_v6.ipp:226
void scope_id(unsigned long id) ASIO_NOEXCEPT
The scope ID of the address.
Definition: address_v6.hpp:98
Definition: any_io_executor.hpp:28
ASIO_DECL bool is_v4_compatible() const
(Deprecated: No replacement.) Determine whether the address is an IPv4-compatible address...
Definition: address_v6.ipp:186
ASIO_DECL bool is_site_local() const ASIO_NOEXCEPT
Determine whether the address is site local.
Definition: address_v6.ipp:170
Definition: format.h:3611
Definition: array_fwd.hpp:23
static ASIO_DECL address_v6 v4_compatible(const address_v4 &addr)
(Deprecated: No replacement.) Create an IPv4-compatible IPv6 address.
Definition: address_v6.ipp:267