1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-26 19:39:53 +03:00

src/Cedar/Interop_OpenVPN: remove unused functions and variables

[src/Cedar/Interop_OpenVPN.c:2711]: (style) Variable 'now' is assigned a value that is never used.
[src/Cedar/Interop_OpenVPN.c:1053]: (style) The function 'OvsAddEntry' is never used.
[src/Cedar/Interop_OpenVPN.c:2610]: (style) The function 'OvsGetCompatibleL3IPNext' is never used.
[src/Cedar/Interop_OpenVPN.c:1047]: (style) The function 'OvsNewList' is never used.
[src/Cedar/Interop_OpenVPN.c:128]: (style) The function 'OvsSetNoOpenVpnTcp' is never used.
[src/Cedar/Interop_OpenVPN.c:140]: (style) The function 'OvsSetNoOpenVpnUdp' is never used.
This commit is contained in:
Ilya Shipitsin 2018-08-13 07:00:33 +05:00
parent 4ed7c559f1
commit 6af1a2eb46
2 changed files with 0 additions and 73 deletions

View File

@ -124,24 +124,12 @@ static UCHAR ping_signature[] =
0x07, 0xed, 0x2d, 0x0a, 0x98, 0x1f, 0xc7, 0x48 0x07, 0xed, 0x2d, 0x0a, 0x98, 0x1f, 0xc7, 0x48
}; };
// Set the OpenVPN over TCP disabling flag
void OvsSetNoOpenVpnTcp(bool b)
{
g_no_openvpn_tcp = b;
}
// Get the OpenVPN over TCP disabling flag // Get the OpenVPN over TCP disabling flag
bool OvsGetNoOpenVpnTcp() bool OvsGetNoOpenVpnTcp()
{ {
return g_no_openvpn_tcp; return g_no_openvpn_tcp;
} }
// Set the OpenVPN over UDP disabling flag
void OvsSetNoOpenVpnUdp(bool b)
{
g_no_openvpn_udp = b;
}
// Get the OpenVPN over UDP disabling flag // Get the OpenVPN over UDP disabling flag
bool OvsGetNoOpenVpnUdp() bool OvsGetNoOpenVpnUdp()
{ {
@ -1043,44 +1031,6 @@ void OvsFreeList(LIST *o)
FreeIni(o); FreeIni(o);
} }
// Create an Option List
LIST *OvsNewList()
{
return NewListFast(NULL);
}
// Add a value to the option list
void OvsAddEntry(LIST *o, char *key, char *value)
{
INI_ENTRY *e;
// Validate arguments
if (o == NULL)
{
return;
}
e = GetIniEntry(o, key);
if (e != NULL)
{
// Overwrite existing keys
Free(e->Key);
e->Key = CopyStr(key);
Free(e->Value);
e->Value = CopyStr(value);
}
else
{
// Create a new key
e = ZeroMalloc(sizeof(INI_ENTRY));
e->Key = CopyStr(key);
e->Value = CopyStr(value);
Add(o, e);
}
}
// Confirm whether there is specified option key string // Confirm whether there is specified option key string
bool OvsHasEntry(LIST *o, char *key) bool OvsHasEntry(LIST *o, char *key)
{ {
@ -2606,22 +2556,6 @@ bool OvsIsCompatibleL3IP(UINT ip)
return false; return false;
} }
// Get an IP address that is compatible to tun device of the OpenVPN after the specified IP address
UINT OvsGetCompatibleL3IPNext(UINT ip)
{
ip = Endian32(ip);
while (true)
{
if (OvsIsCompatibleL3IP(Endian32(ip)))
{
return Endian32(ip);
}
ip++;
}
}
// Create a new OpenVPN server // Create a new OpenVPN server
OPENVPN_SERVER *NewOpenVpnServer(CEDAR *cedar, INTERRUPT_MANAGER *interrupt, SOCK_EVENT *sock_event) OPENVPN_SERVER *NewOpenVpnServer(CEDAR *cedar, INTERRUPT_MANAGER *interrupt, SOCK_EVENT *sock_event)
{ {
@ -2708,7 +2642,6 @@ void FreeOpenVpnServer(OPENVPN_SERVER *s)
void OpenVpnServerUdpListenerProc(UDPLISTENER *u, LIST *packet_list) void OpenVpnServerUdpListenerProc(UDPLISTENER *u, LIST *packet_list)
{ {
OPENVPN_SERVER_UDP *us; OPENVPN_SERVER_UDP *us;
UINT64 now = Tick64();
// Validate arguments // Validate arguments
if (u == NULL || packet_list == NULL) if (u == NULL || packet_list == NULL)
{ {

View File

@ -361,13 +361,10 @@ void OvsWriteStringToBuf(BUF *b, char *str, UINT max_size);
LIST *OvsParseData(char *str, int type); LIST *OvsParseData(char *str, int type);
void OvsFreeList(LIST *o); void OvsFreeList(LIST *o);
LIST *OvsNewList();
void OvsAddEntry(LIST *o, char *key, char *value);
bool OvsHasEntry(LIST *o, char *key); bool OvsHasEntry(LIST *o, char *key);
UINT OvsPeekStringFromFifo(FIFO *f, char *str, UINT str_size); UINT OvsPeekStringFromFifo(FIFO *f, char *str, UINT str_size);
void OvsBeginIPCAsyncConnectionIfEmpty(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c); void OvsBeginIPCAsyncConnectionIfEmpty(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c);
bool OvsIsCompatibleL3IP(UINT ip); bool OvsIsCompatibleL3IP(UINT ip);
UINT OvsGetCompatibleL3IPNext(UINT ip);
UINT OvsCalcTcpMss(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c); UINT OvsCalcTcpMss(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c);
CIPHER *OvsGetCipher(char *name); CIPHER *OvsGetCipher(char *name);
@ -378,11 +375,8 @@ bool OvsPerformTcpServer(CEDAR *cedar, SOCK *sock);
void OvsSetReplyForVgsPollEnable(bool b); void OvsSetReplyForVgsPollEnable(bool b);
void OvsSetNoOpenVpnTcp(bool b);
bool OvsGetNoOpenVpnTcp(); bool OvsGetNoOpenVpnTcp();
void OvsSetNoOpenVpnUdp(bool b);
void OpenVpnServerUdpSetDhParam(OPENVPN_SERVER_UDP *u, DH_CTX *dh); void OpenVpnServerUdpSetDhParam(OPENVPN_SERVER_UDP *u, DH_CTX *dh);