Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
netif.cpp File Reference
#include <bitcoin-build-config.h>
#include <common/netif.h>
#include <logging.h>
#include <netbase.h>
#include <util/check.h>
#include <util/sock.h>
#include <util/syserror.h>
#include <type_traits>
Include dependency graph for netif.cpp:

Go to the source code of this file.

Functions

std::optional< CNetAddrQueryDefaultGateway (Network network)
std::vector< CNetAddrGetLocalAddresses ()
 Return all local non-loopback IPv4 and IPv6 network addresses.

Function Documentation

◆ GetLocalAddresses()

std::vector< CNetAddr > GetLocalAddresses ( )

Return all local non-loopback IPv4 and IPv6 network addresses.

Definition at line 322 of file netif.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QueryDefaultGateway()

std::optional< CNetAddr > QueryDefaultGateway ( Network network)

Query the OS for the default gateway for network. This only makes sense for NET_IPV4 and NET_IPV6. Returns std::nullopt if it cannot be found, or there is no support for this OS.

Definition at line 298 of file netif.cpp.

Here is the caller graph for this function: