Bitcoin Core  29.1.0
P2P Digital Currency
netif.h
Go to the documentation of this file.
1 // Copyright (c) 2024 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or https://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_COMMON_NETIF_H
6 #define BITCOIN_COMMON_NETIF_H
7 
8 #include <netaddress.h>
9 
10 #include <optional>
11 
14 std::optional<CNetAddr> QueryDefaultGateway(Network network);
15 
17 std::vector<CNetAddr> GetLocalAddresses();
18 
19 #endif // BITCOIN_COMMON_NETIF_H
std::vector< CNetAddr > GetLocalAddresses()
Return all local non-loopback IPv4 and IPv6 network addresses.
Definition: netif.cpp:268
std::optional< CNetAddr > QueryDefaultGateway(Network network)
Query the OS for the default gateway for network.
Definition: netif.cpp:244
Network
A network type.
Definition: netaddress.h:32