|
libcaf
0.14.4
|
Utility class bundling access to network interface names and addresses. More...
#include <interfaces.hpp>
Public Types | |
| using | consumer = std::function< void(const char *, protocol, bool, const char *)> |
Consumes {interface_name, protocol_type, is_localhost, address} entries. | |
Static Public Member Functions | |
| static void | traverse (std::initializer_list< protocol > 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 > procs, bool include_localhost=true) |
| Returns all addresses for all devices for given protocols. | |
| static std::vector< std::string > | list_addresses (protocol proc, bool include_localhost=true) |
| Returns all addresses for all devices for given protocol. | |
| static maybe< std::pair< std::string, protocol > > | native_address (const std::string &host, maybe< protocol > preferred=none) |
Returns a native IPv4 or IPv6 translation of host. | |
Utility class bundling access to network interface names and addresses.
1.8.9.1