OpenVPN 3 Core Library
|
Interface to integrate this component into the server implementation. More...
#include <psid_cookie.hpp>
Public Types | |
enum class | Intercept { DECLINE_HANDLING , EARLY_DROP , DROP_1ST , HANDLE_1ST , DROP_2ND , HANDLE_2ND } |
Values returned by the intercept() function. More... | |
typedef RCPtr< PsidCookie > | Ptr |
![]() | |
typedef RCPtr< RC > | Ptr |
Public Member Functions | |
virtual Intercept | intercept (ConstBuffer &pkt_buf, const PsidCookieAddrInfoBase &pcaib)=0 |
Called when a potential new client session packet is received. | |
virtual ProtoSessionID | get_cookie_psid ()=0 |
Get the cookie psid from client's 2nd packet. | |
virtual void | provide_psid_cookie_transport (PsidCookieTransportBase::Ptr pctb)=0 |
Give this component the transport needed to send the server's HARD_RESET. | |
virtual | ~PsidCookie ()=default |
![]() | |
RC () noexcept=default | |
RC (const RC &)=delete | |
virtual | ~RC ()=default |
RC & | operator= (const RC &)=delete |
olong | use_count () const noexcept |
Delegates call to RCImpl and returns the result. | |
Additional Inherited Members | |
![]() | |
static constexpr bool | is_thread_safe () |
Delegates call to RCImpl and returns the result. | |
Interface to integrate this component into the server implementation.
Definition at line 84 of file psid_cookie.hpp.
typedef RCPtr<PsidCookie> openvpn::PsidCookie::Ptr |
Definition at line 87 of file psid_cookie.hpp.
|
strong |
Values returned by the intercept() function.
These are status values depending upon the action that intercept() took in handling client's 1st and 2nd packets. Early drop indicates that the packet was dropped before determining whether the packet was client's 1st or 2nd.
Enumerator | |
---|---|
DECLINE_HANDLING | |
EARLY_DROP | |
DROP_1ST | |
HANDLE_1ST | |
DROP_2ND | |
HANDLE_2ND |
Definition at line 96 of file psid_cookie.hpp.
|
virtualdefault |
|
pure virtual |
Get the cookie psid from client's 2nd packet.
This provides the server's psid (a.k.a, the cookie_psid) as returned by the client in it's 2nd packet. It may only be called after intercept() returns HANDLE_2ND, indicating a valid psid cookie. Further, it may only be called once as it invalidates the internal data source after it sets the return value.
Implemented in openvpn::PsidCookieImpl.
|
pure virtual |
Called when a potential new client session packet is received.
Called by the server implementation when it recieves a packet for which it has no state information. Such a packet is potentially a client HARD_RESET or a 2nd client packet returning the psid cookie.
pkt_buf | The packet received by the server implementation. |
pcaib | The address information as contained in an instance of the class that the server implementation derived from the PsidCookieAddrInfoBase class |
Implemented in openvpn::PsidCookieImpl.
|
pure virtual |
Give this component the transport needed to send the server's HARD_RESET.
The server implementation must call this method before the intercept() function is asked to handle a packet
pctb | The transport capability as provided by the server implementation's object derived from the PsidCookieTransportBase class |
Implemented in openvpn::PsidCookieImpl.