OpenVPN
|
#include <windef.h>
#include <iphlpapi.h>
#include <ws2tcpip.h>
Go to the source code of this file.
Macros | |
#define | WFP_BLOCK_IFACE_METRIC 3 |
Typedefs | |
typedef void(* | wfp_block_msg_handler_t) (DWORD err, const char *msg) |
Functions | |
DWORD | delete_wfp_block_filters (HANDLE engine) |
DWORD | add_wfp_block_filters (HANDLE *engine, int iface_index, const WCHAR *exe_path, wfp_block_msg_handler_t msg_handler_callback, BOOL dns_only) |
int | get_interface_metric (const NET_IFINDEX index, const ADDRESS_FAMILY family, int *is_auto) |
Return interface metric value for the specified interface index. More... | |
DWORD | set_interface_metric (const NET_IFINDEX index, const ADDRESS_FAMILY family, const ULONG metric) |
Sets interface metric value for specified interface index. More... | |
#define WFP_BLOCK_IFACE_METRIC 3 |
Definition at line 34 of file wfp_block.h.
typedef void(* wfp_block_msg_handler_t) (DWORD err, const char *msg) |
Definition at line 36 of file wfp_block.h.
DWORD add_wfp_block_filters | ( | HANDLE * | engine, |
int | iface_index, | ||
const WCHAR * | exe_path, | ||
wfp_block_msg_handler_t | msg_handler_callback, | ||
BOOL | dns_only | ||
) |
Definition at line 185 of file wfp_block.c.
References add_sublayer(), default_msg_handler(), FIREWALL_NAME, FWPM_SESSION_FLAG_DYNAMIC, OUT_ON_ERROR, and UINT64.
Referenced by AddWfpBlock(), and win_wfp_block().
DWORD delete_wfp_block_filters | ( | HANDLE | engine | ) |
Definition at line 379 of file wfp_block.c.
Referenced by AddWfpBlock(), DeleteWfpBlock(), Undo(), and win_wfp_uninit().
int get_interface_metric | ( | const NET_IFINDEX | index, |
const ADDRESS_FAMILY | family, | ||
int * | is_auto | ||
) |
Return interface metric value for the specified interface index.
index | The index of TAP adapter. |
family | Address family (AF_INET for IPv4 and AF_INET6 for IPv6). |
is_auto | On return set to true if automatic metric is in use. Unused if NULL. |
Definition at line 404 of file wfp_block.c.
Referenced by adapter_index_of_ip(), AddWfpBlock(), and win_wfp_block().
DWORD set_interface_metric | ( | const NET_IFINDEX | index, |
const ADDRESS_FAMILY | family, | ||
const ULONG | metric | ||
) |
Sets interface metric value for specified interface index.
index | The index of TAP adapter |
family | Address family (AF_INET for IPv4 and AF_INET6 for IPv6) |
metric | Metric value. 0 for automatic metric |
Definition at line 443 of file wfp_block.c.
Referenced by AddWfpBlock(), DeleteWfpBlock(), Undo(), win_wfp_block(), and win_wfp_uninit().