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.
Synopsis
Declared in <common/netif.h>
std::optional<CNetAddr>
QueryDefaultGateway(Network network);
Return Value
The gateway address, or std::nullopt if unavailable.
Parameters
Name |
Description |
network |
The network family to query (NET_IPV4 or NET_IPV6). |
Created with MrDocs