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

#include <tuncli.hpp>

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

Public Member Functions

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
 
void set_disconnect () override
 
void stop () override
 
virtual ~Client ()
 
void apply_push_update (const OptionList &opt, TransportClient &cli) override
 Notifies tun client about received PUSH_UPDATE control channel message.
 
- Public Member Functions inherited from openvpn::TunClient
virtual void adjust_mss (int mss)
 
virtual std::uint32_t vpn_interface_index () const
 
- 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_ ()
 

Private Attributes

openvpn_io::io_context & io_context
 
TunPersist::Ptr tun_persist
 
ClientConfig::Ptr config
 
TunClientParentparent
 
TunImpl::Ptr impl
 
bool halt
 
TunProp::State::Ptr state
 
TunBuilderSetup::Base::Ptr tun_setup
 

Friends

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

Additional Inherited Members

- Public Types inherited from openvpn::TunClient
typedef RCPtr< TunClientPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 
- 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 136 of file tuncli.hpp.

Member Typedef Documentation

◆ TunImpl

Definition at line 141 of file tuncli.hpp.

Constructor & Destructor Documentation

◆ ~Client()

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

Definition at line 319 of file tuncli.hpp.

◆ Client()

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

Definition at line 344 of file tuncli.hpp.

Member Function Documentation

◆ apply_push_update()

void openvpn::TunMac::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 324 of file tuncli.hpp.

◆ send()

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

Definition at line 355 of file tuncli.hpp.

Here is the caller graph for this function:

◆ set_disconnect()

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

Implements openvpn::TunClient.

Definition at line 311 of file tuncli.hpp.

◆ stop()

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

Implements openvpn::TunClient.

Definition at line 315 of file tuncli.hpp.

Here is the caller graph for this function:

◆ stop_()

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

Definition at line 374 of file tuncli.hpp.

Here is the caller graph for this function:

◆ tun_error_handler()

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

Definition at line 368 of file tuncli.hpp.

◆ tun_name()

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

Implements openvpn::TunClient.

Definition at line 266 of file tuncli.hpp.

◆ tun_read_handler()

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

Definition at line 363 of file tuncli.hpp.

◆ tun_send()

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

Implements openvpn::TunClient.

Definition at line 261 of file tuncli.hpp.

◆ tun_start()

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

Implements openvpn::TunClient.

Definition at line 144 of file tuncli.hpp.

◆ vpn_gw4()

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

Reimplemented from openvpn::TunClient.

Definition at line 290 of file tuncli.hpp.

◆ vpn_gw6()

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

Reimplemented from openvpn::TunClient.

Definition at line 298 of file tuncli.hpp.

◆ vpn_ip4()

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

Implements openvpn::TunClient.

Definition at line 274 of file tuncli.hpp.

◆ vpn_ip6()

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

Implements openvpn::TunClient.

Definition at line 282 of file tuncli.hpp.

◆ vpn_mtu()

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

Implements openvpn::TunClient.

Definition at line 306 of file tuncli.hpp.

Friends And Related Symbol Documentation

◆ ClientConfig

friend class ClientConfig
friend

Definition at line 138 of file tuncli.hpp.

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

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

Definition at line 138 of file tuncli.hpp.

Member Data Documentation

◆ config

ClientConfig::Ptr openvpn::TunMac::Client::config
private

Definition at line 389 of file tuncli.hpp.

◆ halt

bool openvpn::TunMac::Client::halt
private

Definition at line 392 of file tuncli.hpp.

◆ impl

TunImpl::Ptr openvpn::TunMac::Client::impl
private

Definition at line 391 of file tuncli.hpp.

◆ io_context

openvpn_io::io_context& openvpn::TunMac::Client::io_context
private

Definition at line 387 of file tuncli.hpp.

◆ parent

TunClientParent& openvpn::TunMac::Client::parent
private

Definition at line 390 of file tuncli.hpp.

◆ state

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

Definition at line 393 of file tuncli.hpp.

◆ tun_persist

TunPersist::Ptr openvpn::TunMac::Client::tun_persist
private

Definition at line 388 of file tuncli.hpp.

◆ tun_setup

TunBuilderSetup::Base::Ptr openvpn::TunMac::Client::tun_setup
private

Definition at line 394 of file tuncli.hpp.


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