OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::TunWin::Client Class Reference

#include <tuncli.hpp>

Inheritance diagram for openvpn::TunWin::Client:
[legend]
Collaboration diagram for openvpn::TunWin::Client:
[legend]

Public Types

typedef RCPtr< ClientPtr
 
- Public Types inherited from openvpn::TunClient
typedef RCPtr< TunClientPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

void apply_push_update (const OptionList &opt, TransportClient &transcli) override
 Notifies tun client about received PUSH_UPDATE control channel message.
 
void tun_start (const OptionList &opt, TransportClient &transcli, CryptoDCSettings &) override
 
bool tun_send (BufferAllocated &buf) override
 
std::string tun_name () const override
 
std::string vpn_ip4 () const override
 
std::string vpn_ip6 () const override
 
std::string vpn_gw4 () const override
 
std::string vpn_gw6 () const override
 
int vpn_mtu () const override
 
std::uint32_t vpn_interface_index () const override
 
void set_disconnect () override
 
void stop () override
 
virtual ~Client ()
 
- Public Member Functions inherited from openvpn::TunClient
virtual void adjust_mss (int mss)
 
- Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
 RC () noexcept=default
 
 RC (const RC &)=delete
 
virtual ~RC ()=default
 
RCoperator= (const RC &)=delete
 
olong use_count () const noexcept
 Delegates call to RCImpl and returns the result.
 

Private Types

typedef Tun< Client *, TunPersistTunImpl
 

Private Member Functions

 Client (openvpn_io::io_context &io_context_arg, ClientConfig *config_arg, TunClientParent &parent_arg)
 
bool send (Buffer &buf)
 
void tun_read_handler (PacketFrom::SPtr &pfp)
 
void tun_error_handler (const Error::Type errtype, const openvpn_io::error_code *error)
 
void stop_ ()
 
HANDLE tap_handle ()
 
void tap_process_logging ()
 
void dhcp_inspect (Buffer &buf)
 
void layer_2_schedule_timer (const unsigned int seconds)
 
void layer_2_timer_callback ()
 

Private Attributes

openvpn_io::io_context & io_context
 
TunPersist::Ptr tun_persist
 
ClientConfig::Ptr config
 
TunClientParentparent
 
TunImpl::Ptr impl
 
TunProp::State::Ptr state
 
TunWin::SetupBase::Ptr tun_setup
 
std::unique_ptr< DHCPCapturedhcp_capture
 
AsioTimer l2_timer
 
Frame::Contextframe_context
 
bool halt
 

Friends

class ClientConfig
 
class TunIO< Client *, PacketFrom, TunWrapAsioStream< TunPersist > >
 

Additional Inherited Members

- Static Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
static constexpr bool is_thread_safe ()
 Delegates call to RCImpl and returns the result.
 

Detailed Description

Definition at line 70 of file tuncli.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 78 of file tuncli.hpp.

◆ TunImpl

Definition at line 75 of file tuncli.hpp.

Constructor & Destructor Documentation

◆ ~Client()

virtual openvpn::TunWin::Client::~Client ( )
inlinevirtual

Definition at line 272 of file tuncli.hpp.

◆ Client()

openvpn::TunWin::Client::Client ( openvpn_io::io_context &  io_context_arg,
ClientConfig config_arg,
TunClientParent parent_arg 
)
inlineprivate

Definition at line 278 of file tuncli.hpp.

Member Function Documentation

◆ apply_push_update()

void openvpn::TunWin::Client::apply_push_update ( const OptionList opt,
TransportClient cli 
)
inlineoverridevirtual

Notifies tun client about received PUSH_UPDATE control channel message.

The merging of exiting and incoming options (including removing options) happens before this call, so implementations are supposed to only undo existing options and apply the new ones, normally by calling stop() and tun_start().

Parameters
optmerged options, to be applied by implementation
clitransport client, passed to tun_start() call

Reimplemented from openvpn::TunClient.

Definition at line 80 of file tuncli.hpp.

◆ dhcp_inspect()

void openvpn::TunWin::Client::dhcp_inspect ( Buffer buf)
inlineprivate

Definition at line 358 of file tuncli.hpp.

Here is the caller graph for this function:

◆ layer_2_schedule_timer()

void openvpn::TunWin::Client::layer_2_schedule_timer ( const unsigned int  seconds)
inlineprivate

Definition at line 376 of file tuncli.hpp.

Here is the caller graph for this function:

◆ layer_2_timer_callback()

void openvpn::TunWin::Client::layer_2_timer_callback ( )
inlineprivate

Definition at line 388 of file tuncli.hpp.

◆ send()

bool openvpn::TunWin::Client::send ( Buffer buf)
inlineprivate

Definition at line 291 of file tuncli.hpp.

Here is the caller graph for this function:

◆ set_disconnect()

void openvpn::TunWin::Client::set_disconnect ( )
inlineoverridevirtual

Implements openvpn::TunClient.

Definition at line 264 of file tuncli.hpp.

◆ stop()

void openvpn::TunWin::Client::stop ( )
inlineoverridevirtual

Implements openvpn::TunClient.

