1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2026-04-20 05:49:26 +03:00

Correct Spelling (#458)

* spelling: accepts

* spelling: account

* spelling: accept

* spelling: accumulate

* spelling: adapter

* spelling: address

* spelling: additional

* spelling: aggressive

* spelling: adhered

* spelling: allowed

* spelling: ambiguous

* spelling: amount

* spelling: anonymous

* spelling: acquisition

* spelling: assemble

* spelling: associated

* spelling: assigns

* spelling: attach

* spelling: attempt

* spelling: attribute

* spelling: authenticate

* spelling: authentication

* spelling: available

* spelling: bridging

* spelling: cascade

* spelling: cancel

* spelling: check

* spelling: challenge

* spelling: changing

* spelling: characters

* spelling: cloud

* spelling: compare

* spelling: communication

* spelling: compatible

* spelling: compatibility

* spelling: completion

* spelling: complete

* spelling: computers

* spelling: configure

* spelling: configuration

* spelling: conformant

* spelling: connection

* spelling: contains

* spelling: continuously

* spelling: continue

* spelling: convert

* spelling: counters

* spelling: create

* spelling: created

* spelling: cumulate

* spelling: currently

* spelling: debugging

* spelling: decryption

* spelling: description

* spelling: default

* spelling: driver

* spelling: delete

* spelling: destination

* spelling: disabled

* spelling: different

* spelling: dynamically

* spelling: directory

* spelling: disappeared

* spelling: disable

* spelling: doesn't

* spelling: download

* spelling: dropped

* spelling: enable

* spelling: established

* spelling: ether

* spelling: except

* spelling: expired

* spelling: field

* spelling: following

* spelling: forever

* spelling: firewall

* spelling: first

* spelling: fragment

* spelling: function

* spelling: gateway

* spelling: identifier

* spelling: identify

* spelling: incoming

* spelling: information

* spelling: initialize

* spelling: injection

* spelling: inner

* spelling: instead

* spelling: installation

* spelling: inserted

* spelling: integer

* spelling: interrupt

* spelling: intuitive

* spelling: interval

* spelling: january

* spelling: keybytes

* spelling: know

* spelling: language

* spelling: length

* spelling: library

* spelling: listener

* spelling: maintain

* spelling: modified

* spelling: necessary

* spelling: number

* spelling: obsoleted

* spelling: occurred

* spelling: occurring

* spelling: occur

* spelling: original

* spelling: omittable

* spelling: omit

* spelling: opening

* spelling: operation

* spelling: packet

* spelling: parameters

* spelling: pointed

* spelling: popupmenuopen

* spelling: privilege

* spelling: product

* spelling: protection

* spelling: promiscuous

* spelling: prompt

* spelling: query

* spelling: random

* spelling: reconnection

* spelling: revocation

* spelling: received

* spelling: red hat

* spelling: registry

* spelling: release

* spelling: retrieve
This commit is contained in:
Josh Soref
2018-05-16 17:47:10 -04:00
committed by Moataz Elmasry
parent 03443ab1c4
commit ac865f04fc
135 changed files with 483 additions and 483 deletions
+2 -2
View File
@@ -1180,7 +1180,7 @@ void CleanupUser(USER *u)
ReleaseGroup(u->Group);
}
// Free authntication data
// Free authentication data
FreeAuthData(u->AuthType, u->AuthData);
if (u->Policy)
@@ -1194,7 +1194,7 @@ void CleanupUser(USER *u)
Free(u);
}
// Free authntication data
// Free authentication data
void FreeAuthData(UINT authtype, void *authdata)
{
AUTHPASSWORD *pw = (AUTHPASSWORD *)authdata;
+6 -6
View File
@@ -465,7 +465,7 @@ PACK *AdminDispatch(RPC *rpc, char *name, PACK *p)
DECLARE_RPC("DeleteHub", RPC_DELETE_HUB, StDeleteHub, InRpcDeleteHub, OutRpcDeleteHub)
DECLARE_RPC("GetHubRadius", RPC_RADIUS, StGetHubRadius, InRpcRadius, OutRpcRadius)
DECLARE_RPC("SetHubRadius", RPC_RADIUS, StSetHubRadius, InRpcRadius, OutRpcRadius)
DECLARE_RPC_EX("EnumConnection", RPC_ENUM_CONNECTION, StEnumConnection, InRpcEnumConnection, OutRpcEnumConnection, FreeRpcEnumConnetion)
DECLARE_RPC_EX("EnumConnection", RPC_ENUM_CONNECTION, StEnumConnection, InRpcEnumConnection, OutRpcEnumConnection, FreeRpcEnumConnection)
DECLARE_RPC("DisconnectConnection", RPC_DISCONNECT_CONNECTION, StDisconnectConnection, InRpcDisconnectConnection, OutRpcDisconnectConnection)
DECLARE_RPC("GetConnectionInfo", RPC_CONNECTION_INFO, StGetConnectionInfo, InRpcConnectionInfo, OutRpcConnectionInfo)
DECLARE_RPC("SetHubOnline", RPC_SET_HUB_ONLINE, StSetHubOnline, InRpcSetHubOnline, OutRpcSetHubOnline)
@@ -644,7 +644,7 @@ DECLARE_SC_EX("EnumHub", RPC_ENUM_HUB, ScEnumHub, InRpcEnumHub, OutRpcEnumHub, F
DECLARE_SC("DeleteHub", RPC_DELETE_HUB, ScDeleteHub, InRpcDeleteHub, OutRpcDeleteHub)
DECLARE_SC("GetHubRadius", RPC_RADIUS, ScGetHubRadius, InRpcRadius, OutRpcRadius)
DECLARE_SC("SetHubRadius", RPC_RADIUS, ScSetHubRadius, InRpcRadius, OutRpcRadius)
DECLARE_SC_EX("EnumConnection", RPC_ENUM_CONNECTION, ScEnumConnection, InRpcEnumConnection, OutRpcEnumConnection, FreeRpcEnumConnetion)
DECLARE_SC_EX("EnumConnection", RPC_ENUM_CONNECTION, ScEnumConnection, InRpcEnumConnection, OutRpcEnumConnection, FreeRpcEnumConnection)
DECLARE_SC("DisconnectConnection", RPC_DISCONNECT_CONNECTION, ScDisconnectConnection, InRpcDisconnectConnection, OutRpcDisconnectConnection)
DECLARE_SC("GetConnectionInfo", RPC_CONNECTION_INFO, ScGetConnectionInfo, InRpcConnectionInfo, OutRpcConnectionInfo)
DECLARE_SC("SetHubOnline", RPC_SET_HUB_ONLINE, ScSetHubOnline, InRpcSetHubOnline, OutRpcSetHubOnline)
@@ -6075,7 +6075,7 @@ UINT StGetLinkStatus(ADMIN *a, RPC_LINK_STATUS *t)
return ERR_OBJECT_NOT_FOUND;
}
// Get status infomation from session
// Get status information from session
Lock(k->lock);
{
sess = k->ClientSession;
@@ -7580,7 +7580,7 @@ UINT StEnumConnection(ADMIN *a, RPC_ENUM_CONNECTION *t)
SERVER_ADMIN_ONLY;
FreeRpcEnumConnetion(t);
FreeRpcEnumConnection(t);
Zero(t, sizeof(RPC_ENUM_CONNECTION));
LockList(c->ConnectionList);
@@ -11507,7 +11507,7 @@ void OutRpcEnumConnection(PACK *p, RPC_ENUM_CONNECTION *t)
PackAddIntEx(p, "Type", e->Type, i, t->NumConnection);
}
}
void FreeRpcEnumConnetion(RPC_ENUM_CONNECTION *t)
void FreeRpcEnumConnection(RPC_ENUM_CONNECTION *t)
{
// Validate arguments
if (t == NULL)
@@ -13402,7 +13402,7 @@ UINT AdminAccept(CONNECTION *c, PACK *p)
StrCpy(hubname, sizeof(hubname), "");
}
// Cehck source IP address
// Check source IP address
if (CheckAdminSourceAddress(sock, hubname) == false)
{
SLog(c->Cedar, "LA_IP_DENIED", c->Name);
+2 -2
View File
@@ -172,7 +172,7 @@ struct RPC_SERVER_STATUS
UINT NumTcpConnectionsLocal; // Number of Local TCP connections
UINT NumTcpConnectionsRemote; // Number of remote TCP connections
UINT NumHubTotal; // Total number of HUBs
UINT NumHubStandalone; // Nymber of stand-alone HUB
UINT NumHubStandalone; // Number of stand-alone HUB
UINT NumHubStatic; // Number of static HUBs
UINT NumHubDynamic; // Number of Dynamic HUBs
UINT NumSessionsTotal; // Total number of sessions
@@ -1355,7 +1355,7 @@ void InRpcDeleteHub(RPC_DELETE_HUB *t, PACK *p);
void OutRpcDeleteHub(PACK *p, RPC_DELETE_HUB *t);
void InRpcEnumConnection(RPC_ENUM_CONNECTION *t, PACK *p);
void OutRpcEnumConnection(PACK *p, RPC_ENUM_CONNECTION *t);
void FreeRpcEnumConnetion(RPC_ENUM_CONNECTION *t);
void FreeRpcEnumConnection(RPC_ENUM_CONNECTION *t);
void InRpcDisconnectConnection(RPC_DISCONNECT_CONNECTION *t, PACK *p);
void OutRpcDisconnectConnection(PACK *p, RPC_DISCONNECT_CONNECTION *t);
void InRpcConnectionInfo(RPC_CONNECTION_INFO *t, PACK *p);
+3 -3
View File
@@ -648,7 +648,7 @@ ETH *OpenEthLinux(char *name, bool local, bool tapmode, char *tapaddr)
if (local == false)
{
// Enable promiscious mode
// Enable promiscuous mode
Zero(&ifr, sizeof(ifr));
StrCpy(ifr.ifr_name, sizeof(ifr.ifr_name), name);
if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0)
@@ -935,7 +935,7 @@ ETH *OpenEthSolaris(char *name, bool local, bool tapmode, char *tapaddr)
}
// Attach to the device
if (DlipAttatchRequest(fd, devid) == false)
if (DlipAttachRequest(fd, devid) == false)
{
// Failed
close(fd);
@@ -1104,7 +1104,7 @@ bool DlipBindRequest(int fd)
}
// Attach to the device
bool DlipAttatchRequest(int fd, UINT devid)
bool DlipAttachRequest(int fd, UINT devid)
{
dl_attach_req_t req;
struct strbuf ctl;
+1 -1
View File
@@ -227,7 +227,7 @@ void EthSendIpPacketInnerIpRaw(ETH *e, void *data, UINT size, USHORT protocol);
#ifdef UNIX_SOLARIS
// Function prototype for Solaris
bool DlipAttatchRequest(int fd, UINT devid);
bool DlipAttachRequest(int fd, UINT devid);
bool DlipReceiveAck(int fd);
bool DlipPromiscuous(int fd, UINT level);
bool DlipBindRequest(int fd);
+10 -10
View File
@@ -631,7 +631,7 @@ void CmRefreshEasy()
SendMessage(cm->hEasyWnd, WM_CM_EASY_REFRESH, 0, 0);
}
// Initialze the Simple Connect Manager
// Initialize the Simple Connect Manager
void CmEasyDlgInit(HWND hWnd, CM_EASY_DLG *d)
{
HFONT hFontForList;
@@ -4480,7 +4480,7 @@ UINT CmMainWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *p
// Specify the notification service to the foreground process
void CmSetForegroundProcessToCnService()
{
if (cm->MenuPopuping)
if (cm->PopupMenuOpen)
{
return;
}
@@ -4657,7 +4657,7 @@ void CmShowTrayMenu(HWND hWnd)
return;
}
cm->MenuPopuping = true;
cm->PopupMenuOpen = true;
locked = cm->CmSetting.LockMode;
easy = cm->CmSetting.EasyMode;
@@ -4786,7 +4786,7 @@ void CmShowTrayMenu(HWND hWnd)
DestroyMenu(h);
cm->MenuPopuping = false;
cm->PopupMenuOpen = false;
}
// Hide or show the main window
@@ -9393,8 +9393,8 @@ void CmPrintStatusToListViewEx(LVB *b, RPC_CLIENT_GET_CONNECTION_STATUS *s, bool
GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->StartTime), NULL);
LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_START_TIME"), tmp);
GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->FirstConnectionEstablisiedTime), NULL);
LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_FIRST_ESTAB_TIME"), s->FirstConnectionEstablisiedTime == 0 ? _UU("CM_ST_NONE") : tmp);
GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->FirstConnectionEstablishedTime), NULL);
LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_FIRST_ESTAB_TIME"), s->FirstConnectionEstablishedTime == 0 ? _UU("CM_ST_NONE") : tmp);
if (s->Connected)
{
@@ -9404,7 +9404,7 @@ void CmPrintStatusToListViewEx(LVB *b, RPC_CLIENT_GET_CONNECTION_STATUS *s, bool
if (server_mode == false)
{
UniFormat(tmp, sizeof(tmp), _UU("CM_ST_NUM_STR"), s->NumConnectionsEatablished);
UniFormat(tmp, sizeof(tmp), _UU("CM_ST_NUM_STR"), s->NumConnectionsEstablished);
LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_NUM_ESTABLISHED"), tmp);
}
@@ -10386,7 +10386,7 @@ void CmRefreshAccountListEx2(HWND hWnd, bool easy, bool style_changed)
UINT num_connecting = 0, num_connected = 0;
wchar_t tmp[MAX_SIZE];
wchar_t new_inserted_item[MAX_ACCOUNT_NAME_LEN + 1];
bool select_new_insteted_item = true;
bool select_new_inserted_item = true;
// Validate arguments
if (hWnd == NULL)
{
@@ -10435,7 +10435,7 @@ void CmRefreshAccountListEx2(HWND hWnd, bool easy, bool style_changed)
if (LvNum(hWnd, L_ACCOUNT) == 0)
{
select_new_insteted_item = false;
select_new_inserted_item = false;
}
// Enumerate the account list
@@ -10573,7 +10573,7 @@ void CmRefreshAccountListEx2(HWND hWnd, bool easy, bool style_changed)
CiFreeClientEnumAccount(&a);
if (select_new_insteted_item)
if (select_new_inserted_item)
{
if (UniStrLen(new_inserted_item) >= 1)
{
+1 -1
View File
@@ -208,7 +208,7 @@ typedef struct CM
bool CheckedAndShowedAdminPackMessage;
INSTANCE *StartupMutex;
bool BadProcessChecked;
bool MenuPopuping;
bool PopupMenuOpen;
WINUI_UPDATE *Update;
} CM;
+1 -1
View File
@@ -274,7 +274,7 @@
#define MAX_RETRY_INTERVAL (300 * 1000) // Maximum retry interval
#define RETRY_INTERVAL_SPECIAL (60 * 1000) // Reconnection interval of a special case
#define MAX_ADDITONAL_CONNECTION_FAILED_COUNTER 16 // Allowable number that can be serially failed to additional connection
#define MAX_ADDITIONAL_CONNECTION_FAILED_COUNTER 16 // Allowable number that can be serially failed to additional connection
#define ADDITIONAL_CONNECTION_COUNTER_RESET_INTERVAL (30 * 60 * 1000) // Reset period of additional connection failure counter
#define MAC_MIN_LIMIT_COUNT 3 // Minimum number of MAC addresses
+1 -1
View File
@@ -680,7 +680,7 @@ typedef struct IPC IPC;
typedef struct IPC_ARP IPC_ARP;
typedef struct IPC_ASYNC IPC_ASYNC;
typedef struct IPC_PARAM IPC_PARAM;
typedef struct IPC_DHCP_RELESAE_QUEUE IPC_DHCP_RELESAE_QUEUE;
typedef struct IPC_DHCP_RELEASE_QUEUE IPC_DHCP_RELEASE_QUEUE;
typedef struct IPC_MSCHAP_V2_AUTHINFO IPC_MSCHAP_V2_AUTHINFO;
+9 -9
View File
@@ -235,7 +235,7 @@ void CiGetCurrentMachineHashOld(void *data)
}
#ifdef OS_WIN32
// Priduct ID
// Product ID
product_id = MsRegReadStr(REG_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "ProductId");
if (product_id == NULL)
{
@@ -3377,7 +3377,7 @@ UINT CcEnumAccount(REMOTE_CLIENT *r, RPC_CLIENT_ENUM_ACCOUNT *e)
return err;
}
// Unset the startup flag of the accout
// Unset the startup flag of the account
UINT CcRemoveStartupAccount(REMOTE_CLIENT *r, RPC_CLIENT_DELETE_ACCOUNT *a)
{
PACK *ret, *p;
@@ -5000,14 +5000,14 @@ void InRpcClientGetConnectionStatus(RPC_CLIENT_GET_CONNECTION_STATUS *s, PACK *p
s->ServerPort = PackGetInt(p, "ServerPort");
s->ServerProductVer = PackGetInt(p, "ServerProductVer");
s->ServerProductBuild = PackGetInt(p, "ServerProductBuild");
s->NumConnectionsEatablished = PackGetInt(p, "NumConnectionsEatablished");
s->NumConnectionsEstablished = PackGetInt(p, "NumConnectionsEstablished");
s->MaxTcpConnections = PackGetInt(p, "MaxTcpConnections");
s->NumTcpConnections = PackGetInt(p, "NumTcpConnections");
s->NumTcpConnectionsUpload = PackGetInt(p, "NumTcpConnectionsUpload");
s->NumTcpConnectionsDownload = PackGetInt(p, "NumTcpConnectionsDownload");
s->StartTime = PackGetInt64(p, "StartTime");
s->FirstConnectionEstablisiedTime = PackGetInt64(p, "FirstConnectionEstablisiedTime");
s->FirstConnectionEstablishedTime = PackGetInt64(p, "FirstConnectionEstablishedTime");
s->CurrentConnectionEstablishTime = PackGetInt64(p, "CurrentConnectionEstablishTime");
s->TotalSendSize = PackGetInt64(p, "TotalSendSize");
s->TotalRecvSize = PackGetInt64(p, "TotalRecvSize");
@@ -5073,7 +5073,7 @@ void OutRpcClientGetConnectionStatus(PACK *p, RPC_CLIENT_GET_CONNECTION_STATUS *
PackAddInt(p, "ServerPort", c->ServerPort);
PackAddInt(p, "ServerProductVer", c->ServerProductVer);
PackAddInt(p, "ServerProductBuild", c->ServerProductBuild);
PackAddInt(p, "NumConnectionsEatablished", c->NumConnectionsEatablished);
PackAddInt(p, "NumConnectionsEstablished", c->NumConnectionsEstablished);
PackAddInt(p, "HalfConnection", c->HalfConnection);
PackAddInt(p, "QoS", c->QoS);
PackAddInt(p, "MaxTcpConnections", c->MaxTcpConnections);
@@ -5091,7 +5091,7 @@ void OutRpcClientGetConnectionStatus(PACK *p, RPC_CLIENT_GET_CONNECTION_STATUS *
PackAddBool(p, "IsMonitorMode", c->IsMonitorMode);
PackAddInt64(p, "StartTime", c->StartTime);
PackAddInt64(p, "FirstConnectionEstablisiedTime", c->FirstConnectionEstablisiedTime);
PackAddInt64(p, "FirstConnectionEstablishedTime", c->FirstConnectionEstablishedTime);
PackAddInt64(p, "CurrentConnectionEstablishTime", c->CurrentConnectionEstablishTime);
PackAddInt64(p, "TotalSendSize", c->TotalSendSize);
PackAddInt64(p, "TotalRecvSize", c->TotalRecvSize);
@@ -5152,7 +5152,7 @@ void CiNotifyMain(CLIENT *c, SOCK *s)
return;
}
// Register a Cencel
// Register a Cancel
cancel = NewCancel();
LockList(c->NotifyCancelList);
{
@@ -6088,9 +6088,9 @@ void CiGetSessionStatus(RPC_CLIENT_GET_CONNECTION_STATUS *st, SESSION *s)
// Connection start time
st->StartTime = TickToTime(s->CreatedTime);
// Connection completion time of the first connection
st->FirstConnectionEstablisiedTime = TickToTime(s->FirstConnectionEstablisiedTime);
st->FirstConnectionEstablishedTime = TickToTime(s->FirstConnectionEstablishedTime);
// Number of connections have been established so far
st->NumConnectionsEatablished = s->NumConnectionsEatablished;
st->NumConnectionsEstablished = s->NumConnectionsEstablished;
}
Unlock(s->lock);
}
+2 -2
View File
@@ -427,9 +427,9 @@ struct RPC_CLIENT_GET_CONNECTION_STATUS
X *ServerX; // Server certificate
X *ClientX; // Client certificate
UINT64 StartTime; // Connection start time
UINT64 FirstConnectionEstablisiedTime; // Connection completion time of the first connection
UINT64 FirstConnectionEstablishedTime; // Connection completion time of the first connection
UINT64 CurrentConnectionEstablishTime; // Connection completion time of this connection
UINT NumConnectionsEatablished; // Number of connections have been established so far
UINT NumConnectionsEstablished; // Number of connections have been established so far
bool HalfConnection; // Half-connection
bool QoS; // VoIP / QoS
UINT MaxTcpConnections; // Maximum number of the TCP connections
+7 -7
View File
@@ -6161,7 +6161,7 @@ UINT PcAccountRetrySet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param)
{
{"[name]", CmdPrompt, _UU("CMD_AccountCreate_Prompt_Name"), CmdEvalNotEmpty, NULL},
{"NUM", CmdPrompt, _UU("CMD_AccountRetrySet_PROMPT_NUM"), CmdEvalNotEmpty, NULL},
{"INTERVAL", CmdPrompt, _UU("CMD_AccountRetrySet_PROMPY_INTERVAL"), CmdEvalMinMax, &minmax},
{"INTERVAL", CmdPrompt, _UU("CMD_AccountRetrySet_PROMPT_INTERVAL"), CmdEvalMinMax, &minmax},
};
// Get the parameter list
@@ -8791,7 +8791,7 @@ UINT PsConnectionList(CONSOLE *c, char *cmd_name, wchar_t *str, void *param)
CtFree(ct, c);
FreeRpcEnumConnetion(&t);
FreeRpcEnumConnection(&t);
FreeParamValueList(o);
@@ -14186,7 +14186,7 @@ bool EditPolicy(CONSOLE *c, POLICY *pol, char *name, char *value, bool cascade_m
if (cascade_mode && (PolicyIsSupportedForCascade(id) == false))
{
UniFormat(tmp, sizeof(tmp), _UU("CMD_CascadePolicySet_Invalid_Name_For_Cadcade"), name);
UniFormat(tmp, sizeof(tmp), _UU("CMD_CascadePolicySet_Invalid_Name_For_Cascade"), name);
c->Write(c, tmp);
FreePack(p);
return false;
@@ -14421,8 +14421,8 @@ void CmdPrintStatusToListViewEx(CT *ct, RPC_CLIENT_GET_CONNECTION_STATUS *s, boo
GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->StartTime), NULL);
CtInsert(ct, _UU("CM_ST_START_TIME"), tmp);
GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->FirstConnectionEstablisiedTime), NULL);
CtInsert(ct, _UU("CM_ST_FIRST_ESTAB_TIME"), s->FirstConnectionEstablisiedTime == 0 ? _UU("CM_ST_NONE") : tmp);
GetDateTimeStrEx64(tmp, sizeof(tmp), SystemToLocal64(s->FirstConnectionEstablishedTime), NULL);
CtInsert(ct, _UU("CM_ST_FIRST_ESTAB_TIME"), s->FirstConnectionEstablishedTime == 0 ? _UU("CM_ST_NONE") : tmp);
if (s->Connected)
{
@@ -14432,7 +14432,7 @@ void CmdPrintStatusToListViewEx(CT *ct, RPC_CLIENT_GET_CONNECTION_STATUS *s, boo
if (server_mode == false)
{
UniFormat(tmp, sizeof(tmp), _UU("CM_ST_NUM_STR"), s->NumConnectionsEatablished);
UniFormat(tmp, sizeof(tmp), _UU("CM_ST_NUM_STR"), s->NumConnectionsEstablished);
CtInsert(ct, _UU("CM_ST_NUM_ESTABLISHED"), tmp);
}
@@ -23121,7 +23121,7 @@ wchar_t *CmdPromptPort(CONSOLE *c, void *param)
}
else
{
prompt_str = _UU("CMD_PROPMT_PORT");
prompt_str = _UU("CMD_PROMPT_PORT");
}
return c->ReadLine(c, prompt_str, true);
+11 -11
View File
@@ -667,7 +667,7 @@ void WriteSendFifo(SESSION *s, TCPSOCK *ts, void *data, UINT size)
WriteFifo(ts->SendFifo, data, size);
}
// Write data to the reception FIFO (automatic deccyption)
// Write data to the reception FIFO (automatic decryption)
void WriteRecvFifo(SESSION *s, TCPSOCK *ts, void *data, UINT size)
{
// Validate arguments
@@ -892,7 +892,7 @@ void PutUDPPacketData(CONNECTION *c, void *data, UINT size)
block = NewBlock(tmp, size, 0);
// Insert Block
InsertReveicedBlockToQueue(c, block, false);
InsertReceivedBlockToQueue(c, block, false);
}
}
@@ -909,7 +909,7 @@ void PutUDPPacketData(CONNECTION *c, void *data, UINT size)
}
// Add a block to the receive queue
void InsertReveicedBlockToQueue(CONNECTION *c, BLOCK *block, bool no_lock)
void InsertReceivedBlockToQueue(CONNECTION *c, BLOCK *block, bool no_lock)
{
SESSION *s;
// Validate arguments
@@ -1831,7 +1831,7 @@ void ConnectionReceive(CONNECTION *c, CANCEL *c1, CANCEL *c2)
else
{
// Add the data block to queue
InsertReveicedBlockToQueue(c, b, true);
InsertReceivedBlockToQueue(c, b, true);
if ((current_packet_index % 32) == 0)
{
@@ -1914,7 +1914,7 @@ void ConnectionReceive(CONNECTION *c, CANCEL *c1, CANCEL *c2)
else
{
// Add the data block to queue
InsertReveicedBlockToQueue(c, block, true);
InsertReceivedBlockToQueue(c, block, true);
if ((current_packet_index % 32) == 0)
{
@@ -1979,7 +1979,7 @@ void ConnectionReceive(CONNECTION *c, CANCEL *c1, CANCEL *c2)
else
{
// Add the data block to queue
InsertReveicedBlockToQueue(c, block, true);
InsertReceivedBlockToQueue(c, block, true);
if ((current_packet_index % 32) == 0)
{
@@ -2208,7 +2208,7 @@ DISCONNECT_THIS_TCP:
else
{
// Add the data block to queue
InsertReveicedBlockToQueue(c, block, true);
InsertReceivedBlockToQueue(c, block, true);
if ((current_packet_index % 32) == 0)
{
@@ -2477,7 +2477,7 @@ DISCONNECT_THIS_TCP:
else
{
// Add the data block to queue
InsertReveicedBlockToQueue(c, block, true);
InsertReceivedBlockToQueue(c, block, true);
}
num++;
if (num >= MAX_SEND_SOCKET_QUEUE_NUM)
@@ -2558,7 +2558,7 @@ DISCONNECT_THIS_TCP:
}
else
{
InsertReveicedBlockToQueue(c, block, true);
InsertReceivedBlockToQueue(c, block, true);
}
num++;
@@ -2675,7 +2675,7 @@ DISCONNECT_THIS_TCP:
}
else
{
InsertReveicedBlockToQueue(c, block, true);
InsertReceivedBlockToQueue(c, block, true);
}
num++;
if (num >= MAX_SEND_SOCKET_QUEUE_NUM)
@@ -2690,7 +2690,7 @@ DISCONNECT_THIS_TCP:
else
{
ETH *e;
// Bridge is stopped cureently
// Bridge is stopped currently
Select(NULL, SELECT_TIME, c1, NULL);
if (b->LastBridgeTry == 0 || (b->LastBridgeTry + BRIDGE_TRY_SPAN) <= Tick64())
+1 -1
View File
@@ -352,7 +352,7 @@ void SendKeepAlive(CONNECTION *c, TCPSOCK *ts);
void DisconnectUDPSockets(CONNECTION *c);
void PutUDPPacketData(CONNECTION *c, void *data, UINT size);
void SendDataWithUDP(SOCK *s, CONNECTION *c);
void InsertReveicedBlockToQueue(CONNECTION *c, BLOCK *block, bool no_lock);
void InsertReceivedBlockToQueue(CONNECTION *c, BLOCK *block, bool no_lock);
void InitTcpSockRc4Key(TCPSOCK *ts, bool server_mode);
UINT TcpSockRecv(SESSION *s, TCPSOCK *ts, void *data, UINT size);
UINT TcpSockSend(SESSION *s, TCPSOCK *ts, void *data, UINT size);
+6 -6
View File
@@ -933,11 +933,11 @@ RETRY:
wchar_t tmp[MAX_SIZE];
// There is more than one candidate
UniFormat(tmp, sizeof(tmp), _UU("CON_AMBIGIOUS_CMD"), cmd_name);
UniFormat(tmp, sizeof(tmp), _UU("CON_AMBIGUOUS_CMD"), cmd_name);
c->Write(c, tmp);
c->Write(c, _UU("CON_AMBIGIOUS_CMD_1"));
c->Write(c, _UU("CON_AMBIGUOUS_CMD_1"));
PrintCandidateHelp(c, NULL, candidate, 1);
c->Write(c, _UU("CON_AMBIGIOUS_CMD_2"));
c->Write(c, _UU("CON_AMBIGUOUS_CMD_2"));
c->RetCode = ERR_BAD_COMMAND_OR_PARAM;
}
@@ -1338,14 +1338,14 @@ LIST *ParseCommandList(CONSOLE *c, char *cmd_name, wchar_t *command, PARAM param
wchar_t tmp[MAX_SIZE];
// There is more than one candidate
UniFormat(tmp, sizeof(tmp), _UU("CON_AMBIGIOUS_PARAM"), param_list->Token[i]);
UniFormat(tmp, sizeof(tmp), _UU("CON_AMBIGUOUS_PARAM"), param_list->Token[i]);
c->Write(c, tmp);
UniFormat(tmp, sizeof(tmp), _UU("CON_AMBIGIOUS_PARAM_1"), cmd_name);
UniFormat(tmp, sizeof(tmp), _UU("CON_AMBIGUOUS_PARAM_1"), cmd_name);
c->Write(c, tmp);
PrintCandidateHelp(c, cmd_name, candidate, 1);
c->Write(c, _UU("CON_AMBIGIOUS_PARAM_2"));
c->Write(c, _UU("CON_AMBIGUOUS_PARAM_2"));
ok = false;
}
+8 -8
View File
@@ -227,7 +227,7 @@ UINT DCChangeHostName(DDNS_CLIENT *c, char *hostname)
void DCThread(THREAD *thread, void *param)
{
DDNS_CLIENT *c;
INTERRUPT_MANAGER *interrput;
INTERRUPT_MANAGER *interrupt;
UINT last_ip_hash = 0;
void *route_change_poller = NULL;
bool last_time_ip_changed = false;
@@ -243,7 +243,7 @@ void DCThread(THREAD *thread, void *param)
c = (DDNS_CLIENT *)param;
interrput = NewInterruptManager();
interrupt = NewInterruptManager();
route_change_poller = NewRouteChange();
IsRouteChanged(route_change_poller);
@@ -346,7 +346,7 @@ void DCThread(THREAD *thread, void *param)
c->NextGetMyIpTick_IPv4 = Tick64() + (UINT64)next_interval;
AddInterrupt(interrput, c->NextGetMyIpTick_IPv4);
AddInterrupt(interrupt, c->NextGetMyIpTick_IPv4);
}
// Self IPv6 address acquisition
@@ -381,7 +381,7 @@ void DCThread(THREAD *thread, void *param)
c->NextGetMyIpTick_IPv6 = Tick64() + (UINT64)next_interval;
AddInterrupt(interrput, c->NextGetMyIpTick_IPv6);
AddInterrupt(interrupt, c->NextGetMyIpTick_IPv6);
}
}
@@ -419,7 +419,7 @@ void DCThread(THREAD *thread, void *param)
SiApplyAzureConfig(c->Cedar->Server, &st);
}
AddInterrupt(interrput, c->NextRegisterTick_IPv4);
AddInterrupt(interrupt, c->NextRegisterTick_IPv4);
}
if (c->Halt)
@@ -454,10 +454,10 @@ void DCThread(THREAD *thread, void *param)
SiApplyAzureConfig(c->Cedar->Server, &st);
}
AddInterrupt(interrput, c->NextRegisterTick_IPv6);
AddInterrupt(interrupt, c->NextRegisterTick_IPv6);
}
interval = GetNextIntervalForInterrupt(interrput);
interval = GetNextIntervalForInterrupt(interrupt);
interval = MIN(interval, 1234);
if (n == 1)
@@ -490,7 +490,7 @@ void DCThread(THREAD *thread, void *param)
}
FreeRouteChange(route_change_poller);
FreeInterruptManager(interrput);
FreeInterruptManager(interrupt);
}
// Command to update immediately
+2 -2
View File
@@ -781,7 +781,7 @@ void EmAddInit(HWND hWnd, EM_ADD *p)
// Edit mode (to obtain a configuration)
wchar_t tmp[MAX_PATH];
RPC_ADD_DEVICE t;
Hide(hWnd, R_PROMISCUS);
Hide(hWnd, R_PROMISCUOUS);
Zero(&t, sizeof(t));
StrCpy(t.DeviceName, sizeof(t.DeviceName), p->DeviceName);
@@ -827,7 +827,7 @@ void EmAddOk(HWND hWnd, EM_ADD *p)
if (p->NewMode)
{
t.NoPromiscus = IsChecked(hWnd, R_PROMISCUS);
t.NoPromiscuous = IsChecked(hWnd, R_PROMISCUOUS);
}
if (p->NewMode)
+1 -1
View File
@@ -114,7 +114,7 @@
// Constants
#define EM_REG_KEY "Software\\" GC_REG_COMPANY_NAME "\\EtherLogger\\Manager"
// Innner structure
// Inner structure
typedef struct EM_ADD
{
RPC *Rpc;
+8 -8
View File
@@ -444,7 +444,7 @@ UINT EtSetPassword(EL *e, RPC_SET_PASSWORD *t)
// Add a device
UINT EtAddDevice(EL *e, RPC_ADD_DEVICE *t)
{
if (ElAddCaptureDevice(e, t->DeviceName, &t->LogSetting, t->NoPromiscus) == false)
if (ElAddCaptureDevice(e, t->DeviceName, &t->LogSetting, t->NoPromiscuous) == false)
{
return ERR_CAPTURE_DEVICE_ADD_ERROR;
}
@@ -485,7 +485,7 @@ UINT EtGetDevice(EL *e, RPC_ADD_DEVICE *t)
ret = ERR_NO_ERROR;
Copy(&t->LogSetting, &d->LogSetting, sizeof(HUB_LOG));
t->NoPromiscus = d->NoPromiscus;
t->NoPromiscuous = d->NoPromiscuous;
}
}
UnlockList(e->DeviceList);
@@ -583,7 +583,7 @@ void InRpcAddDevice(RPC_ADD_DEVICE *t, PACK *p)
Zero(t, sizeof(RPC_ADD_DEVICE));
PackGetStr(p, "DeviceName", t->DeviceName, sizeof(t->DeviceName));
t->NoPromiscus = PackGetInt(p, "NoPromiscus");
t->NoPromiscuous = PackGetInt(p, "NoPromiscuous");
t->LogSetting.PacketLogSwitchType = PackGetInt(p, "PacketLogSwitchType");
for (i = 0;i < NUM_PACKET_LOG;i++)
@@ -602,7 +602,7 @@ void OutRpcAddDevice(PACK *p, RPC_ADD_DEVICE *t)
}
PackAddStr(p, "DeviceName", t->DeviceName);
PackAddInt(p, "NoPromiscus", t->NoPromiscus);
PackAddInt(p, "NoPromiscuous", t->NoPromiscuous);
PackAddInt(p, "PacketLogSwitchType", t->LogSetting.PacketLogSwitchType);
for (i = 0;i < NUM_PACKET_LOG;i++)
@@ -969,7 +969,7 @@ bool ElDeleteCaptureDevice(EL *e, char *name)
}
// Add a capture device
bool ElAddCaptureDevice(EL *e, char *name, HUB_LOG *log, bool no_promiscus)
bool ElAddCaptureDevice(EL *e, char *name, HUB_LOG *log, bool no_promiscuous)
{
EL_DEVICE *d, t;
// Validate arguments
@@ -995,7 +995,7 @@ bool ElAddCaptureDevice(EL *e, char *name, HUB_LOG *log, bool no_promiscus)
d = ZeroMalloc(sizeof(EL_DEVICE));
StrCpy(d->DeviceName, sizeof(d->DeviceName), name);
Copy(&d->LogSetting, log, sizeof(HUB_LOG));
d->NoPromiscus = no_promiscus;
d->NoPromiscuous = no_promiscuous;
d->el = e;
Insert(e->DeviceList, d);
@@ -1091,7 +1091,7 @@ void ElSaveConfigToFolder(EL *e, FOLDER *root)
f = CfgCreateFolder(devices, d->DeviceName);
SiWriteHubLogCfgEx(f, &d->LogSetting, true);
CfgAddBool(f, "NoPromiscusMode", d->NoPromiscus);
CfgAddBool(f, "NoPromiscuousMode", d->NoPromiscuous);
}
}
UnlockList(e->DeviceList);
@@ -1157,7 +1157,7 @@ void ElLoadConfigFromFolder(EL *e, FOLDER *root)
Zero(&g, sizeof(g));
SiLoadHubLogCfg(&g, f);
ElAddCaptureDevice(e, name, &g, CfgGetBool(f, "NoPromiscusMode"));
ElAddCaptureDevice(e, name, &g, CfgGetBool(f, "NoPromiscuousMode"));
}
}
FreeToken(t);
+3 -3
View File
@@ -133,7 +133,7 @@ struct RPC_ADD_DEVICE
{
char DeviceName[MAX_SIZE]; // Device name
HUB_LOG LogSetting; // Log settings
bool NoPromiscus; // Without promiscuous mode
bool NoPromiscuous; // Without promiscuous mode
};
struct RPC_DELETE_DEVICE
@@ -173,7 +173,7 @@ struct EL_DEVICE
CANCEL *Cancel2; // Cancel 2
volatile bool Halt; // Halting flag
bool Active; // Running flag
bool NoPromiscus; // Without promiscuous mode
bool NoPromiscuous; // Without promiscuous mode
LOG *Logger; // Logger
};
@@ -219,7 +219,7 @@ void ElLoadConfigFromFolder(EL *e, FOLDER *root);
void ElSaveConfig(EL *e);
void ElSaveConfigToFolder(EL *e, FOLDER *root);
int ElCompareDevice(void *p1, void *p2);
bool ElAddCaptureDevice(EL *e, char *name, HUB_LOG *log, bool no_promiscus);
bool ElAddCaptureDevice(EL *e, char *name, HUB_LOG *log, bool no_promiscuous);
bool ElDeleteCaptureDevice(EL *e, char *name);
bool ElSetCaptureDeviceLogSetting(EL *e, char *name, HUB_LOG *log);
void ElCaptureThread(THREAD *thread, void *param);
+1 -1
View File
@@ -1835,7 +1835,7 @@ ESCAPE:
return;
}
// Eable / disable the SecureNAT
// Enable / disable the SecureNAT
void EnableSecureNAT(HUB *h, bool enable)
{
EnableSecureNATEx(h, enable, false);
+1 -1
View File
@@ -348,7 +348,7 @@ struct ACCESS
UCHAR DstMacAddress[6]; // Destination MAC address
UCHAR DstMacMask[6]; // Destination MAC address mask
bool CheckTcpState; // The state of the TCP connection
bool Established; // Establieshed(TCP)
bool Established; // Established(TCP)
UINT Delay; // Delay
UINT Jitter; // Jitter
UINT Loss; // Packet loss
+5 -5
View File
@@ -206,7 +206,7 @@ void IPsecSendPacketByIPsecSa(IKE_SERVER *ike, IPSECSA *sa, UCHAR *data, UINT da
IPV4_SET_HEADER_LEN(&h, sizeof(IPV4_HEADER) / 4);
h.TotalLength = Endian16((USHORT)(data_size + sizeof(IPV4_HEADER)));
h.Identification = Endian16(c->TunnelSendIpId++);
h.FlagsAndFlagmentOffset[0] = h.FlagsAndFlagmentOffset[1] = 0;
h.FlagsAndFragmentOffset[0] = h.FlagsAndFragmentOffset[1] = 0;
h.TimeToLive = DEFAULT_IP_TTL;
h.Protocol = protocol_id;
h.SrcIP = IPToUINT(&c->TunnelModeServerIP);
@@ -2839,7 +2839,7 @@ void ProcIkeAggressiveModePacketRecv(IKE_SERVER *ike, UDPPACKET *p, IKE_PACKET *
if ((caps.NatTraversalDraftIetf || caps.NatTraversalRfc3947) || (IsUdpPortOpened(ike->IPsec->UdpListener, &p->DstIP, IPSEC_PORT_IPSEC_ESP_RAW)))
{
sa = FindIkeSaByEndPointAndInitiatorCookie(ike, &p->DstIP, p->DestPort, &p->SrcIP, p->SrcPort, header->InitiatorCookie, IKE_SA_AGRESSIVE_MODE);
sa = FindIkeSaByEndPointAndInitiatorCookie(ike, &p->DstIP, p->DestPort, &p->SrcIP, p->SrcPort, header->InitiatorCookie, IKE_SA_AGGRESSIVE_MODE);
if (sa == NULL)
{
@@ -2894,7 +2894,7 @@ void ProcIkeAggressiveModePacketRecv(IKE_SERVER *ike, UDPPACKET *p, IKE_PACKET *
IKE_PACKET_PAYLOAD *your_nat_d_2 = NULL;
// Create an IKE SA
sa = NewIkeSa(ike, c, header->InitiatorCookie, IKE_SA_AGRESSIVE_MODE, &setting);
sa = NewIkeSa(ike, c, header->InitiatorCookie, IKE_SA_AGGRESSIVE_MODE, &setting);
Copy(&sa->Caps, &caps, sizeof(IKE_CAPS));
sa->State= IKE_SA_AM_STATE_1_SA;
Insert(ike->IkeSaList, sa);
@@ -3118,7 +3118,7 @@ void ProcIkeAggressiveModePacketRecv(IKE_SERVER *ike, UDPPACKET *p, IKE_PACKET *
header->ResponderCookie), true, header->InitiatorCookie, header->ResponderCookie);
}
if (sa != NULL && sa->Mode == IKE_SA_AGRESSIVE_MODE)
if (sa != NULL && sa->Mode == IKE_SA_AGGRESSIVE_MODE)
{
IKE_PACKET *pr = NULL;
@@ -5757,7 +5757,7 @@ void ProcessIKEInterrupts(IKE_SERVER *ike)
while (ike->StateHasChanged);
// Maintenance of the thread list
MainteThreadList(ike->ThreadList);
MaintainThreadList(ike->ThreadList);
/*Debug("ike->ThreadList: %u\n", LIST_NUM(ike->ThreadList));
{
UINT i;
+1 -1
View File
@@ -120,7 +120,7 @@
// State
#define IKE_SA_MAIN_MODE 0 // Main mode
#define IKE_SA_AGRESSIVE_MODE 1 // Aggressive mode
#define IKE_SA_AGGRESSIVE_MODE 1 // Aggressive mode
#define IKE_SA_MM_STATE_1_SA 0 // Main mode state 1 (SA exchange is complete. Wait for key exchange)
#define IKE_SA_MM_STATE_2_KEY 1 // Main mode state 2 (Key exchange is complete. Wait for exchange ID)
+10 -10
View File
@@ -561,7 +561,7 @@ IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char
ipc->ArpTable = NewList(IPCCmpArpTable);
// Create an IPv4 reception queue
ipc->IPv4RecviedQueue = NewQueue();
ipc->IPv4ReceivedQueue = NewQueue();
return ipc;
@@ -601,7 +601,7 @@ IPC *NewIPCBySock(CEDAR *cedar, SOCK *s, void *mac_address)
ipc->ArpTable = NewList(IPCCmpArpTable);
// Create an IPv4 reception queue
ipc->IPv4RecviedQueue = NewQueue();
ipc->IPv4ReceivedQueue = NewQueue();
ipc->FlushList = NewTubeFlushList();
@@ -671,7 +671,7 @@ void FreeIPC(IPC *ipc)
while (true)
{
BLOCK *b = GetNext(ipc->IPv4RecviedQueue);
BLOCK *b = GetNext(ipc->IPv4ReceivedQueue);
if (b == NULL)
{
break;
@@ -680,7 +680,7 @@ void FreeIPC(IPC *ipc)
FreeBlock(b);
}
ReleaseQueue(ipc->IPv4RecviedQueue);
ReleaseQueue(ipc->IPv4ReceivedQueue);
Free(ipc);
}
@@ -872,7 +872,7 @@ LABEL_RETRY_FOR_OPENVPN:
char tmp[64];
DHCP_OPTION_LIST req;
IPC_DHCP_RELESAE_QUEUE *q;
IPC_DHCP_RELEASE_QUEUE *q;
// If the offered IP address is not used, place the address
// in release memo list to release at the end of this function
@@ -880,7 +880,7 @@ LABEL_RETRY_FOR_OPENVPN:
req.Opcode = DHCP_RELEASE;
req.ServerAddress = d->ParsedOptionList->ServerAddress;
q = ZeroMalloc(sizeof(IPC_DHCP_RELESAE_QUEUE));
q = ZeroMalloc(sizeof(IPC_DHCP_RELEASE_QUEUE));
Copy(&q->Req, &req, sizeof(DHCP_OPTION_LIST));
q->TranId = tran_id;
Copy(q->MacAddress, ipc->MacAddress, 6);
@@ -994,7 +994,7 @@ LABEL_CLEANUP:
for (i = 0;i < LIST_NUM(release_list);i++)
{
IPC_DHCP_RELESAE_QUEUE *q = LIST_DATA(release_list, i);
IPC_DHCP_RELEASE_QUEUE *q = LIST_DATA(release_list, i);
Copy(ipc->MacAddress, q->MacAddress, 6);
FreeDHCPv4Data(IPCSendDhcpRequest(ipc, NULL, q->TranId, &q->Req, 0, 0, NULL));
@@ -1456,7 +1456,7 @@ void IPCAssociateOnArpTable(IPC *ipc, IP *ip, UCHAR *mac_address)
}
}
// Identifiy whether the MAC address is a normal unicast address
// Identify whether the MAC address is a normal unicast address
bool IsValidUnicastMacAddress(UCHAR *mac)
{
// Validate arguments
@@ -1626,7 +1626,7 @@ void IPCProcessL3EventsEx(IPC *ipc, UINT64 now)
IPCAssociateOnArpTable(ipc, &ip_src, src_mac);
// Place in the reception queue
InsertQueue(ipc->IPv4RecviedQueue, NewBlock(data, size, 0));
InsertQueue(ipc->IPv4ReceivedQueue, NewBlock(data, size, 0));
}
else
{
@@ -2086,7 +2086,7 @@ BLOCK *IPCRecvIPv4(IPC *ipc)
return NULL;
}
b = GetNext(ipc->IPv4RecviedQueue);
b = GetNext(ipc->IPv4ReceivedQueue);
return b;
}
+2 -2
View File
@@ -140,7 +140,7 @@ struct IPC_ARP
};
// DHCP release queue
struct IPC_DHCP_RELESAE_QUEUE
struct IPC_DHCP_RELEASE_QUEUE
{
DHCP_OPTION_LIST Req;
UINT TranId;
@@ -206,7 +206,7 @@ struct IPC
UCHAR MacAddress[6]; // MAC address
UCHAR Padding[2];
LIST *ArpTable; // ARP table
QUEUE *IPv4RecviedQueue; // IPv4 reception queue
QUEUE *IPv4ReceivedQueue; // IPv4 reception queue
TUBE_FLUSH_LIST *FlushList; // Tube Flush List
UCHAR MsChapV2_ServerResponse[20]; // Server response
DHCP_CLASSLESS_ROUTE_TABLE ClasslessRoute; // Classless routing table
+1 -1
View File
@@ -2562,7 +2562,7 @@ void L2TPProcessInterrupts(L2TP_SERVER *l2tp)
// Maintenance the thread list
if (l2tp->IkeServer == NULL)
{
MainteThreadList(l2tp->ThreadList);
MaintainThreadList(l2tp->ThreadList);
//Debug("l2tp->ThreadList: %u\n", LIST_NUM(l2tp->ThreadList));
}
}
+14 -14
View File
@@ -137,7 +137,7 @@ void SstpProcessControlPacket(SSTP_SERVER *s, SSTP_PACKET *p)
return;
}
Debug("SSTP Control Packet Recv: Msg = %u, Num = %u\n", p->MessageType, LIST_NUM(p->AttibuteList));
Debug("SSTP Control Packet Recv: Msg = %u, Num = %u\n", p->MessageType, LIST_NUM(p->AttributeList));
switch (p->MessageType)
{
@@ -266,7 +266,7 @@ void SstpSendPacket(SSTP_SERVER *s, SSTP_PACKET *p)
if (p->IsControl)
{
Debug("SSTP Control Packet Send: Msg = %u, Num = %u\n", p->MessageType, LIST_NUM(p->AttibuteList));
Debug("SSTP Control Packet Send: Msg = %u, Num = %u\n", p->MessageType, LIST_NUM(p->AttributeList));
}
else
{
@@ -438,7 +438,7 @@ SSTP_PACKET *SstpNewControlPacketWithAnAttribute(USHORT message_type, SSTP_ATTRI
if (a != NULL)
{
Add(p->AttibuteList, a);
Add(p->AttributeList, a);
}
return p;
@@ -452,7 +452,7 @@ SSTP_PACKET *SstpNewControlPacket(USHORT message_type)
p->IsControl = true;
p->MessageType = message_type;
p->Version = SSTP_VERSION_1;
p->AttibuteList = NewListFast(NULL);
p->AttributeList = NewListFast(NULL);
return p;
}
@@ -469,7 +469,7 @@ SSTP_PACKET *SstpNewDataPacket(UCHAR *data, UINT size)
return p;
}
// Get the Attibute with the specified ID from SSTP packet
// Get the Attribute with the specified ID from SSTP packet
SSTP_ATTRIBUTE *SstpFindAttribute(SSTP_PACKET *p, UCHAR attribute_id)
{
UINT i;
@@ -479,9 +479,9 @@ SSTP_ATTRIBUTE *SstpFindAttribute(SSTP_PACKET *p, UCHAR attribute_id)
return NULL;
}
for (i = 0;i < LIST_NUM(p->AttibuteList);i++)
for (i = 0;i < LIST_NUM(p->AttributeList);i++)
{
SSTP_ATTRIBUTE *a = LIST_DATA(p->AttibuteList, i);
SSTP_ATTRIBUTE *a = LIST_DATA(p->AttributeList, i);
if (a->AttributeId == attribute_id)
{
@@ -665,7 +665,7 @@ BUF *SstpBuildPacket(SSTP_PACKET *p)
Free(p->Data);
}
ab = SstpBuildAttributeList(p->AttibuteList, p->MessageType);
ab = SstpBuildAttributeList(p->AttributeList, p->MessageType);
p->Data = ab->Buf;
p->DataSize = ab->Size;
Free(ab);
@@ -753,9 +753,9 @@ SSTP_PACKET *SstpParsePacket(UCHAR *data, UINT size)
if (p->IsControl)
{
// Parse the Attribute list
p->AttibuteList = SstpParseAttributeList(p->Data, p->DataSize, p);
p->AttributeList = SstpParseAttributeList(p->Data, p->DataSize, p);
if (p->AttibuteList == NULL)
if (p->AttributeList == NULL)
{
// Failure of parsing list
SstpFreePacket(p);
@@ -794,7 +794,7 @@ LIST *SstpParseAttributeList(UCHAR *data, UINT size, SSTP_PACKET *p)
data += sizeof(USHORT);
size -= sizeof(USHORT);
// Attibutes List
// Attributes List
o = NewListFast(NULL);
while (LIST_NUM(o) < num)
@@ -874,7 +874,7 @@ SSTP_ATTRIBUTE *SstpParseAttribute(UCHAR *data, UINT size)
return a;
}
// Release the Attibute
// Release the Attribute
void SstpFreeAttribute(SSTP_ATTRIBUTE *a)
{
// Validate arguments
@@ -917,9 +917,9 @@ void SstpFreePacket(SSTP_PACKET *p)
return;
}
if (p->AttibuteList != NULL)
if (p->AttributeList != NULL)
{
SstpFreeAttributeList(p->AttibuteList);
SstpFreeAttributeList(p->AttributeList);
}
if (p->Data != NULL)
+2 -2
View File
@@ -174,7 +174,7 @@
//// Type
// SSTP Attibute
// SSTP Attribute
struct SSTP_ATTRIBUTE
{
UCHAR AttributeId;
@@ -191,7 +191,7 @@ struct SSTP_PACKET
UCHAR *Data;
UINT DataSize;
USHORT MessageType;
LIST *AttibuteList;
LIST *AttributeList;
};
// SSTP Server
+2 -2
View File
@@ -302,7 +302,7 @@ void L3RecvIp(L3IF *f, PKT *p, bool self)
ip->TimeToLive = 0xff;
// Recalculates the checksum
ip->FlagsAndFlagmentOffset[0] = ip->FlagsAndFlagmentOffset[1] = 0;
ip->FlagsAndFragmentOffset[0] = ip->FlagsAndFragmentOffset[1] = 0;
icmp->Checksum = 0;
icmp->Type = ICMP_TYPE_ECHO_RESPONSE;
icmp->Checksum = IpChecksum(icmp, p->PacketSize - sizeof(MAC_HEADER) - header_size);
@@ -356,7 +356,7 @@ void L3RecvL2(L3IF *f, PKT *p)
return;
}
// Ignore any packets except a unicast packet which is destinated other
// Ignore any packets except a unicast packet which is at destination
// or a packet which I sent
if (Cmp(p->MacAddressSrc, f->MacAddress, 6) == 0 ||
(p->BroadcastPacket == false && Cmp(p->MacAddressDest, f->MacAddress, 6) != 0))
+2 -2
View File
@@ -266,7 +266,7 @@ bool LinkPaPutPacket(SESSION *s, void *data, UINT size)
k->Flag1++;
if ((k->Flag1 % 32) == 0)
{
// Ommit for performance
// Omit for performance
UINT current_num;
int diff;
@@ -313,7 +313,7 @@ bool LinkPaPutPacket(SESSION *s, void *data, UINT size)
}
else
{
InsertReveicedBlockToQueue(server_connection, block, true);
InsertReceivedBlockToQueue(server_connection, block, true);
}
}
}
+1 -1
View File
@@ -562,7 +562,7 @@ void ListenerTCPMainLoop(LISTENER *r)
goto STOP;
}
// Accpet loop
// Accept loop
while (true)
{
// Accept
+2 -2
View File
@@ -1750,7 +1750,7 @@ char *PacketLogParseProc(RECORD *rec)
}
else if (p->L7.IkeHeader->ExchangeType == IKE_EXCHANGE_TYPE_AGGRESSIVE)
{
t->Token[7] = CopyStr("AgressiveMode");
t->Token[7] = CopyStr("AggressiveMode");
}
{
@@ -2022,7 +2022,7 @@ char *PacketLogParseProc(RECORD *rec)
}
else if (p->L7.IkeHeader->ExchangeType == IKE_EXCHANGE_TYPE_AGGRESSIVE)
{
t->Token[7] = CopyStr("AgressiveMode");
t->Token[7] = CopyStr("AggressiveMode");
}
{
+1 -1
View File
@@ -164,7 +164,7 @@ struct RPC_NAT_STATUS
char HubName[MAX_HUBNAME_LEN + 1]; // HUB name
UINT NumTcpSessions; // Number of TCP sessions
UINT NumUdpSessions; // Ntmber of UDP sessions
UINT NumIcmpSessions; // Nymber of ICMP sessions
UINT NumIcmpSessions; // Number of ICMP sessions
UINT NumDnsSessions; // Number of DNS sessions
UINT NumDhcpClients; // Number of DHCP clients
bool IsKernelMode; // Whether kernel mode
+7 -7
View File
@@ -1576,7 +1576,7 @@ bool ServerAccept(CONNECTION *c)
if (hub->ForceDisableComm)
{
// Commnunication function is disabled
// Communication function is disabled
FreePack(p);
c->Err = ERR_SERVER_CANT_ACCEPT;
error_detail = "ERR_COMM_DISABLED";
@@ -1851,7 +1851,7 @@ bool ServerAccept(CONNECTION *c)
Add(o, "p");
Add(o, "guest");
Add(o, "anony");
Add(o, "anonymouse");
Add(o, "anonymous");
Add(o, "password");
Add(o, "passwd");
Add(o, "pass");
@@ -4618,7 +4618,7 @@ void ClientCheckServerCertThread(THREAD *thread, void *param)
NoticeThreadInit(thread);
// Query for the selection to the user
p->Ok = p->CheckCertProc(p->Connection->Session, p->Connection, p->ServerX, &p->Exipred);
p->Ok = p->CheckCertProc(p->Connection->Session, p->Connection, p->ServerX, &p->Expired);
p->UserSelected = true;
}
@@ -4764,7 +4764,7 @@ bool ClientCheckServerCert(CONNECTION *c, bool *expired)
if (expired != NULL)
{
*expired = p->Exipred;
*expired = p->Expired;
}
ret = p->Ok;
@@ -6492,7 +6492,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect, bool no_tls
volatile bool *cancel_flag = NULL;
void *hWnd;
UINT nat_t_err = 0;
bool is_additonal_rudp_session = false;
bool is_additional_rudp_session = false;
UCHAR uc = 0;
IP ret_ip;
// Validate arguments
@@ -6508,7 +6508,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect, bool no_tls
if (sess != NULL)
{
cancel_flag = &sess->CancelConnect;
is_additonal_rudp_session = sess->IsRUDPSession;
is_additional_rudp_session = sess->IsRUDPSession;
}
hWnd = c->hWndForUI;
@@ -6552,7 +6552,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect, bool no_tls
// If additional_connect == false, enable trying to NAT-T connection
// If additional_connect == true, follow the IsRUDPSession setting in this session
s = TcpIpConnectEx(host_for_direct_connection, port_for_direct_connection,
(bool *)cancel_flag, hWnd, &nat_t_err, (additional_connect ? (!is_additonal_rudp_session) : false),
(bool *)cancel_flag, hWnd, &nat_t_err, (additional_connect ? (!is_additional_rudp_session) : false),
true, no_tls, &ret_ip);
}
}
+1 -1
View File
@@ -121,7 +121,7 @@ struct CHECK_CERT_THREAD_PROC
X *ServerX;
CHECK_CERT_PROC *CheckCertProc;
bool UserSelected;
bool Exipred;
bool Expired;
bool Ok;
};
+2 -2
View File
@@ -137,7 +137,7 @@ bool PeapClientSendMsChapv2AuthClientResponse(EAP_CLIENT *e, UCHAR *client_respo
msg1.Chap_Id = e->MsChapV2Challenge.Chap_Id;
msg1.Chap_Len = Endian16(54 + StrLen(e->Username));
msg1.Chap_ValueSize = 49;
Copy(msg1.Chap_PeerChallange, client_challenge, 16);
Copy(msg1.Chap_PeerChallenge, client_challenge, 16);
Copy(msg1.Chap_NtResponse, client_response, 24);
Copy(msg1.Chap_Name, e->Username, MIN(StrLen(e->Username), 255));
@@ -757,7 +757,7 @@ bool EapClientSendMsChapv2AuthClientResponse(EAP_CLIENT *e, UCHAR *client_respon
eap1->Chap_Id = e->MsChapV2Challenge.Chap_Id;
eap1->Chap_Len = Endian16(54 + StrLen(e->Username));
eap1->Chap_ValueSize = 49;
Copy(eap1->Chap_PeerChallange, client_challenge, 16);
Copy(eap1->Chap_PeerChallenge, client_challenge, 16);
Copy(eap1->Chap_NtResponse, client_response, 24);
Copy(eap1->Chap_Name, e->Username, MIN(StrLen(e->Username), 255));
+1 -1
View File
@@ -234,7 +234,7 @@ struct EAP_MSCHAPV2_RESPONSE
UCHAR Chap_Id;
USHORT Chap_Len;
UCHAR Chap_ValueSize; // = 49
UCHAR Chap_PeerChallange[16];
UCHAR Chap_PeerChallenge[16];
UCHAR Chap_Reserved[8];
UCHAR Chap_NtResponse[24];
UCHAR Chap_Flags;
+5 -5
View File
@@ -3470,7 +3470,7 @@ void SmSetupDlgOnOk(HWND hWnd, SM_SETUP *s)
s->s->IPsecMessageDisplayed = true;
}
// Confgure the VPN Azure if VPN Azure feature is available
// Configure the VPN Azure if VPN Azure feature is available
if (GetCapsBool(s->s->CapsList, "b_support_azure"))
{
SmAzure(hWnd, s->s, true);
@@ -9465,7 +9465,7 @@ void SmSessionDlgUpdate(HWND hWnd, SM_HUB *s)
if (s->p->ServerInfo.ServerBuildInt < 2844)
{
// Old version doen't support for remote management of the sessions
// Old version doesn't support for remote management of the sessions
ok2 = ok;
}
@@ -13776,7 +13776,7 @@ void SmEditUserDlgOk(HWND hWnd, SM_EDIT_USER *s)
}
FreeRpcSetUser(&t);
MsgBoxEx(hWnd, MB_ICONINFORMATION, _UU("SM_USER_CREEATE_OK"), u->Name);
MsgBoxEx(hWnd, MB_ICONINFORMATION, _UU("SM_USER_CREATE_OK"), u->Name);
}
else
{
@@ -16120,7 +16120,7 @@ void SmConnectionDlgRefresh(HWND hWnd, SM_SERVER *p)
LvInsertEnd(b, hWnd, L_LIST);
FreeRpcEnumConnetion(&t);
FreeRpcEnumConnection(&t);
}
// Update the control
@@ -17571,7 +17571,7 @@ void SmEditHubOnOk(HWND hWnd, SM_EDIT_HUB *s)
{
if (CALL(hWnd, ScCreateHub(s->p->Rpc, &t)))
{
MsgBoxEx(hWnd, MB_ICONINFORMATION, _UU("CM_EDIT_HUB_CREATER"), hubname);
MsgBoxEx(hWnd, MB_ICONINFORMATION, _UU("CM_EDIT_HUB_CREATED"), hubname);
EndDialog(hWnd, true);
}
}
+3 -3
View File
@@ -665,7 +665,7 @@ bool SwSfxCopyVgFiles(HWND hWnd, wchar_t *src, wchar_t *dst)
}
msg = L"The file \"%s\" was not found on the directory which the installer \"%s\" is located on.\r\n\r\n"
L"To continue the installation, the file \"%s\" is required on the same direcotry.\r\n"
L"To continue the installation, the file \"%s\" is required on the same directory.\r\n"
L"If you have extracted the installer from a ZIP archive, you have to also extract the file \"%s\" from the ZIP archive together.";
MsgBoxEx(hWnd, MB_ICONINFORMATION, msg, srcfilename, exefilename, srcfilename, srcfilename);
@@ -1759,7 +1759,7 @@ UINT SwFinish(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, WIZARD *wizard,
return 0;
}
// Error occuring screen
// Error occurring screen
UINT SwError(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, WIZARD *wizard, WIZARD_PAGE *wizard_page, void *param)
{
SW *sw = (SW *)param;
@@ -4155,7 +4155,7 @@ L_RETRY_LINK:
{
// Show the error message if it fails
UINT msgret;
UniFormat(tmp, sizeof(tmp), _UU("SW_PERFORM_MSG_CRAETE_LINK_ERROR"), lnk_fullpath);
UniFormat(tmp, sizeof(tmp), _UU("SW_PERFORM_MSG_CREATE_LINK_ERROR"), lnk_fullpath);
msgret = SwPerformMsgBox(wp, MB_ICONEXCLAMATION | MB_YESNO, tmp);
if (msgret == IDYES)
+1 -1
View File
@@ -473,7 +473,7 @@ void SecurePassword(void *secure_password, void *password, void *random)
}
// Generate 160bit random number
void GenRamdom(void *random)
void GenRandom(void *random)
{
// Validate arguments
if (random == NULL)
+1 -1
View File
@@ -124,7 +124,7 @@ bool SamAuthUserByCert(HUB *h, char *username, X *x);
bool SamAuthUserByPlainPassword(CONNECTION *c, HUB *hub, char *username, char *password, bool ast, UCHAR *mschap_v2_server_response_20, RADIUS_LOGIN_OPTION *opt);
POLICY *SamGetUserPolicy(HUB *h, char *username);
void GenRamdom(void *random);
void GenRandom(void *random);
void SecurePassword(void *secure_password, void *password, void *random);
X *GetIssuerFromList(LIST *cert_list, X *cert);
+2 -2
View File
@@ -839,7 +839,7 @@ LIST *SuGetAdapterList(SU *u)
return NULL;
}
ret = NewList(SuCmpAdaterList);
ret = NewList(SuCmpAdapterList);
// Enumerate adapters
Zero(&u->AdapterInfoList, sizeof(u->AdapterInfoList));
@@ -869,7 +869,7 @@ LIST *SuGetAdapterList(SU *u)
}
// Comparison function of the adapter list
int SuCmpAdaterList(void *p1, void *p2)
int SuCmpAdapterList(void *p1, void *p2)
{
int r;
SU_ADAPTER_LIST *a1, *a2;
+1 -1
View File
@@ -168,7 +168,7 @@ bool SuPutPacket(SU_ADAPTER *a, void *buf, UINT size);
SU_ADAPTER_LIST *SuAdapterInfoToAdapterList(SL_ADAPTER_INFO *info);
LIST *SuGetAdapterList(SU *u);
void SuFreeAdapterList(LIST *o);
int SuCmpAdaterList(void *p1, void *p2);
int SuCmpAdapterList(void *p1, void *p2);
bool SuInstallDriver(bool force);
bool SuInstallDriverInner(bool force);
+6 -6
View File
@@ -1390,7 +1390,7 @@ UINT GetGlobalServerFlag(UINT index)
return global_server_flags[index];
}
// Main of the aquisition of Caps of the server
// Main of the acquisition of Caps of the server
void GetServerCapsMain(SERVER *s, CAPSLIST *t)
{
bool is_restricted = false;
@@ -1558,7 +1558,7 @@ void GetServerCapsMain(SERVER *s, CAPSLIST *t)
// Maximum NAT table size / Virtual HUB
AddCapsInt(t, "i_max_secnat_tables", NAT_MAX_SESSIONS);
// Cascade connction
// Cascade connection
if (s->ServerType == SERVER_TYPE_STANDALONE)
{
AddCapsBool(t, "b_support_cascade", true);
@@ -1620,7 +1620,7 @@ void GetServerCapsMain(SERVER *s, CAPSLIST *t)
AddCapsBool(t, "b_tap_supported", GetOsInfo()->OsType == OSTYPE_LINUX ? true : false);
}
// Cascade connction
// Cascade connection
if (s->ServerType == SERVER_TYPE_STANDALONE)
{
AddCapsBool(t, "b_support_cascade", true);
@@ -2794,7 +2794,7 @@ void SiInitConfiguration(SERVER *s)
}
}
if (s->DisableDosProction)
if (s->DisableDosProtection)
{
DisableDosProtect();
}
@@ -5905,7 +5905,7 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f)
s->Cedar->DisableIPv6Listener = CfgGetBool(f, "DisableIPv6Listener");
// DoS
s->DisableDosProction = CfgGetBool(f, "DisableDosProction");
s->DisableDosProtection = CfgGetBool(f, "DisableDosProtection");
// Num Connections Per IP
SetMaxConnectionsPerIp(CfgGetInt(f, "MaxConnectionsPerIP"));
@@ -6329,7 +6329,7 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s)
CfgAddBool(f, "DisableIPv6Listener", s->Cedar->DisableIPv6Listener);
// DoS
CfgAddBool(f, "DisableDosProction", s->DisableDosProction);
CfgAddBool(f, "DisableDosProtection", s->DisableDosProtection);
// MaxConnectionsPerIP
CfgAddInt(f, "MaxConnectionsPerIP", GetMaxConnectionsPerIp());
+1 -1
View File
@@ -277,7 +277,7 @@ struct SERVER
bool DontBackupConfig; // Do not save a backup of the configuration automatically
bool BackupConfigOnlyWhenModified; // Save a backup of the configuration only if there is a modification
UINT ConfigRevision; // Configuration file revision
bool DisableDosProction; // Disable the DoS attack protection
bool DisableDosProtection; // Disable the DoS attack protection
UCHAR MyRandomKey[SHA1_SIZE]; // Their own random key
bool FarmControllerInited; // Initialization of farm controller has been completed
bool DisableDeadLockCheck; // Disable the deadlock check
+5 -5
View File
@@ -212,11 +212,11 @@ void SessionMain(SESSION *s)
s->NextConnectionTime = Tick64() + (UINT64)(s->ClientOption->AdditionalConnectionInterval * 1000);
}
s->NumConnectionsEatablished++;
s->NumConnectionsEstablished++;
s->CurrentConnectionEstablishTime = Tick64();
if (s->FirstConnectionEstablisiedTime == 0)
if (s->FirstConnectionEstablishedTime == 0)
{
s->FirstConnectionEstablisiedTime = Tick64();
s->FirstConnectionEstablishedTime = Tick64();
}
if (s->ServerMode == false && s->Cedar->Client != NULL)
@@ -919,7 +919,7 @@ void IncrementUserTraffic(HUB *hub, char *username, SESSION *s)
Unlock(s->TrafficLock);
}
// Cummulate the traffic information of the connection
// Cumulate the traffic information of the connection
void AddTrafficForSession(SESSION *s, TRAFFIC *t)
{
HUB *h;
@@ -980,7 +980,7 @@ void ClientAdditionalConnectChance(SESSION *s)
return;
}
if (s->IsRUDPSession && (s->Connection->AdditionalConnectionFailedCounter > MAX_ADDITONAL_CONNECTION_FAILED_COUNTER))
if (s->IsRUDPSession && (s->Connection->AdditionalConnectionFailedCounter > MAX_ADDITIONAL_CONNECTION_FAILED_COUNTER))
{
// Not to make a large amount of repeated connection retry within a certain time in the case of R-UDP session
return;
+4 -4
View File
@@ -265,9 +265,9 @@ struct SESSION
UINT NumDisconnected; // Number of socket disconnection
bool NoReconnectToSession; // Disable to reconnect to the session
char UnderlayProtocol[64]; // Physical communication protocol
UINT64 FirstConnectionEstablisiedTime; // Connection completion time of the first connection
UINT64 FirstConnectionEstablishedTime; // Connection completion time of the first connection
UINT64 CurrentConnectionEstablishTime; // Completion time of this connection
UINT NumConnectionsEatablished; // Number of connections established so far
UINT NumConnectionsEstablished; // Number of connections established so far
UINT AdjustMss; // MSS adjustment value
bool IsVPNClientAndVLAN_Win32; // Is the VPN Client session with a VLAN card (Win32)
@@ -309,7 +309,7 @@ struct SESSION
LIST *DelayedPacketList; // Delayed packet list
UINT Flag1;
USER *NumLoginIncrementUserObject; // User objects to increment the nymber of logins
USER *NumLoginIncrementUserObject; // User objects to increment the number of logins
HUB *NumLoginIncrementHubObject; // Virtual HUB object to increment the number of logins
UINT64 NumLoginIncrementTick; // Time to perform increment a number of log
@@ -317,7 +317,7 @@ struct SESSION
char FirstTimeHttpRedirectUrl[128]; // URL for redirection only the first time
UINT FirstTimeHttpAccessCheckIp; // IP address for access checking
// To examine the maximum number of alowed logging target packets per minute
// To examine the maximum number of allowed logging target packets per minute
UINT64 MaxLoggedPacketsPerMinuteStartTick; // Inspection start time
UINT CurrentNumPackets; // Current number of packets
+8 -8
View File
@@ -340,7 +340,7 @@ void RouteTrackingMain(SESSION *s)
UINT i;
bool route_to_server_erased = true;
bool is_vlan_want_to_be_default_gateway = false;
UINT vlan_default_gatewat_metric = 0;
UINT vlan_default_gateway_metric = 0;
UINT other_if_default_gateway_metric_min = INFINITE;
// Get whether the routing table have been changed
@@ -383,10 +383,10 @@ void RouteTrackingMain(SESSION *s)
{
// The virtual LAN card think that he want to be a default gateway
is_vlan_want_to_be_default_gateway = true;
vlan_default_gatewat_metric = e->Metric;
vlan_default_gateway_metric = e->Metric;
if (vlan_default_gatewat_metric >= 2 &&
t->OldDefaultGatewayMetric == (vlan_default_gatewat_metric - 1))
if (vlan_default_gateway_metric >= 2 &&
t->OldDefaultGatewayMetric == (vlan_default_gateway_metric - 1))
{
// Restore because the PPP server rewrites
// the routing table selfishly
@@ -408,7 +408,7 @@ void RouteTrackingMain(SESSION *s)
t->DefaultGatewayByVLan = ZeroMalloc(sizeof(ROUTE_ENTRY));
Copy(t->DefaultGatewayByVLan, e, sizeof(ROUTE_ENTRY));
t->OldDefaultGatewayMetric = vlan_default_gatewat_metric;
t->OldDefaultGatewayMetric = vlan_default_gateway_metric;
}
else
{
@@ -509,10 +509,10 @@ void RouteTrackingMain(SESSION *s)
// there is no LAN card with smaller metric of 0.0.0.0/0 than
// the virtual LAN card, delete other default gateway entries
// to elect the virtual LAN card as the default gateway
// Debug("is_vlan_want_to_be_default_gateway = %u, rs = %u, route_to_server_erased = %u, other_if_default_gateway_metric_min = %u, vlan_default_gatewat_metric = %u\n",
// is_vlan_want_to_be_default_gateway, rs, route_to_server_erased, other_if_default_gateway_metric_min, vlan_default_gatewat_metric);
// Debug("is_vlan_want_to_be_default_gateway = %u, rs = %u, route_to_server_erased = %u, other_if_default_gateway_metric_min = %u, vlan_default_gateway_metric = %u\n",
// is_vlan_want_to_be_default_gateway, rs, route_to_server_erased, other_if_default_gateway_metric_min, vlan_default_gateway_metric);
if (is_vlan_want_to_be_default_gateway && (rs != NULL && route_to_server_erased == false) &&
other_if_default_gateway_metric_min >= vlan_default_gatewat_metric)
other_if_default_gateway_metric_min >= vlan_default_gateway_metric)
{
// Scan the routing table again
for (i = 0;i < table->NumEntry;i++)
+4 -4
View File
@@ -436,7 +436,7 @@ void NnCombineIp(NATIVE_NAT *t, IP_COMBINE *c, UINT offset, void *data, UINT siz
if (last_packet)
{
// If No More Flagment packet arrives, the size of this datagram is finalized
// If No More Fragment packet arrives, the size of this datagram is finalized
c->Size = offset + size;
}
@@ -1178,7 +1178,7 @@ void NnIpSendFragmentedForInternet(NATIVE_NAT *t, UCHAR ip_protocol, UINT src_ip
ip->TypeOfService = DEFAULT_IP_TOS;
ip->TotalLength = Endian16((USHORT)(size + IP_HEADER_SIZE));
ip->Identification = Endian16(id);
ip->FlagsAndFlagmentOffset[0] = ip->FlagsAndFlagmentOffset[1] = 0;
ip->FlagsAndFragmentOffset[0] = ip->FlagsAndFragmentOffset[1] = 0;
IPV4_SET_OFFSET(ip, (offset / 8));
if ((offset + size) >= total_size)
{
@@ -7637,7 +7637,7 @@ void CombineIp(VH *v, IP_COMBINE *c, UINT offset, void *data, UINT size, bool la
if (last_packet)
{
// If No More Flagment packet arrives, the size of this datagram is finalized
// If No More Fragment packet arrives, the size of this datagram is finalized
c->Size = offset + size;
}
@@ -8847,7 +8847,7 @@ void SendFragmentedIp(VH *v, UINT dest_ip, UINT src_ip, USHORT id, USHORT total_
ip->TypeOfService = DEFAULT_IP_TOS;
ip->TotalLength = Endian16((USHORT)(size + IP_HEADER_SIZE));
ip->Identification = Endian16(id);
ip->FlagsAndFlagmentOffset[0] = ip->FlagsAndFlagmentOffset[1] = 0;
ip->FlagsAndFragmentOffset[0] = ip->FlagsAndFragmentOffset[1] = 0;
IPV4_SET_OFFSET(ip, (offset / 8));
if ((offset + size) >= total_size)
{
+2 -2
View File
@@ -214,7 +214,7 @@ UINT UpdateConfigDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void
LoadUpdateUiSetting(u, &s);
Check(hWnd, S_ENABLE, s.DisableCheck == false);
Check(hWnd, S_DISBLE, s.DisableCheck);
Check(hWnd, S_DISABLE, s.DisableCheck);
DlgFont(hWnd, S_TITLE, 10, true);
FormatText(hWnd, S_TITLE, u->SoftwareTitle);
@@ -246,7 +246,7 @@ UINT UpdateConfigDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void
LABEL_CLOSE:
LoadUpdateUiSetting(u, &s);
s.DisableCheck = IsChecked(hWnd, S_DISBLE);
s.DisableCheck = IsChecked(hWnd, S_DISABLE);
if (s.DisableCheck)
{
+2 -2
View File
@@ -306,7 +306,7 @@ struct _PACKET_OID_DATA {
ULONG Oid; ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h
///< for a complete list of valid codes.
ULONG Length; ///< Length of the data field
UCHAR Data[1]; ///< variable-lenght field that contains the information passed to or received
UCHAR Data[1]; ///< variable-length field that contains the information passed to or received
///< from the adapter.
};
typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA;
@@ -346,7 +346,7 @@ LONG PacketDumpRegistryKey(PCHAR KeyName, PCHAR FileName);
#endif
#endif
/* We load dinamically the dag library in order link it only when it's present on the system */
/* We load dynamically the dag library in order link it only when it's present on the system */
#ifdef HAVE_DAG_API
typedef dagc_t* (*dagc_open_handler)(const char *source, unsigned flags, char *ebuf); ///< prototype used to dynamically load the dag dll
typedef void (*dagc_close_handler)(dagc_t *dagcfd); ///< prototype used to dynamically load the dag dll
+1 -1
View File
@@ -445,7 +445,7 @@ struct bpf_version {
* interface (irdaX), but not on a raw serial port.
* Note the capture is done in "Linux-cooked" mode, so each packet include
* a fake packet header (struct sll_header). This is because IrDA packet
* decoding is dependant on the direction of the packet (incomming or
* decoding is dependant on the direction of the packet (incoming or
* outgoing).
* When/if other platform implement IrDA capture, we may revisit the
* issue and define a real DLT_IRDA...
+2 -2
View File
@@ -128,7 +128,7 @@ struct pcap_md {
\brief It keeps the number of packets that have been received by the application.
Packets dropped by the kernel buffer are not counted in this variable. The variable is always
equal to (TotAccepted - TotDrops), exept for the case of remote capture, in which we have also
equal to (TotAccepted - TotDrops), except for the case of remote capture, in which we have also
packets in fligh, i.e. that have been transmitted by the remote host, but that have not been
received (yet) from the client. In this case, (TotAccepted - TotDrops - TotNetDrops) gives a
wrong result, since this number does not corresponds always to the number of packet received by
@@ -228,7 +228,7 @@ struct pcap {
SOCKET rmt_sockctrl; //!< socket ID of the socket used for the control connection
SOCKET rmt_sockdata; //!< socket ID of the socket used for the data connection
int rmt_flags; //!< we have to save flags, since they are passed by the pcap_open_live(), but they are used by the pcap_startcapture()
int rmt_capstarted; //!< 'true' if the capture is already started (needed to knoe if we have to call the pcap_startcapture()
int rmt_capstarted; //!< 'true' if the capture is already started (needed to know if we have to call the pcap_startcapture()
struct pcap_samp rmt_samp; //!< Keeps the parameters related to the sampling process.
char *currentfilter; //!< Pointer to a buffer (allocated at run-time) that stores the current filter. Needed when flag PCAP_OPENFLAG_NOCAPTURE_RPCAP is turned on.
#endif /* HAVE_REMOTE */
+1 -1
View File
@@ -543,7 +543,7 @@ enum {
PTHREAD_SCOPE_SYSTEM = 1, /* Default */
/*
* pthread_setcancelstate paramters
* pthread_setcancelstate parameters
*/
PTHREAD_CANCEL_ENABLE = 0, /* Default */
PTHREAD_CANCEL_DISABLE = 1,
+5 -5
View File
@@ -118,15 +118,15 @@ extern "C" {
- rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol]
- rpcap://host/devicename [opens the selected device available on a remote host]
- rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP]
- adaptername [to open a local adapter; kept for compability, but it is strongly discouraged]
- (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged]
- adaptername [to open a local adapter; kept for compatibility, but it is strongly discouraged]
- (NULL) [to open the first local adapter; kept for compatibility, but it is strongly discouraged]
The formats allowed by the pcap_findalldevs_ex() are the following:
- file://folder/ [lists all the files in the given folder]
- rpcap:// [lists all local adapters]
- rpcap://host:port/ [lists the devices available on a remote host]
Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since
Referring to the 'host' and 'port' parameters, they can be either numeric or literal. Since
IPv6 is fully supported, these are the allowed formats:
- host (literal): e.g. host.foo.bar
@@ -299,7 +299,7 @@ extern "C" {
/*!
\brief This structure keeps the information needed to autheticate
\brief This structure keeps the information needed to authenticate
the user on a remote machine.
The remote machine can either grant or refuse the access according
@@ -371,7 +371,7 @@ struct pcap_samp
//! Maximum lenght of an host name (needed for the RPCAP active mode)
//! Maximum length of an host name (needed for the RPCAP active mode)
#define RPCAP_HOSTLIST_SIZE 1024