Realistic 3D camera system
3D camera system components
Public Types | Public Member Functions | Static Public Member Functions | Friends | Related Functions | List of all members
asio::ip::address_v6 Class Reference

Implements IP version 6 style addresses. More...

#include <address_v6.hpp>

Public Types

typedef asio::detail::array< unsigned char, 16 > bytes_type
 The type used to represent an address as an array of bytes. More...
 

Public Member Functions

ASIO_DECL address_v6 ()
 Default constructor. More...
 
ASIO_DECL address_v6 (const bytes_type &bytes, unsigned long scope_id=0)
 Construct an address from raw bytes and scope ID. More...
 
ASIO_DECL address_v6 (const address_v6 &other)
 Copy constructor. More...
 
ASIO_DECL address_v6operator= (const address_v6 &other)
 Assign from another address. More...
 
unsigned long scope_id () const
 The scope ID of the address. More...
 
void scope_id (unsigned long id)
 The scope ID of the address. More...
 
ASIO_DECL bytes_type to_bytes () const
 Get the address in bytes, in network byte order. More...
 
ASIO_DECL std::string to_string () const
 Get the address as a string. More...
 
ASIO_DECL std::string to_string (asio::error_code &ec) const
 Get the address as a string. More...
 
ASIO_DECL address_v4 to_v4 () const
 Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. More...
 
ASIO_DECL bool is_loopback () const
 Determine whether the address is a loopback address. More...
 
ASIO_DECL bool is_unspecified () const
 Determine whether the address is unspecified. More...
 
ASIO_DECL bool is_link_local () const
 Determine whether the address is link local. More...
 
ASIO_DECL bool is_site_local () const
 Determine whether the address is site local. More...
 
ASIO_DECL bool is_v4_mapped () const
 Determine whether the address is a mapped IPv4 address. More...
 
ASIO_DECL bool is_v4_compatible () const
 Determine whether the address is an IPv4-compatible address. More...
 
ASIO_DECL bool is_multicast () const
 Determine whether the address is a multicast address. More...
 
ASIO_DECL bool is_multicast_global () const
 Determine whether the address is a global multicast address. More...
 
ASIO_DECL bool is_multicast_link_local () const
 Determine whether the address is a link-local multicast address. More...
 
ASIO_DECL bool is_multicast_node_local () const
 Determine whether the address is a node-local multicast address. More...
 
ASIO_DECL bool is_multicast_org_local () const
 Determine whether the address is a org-local multicast address. More...
 
ASIO_DECL bool is_multicast_site_local () const
 Determine whether the address is a site-local multicast address. More...
 

Static Public Member Functions

static ASIO_DECL address_v6 from_string (const char *str)
 Create an address from an IP address string. More...
 
static ASIO_DECL address_v6 from_string (const char *str, asio::error_code &ec)
 Create an address from an IP address string. More...
 
static ASIO_DECL address_v6 from_string (const std::string &str)
 Create an address from an IP address string. More...
 
static ASIO_DECL address_v6 from_string (const std::string &str, asio::error_code &ec)
 Create an address from an IP address string. More...
 
static address_v6 any ()
 Obtain an address object that represents any address. More...
 
static ASIO_DECL address_v6 loopback ()
 Obtain an address object that represents the loopback address. More...
 
static ASIO_DECL address_v6 v4_mapped (const address_v4 &addr)
 Create an IPv4-mapped IPv6 address. More...
 
static ASIO_DECL address_v6 v4_compatible (const address_v4 &addr)
 Create an IPv4-compatible IPv6 address. More...
 

Friends

ASIO_DECL friend bool operator== (const address_v6 &a1, const address_v6 &a2)
 Compare two addresses for equality. More...
 
bool operator!= (const address_v6 &a1, const address_v6 &a2)
 Compare two addresses for inequality. More...
 
ASIO_DECL friend bool operator< (const address_v6 &a1, const address_v6 &a2)
 Compare addresses for ordering. More...
 
bool operator> (const address_v6 &a1, const address_v6 &a2)
 Compare addresses for ordering. More...
 
bool operator<= (const address_v6 &a1, const address_v6 &a2)
 Compare addresses for ordering. More...
 
bool operator>= (const address_v6 &a1, const address_v6 &a2)
 Compare addresses for ordering. More...
 

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. More...
 

Detailed Description

Implements IP version 6 style addresses.

The asio::ip::address_v6 class provides the ability to use and manipulate IP version 6 addresses.

Thread Safety
Distinct objects: Safe.
Shared objects: Unsafe.

Definition at line 44 of file address_v6.hpp.

Member Typedef Documentation

The type used to represent an address as an array of bytes.

Note
This type is defined in terms of the C++0x template std::array when it is available. Otherwise, it uses boost:array.

Definition at line 55 of file address_v6.hpp.

Constructor & Destructor Documentation

asio::ip::address_v6::address_v6 ( )

Default constructor.

Definition at line 33 of file address_v6.ipp.

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.

Definition at line 39 of file address_v6.ipp.

asio::ip::address_v6::address_v6 ( const address_v6 other)

Copy constructor.

Definition at line 58 of file address_v6.ipp.

Member Function Documentation

static address_v6 asio::ip::address_v6::any ( )
inlinestatic

Obtain an address object that represents any address.

