Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

745 lines
19 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. srvdata.h
  5. Abstract:
  6. This module defines global data for the LAN Manager server.
  7. Author:
  8. Chuck Lenzmeier (chuckl) 22-Sep-1989
  9. Revision History:
  10. --*/
  11. #ifndef _SRVDATA_
  12. #define _SRVDATA_
  13. //#include <ntos.h>
  14. //#include "lock.h"
  15. //#include "srvconst.h"
  16. //#include "smbtypes.h"
  17. //
  18. // All global variables referenced in this module are defined in
  19. // srvdata.c. See that module for complete descriptions.
  20. //
  21. // The variables referenced herein, because they are part of the driver
  22. // image, are not pageable. However, some of the things pointed to by
  23. // these variables are in the FSP's address space and are pageable.
  24. // These variables are only accessed by the FSP, and only at low IRQL.
  25. // Any data referenced by the FSP at elevated IRQL or by the FSD must
  26. // be nonpageable.
  27. //
  28. //
  29. // Routine to initialize data structures contained herein that cannot
  30. // be statically initialized.
  31. //
  32. VOID
  33. SrvInitializeData (
  34. VOID
  35. );
  36. //
  37. // Routine to clean up global server data when the driver is unloaded.
  38. //
  39. VOID
  40. SrvTerminateData (
  41. VOID
  42. );
  43. //
  44. // This is an enum structure that enumerates all the routines in the
  45. // SrvSmbDispatchTable. This is done for convenience only. Note that
  46. // this will only work if this list corresponds exactly to
  47. // SrvSmbDispatchTable.
  48. //
  49. typedef enum _SRV_SMB_INDEX {
  50. ISrvSmbIllegalCommand,
  51. ISrvSmbCreateDirectory,
  52. ISrvSmbDeleteDirectory,
  53. ISrvSmbOpen,
  54. ISrvSmbCreate,
  55. ISrvSmbClose,
  56. ISrvSmbFlush,
  57. ISrvSmbDelete,
  58. ISrvSmbRename,
  59. ISrvSmbQueryInformation,
  60. ISrvSmbSetInformation,
  61. ISrvSmbRead,
  62. ISrvSmbWrite,
  63. ISrvSmbLockByteRange,
  64. ISrvSmbUnlockByteRange,
  65. ISrvSmbCreateTemporary,
  66. ISrvSmbCheckDirectory,
  67. ISrvSmbProcessExit,
  68. ISrvSmbSeek,
  69. ISrvSmbLockAndRead,
  70. ISrvSmbSetInformation2,
  71. ISrvSmbQueryInformation2,
  72. ISrvSmbLockingAndX,
  73. ISrvSmbTransaction,
  74. ISrvSmbTransactionSecondary,
  75. ISrvSmbIoctl,
  76. ISrvSmbIoctlSecondary,
  77. ISrvSmbMove,
  78. ISrvSmbEcho,
  79. ISrvSmbOpenAndX,
  80. ISrvSmbReadAndX,
  81. ISrvSmbWriteAndX,
  82. ISrvSmbFindClose2,
  83. ISrvSmbFindNotifyClose,
  84. ISrvSmbTreeConnect,
  85. ISrvSmbTreeDisconnect,
  86. ISrvSmbNegotiate,
  87. ISrvSmbSessionSetupAndX,
  88. ISrvSmbLogoffAndX,
  89. ISrvSmbTreeConnectAndX,
  90. ISrvSmbQueryInformationDisk,
  91. ISrvSmbSearch,
  92. ISrvSmbNtTransaction,
  93. ISrvSmbNtTransactionSecondary,
  94. ISrvSmbNtCreateAndX,
  95. ISrvSmbNtCancel,
  96. ISrvSmbOpenPrintFile,
  97. ISrvSmbClosePrintFile,
  98. ISrvSmbGetPrintQueue,
  99. ISrvSmbReadRaw,
  100. ISrvSmbWriteRaw,
  101. ISrvSmbReadMpx,
  102. ISrvSmbWriteMpx,
  103. ISrvSmbWriteMpxSecondary
  104. } SRV_SMB_INDEX;
  105. //
  106. // Address of the server device object.
  107. //
  108. extern PDEVICE_OBJECT SrvDeviceObject;
  109. //
  110. // Fields describing the state of the FSP.
  111. //
  112. extern BOOLEAN SrvFspActive; // Indicates whether the FSP is running
  113. extern BOOLEAN SrvFspTransitioning; // Indicates that the server is in the
  114. // process of starting up or
  115. // shutting down
  116. extern PEPROCESS SrvServerProcess; // Pointer to the initial system process
  117. extern PEPROCESS SrvSvcProcess; // Pointer to the service controller process
  118. extern BOOLEAN SrvCompletedPNPRegistration; // Indicates whether the FSP has completed
  119. // registering for PNP notifications
  120. //
  121. // Endpoint variables. SrvEndpointCount is used to count the number of
  122. // active endpoints. When the last endpoint is closed, SrvEndpointEvent
  123. // is set so that the thread processing the shutdown request continues
  124. // server termination.
  125. //
  126. extern CLONG SrvEndpointCount; // Number of transport endpoints
  127. extern KEVENT SrvEndpointEvent; // Signaled when no active endpoints
  128. //
  129. // DMA alignment size
  130. //
  131. extern ULONG SrvCacheLineSize;
  132. //
  133. // Global spin locks.
  134. //
  135. extern SRV_GLOBAL_SPIN_LOCKS SrvGlobalSpinLocks;
  136. #if SRVDBG || SRVDBG_HANDLES
  137. //
  138. // Lock used to protect debugging structures.
  139. //
  140. extern SRV_LOCK SrvDebugLock;
  141. #endif
  142. //
  143. // SrvConfigurationLock is used to synchronize configuration requests.
  144. //
  145. extern SRV_LOCK SrvConfigurationLock;
  146. //
  147. // SrvStartupShutdownLock is used to synchronize driver starting and stopping
  148. //
  149. extern SRV_LOCK SrvStartupShutdownLock;
  150. //
  151. // SrvEndpointLock serializes access to the global endpoint list and
  152. // all endpoints. Note that the list of connections in each endpoint
  153. // is also protected by this lock.
  154. //
  155. extern SRV_LOCK SrvEndpointLock;
  156. //
  157. // SrvShareLock protects all shares.
  158. //
  159. extern SRV_LOCK SrvShareLock;
  160. //
  161. // The number of processors in the system
  162. //
  163. extern ULONG SrvNumberOfProcessors;
  164. //
  165. // Work queues -- nonblocking, blocking, and critical.
  166. //
  167. #if MULTIPROCESSOR
  168. extern PBYTE SrvWorkQueuesBase;
  169. extern PWORK_QUEUE SrvWorkQueues;
  170. #else
  171. extern WORK_QUEUE SrvWorkQueues[1];
  172. #endif
  173. extern PWORK_QUEUE eSrvWorkQueues; // used to terminate 'for' loops
  174. extern WORK_QUEUE SrvBlockingWorkQueue;
  175. extern ULONG SrvReBalanced; // how often we've picked another CPU
  176. extern ULONG SrvNextBalanceProcessor; // Which processor we'll look for next
  177. extern CLONG SrvBlockingOpsInProgress;
  178. //
  179. // Various list heads.
  180. //
  181. extern LIST_ENTRY SrvNeedResourceQueue; // The need resource queue
  182. extern LIST_ENTRY SrvDisconnectQueue; // The disconnect queue
  183. //
  184. // Queue of connections that needs to be dereferenced.
  185. //
  186. extern SLIST_HEADER SrvBlockOrphanage;
  187. //
  188. // FSP configuration queue. The FSD puts configuration request IRPs
  189. // (from NtDeviceIoControlFile) on this queue, and it is serviced by an
  190. // EX worker thread.
  191. //
  192. extern LIST_ENTRY SrvConfigurationWorkQueue;
  193. //
  194. // This is the number of configuration IRPs which have been queued but not
  195. // yet completed.
  196. //
  197. extern ULONG SrvConfigurationIrpsInProgress;
  198. //
  199. // Work item for running the configuration thread in the context of an
  200. // EX worker thread.
  201. extern WORK_QUEUE_ITEM SrvConfigurationThreadWorkItem[ MAX_CONFIG_WORK_ITEMS ];
  202. //
  203. // Base address of the large block allocated to hold initial normal
  204. // work items (see blkwork.c\SrvAllocateInitialWorkItems).
  205. //
  206. extern PVOID SrvInitialWorkItemBlock;
  207. //
  208. // Work item used to run the resource thread. Booleans used to inform
  209. // the resource thread to continue running.
  210. //
  211. extern WORK_QUEUE_ITEM SrvResourceThreadWorkItem;
  212. extern BOOLEAN SrvResourceThreadRunning;
  213. extern BOOLEAN SrvResourceDisconnectPending;
  214. extern BOOLEAN SrvResourceFreeConnection;
  215. extern LONG SrvResourceOrphanedBlocks;
  216. //
  217. // Denial of Service monitoring variables for the Resource Thread
  218. //
  219. #define SRV_DOS_MINIMUM_DOS_WAIT_PERIOD (50*1000*10)
  220. #define SRV_DOS_TEARDOWN_MIN (LONG)MAX((SrvMaxReceiveWorkItemCount>>4),32)
  221. #define SRV_DOS_TEARDOWN_MAX (LONG)(SrvMaxReceiveWorkItemCount>>1)
  222. #define SRV_DOS_INCREASE_TEARDOWN() { \
  223. LONG lTearDown = InterlockedCompareExchange( &SrvDoSWorkItemTearDown, 0, 0 ); \
  224. LONG lNewTearDown = MIN(lTearDown+(lTearDown>>2), SRV_DOS_TEARDOWN_MAX); \
  225. SrvDoSRundownIncreased = TRUE; \
  226. InterlockedCompareExchange( &SrvDoSWorkItemTearDown, lNewTearDown, lTearDown ); \
  227. }
  228. #define SRV_DOS_DECREASE_TEARDOWN() { \
  229. LONG lTearDown = InterlockedCompareExchange( &SrvDoSWorkItemTearDown, 0, 0 ); \
  230. LONG lNewTearDown = MAX(lTearDown-(SRV_DOS_TEARDOWN_MIN), SRV_DOS_TEARDOWN_MIN); \
  231. if( lNewTearDown == SRV_DOS_TEARDOWN_MIN ) SrvDoSRundownIncreased = FALSE; \
  232. InterlockedCompareExchange( &SrvDoSWorkItemTearDown, lNewTearDown, lTearDown ); \
  233. }
  234. #define SRV_DOS_GET_TEARDOWN() InterlockedCompareExchange( &SrvDoSWorkItemTearDown, 0, 0 )
  235. #define SRV_DOS_IS_TEARDOWN_IN_PROGRESS() InterlockedCompareExchange( &SrvDoSTearDownInProgress, 0, 0 )
  236. #define SRV_DOS_CAN_START_TEARDOWN() !InterlockedCompareExchange( &SrvDoSTearDownInProgress, 1, 0 )
  237. #define SRV_DOS_COMPLETE_TEARDOWN() InterlockedCompareExchange( &SrvDoSTearDownInProgress, 0, 1 )
  238. extern LONG SrvDoSWorkItemTearDown;
  239. extern LONG SrvDoSTearDownInProgress; // Is a teardown in progress?
  240. extern BOOLEAN SrvDoSDetected;
  241. extern BOOLEAN SrvDoSRundownDetector; // Used to rundown the teardown amounts
  242. extern BOOLEAN SrvDoSRundownIncreased; // Have we increased the Rundown past the minimum
  243. extern BOOLEAN SrvDisableDoSChecking;
  244. extern SPECIAL_WORK_ITEM SrvDoSWorkItem;
  245. extern KSPIN_LOCK SrvDosSpinLock;
  246. extern LARGE_INTEGER SrvDoSLastRan;
  247. //
  248. // Should we disable strict name checking
  249. //
  250. extern BOOLEAN SrvDisableStrictNameChecking;
  251. //
  252. // Generic security mapping for connecting to shares
  253. //
  254. extern GENERIC_MAPPING SrvShareConnectMapping;
  255. //
  256. // What's the minumum # of free work items each processor should have?
  257. //
  258. extern ULONG SrvMinPerProcessorFreeWorkItems;
  259. //
  260. // The server has callouts to enable a smart card to accelerate its direct
  261. // host IPX performance. This is the vector of entry points.
  262. //
  263. extern SRV_IPX_SMART_CARD SrvIpxSmartCard;
  264. //
  265. // This is the name of the server computer. Returned in the negprot response
  266. //
  267. extern UNICODE_STRING SrvComputerName;
  268. //
  269. // The master file table contains one entry for each named file that has
  270. // at least one open instance.
  271. //
  272. extern MFCBHASH SrvMfcbHashTable[ NMFCB_HASH_TABLE ];
  273. //
  274. // The share table contains one entry for each share
  275. //
  276. extern LIST_ENTRY SrvShareHashTable[ NSHARE_HASH_TABLE ];
  277. //
  278. // Hex digits array used by the dump routines and SrvSmbCreateTemporary.
  279. //
  280. extern CHAR SrvHexChars[];
  281. #if SRVCATCH
  282. //
  283. // Are we looking for the special file?
  284. //
  285. extern UNICODE_STRING SrvCatch;
  286. extern PWSTR *SrvCatchBuf;
  287. extern UNICODE_STRING SrvCatchExt;
  288. extern PWSTR *SrvCatchExtBuf;
  289. extern ULONG SrvCatchShares;
  290. extern PWSTR *SrvCatchShareNames;
  291. #endif
  292. //
  293. // SMB dispatch table
  294. //
  295. extern UCHAR SrvSmbIndexTable[];
  296. typedef struct {
  297. PSMB_PROCESSOR Func;
  298. #if DBG
  299. LPSTR Name;
  300. #endif
  301. } SRV_SMB_DISPATCH_TABLE;
  302. extern SRV_SMB_DISPATCH_TABLE SrvSmbDispatchTable[];
  303. //
  304. // SMB word count table.
  305. //
  306. extern SCHAR SrvSmbWordCount[];
  307. //
  308. // Device prefix strings.
  309. //
  310. extern UNICODE_STRING SrvCanonicalNamedPipePrefix;
  311. extern UNICODE_STRING SrvNamedPipeRootDirectory;
  312. extern UNICODE_STRING SrvMailslotRootDirectory;
  313. //
  314. // Transaction2 dispatch table
  315. //
  316. extern PSMB_TRANSACTION_PROCESSOR SrvTransaction2DispatchTable[];
  317. extern PSMB_TRANSACTION_PROCESSOR SrvNtTransactionDispatchTable[];
  318. extern SRV_STATISTICS SrvStatistics;
  319. #if SRVDBG_STATS || SRVDBG_STATS2
  320. extern SRV_STATISTICS_DEBUG SrvDbgStatistics;
  321. #endif
  322. //
  323. // The number of abortive disconnects that the server has gotten
  324. //
  325. extern ULONG SrvAbortiveDisconnects;
  326. //
  327. // Server environment information strings.
  328. //
  329. extern UNICODE_STRING SrvNativeOS;
  330. extern OEM_STRING SrvOemNativeOS;
  331. extern UNICODE_STRING SrvNativeLanMan;
  332. extern OEM_STRING SrvOemNativeLanMan;
  333. extern UNICODE_STRING SrvSystemRoot;
  334. //
  335. // The following will be a permanent handle and device object pointer
  336. // to NPFS.
  337. //
  338. extern HANDLE SrvNamedPipeHandle;
  339. extern PDEVICE_OBJECT SrvNamedPipeDeviceObject;
  340. extern PFILE_OBJECT SrvNamedPipeFileObject;
  341. //
  342. // The following are used to converse with the Dfs driver
  343. //
  344. extern PFAST_IO_DEVICE_CONTROL SrvDfsFastIoDeviceControl;
  345. extern PDEVICE_OBJECT SrvDfsDeviceObject;
  346. extern PFILE_OBJECT SrvDfsFileObject;
  347. //
  348. // The following will be a permanent handle and device object pointer
  349. // to MSFS.
  350. //
  351. extern HANDLE SrvMailslotHandle;
  352. extern PDEVICE_OBJECT SrvMailslotDeviceObject;
  353. extern PFILE_OBJECT SrvMailslotFileObject;
  354. //
  355. // Flag indicating XACTSRV whether is active, and resource synchronizing
  356. // access to XACTSRV-related variabled.
  357. //
  358. extern BOOLEAN SrvXsActive;
  359. extern ERESOURCE SrvXsResource;
  360. //
  361. // Handle to the unnamed shared memory and communication port used for
  362. // communication between the server and XACTSRV.
  363. //
  364. extern HANDLE SrvXsSectionHandle;
  365. extern HANDLE SrvXsPortHandle;
  366. //
  367. // Pointers to control the unnamed shared memory for the XACTSRV LPC port.
  368. //
  369. extern PVOID SrvXsPortMemoryBase;
  370. extern ULONG_PTR SrvXsPortMemoryDelta;
  371. extern PVOID SrvXsPortMemoryHeap;
  372. //
  373. // Pointer to heap header for the special XACTSRV shared-memory heap.
  374. //
  375. extern PVOID SrvXsHeap;
  376. //
  377. // Dispatch table for handling server API requests.
  378. //
  379. extern PAPI_PROCESSOR SrvApiDispatchTable[];
  380. //
  381. // Names for the various types of clients.
  382. //
  383. extern UNICODE_STRING SrvClientTypes[];
  384. //
  385. // All the resumable Enum APIs use ordered lists for context-free
  386. // resume. All data blocks in the server that correspond to return
  387. // information for Enum APIs are maintained in ordered lists.
  388. //
  389. extern SRV_LOCK SrvOrderedListLock;
  390. extern ORDERED_LIST_HEAD SrvEndpointList;
  391. extern ORDERED_LIST_HEAD SrvRfcbList;
  392. extern ORDERED_LIST_HEAD SrvSessionList;
  393. extern ORDERED_LIST_HEAD SrvShareList;
  394. extern ORDERED_LIST_HEAD SrvTreeConnectList;
  395. // The DNS domain name for the domain
  396. extern PUNICODE_STRING SrvDnsDomainName;
  397. //
  398. // To synchronize server shutdown with API requests handled in the
  399. // server FSD, we track the number of outstanding API requests. The
  400. // shutdown code waits until all APIs have been completed to start
  401. // termination.
  402. //
  403. // SrvApiRequestCount tracks the active APIs in the FSD.
  404. // SrvApiCompletionEvent is set by the last API to complete, and the
  405. // shutdown code waits on it if there are outstanding APIs.
  406. //
  407. extern ULONG SrvApiRequestCount;
  408. extern KEVENT SrvApiCompletionEvent;
  409. //
  410. // Security contexts required for mutual authentication.
  411. // SrvKerberosLsaHandle and SrvLmLsaHandle are credentials of the server
  412. // principal. They are used to validate incoming kerberos tickets.
  413. // SrvNullSessionToken is a cached token handle representing the null session.
  414. //
  415. extern CtxtHandle SrvLmLsaHandle;
  416. extern CtxtHandle SrvNullSessionToken;
  417. extern CtxtHandle SrvExtensibleSecurityHandle;
  418. //
  419. // Oplock break information.
  420. //
  421. extern LIST_ENTRY SrvWaitForOplockBreakList;
  422. extern SRV_LOCK SrvOplockBreakListLock;
  423. extern LIST_ENTRY SrvOplockBreaksInProgressList;
  424. //
  425. // The default server security quality of service.
  426. //
  427. extern SECURITY_QUALITY_OF_SERVICE SrvSecurityQOS;
  428. //
  429. // A BOOLEAN to indicate whether the server is paused. If paused, the
  430. // server will not accept new tree connections from non-admin users.
  431. //
  432. extern BOOLEAN SrvPaused;
  433. //
  434. // Alerting information.
  435. //
  436. extern SRV_ERROR_RECORD SrvErrorRecord;
  437. extern SRV_ERROR_RECORD SrvNetworkErrorRecord;
  438. extern BOOLEAN SrvDiskAlertRaised[26];
  439. //
  440. // Counts of the number of times pool allocations have failed because
  441. // the server was at its configured pool limit.
  442. //
  443. extern ULONG SrvNonPagedPoolLimitHitCount;
  444. extern ULONG SrvPagedPoolLimitHitCount;
  445. //
  446. // SrvOpenCount counts the number of active opens of the server device.
  447. // This is used at server shutdown time to determine whether the server
  448. // service should unload the driver.
  449. //
  450. extern ULONG SrvOpenCount;
  451. //
  452. // Counters for logging resource shortage events during a scavenger pass.
  453. //
  454. extern ULONG SrvOutOfFreeConnectionCount;
  455. extern ULONG SrvOutOfRawWorkItemCount;
  456. extern ULONG SrvFailedBlockingIoCount;
  457. //
  458. // Current core search timeout time in seconds
  459. //
  460. extern ULONG SrvCoreSearchTimeout;
  461. //
  462. // SrvTimerList is a pool of timer/DPC structures available for use by
  463. // code that needs to start a timer.
  464. //
  465. extern SLIST_HEADER SrvTimerList;
  466. //
  467. // Name that should be displayed when doing a server alert.
  468. //
  469. extern PWSTR SrvAlertServiceName;
  470. //
  471. // Variable to store the number of tick counts for 5 seconds
  472. //
  473. extern ULONG SrvFiveSecondTickCount;
  474. //
  475. // Holds the PNP notification handle for TDI
  476. //
  477. extern HANDLE SrvTdiNotificationHandle;
  478. //
  479. // Flag indicating whether or not SMB security signatures are enabled.
  480. //
  481. extern BOOLEAN SrvSmbSecuritySignaturesEnabled;
  482. //
  483. // Flag indicating whether or not SMB security signatures are required. The signature
  484. // must match between the client and the server for the smb to be accepted.
  485. //
  486. extern BOOLEAN SrvSmbSecuritySignaturesRequired;
  487. //
  488. // Flag indicating whether or not SMB security signatures should be applied to W9x
  489. // clients.
  490. //
  491. extern BOOLEAN SrvEnableW9xSecuritySignatures;
  492. //
  493. // Security descriptor granting Administrator READ access.
  494. // Used to see if a client has administrative privileges
  495. //
  496. extern SECURITY_DESCRIPTOR SrvAdminSecurityDescriptor;
  497. //
  498. // Security descriptor granting Anonymous READ access.
  499. // Used to see if a client was an anonymous (null session) logon
  500. //
  501. extern SECURITY_DESCRIPTOR SrvNullSessionSecurityDescriptor;
  502. //
  503. // Flag indicating whether or not we need to filter extended characters
  504. // out of 8.3 names ourselves.
  505. //
  506. extern BOOLEAN SrvFilterExtendedCharsInPath;
  507. //
  508. // Flag indicating whether we enforce logoff times
  509. //
  510. extern BOOLEAN SrvEnforceLogoffTimes;
  511. //
  512. // Maximum amount of data that we'll allocate to support a METHOD_NEITHER Fsctl call
  513. //
  514. extern ULONG SrvMaxFsctlBufferSize;
  515. //
  516. // Maximum NT transaction size which we'll accept.
  517. //
  518. extern ULONG SrvMaxNtTransactionSize;
  519. //
  520. // Maximum size of large Read&X that we'll allow. We need to lock down a cache region
  521. // to service this request, so we don't want it to get too big
  522. //
  523. extern ULONG SrvMaxReadSize;
  524. //
  525. // Maximum size of a compressed write that we'll allow. We need to lock down a cache
  526. // region to service this request, so we dont' want it to get too big.
  527. //
  528. extern ULONG SrvMaxCompressedDataLength;
  529. //
  530. // When we receive an uncompressed large write from a client, we receive it in chunks,
  531. // locking & unlocking the file cache as we receive the data. SrvMaxWriteChunk is the
  532. // size of this 'chunk'. There's no magic to this chosen value.
  533. //
  534. extern ULONG SrvMaxWriteChunk;
  535. //
  536. // Handle used for PoRegisterSystemState calls
  537. //
  538. extern PVOID SrvPoRegistrationState;
  539. //
  540. // Counter used to suppress extraneous PoRegisterSystemStateCalls
  541. //
  542. extern ULONG SrvIdleCount;
  543. #if SRVNTVERCHK
  544. //
  545. // This is the minimum NT5 client build number that we will allow to connect to the server
  546. //
  547. extern ULONG SrvMinNT5Client;
  548. extern BOOLEAN SrvMinNT5ClientIPCToo;
  549. //
  550. // To force upgrades of our internal development community, we can set a
  551. // value in the registry that governs the minimum NT release that we allow
  552. // people to run to connect to this server. However, some folks have special
  553. // needs that preclude a forced upgrade. Presuming they have a static IP address,
  554. // you can add their address to the registry to exclude them from the build number
  555. // checking logic
  556. //
  557. extern DWORD SrvAllowIPAddress[25];
  558. //
  559. // If a server worker threads remains idle for this many ticks, then it terminate
  560. //
  561. extern LONGLONG SrvIdleThreadTimeOut;
  562. extern LARGE_INTEGER SrvLastDosAttackTime;
  563. extern ULONG SrvDOSAttacks;
  564. extern BOOLEAN SrvLogEventOnDOS;
  565. #endif
  566. //
  567. // These are used to track persistent connections/handles. The counters are
  568. // assigned to RFCBs, connections, and sessions.
  569. //
  570. #ifdef INCLUDE_SMB_PERSISTENT
  571. extern ULONG SrvGlobalPersistentSessionId;
  572. extern ULONG SrvGlobalPersistentRfcbId;
  573. #endif
  574. //
  575. // These are used for internal testing of the reauthentication code
  576. //
  577. extern USHORT SessionInvalidateCommand;
  578. extern USHORT SessionInvalidateMod;
  579. typedef struct _SRV_REAUTH_TEST_
  580. {
  581. USHORT InvalidateCommand;
  582. USHORT InvalidateModulo;
  583. } SRV_REAUTH_TEST, *PSRV_REAUTH_TEST;
  584. #endif // ndef _SRVDATA_