|
libcppwrap
A collection of C++ wrappers for native APIs
|
Functions | |
| bool | is_link_local (const in6_addr &address) noexcept |
| Tests if an IPv6 address has link-local scope. More... | |
| struct sockaddr_in6 | get_link_local_address (const char *interface_name) |
| Gets the first link-local address for the specified network interface. More... | |
| std::string | to_string (const in6_addr &address) |
| Produces a string representation of an IPv6 address. More... | |
| struct sockaddr_in6 wx::ipv6::get_link_local_address | ( | const char * | interface_name | ) |
Gets the first link-local address for the specified network interface.
Note that it is possible for an interface to have more than one link-local address. In this case, one is selected at random (and subsequent calls may not return the same address). It is also possible for an interface to have no link-local address (for example, if IPv6 is disabled).
| interface_name | The name of the network interface. |
| std::system_error | An error occurred. |
| std::runtime_error | The specified interface doesn't exist or has no link-local address. |
|
noexcept |
Tests if an IPv6 address has link-local scope.
An address has link-local scope if and only if it is in the range [fe80::, fe81::).
| address | The IPv6 address to test. |
true if address has link-local scope. | std::string wx::ipv6::to_string | ( | const in6_addr & | address | ) |
Produces a string representation of an IPv6 address.
| address | The IPv6 address to convert. |
address, using :: shorthand notation where possible.