#include <tunutil.hpp>
|
void | fill_gw_details (const MIB_IPFORWARD_ROW2 *row, const std::string &dest) |
|
|
static ULONG | get_iface_metric (std::map< NET_IFINDEX, ULONG > &metric_per_iface, NET_IFINDEX iface, ADDRESS_FAMILY af) |
|
Definition at line 984 of file tunutil.hpp.
◆ BestGateway() [1/2]
openvpn::TunWin::Util::BestGateway::BestGateway |
( |
ADDRESS_FAMILY |
af | ) |
|
|
inline |
Construct object which represents default gateway
Definition at line 990 of file tunutil.hpp.
◆ BestGateway() [2/2]
openvpn::TunWin::Util::BestGateway::BestGateway |
( |
ADDRESS_FAMILY |
af, |
|
|
const std::string & |
dest_str, |
|
|
DWORD |
vpn_interface_index |
|
) |
| |
|
inline |
Construct object which represents best gateway to given destination, excluding gateway on VPN interface. Gateway is chosen first by the longest prefix match and then by metric. If destination is in local network, no gateway is selected and "local_route" flag is set.
- Parameters
-
af | address family, AF_INET or AF_INET6 |
dest_str | destination IPv4/IPv6 address |
vpn_interface_index | index of VPN interface which is excluded from gateway selection |
Definition at line 1044 of file tunutil.hpp.
◆ defined()
bool openvpn::TunWin::Util::BestGateway::defined |
( |
| ) |
const |
|
inline |
◆ fill_gw_details()
void openvpn::TunWin::Util::BestGateway::fill_gw_details |
( |
const MIB_IPFORWARD_ROW2 * |
row, |
|
|
const std::string & |
dest |
|
) |
| |
|
inlineprivate |
◆ gateway_address()
const std::string & openvpn::TunWin::Util::BestGateway::gateway_address |
( |
| ) |
const |
|
inline |
◆ get_iface_metric()
static ULONG openvpn::TunWin::Util::BestGateway::get_iface_metric |
( |
std::map< NET_IFINDEX, ULONG > & |
metric_per_iface, |
|
|
NET_IFINDEX |
iface, |
|
|
ADDRESS_FAMILY |
af |
|
) |
| |
|
inlinestaticprivate |
◆ interface_index()
DWORD openvpn::TunWin::Util::BestGateway::interface_index |
( |
| ) |
const |
|
inline |
◆ local_route()
bool openvpn::TunWin::Util::BestGateway::local_route |
( |
| ) |
const |
|
inline |
Return true if destination, provided to constructor, doesn't require gateway, false otherwise.
Definition at line 1169 of file tunutil.hpp.
◆ addr
std::string openvpn::TunWin::Util::BestGateway::addr |
|
private |
◆ index
DWORD openvpn::TunWin::Util::BestGateway::index = -1 |
|
private |
◆ local_route_
bool openvpn::TunWin::Util::BestGateway::local_route_ = false |
|
private |
The documentation for this class was generated from the following file: