mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
Windows: rx lowlevel nat ping
sha1 d24078658d
added support
for a low-level nat ping using rx version replies.
Export rx_SetConnSecondsUntilNatPing from afsrpc.dll.
Add NatPingInterval registry value to
HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
to permit Nat Ping to be enabled. The default value is 0 seconds.
Change-Id: I5122ea81e1a61934eba3c836632039c76f6c45e3
Reviewed-on: http://gerrit.openafs.org/1487
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
8b898af1b3
commit
8ade30f3f1
@ -27,6 +27,7 @@ DWORD RDRtimeout = CM_CONN_DEFAULTRDRTIMEOUT;
|
||||
unsigned short ConnDeadtimeout = CM_CONN_CONNDEADTIME;
|
||||
unsigned short HardDeadtimeout = CM_CONN_HARDDEADTIME;
|
||||
unsigned short IdleDeadtimeout = CM_CONN_IDLEDEADTIME;
|
||||
unsigned short NatPingInterval = CM_CONN_NATPINGINTERVAL;
|
||||
|
||||
#define LANMAN_WKS_PARAM_KEY "SYSTEM\\CurrentControlSet\\Services\\lanmanworkstation\\parameters"
|
||||
#define LANMAN_WKS_SESSION_TIMEOUT "SessTimeout"
|
||||
@ -121,6 +122,13 @@ void cm_InitConn(void)
|
||||
IdleDeadtimeout = (unsigned short)dwValue;
|
||||
afsi_log("IdleDeadTimeout is %d", IdleDeadtimeout);
|
||||
}
|
||||
dummyLen = sizeof(DWORD);
|
||||
code = RegQueryValueEx(parmKey, "NatPingInterval", NULL, NULL,
|
||||
(BYTE *) &dwValue, &dummyLen);
|
||||
if (code == ERROR_SUCCESS) {
|
||||
NatPingInterval = (unsigned short)dwValue;
|
||||
}
|
||||
afsi_log("NatPingInterval is %d", NatPingInterval);
|
||||
RegCloseKey(parmKey);
|
||||
}
|
||||
|
||||
@ -1103,6 +1111,8 @@ static void cm_NewRXConnection(cm_conn_t *tcp, cm_ucell_t *ucellp,
|
||||
rx_SetConnDeadTime(tcp->rxconnp, ConnDeadtimeout);
|
||||
rx_SetConnHardDeadTime(tcp->rxconnp, HardDeadtimeout);
|
||||
rx_SetConnIdleDeadTime(tcp->rxconnp, IdleDeadtimeout);
|
||||
if (NatPingInterval)
|
||||
rx_SetConnSecondsUntilNatPing(tcp->rxconnp, NatPingInterval);
|
||||
tcp->ucgen = ucellp->gen;
|
||||
if (secObjp)
|
||||
rxs_Release(secObjp); /* Decrement the initial refCount */
|
||||
|
@ -20,6 +20,9 @@
|
||||
#ifndef CM_CONN_IDLEDEADTIME
|
||||
#define CM_CONN_IDLEDEADTIME 0
|
||||
#endif
|
||||
#ifndef CM_CONN_NATPINGINTERVAL
|
||||
#define CM_CONN_NATPINGINTERVAL 0
|
||||
#endif
|
||||
|
||||
extern unsigned short ConnDeadtimeout;
|
||||
extern unsigned short HardDeadtimeout;
|
||||
|
@ -258,6 +258,7 @@ EXPORTS
|
||||
xdr_serverList @263
|
||||
xdr_Capabilities @264
|
||||
xdrlen_create @265
|
||||
rx_SetConnSecondsUntilNatPing @266
|
||||
|
||||
; for performance testing
|
||||
rx_TSFPQGlobSize @2001 DATA
|
||||
|
Loading…
Reference in New Issue
Block a user