OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::Win Namespace Reference

Namespaces

namespace  Console
 
namespace  Handle
 
namespace  HandleComm
 
namespace  LogUtil
 

Classes

struct  DestroyEvent
 
struct  Error
 
class  Event
 
class  Impersonate
 
struct  LastError
 
class  LogFile
 
struct  NamedPipeImpersonate
 
struct  NamedPipePeerInfo
 
struct  NamedPipePeerInfoClient
 
struct  NamedPipePeerInfoCS
 
struct  NamedPipePeerInfoServer
 
struct  NetApi
 
class  Reg
 Abstraction of Windows Registry operations. More...
 
class  ScopedHANDLE
 
struct  SecurityAttributes
 
class  Service
 

Typedefs

typedef std::unique_ptr< wchar_t[]> UTF16
 
typedef std::unique_ptr< char[]> UTF8
 

Functions

 OPENVPN_EXCEPTION (win_call)
 
std::string call (const std::string &cmd)
 
std::wstring module_name ()
 
std::string module_name_utf8 ()
 
std::string omiclient_path ()
 
template<typename REG = Win::Reg>
static std::wstring interface_dns_domain (const std::wstring &itf_guid)
 Read interface specific domain suffix.
 
template<typename REG = Win::Reg>
static bool dhcp_enabled_on_itf (typename REG::Key &itf_key)
 Checks if DHCP is enabled for an interface.
 
template<typename E >
static void check_reg_error (DWORD status, const std::string &key)
 
 OPENVPN_SIMPLE_EXCEPTION (win_utf16)
 
wchar_t * utf16 (const std::string &str, int cp=CP_UTF8)
 
size_t utf16_strlen (const wchar_t *str)
 
char * utf8 (wchar_t *str)
 

Typedef Documentation

◆ UTF16

typedef std::unique_ptr<wchar_t[]> openvpn::Win::UTF16

Definition at line 24 of file unicode.hpp.

◆ UTF8

typedef std::unique_ptr<char[]> openvpn::Win::UTF8

Definition at line 25 of file unicode.hpp.

Function Documentation

◆ call()

std::string openvpn::Win::call ( const std::string &  cmd)
inline

Definition at line 31 of file call.hpp.

Here is the caller graph for this function:

◆ check_reg_error()

template<typename E >
static void openvpn::Win::check_reg_error ( DWORD  status,
const std::string &  key 
)
static

Definition at line 25 of file reg.hpp.

◆ dhcp_enabled_on_itf()

template<typename REG = Win::Reg>
static bool openvpn::Win::dhcp_enabled_on_itf ( typename REG::Key &  itf_key)
static

Checks if DHCP is enabled for an interface.

Template Parameters
REGthe Registry abstraction to use (default: Win::Reg)
Parameters
itf_keyREG::Key of the interface to check for
Returns
bool true if DHCP is enabled, false if disabled or an error occurred

Definition at line 128 of file netutil.hpp.

◆ interface_dns_domain()

template<typename REG = Win::Reg>
static std::wstring openvpn::Win::interface_dns_domain ( const std::wstring &  itf_guid)
static

Read interface specific domain suffix.

It can be either be the one assigned by DHCP or manually.

Template Parameters
REGthe Registry abstraction to use (default: Win::Reg)
Parameters
itf_guidThe interface GUID string
Returns
std::wstring The domain found, or the empty string

Definition at line 98 of file netutil.hpp.

◆ module_name()

std::wstring openvpn::Win::module_name ( )
inline

Definition at line 29 of file modname.hpp.

Here is the caller graph for this function:

◆ module_name_utf8()

std::string openvpn::Win::module_name_utf8 ( )
inline

Definition at line 41 of file modname.hpp.

Here is the caller graph for this function:

◆ omiclient_path()

std::string openvpn::Win::omiclient_path ( )
inline

Definition at line 46 of file modname.hpp.

Here is the caller graph for this function:

◆ OPENVPN_EXCEPTION()

openvpn::Win::OPENVPN_EXCEPTION ( win_call  )

◆ OPENVPN_SIMPLE_EXCEPTION()

openvpn::Win::OPENVPN_SIMPLE_EXCEPTION ( win_utf16  )

◆ utf16()

wchar_t * openvpn::Win::utf16 ( const std::string &  str,
int  cp = CP_UTF8 
)
inline

Definition at line 29 of file unicode.hpp.

Here is the caller graph for this function:

◆ utf16_strlen()

size_t openvpn::Win::utf16_strlen ( const wchar_t *  str)
inline

Definition at line 52 of file unicode.hpp.

Here is the caller graph for this function:

◆ utf8()

char * openvpn::Win::utf8 ( wchar_t *  str)
inline

Definition at line 57 of file unicode.hpp.

Here is the caller graph for this function: