OpenVPN 3 Core Library
Loading...
Searching...
No Matches
dco.hpp
Go to the documentation of this file.
1// OpenVPN -- An application to securely tunnel IP networks
2// over a single port, with support for SSL/TLS-based
3// session authentication and key exchange,
4// packet encryption, packet authentication, and
5// packet compression.
6//
7// Copyright (C) 2012- OpenVPN Inc.
8//
9// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10//
11
12#ifndef OPENVPN_TRANSPORT_DCO_H
13#define OPENVPN_TRANSPORT_DCO_H
14
15#include <string>
16
17#include <openvpn/common/rc.hpp>
25#include <openvpn/tun/layer.hpp>
28
29#if defined(OPENVPN_PLATFORM_WIN)
32#endif
33
34namespace openvpn {
35struct DCO : public virtual RC<thread_unsafe_refcount>
36{
37 typedef RCPtr<DCO> Ptr;
38
53
54 struct TunConfig
55 {
56 TunConfig() = default;
57
58#if defined(OPENVPN_PLATFORM_WIN)
59 TunWin::SetupFactory::Ptr setup_factory;
60
61 TunWin::SetupBase::Ptr new_setup_obj(openvpn_io::io_context &io_context, bool allow_local_dns_resolvers)
62 {
63 if (setup_factory)
64 return setup_factory->new_setup_obj(io_context, TunWin::OvpnDco, allow_local_dns_resolvers);
65 else
67 }
68
70#endif
71
73 Stop *stop = nullptr;
74
76 };
77
78 virtual TunClientFactory::Ptr new_tun_factory(const TunConfig &conf, const OptionList &opt) = 0;
80
82};
83} // namespace openvpn
84
85#endif
The smart pointer class.
Definition rc.hpp:119
Reference count base class for objects tracked by RCPtr. Disallows copying and assignment.
Definition rc.hpp:912
TunBuilder methods, loosely based on the Android VpnService.Builder abstraction.
Definition base.hpp:42
RemoteList::Ptr remote_list
Definition dco.hpp:47
SessionStats::Ptr stats
Definition dco.hpp:50
SocketProtect * socket_protect
Definition dco.hpp:51
bool allow_local_dns_resolvers
Definition dco.hpp:75
TunProp::Config tun_prop
Definition dco.hpp:72
virtual TunClientFactory::Ptr new_tun_factory(const TunConfig &conf, const OptionList &opt)=0
RCPtr< DCO > Ptr
Definition dco.hpp:37
virtual TransportClientFactory::Ptr new_transport_factory(const TransportConfig &conf)=0
TunBuilderBase * builder
Definition dco.hpp:81