OpenVPN 3 Core Library
Loading...
Searching...
No Matches
TestProto Class Reference
Inheritance diagram for TestProto:
[legend]
Collaboration diagram for TestProto:
[legend]

Public Member Functions

 OPENVPN_EXCEPTION (session_invalidated)
 
 TestProto (const ProtoContext::ProtoConfig::Ptr &config, const SessionStats::Ptr &stats)
 
void reset ()
 
void initial_app_send (const char *msg)
 
void app_send_templ_init (const char *msg)
 
void app_send_templ ()
 
bool do_housekeeping ()
 
void control_send (BufferPtr &&app_bp)
 
void control_send (BufferAllocated &&app_buf)
 
BufferPtr data_encrypt_string (const char *str)
 
void data_encrypt (BufferAllocated &in_out)
 
void data_decrypt (const ProtoContext::PacketType &type, BufferAllocated &in_out)
 
size_t net_bytes () const
 
size_t app_bytes () const
 
size_t data_bytes () const
 
size_t n_control_recv () const
 
size_t n_control_send () const
 
const char * progress () const
 
void finalize ()
 
void check_invalidated ()
 
void disable_xmit ()
 
- Public Member Functions inherited from openvpn::ProtoContextCallbackInterface
virtual ~ProtoContextCallbackInterface ()=default
 
virtual void client_auth (Buffer &buf)
 
virtual void server_auth (const std::string &username, const SafeString &password, const std::string &peer_info, const AuthCert::Ptr &auth_cert)
 

Public Attributes

ProtoContext proto_context
 
std::deque< BufferPtrnet_out
 
DroughtMeasure control_drought
 
DroughtMeasure data_drought
 

Private Member Functions

void active (bool primary) override
 Called when KeyContext transitions to ACTIVE state.
 
bool supports_epoch_data () override
 
void control_net_send (const Buffer &net_buf) override
 
void control_recv (BufferPtr &&app_bp) override
 
void copy_progress (Buffer &buf)
 
void modmsg (BufferPtr &buf)
 

Private Attributes

Frame::Ptr frame
 
size_t app_bytes_ = 0
 
size_t net_bytes_ = 0
 
size_t data_bytes_ = 0
 
size_t n_control_send_ = 0
 
size_t n_control_recv_ = 0
 
BufferPtr templ
 
char progress_ [11]
 
bool disable_xmit_ = false
 

Additional Inherited Members

- Static Public Member Functions inherited from openvpn::ProtoContextCallbackInterface
static void write_empty_string (Buffer &buf)
 

Detailed Description

Definition at line 340 of file test_proto.cpp.

Constructor & Destructor Documentation

◆ TestProto()

TestProto::TestProto ( const ProtoContext::ProtoConfig::Ptr config,
const SessionStats::Ptr &  stats 
)
inline

Definition at line 355 of file test_proto.cpp.

Member Function Documentation

◆ active()

void TestProto::active ( bool  primary)
inlineoverrideprivatevirtual

Called when KeyContext transitions to ACTIVE state.

Implements openvpn::ProtoContextCallbackInterface.

Definition at line 343 of file test_proto.cpp.

◆ app_bytes()

size_t TestProto::app_bytes ( ) const
inline

Definition at line 456 of file test_proto.cpp.

Here is the caller graph for this function:

◆ app_send_templ()

void TestProto::app_send_templ ( )
inline

Definition at line 391 of file test_proto.cpp.

◆ app_send_templ_init()

void TestProto::app_send_templ_init ( const char *  msg)
inline

Definition at line 383 of file test_proto.cpp.

Here is the caller graph for this function:

◆ check_invalidated()

void TestProto::check_invalidated ( )
inline

Definition at line 484 of file test_proto.cpp.

◆ control_net_send()

void TestProto::control_net_send ( const Buffer net_buf)
inlineoverrideprivatevirtual

Sends out bytes to the network.

Implements openvpn::ProtoContextCallbackInterface.

Definition at line 503 of file test_proto.cpp.

◆ control_recv()

void TestProto::control_recv ( BufferPtr &&  app_bp)
inlineoverrideprivatevirtual

Implements openvpn::ProtoContextCallbackInterface.

Definition at line 511 of file test_proto.cpp.

◆ control_send() [1/2]

void TestProto::control_send ( BufferAllocated &&  app_buf)
inline

Definition at line 422 of file test_proto.cpp.

◆ control_send() [2/2]

void TestProto::control_send ( BufferPtr &&  app_bp)
inline

Definition at line 416 of file test_proto.cpp.

