Leaked source code of windows server 2003
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.

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