mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-12 10:44:58 +03:00
Cedar: prepare Proto for UDP support
- An additional parameter is added to IsPacketForMe(), used to specify the protocol type (currently either TCP or UDP). - SupportedModes() is dropped because it's now redundant. - IsOk() and EstablishedSessions() are dropped because error checking should be handled by the implementation. - ProtoImplDetect() now takes a buffer and its size rather than a SOCK, so that it can be used to detect UDP protocols. - The OpenVPN toggle check is moved to ProtoImplDetect(), so that we don't have to duplicate it once UDP support is implemented.
This commit is contained in:
@ -194,6 +194,7 @@ struct OPENVPN_SERVER
|
||||
LIST *SendPacketList; // Transmission packet list
|
||||
LIST *SessionList; // Session list
|
||||
UINT64 Now; // Current time
|
||||
UINT64 Giveup; // Session establishment deadline
|
||||
SOCK_EVENT *SockEvent; // Socket event
|
||||
UCHAR TmpBuf[OPENVPN_TMP_BUFFER_SIZE]; // Temporary buffer
|
||||
UINT DisconnectCount; // The number of session lost that have occurred so far
|
||||
@ -220,8 +221,7 @@ PROTO_IMPL *OvsGetProtoImpl();
|
||||
bool OvsInit(void **param, CEDAR *cedar, INTERRUPT_MANAGER *im, SOCK_EVENT *se);
|
||||
void OvsFree(void *param);
|
||||
char *OvsName();
|
||||
UINT OvsSupportedModes();
|
||||
bool OvsIsPacketForMe(const UCHAR *buf, const UINT size);
|
||||
bool OvsIsPacketForMe(const PROTO_MODE mode, const UCHAR *data, const UINT size);
|
||||
bool OvsProcessData(void *param, TCP_RAW_DATA *received_data, FIFO *data_to_send);
|
||||
void OvsBufferLimit(void *param, const bool reached);
|
||||
bool OvsIsOk(void *param);
|
||||
|
Reference in New Issue
Block a user