Bitcoin Core 31.99.0
P2P Digital Currency
netif.h
Go to the documentation of this file.
1// Copyright (c) 2024-present 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#include <vector>
12
15std::optional<CNetAddr> QueryDefaultGateway(Network network);
16
18std::vector<CNetAddr> GetLocalAddresses();
19
20#endif // BITCOIN_COMMON_NETIF_H
Network
A network type.
Definition: netaddress.h:33
std::vector< CNetAddr > GetLocalAddresses()
Return all local non-loopback IPv4 and IPv6 network addresses.
Definition: netif.cpp:321
std::optional< CNetAddr > QueryDefaultGateway(Network network)
Query the OS for the default gateway for network.
Definition: netif.cpp:297