Definition at line 268 of file tuncli.hpp.

Here is the caller graph for this function:

◆ stop_()

void openvpn::TunWin::Client::stop_ ( )
inlineprivate

Definition at line 325 of file tuncli.hpp.

Here is the caller graph for this function:

◆ tap_handle()

HANDLE openvpn::TunWin::Client::tap_handle ( )
inlineprivate

Definition at line 340 of file tuncli.hpp.

Here is the caller graph for this function:

◆ tap_process_logging()

void openvpn::TunWin::Client::tap_process_logging ( )
inlineprivate

Definition at line 351 of file tuncli.hpp.

Here is the caller graph for this function:

◆ tun_error_handler()

void openvpn::TunWin::Client::tun_error_handler ( const Error::Type  errtype,
const openvpn_io::error_code *  error 
)
inlineprivate

Definition at line 316 of file tuncli.hpp.

◆ tun_name()

std::string openvpn::TunWin::Client::tun_name ( ) const
inlineoverridevirtual

Implements openvpn::TunClient.

Definition at line 208 of file tuncli.hpp.

◆ tun_read_handler()

void openvpn::TunWin::Client::tun_read_handler ( PacketFrom::SPtr pfp)
inlineprivate

Definition at line 307 of file tuncli.hpp.

◆ tun_send()

bool openvpn::TunWin::Client::tun_send ( BufferAllocated buf)
inlineoverridevirtual

Implements openvpn::TunClient.

Definition at line 203 of file tuncli.hpp.

◆ tun_start()

void openvpn::TunWin::Client::tun_start ( const OptionList opt,
TransportClient transcli,
CryptoDCSettings  
)
inlineoverridevirtual

Implements openvpn::TunClient.

Definition at line 97 of file tuncli.hpp.

◆ vpn_gw4()

std::string openvpn::TunWin::Client::vpn_gw4 ( ) const
inlineoverridevirtual

Reimplemented from openvpn::TunClient.

Definition at line 232 of file tuncli.hpp.

◆ vpn_gw6()

std::string openvpn::TunWin::Client::vpn_gw6 ( ) const
inlineoverridevirtual

Reimplemented from openvpn::TunClient.

Definition at line 240 of file tuncli.hpp.

◆ vpn_interface_index()

std::uint32_t openvpn::TunWin::Client::vpn_interface_index ( ) const
inlineoverridevirtual

Reimplemented from openvpn::TunClient.

Definition at line 253 of file tuncli.hpp.

◆ vpn_ip4()

std::string openvpn::TunWin::Client::vpn_ip4 ( ) const
inlineoverridevirtual

Implements openvpn::TunClient.

Definition at line 216 of file tuncli.hpp.

◆ vpn_ip6()

std::string openvpn::TunWin::Client::vpn_ip6 ( ) const
inlineoverridevirtual

Implements openvpn::TunClient.

Definition at line 224 of file tuncli.hpp.

◆ vpn_mtu()

int openvpn::TunWin::Client::vpn_mtu ( ) const
inlineoverridevirtual

Implements openvpn::TunClient.

Definition at line 248 of file tuncli.hpp.

Friends And Related Symbol Documentation

◆ ClientConfig

friend class ClientConfig
friend

Definition at line 72 of file tuncli.hpp.

◆ TunIO< Client *, PacketFrom, TunWrapAsioStream< TunPersist > >

friend class TunIO< Client *, PacketFrom, TunWrapAsioStream< TunPersist > >
friend

Definition at line 72 of file tuncli.hpp.

Member Data Documentation

◆ config

ClientConfig::Ptr openvpn::TunWin::Client::config
private

Definition at line 418 of file tuncli.hpp.

◆ dhcp_capture

std::unique_ptr<DHCPCapture> openvpn::TunWin::Client::dhcp_capture
private

Definition at line 425 of file tuncli.hpp.

◆ frame_context

Frame::Context& openvpn::TunWin::Client::frame_context
private

Definition at line 428 of file tuncli.hpp.

◆ halt

bool openvpn::TunWin::Client::halt
private

Definition at line 430 of file tuncli.hpp.

◆ impl

TunImpl::Ptr openvpn::TunWin::Client::impl
private

Definition at line 420 of file tuncli.hpp.

◆ io_context

openvpn_io::io_context& openvpn::TunWin::Client::io_context
private

Definition at line 416 of file tuncli.hpp.

◆ l2_timer

AsioTimer openvpn::TunWin::Client::l2_timer
private

Definition at line 426 of file tuncli.hpp.

◆ parent

TunClientParent& openvpn::TunWin::Client::parent
private

Definition at line 419 of file tuncli.hpp.

◆ state

TunProp::State::Ptr openvpn::TunWin::Client::state
private

Definition at line 421 of file tuncli.hpp.

◆ tun_persist

TunPersist::Ptr openvpn::TunWin::Client::tun_persist
private

Definition at line 417 of file tuncli.hpp.

◆ tun_setup

TunWin::SetupBase::Ptr openvpn::TunWin::Client::tun_setup
private

Definition at line 422 of file tuncli.hpp.


The documentation for this class was generated from the following file: