|
C++ Actor Framework 0.19
|
Utility class bundling access to network interface names and addresses. More...
#include <interfaces.hpp>
Public Types | |
| using | consumer = std::function< void(const char *, protocol::network, bool, const char *)> |
Consumes {interface_name, protocol_type, is_localhost, address} entries. | |
Static Public Member Functions | |
| static void | traverse (std::initializer_list< protocol::network > ps, consumer f) |
Traverses all network interfaces for given protocols using f. | |
| static void | traverse (consumer f) |
Traverses all network interfaces using f. | |
| static interfaces_map | list_all (bool include_localhost=true) |
| Returns a map listing each interface by its name. | |
| static address_listing | list_addresses (bool include_localhost=true) |
| Returns all addresses for all devices for all protocols. | |
| static std::vector< std::string > | list_addresses (std::initializer_list< protocol::network > procs, bool include_localhost=true) |
| Returns all addresses for all devices for given protocols. | |
| static std::vector< std::string > | list_addresses (protocol::network proc, bool include_localhost=true) |
| Returns all addresses for all devices for given protocol. | |
| static std::optional< std::pair< std::string, protocol::network > > | native_address (const std::string &host, std::optional< protocol::network > preferred=std::nullopt) |
Returns a native IPv4 or IPv6 translation of host. | |
| static std::vector< std::pair< std::string, protocol::network > > | server_address (uint16_t port, const char *host, std::optional< protocol::network > preferred=std::nullopt) |
| Returns the host and protocol available for a local server socket. | |
| static bool | get_endpoint (const std::string &host, uint16_t port, ip_endpoint &ep, std::optional< protocol::network > preferred=std::nullopt) |
Writes datagram endpoint info for host:port into ep. | |
Utility class bundling access to network interface names and addresses.