|
scclib
Stable Cloud Computing C++ Library
|
Ipv6 internet address. More...
#include <inet.h>


Public Member Functions | |
| InetAddr () | |
| ipv6 internet address, initialized with "any" address | |
| InetAddr (unsigned) | |
| ipv6 internet address, with specified port (address set to any). | |
| InetAddr (const std::string &, unsigned) | |
| ipv6 internet address, with specified host address and port. | |
| InetAddr (const sockaddr *) | |
| ipv6 internet address, initialized with socket address. | |
| InetAddr (const InetAddr &) | |
| ipv6 internet address, copy constructed. | |
| InetAddr & | operator= (const InetAddr &) |
| ipv6 internet address, copy assigned. | |
| InetAddr (InetAddr &&) | |
| ipv6 internet address, move constructed. More... | |
| InetAddr & | operator= (InetAddr &&) |
| ipv6 internet address, move assigned. More... | |
| virtual | ~InetAddr () |
| ipv6 internet address destructor. | |
| virtual | operator const sockaddr * () const |
| Socket address const pointer. | |
| virtual | operator sockaddr * () |
| Socket address pointer. | |
| virtual unsigned | len () const |
| Socket address length in bytes. | |
| virtual std::string | str () const |
| Readable address string. | |
| virtual std::string | host () const |
| Get host. | |
| operator const sockaddr_in6 * () const | |
| IPv6 socket address pointer. | |
| void | any_host () |
| Set to "any" host address :: | |
| void | local_host () |
| Set to local (loopback) address ::1. | |
| void | host (const std::string &) |
| Set the host address. More... | |
| unsigned | port () const |
| Get the port. | |
| void | port (unsigned) |
| Set the port. | |
| void | scope_id (uint32_t) |
| Set the scope id of the address. More... | |
| uint32_t | scope_id () const |
| Get the scope id of the address. | |
| int | flags () const |
| Return the address flags. More... | |
| bool | test_flags (int f) const |
| Test if flags are set in this address. | |
Ipv6 internet address.
An ipv4 address can be embedded in ipv6 for example, with ipv4/ipv6
Example:
::ffff:192.168.1.2
The default address is any host (all zeroes or ::)
| InetAddr::InetAddr | ( | InetAddr && | b | ) |
| int InetAddr::flags | ( | ) | const |
| void InetAddr::host | ( | const std::string & | h | ) |
| void InetAddr::scope_id | ( | uint32_t | s | ) |
Set the scope id of the address.
Used for "scoped" addresses: for link-local (fe80::/10), the scope_id is the interface index (see net::Network_if). for site-local (fec0::/10), the scope_id is the site identifier.
If the scope_id is not set for a scoped address, the routing table may be used to find an address.
In general link-local unicast (fe80::/64) or link-scope multicast (ff00::/8) may require scope_id to route correctly.