Here is the caller graph for this function:

◆ copy_progress()

void TestProto::copy_progress ( Buffer buf)
inlineprivate

Definition at line 533 of file test_proto.cpp.

Here is the caller graph for this function:

◆ data_bytes()

size_t TestProto::data_bytes ( ) const
inline

Definition at line 460 of file test_proto.cpp.

Here is the caller graph for this function:

◆ data_decrypt()

void TestProto::data_decrypt ( const ProtoContext::PacketType type,
BufferAllocated in_out 
)
inline

Definition at line 442 of file test_proto.cpp.

◆ data_encrypt()

void TestProto::data_encrypt ( BufferAllocated in_out)
inline

Definition at line 437 of file test_proto.cpp.

Here is the caller graph for this function:

◆ data_encrypt_string()

BufferPtr TestProto::data_encrypt_string ( const char *  str)
inline

Definition at line 428 of file test_proto.cpp.

◆ disable_xmit()

void TestProto::disable_xmit ( )
inline

Definition at line 490 of file test_proto.cpp.

◆ do_housekeeping()

bool TestProto::do_housekeeping ( )
inline

Definition at line 405 of file test_proto.cpp.

◆ finalize()

void TestProto::finalize ( )
inline

Definition at line 478 of file test_proto.cpp.

Here is the caller graph for this function:

◆ initial_app_send()

void TestProto::initial_app_send ( const char *  msg)
inline

Definition at line 373 of file test_proto.cpp.

Here is the caller graph for this function:

◆ modmsg()

void TestProto::modmsg ( BufferPtr buf)
inlineprivate

Definition at line 539 of file test_proto.cpp.

Here is the caller graph for this function:

◆ n_control_recv()

size_t TestProto::n_control_recv ( ) const
inline

Definition at line 464 of file test_proto.cpp.

Here is the caller graph for this function:

◆ n_control_send()

size_t TestProto::n_control_send ( ) const
inline

Definition at line 468 of file test_proto.cpp.

Here is the caller graph for this function:

◆ net_bytes()

size_t TestProto::net_bytes ( ) const
inline

Definition at line 452 of file test_proto.cpp.

Here is the caller graph for this function:

◆ OPENVPN_EXCEPTION()

TestProto::OPENVPN_EXCEPTION ( session_invalidated  )

◆ progress()

const char * TestProto::progress ( ) const
inline

Definition at line 473 of file test_proto.cpp.

Here is the caller graph for this function:

◆ reset()

void TestProto::reset ( )
inline

Definition at line 366 of file test_proto.cpp.

Here is the caller graph for this function:

◆ supports_epoch_data()

bool TestProto::supports_epoch_data ( )
inlineoverrideprivatevirtual

the protocol context needs to know if the parent and its tun/transport layer are able to support epoch key data format to properly handshake this protocol feature

Implements openvpn::ProtoContextCallbackInterface.

Definition at line 347 of file test_proto.cpp.

Member Data Documentation

◆ app_bytes_

size_t TestProto::app_bytes_ = 0
private

Definition at line 567 of file test_proto.cpp.

◆ control_drought

DroughtMeasure TestProto::control_drought

Definition at line 499 of file test_proto.cpp.

◆ data_bytes_

size_t TestProto::data_bytes_ = 0
private

Definition at line 569 of file test_proto.cpp.

◆ data_drought

DroughtMeasure TestProto::data_drought

Definition at line 500 of file test_proto.cpp.

◆ disable_xmit_

bool TestProto::disable_xmit_ = false
private

Definition at line 577 of file test_proto.cpp.

◆ frame

Frame::Ptr TestProto::frame
private

Definition at line 566 of file test_proto.cpp.

◆ n_control_recv_

size_t TestProto::n_control_recv_ = 0
private

Definition at line 571 of file test_proto.cpp.

◆ n_control_send_

size_t TestProto::n_control_send_ = 0
private

Definition at line 570 of file test_proto.cpp.

◆ net_bytes_

size_t TestProto::net_bytes_ = 0
private

Definition at line 568 of file test_proto.cpp.

◆ net_out

std::deque<BufferPtr> TestProto::net_out

Definition at line 497 of file test_proto.cpp.

◆ progress_

char TestProto::progress_[11]
private

Definition at line 576 of file test_proto.cpp.

◆ proto_context

ProtoContext TestProto::proto_context

Definition at line 495 of file test_proto.cpp.

◆ templ

BufferPtr TestProto::templ
private

Definition at line 572 of file test_proto.cpp.


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