#include <senf/Socket/Protocols/INet/INetAddressing.hh>
This class wraps the standard sockaddr_in6
structure. INet6SocketAddress provides access to all members of the sockaddr_in6 structure. Additionally, INet6SocketAddress supports the string representations
[
address [ %
zone-id ] ]:
port:
port
[2001:db8:1::1]:80
www.go6.net:80
[fe80::1%eth0]:443
Definition at line 141 of file INetAddressing.hh.
Public Member Functions |
|
INet6Address | address () const |
Get printable address representation. |
|
void | address (INet6Address const &addr) |
Change address. |
|
unsigned | port () const |
Get port number. |
|
void | port (unsigned port) |
Change port number. |
|
std::string | iface () const |
Get interface name. |
|
void | iface (std::string const &iface) |
Change interface. |
|
Static Public Attributes |
|
static short const | addressFamily = AF_INET6 |
Related Functions |
|
(Note that these are not member functions.) |
|
std::ostream & | operator<< (std::ostream &os, INet6SocketAddress const &addr) |
Output INet6SocketAddress instance as it's string representation. |
|
Structors and default members |
|
INet6SocketAddress () | |
Create empty instance. |
|
INet6SocketAddress (std::string const &addr, INet6Address::Resolve_t resolve=INet6Address::ResolveINet6) | |
Initialize/convert from string representation. |
|
INet6SocketAddress (INet6Address const &addr, unsigned port) | |
Initialize from address and port. |
|
INet6SocketAddress (INet6Address const &addr, unsigned port, std::string const &iface) | |
Initialize explicitly from given parameters. |
|
INet6SocketAddress (unsigned port) | |
Initialize from port and set to 'unspecified' addr. |
|
INet6SocketAddress (const INet6SocketAddress &other) | |
INet6SocketAddress & | operator= (const INet6SocketAddress &other) |
senf::INet6SocketAddress:: | ||||
INet6SocketAddress | () | |||
Create empty instance.
Definition at line 76 of file INetAddressing.cci.
senf::INet6SocketAddress:: | ||||
INet6SocketAddress | ( | std::string const & | addr, | |
INet6Address::Resolve_t |
resolve = INet6Address::ResolveINet6
|
) | ||
Initialize/convert from string representation.
AddressSyntaxException | if the address syntax is invalid | |
UnknownHostnameException | if the address cannot be resolved. |
[in] | addr | Address to parse |
[in] | resolve | If this is INet6Address::ResolveINet4, support IPv4 addresses. See INet6Address. |
Definition at line 98 of file INetAddressing.cc.
senf::INet6SocketAddress:: | ||||
INet6SocketAddress | ( | INet6Address const & | addr, | |
unsigned | port | ) | ||
Initialize from address and port.
Definition at line 80 of file INetAddressing.cci.
senf::INet6SocketAddress:: | ||||
INet6SocketAddress | ( | INet6Address const & | addr, | |
unsigned | port, | |||
std::string const & | iface | ) | ||
Initialize explicitly from given parameters.
AddressSyntaxException | if the given iface cannot be resolved. |
Definition at line 87 of file INetAddressing.cci.
senf::INet6SocketAddress:: | ||||
INet6SocketAddress | ( | unsigned | port | ) |
Initialize from port and set to 'unspecified' addr.
The address is set to [::]
[in] | port | port number |
Definition at line 96 of file INetAddressing.cci.
senf::INet6SocketAddress:: | ||||
INet6SocketAddress | ( | const INet6SocketAddress & | other | ) |
Definition at line 102 of file INetAddressing.cci.
void senf::INet6SocketAddress:: | ||||
address | ( | INet6Address const & | addr | ) |
Change address.
Definition at line 119 of file INetAddressing.cci.
senf::INet6Address senf::INet6SocketAddress:: | ||||
address | () | |||
Get printable address representation.
Definition at line 113 of file INetAddressing.cci.
void senf::INet6SocketAddress:: | ||||
iface | ( | std::string const & | iface | ) |
Change interface.
AddressSyntaxException | if the given iface cannot be resolved. |
Definition at line 135 of file INetAddressing.cci.
std::string senf::INet6SocketAddress:: | ||||
iface | () | |||
Get interface name.
Definition at line 130 of file INetAddressing.cc.
senf::INet6SocketAddress & senf::INet6SocketAddress:: | ||||
operator= | ( | const INet6SocketAddress & | other | ) |
Definition at line 107 of file INetAddressing.cci.
void senf::INet6SocketAddress:: | ||||
port | ( | unsigned | port | ) |
Change port number.
Definition at line 130 of file INetAddressing.cci.
unsigned senf::INet6SocketAddress:: | ||||
port | () | |||
Get port number.
Definition at line 124 of file INetAddressing.cci.
std::ostream & | ||||
operator<< | ( | std::ostream & | os, | |
INet6SocketAddress const & | addr | ) | ||
Output INet6SocketAddress instance as it's string representation.
short const senf::INet6SocketAddress::addressFamily = AF_INET6 | ||||
[static] | ||||
Definition at line 145 of file INetAddressing.hh.