mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-12 02:34:59 +03:00
Cedar: improve constness of PROTO_IMPL functions, move Name() at the top
This commit is contained in:
@ -14,13 +14,13 @@ static UCHAR ping_signature[] =
|
||||
0x07, 0xed, 0x2d, 0x0a, 0x98, 0x1f, 0xc7, 0x48
|
||||
};
|
||||
|
||||
PROTO_IMPL *OvsGetProtoImpl()
|
||||
const PROTO_IMPL *OvsGetProtoImpl()
|
||||
{
|
||||
static PROTO_IMPL impl =
|
||||
static const PROTO_IMPL impl =
|
||||
{
|
||||
OvsName,
|
||||
OvsInit,
|
||||
OvsFree,
|
||||
OvsName,
|
||||
OvsIsPacketForMe,
|
||||
OvsProcessData,
|
||||
OvsProcessDatagrams
|
||||
@ -29,6 +29,11 @@ PROTO_IMPL *OvsGetProtoImpl()
|
||||
return &impl;
|
||||
}
|
||||
|
||||
const char *OvsName()
|
||||
{
|
||||
return "OpenVPN";
|
||||
}
|
||||
|
||||
bool OvsInit(void **param, CEDAR *cedar, INTERRUPT_MANAGER *im, SOCK_EVENT *se, const char *cipher, const char *hostname)
|
||||
{
|
||||
if (param == NULL || cedar == NULL || im == NULL || se == NULL)
|
||||
@ -48,12 +53,6 @@ void OvsFree(void *param)
|
||||
FreeOpenVpnServer(param);
|
||||
}
|
||||
|
||||
// Return the protocol name
|
||||
char *OvsName()
|
||||
{
|
||||
return "OpenVPN";
|
||||
}
|
||||
|
||||
// Check whether it's an OpenVPN packet
|
||||
bool OvsIsPacketForMe(const PROTO_MODE mode, const UCHAR *data, const UINT size)
|
||||
{
|
||||
|
Reference in New Issue
Block a user