Definition at line 194 of file address_v6.hpp.

address_v6 asio::ip::address_v6::from_string ( const char *  str)
static

Create an address from an IP address string.

Definition at line 120 of file address_v6.ipp.

address_v6 asio::ip::address_v6::from_string ( const char *  str,
asio::error_code ec 
)
static

Create an address from an IP address string.

Definition at line 128 of file address_v6.ipp.

address_v6 asio::ip::address_v6::from_string ( const std::string &  str)
static

Create an address from an IP address string.

Definition at line 138 of file address_v6.ipp.

address_v6 asio::ip::address_v6::from_string ( const std::string &  str,
asio::error_code ec 
)
static

Create an address from an IP address string.

Definition at line 143 of file address_v6.ipp.

bool asio::ip::address_v6::is_link_local ( ) const

Determine whether the address is link local.

Definition at line 186 of file address_v6.ipp.

bool asio::ip::address_v6::is_loopback ( ) const

Determine whether the address is a loopback address.

Definition at line 162 of file address_v6.ipp.

bool asio::ip::address_v6::is_multicast ( ) const

Determine whether the address is a multicast address.

Definition at line 220 of file address_v6.ipp.

bool asio::ip::address_v6::is_multicast_global ( ) const

Determine whether the address is a global multicast address.

Definition at line 225 of file address_v6.ipp.

bool asio::ip::address_v6::is_multicast_link_local ( ) const

Determine whether the address is a link-local multicast address.

Definition at line 230 of file address_v6.ipp.

bool asio::ip::address_v6::is_multicast_node_local ( ) const

Determine whether the address is a node-local multicast address.

Definition at line 235 of file address_v6.ipp.

bool asio::ip::address_v6::is_multicast_org_local ( ) const

Determine whether the address is a org-local multicast address.

Definition at line 240 of file address_v6.ipp.

bool asio::ip::address_v6::is_multicast_site_local ( ) const

Determine whether the address is a site-local multicast address.

Definition at line 245 of file address_v6.ipp.

bool asio::ip::address_v6::is_site_local ( ) const

Determine whether the address is site local.

Definition at line 191 of file address_v6.ipp.

bool asio::ip::address_v6::is_unspecified ( ) const

Determine whether the address is unspecified.

Definition at line 174 of file address_v6.ipp.

bool asio::ip::address_v6::is_v4_compatible ( ) const

Determine whether the address is an IPv4-compatible address.

Definition at line 206 of file address_v6.ipp.

bool asio::ip::address_v6::is_v4_mapped ( ) const

Determine whether the address is a mapped IPv4 address.

Definition at line 196 of file address_v6.ipp.

address_v6 asio::ip::address_v6::loopback ( )
static

Obtain an address object that represents the loopback address.

Definition at line 270 of file address_v6.ipp.

address_v6 & asio::ip::address_v6::operator= ( const address_v6 other)

Assign from another address.

Definition at line 72 of file address_v6.ipp.

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 85 of file address_v6.hpp.

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 94 of file address_v6.hpp.

address_v6::bytes_type asio::ip::address_v6::to_bytes ( ) const

Get the address in bytes, in network byte order.

Definition at line 88 of file address_v6.ipp.

std::string asio::ip::address_v6::to_string ( ) const

Get the address as a string.

Definition at line 100 of file address_v6.ipp.

std::string asio::ip::address_v6::to_string ( asio::error_code ec) const

Get the address as a string.

Definition at line 108 of file address_v6.ipp.

address_v4 asio::ip::address_v6::to_v4 ( ) const

Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address.

Definition at line 149 of file address_v6.ipp.

address_v6 asio::ip::address_v6::v4_compatible ( const address_v4 addr)
static

Create an IPv4-compatible IPv6 address.

Definition at line 285 of file address_v6.ipp.

address_v6 asio::ip::address_v6::v4_mapped ( const address_v4 addr)
static

Create an IPv4-mapped IPv6 address.

Definition at line 277 of file address_v6.ipp.

Friends And Related Function Documentation

bool operator!= ( const address_v6 a1,
const address_v6 a2 
)
friend

Compare two addresses for inequality.

Definition at line 166 of file address_v6.hpp.

ASIO_DECL friend bool operator< ( const address_v6 a1,
const address_v6 a2 
)
friend

Compare addresses for ordering.

Definition at line 258 of file address_v6.ipp.

template<typename Elem , typename Traits >
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.

Parameters
osThe output stream to which the string will be written.
addrThe address to be written.
Returns
The output stream.

Definition at line 28 of file address_v6.hpp.

bool operator<= ( const address_v6 a1,
const address_v6 a2 
)
friend

Compare addresses for ordering.

Definition at line 182 of file address_v6.hpp.

ASIO_DECL friend bool operator== ( const address_v6 a1,
const address_v6 a2 
)
friend

Compare two addresses for equality.

Definition at line 250 of file address_v6.ipp.

bool operator> ( const address_v6 a1,
const address_v6 a2 
)
friend

Compare addresses for ordering.

Definition at line 176 of file address_v6.hpp.

bool operator>= ( const address_v6 a1,
const address_v6 a2 
)
friend

Compare addresses for ordering.

Definition at line 188 of file address_v6.hpp.


The documentation for this class was generated from the following files: