OpenVPN
|
#include "tap.h"
#include "error.h"
#include <objbase.h>
#include <setupapi.h>
#include <stdio.h>
#include <tchar.h>
Go to the source code of this file.
Functions | |
static void | usage (void) |
Print the help message. More... | |
static BOOL | is_adapter_name_available (LPCTSTR name, struct tap_adapter_node *adapter_list, BOOL log) |
Checks if adapter with given name doesn't already exist. More... | |
static LPTSTR | get_unique_adapter_name (LPCTSTR hwid, struct tap_adapter_node *adapter_list) |
Returns unique adapter name based on hwid or NULL if name cannot be generated. More... | |
int __cdecl | _tmain (int argc, LPCTSTR argv[]) |
Program entry point. More... | |
bool | dont_mute (unsigned int flags) |
Check muting filter. More... | |
void | x_msg_va (const unsigned int flags, const char *format, va_list arglist) |
Variables | |
const TCHAR | title_string [] |
static const TCHAR | usage_message [] |
static const TCHAR | usage_message_create [] |
static const TCHAR | usage_message_list [] |
static const TCHAR | usage_message_delete [] |
int __cdecl _tmain | ( | int | argc, |
LPCTSTR | argv[] | ||
) |
Program entry point.
Definition at line 211 of file main.c.
References get_unique_adapter_name(), is_adapter_name_available(), tap_adapter_node::pNext, PRIsLPOLESTR, PRIsLPTSTR, tap_adapter_node::szName, tap_create_adapter(), tap_delete_adapter(), tap_free_adapter_list(), tap_list_adapters(), tap_set_adapter_name(), TAP_WIN_COMPONENT_ID, title_string, usage(), usage_message_create, usage_message_delete, and usage_message_list.
|
static |
Returns unique adapter name based on hwid or NULL if name cannot be generated.
Caller is responsible for freeing it.
Definition at line 158 of file main.c.
References is_adapter_name_available(), and TAP_WIN_COMPONENT_ID.
Referenced by _tmain().
|
static |
Checks if adapter with given name doesn't already exist.
Definition at line 131 of file main.c.
References tap_adapter_node::pNext, PRIsLPOLESTR, and PRIsLPTSTR.
Referenced by _tmain(), and get_unique_adapter_name().
|
static |
Print the help message.
Definition at line 120 of file main.c.
References title_string, and usage_message.
Referenced by _tmain().
void x_msg_va | ( | const unsigned int | flags, |
const char * | format, | ||
va_list | arglist | ||
) |
Definition at line 480 of file main.c.
References M_ERRNO, and PRIsLPTSTR.
|
static |
Definition at line 44 of file main.c.
Referenced by usage().
|
static |
Definition at line 61 of file main.c.
Referenced by _tmain().
|
static |
Definition at line 105 of file main.c.
Referenced by _tmain().
|
static |
Definition at line 86 of file main.c.
Referenced by _tmain().