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.

419 lines
9.1 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. srvconfg.h
  5. Abstract:
  6. This module defines global configuration data for the LAN Manager
  7. server.
  8. Author:
  9. Chuck Lenzmeier (chuckl) 31-Dec-1989
  10. Revision History:
  11. --*/
  12. #ifndef _SRVCONFG_
  13. #define _SRVCONFG_
  14. //#include <ntos.h>
  15. //#include "srvconst.h"
  16. //
  17. // All global variables referenced in this module are defined in
  18. // srvconfg.c. See that module for complete descriptions.
  19. //
  20. // The variables referenced herein, because they are part of the driver
  21. // image, are not pageable.
  22. //
  23. //
  24. // Product type and server size.
  25. //
  26. extern BOOLEAN SrvProductTypeServer; // FALSE for Workstation, TRUE for Server
  27. extern ULONG SrvServerSize;
  28. //
  29. // Server "heuristics", enabling various capabilities.
  30. //
  31. extern BOOLEAN SrvEnableOplocks;
  32. extern BOOLEAN SrvEnableFcbOpens;
  33. extern BOOLEAN SrvEnableSoftCompatibility;
  34. extern BOOLEAN SrvEnableRawMode;
  35. //
  36. // Receive buffer size, receive work item count, and receive IRP stack
  37. // size.
  38. //
  39. extern CLONG SrvReceiveBufferLength;
  40. extern CLONG SrvReceiveBufferSize;
  41. extern CLONG SrvInitialReceiveWorkItemCount;
  42. extern CLONG SrvMaxReceiveWorkItemCount;
  43. extern CLONG SrvInitialRawModeWorkItemCount;
  44. extern CLONG SrvMaxRawModeWorkItemCount;
  45. extern CCHAR SrvReceiveIrpStackSize;
  46. extern CLONG SrvReceiveIrpSize;
  47. extern CLONG SrvReceiveMdlSize;
  48. extern CLONG SrvMaxMdlSize;
  49. //
  50. // Minimum negotiated buffer size we'll allow from a client
  51. //
  52. extern CLONG SrvMinClientBufferSize;
  53. //
  54. // Minimum and maximum number of free connections for an endpoint. When
  55. // the minimum is reached, the resource thread creates more. When the
  56. // maximum is reached, connections are closed as they are disconnected.
  57. //
  58. extern ULONG SrvFreeConnectionMinimum;
  59. extern ULONG SrvFreeConnectionMaximum;
  60. //
  61. // Initial and maximum table sizes.
  62. //
  63. extern USHORT SrvInitialSessionTableSize;
  64. extern USHORT SrvMaxSessionTableSize;
  65. extern USHORT SrvInitialTreeTableSize;
  66. extern USHORT SrvMaxTreeTableSize;
  67. extern USHORT SrvInitialFileTableSize;
  68. extern USHORT SrvMaxFileTableSize;
  69. extern USHORT SrvInitialSearchTableSize;
  70. extern USHORT SrvMaxSearchTableSize;
  71. //
  72. // Core search timeouts. The first is for active core searches, the second
  73. // is for core searches where we have returned STATUS_NO_MORE_FILES. The
  74. // second should be shorter, as these are presumably complete.
  75. //
  76. extern LARGE_INTEGER SrvSearchMaxTimeout;
  77. //
  78. // Should we remove duplicate searches?
  79. //
  80. extern BOOLEAN SrvRemoveDuplicateSearches;
  81. //
  82. // restrict null session access ?
  83. //
  84. extern BOOLEAN SrvRestrictNullSessionAccess;
  85. //
  86. // This flag is needed to enable old (snowball) clients to connect to the
  87. // server over direct hosted ipx. It is disabled by default because
  88. // snowball ipx clients don't do pipes correctly.
  89. //
  90. extern BOOLEAN SrvEnableWfW311DirectIpx;
  91. //
  92. // The maximum number of threads allowed on each work queue. The
  93. // server tries to minimize the number of threads -- this value is
  94. // just to keep the threads from getting out of control.
  95. //
  96. // Since the blocking work queue is not per-processor, the max thread
  97. // count for the blocking work queue is the following value times the
  98. // number of processors in the system.
  99. //
  100. extern ULONG SrvMaxThreadsPerQueue;
  101. //
  102. // Load balancing variables
  103. //
  104. extern ULONG SrvPreferredAffinity;
  105. extern ULONG SrvOtherQueueAffinity;
  106. extern ULONG SrvBalanceCount;
  107. extern LARGE_INTEGER SrvQueueCalc;
  108. //
  109. // Scavenger thread idle wait time.
  110. //
  111. extern LARGE_INTEGER SrvScavengerTimeout;
  112. extern ULONG SrvScavengerTimeoutInSeconds;
  113. //
  114. // Various information variables for the server.
  115. //
  116. extern USHORT SrvMaxMpxCount;
  117. //
  118. // This is supposed to indicate how many virtual connections are allowed
  119. // between this server and client machines. It should always be set to
  120. // one, though more VCs can be established. This duplicates the LM 2.0
  121. // server's behavior.
  122. //
  123. extern CLONG SrvMaxNumberVcs;
  124. //
  125. // Receive work item thresholds
  126. //
  127. //
  128. // The minimum desirable number of free receive work items.
  129. //
  130. extern CLONG SrvMinReceiveQueueLength;
  131. //
  132. // The number of freed RFCBs that we keep internally, per processor
  133. //
  134. extern CLONG SrvMaxFreeRfcbs;
  135. //
  136. // The number of freed MFCBs that we keep internally, per processor
  137. //
  138. extern CLONG SrvMaxFreeMfcbs;
  139. //
  140. // Enforced maximum size of a saved pool chunk per processor
  141. //
  142. extern CLONG SrvMaxPagedPoolChunkSize;
  143. //
  144. // Enforced maximum size of a saved non paged pool chunk per processor
  145. //
  146. extern CLONG SrvMaxNonPagedPoolChunkSize;
  147. //
  148. // The minimum number of free receive work items available before
  149. // the server will start processing a potentially blocking SMB.
  150. //
  151. extern CLONG SrvMinFreeWorkItemsBlockingIo;
  152. //
  153. // The number of cached directory names per connection
  154. //
  155. extern CLONG SrvMaxCachedDirectory;
  156. //
  157. // Size of the shared memory section used for communication between the
  158. // server and XACTSRV.
  159. //
  160. extern LARGE_INTEGER SrvXsSectionSize;
  161. //
  162. // The time sessions may be idle before they are automatically
  163. // disconnected. The scavenger thread does the disconnecting.
  164. //
  165. extern LARGE_INTEGER SrvAutodisconnectTimeout;
  166. extern ULONG SrvIpxAutodisconnectTimeout;
  167. //
  168. // The time a connection structure can hang around without any sessions
  169. //
  170. extern ULONG SrvConnectionNoSessionsTimeout;
  171. //
  172. // The maximum number of users the server will permit.
  173. //
  174. extern ULONG SrvMaxUsers;
  175. //
  176. // Priority of server worker and blocking threads.
  177. //
  178. extern KPRIORITY SrvThreadPriority;
  179. //
  180. // The time to wait before timing out a wait for oplock break.
  181. //
  182. extern LARGE_INTEGER SrvWaitForOplockBreakTime;
  183. //
  184. // The time to wait before timing out a an oplock break request.
  185. //
  186. extern LARGE_INTEGER SrvWaitForOplockBreakRequestTime;
  187. //
  188. // This BOOLEAN determines whether files with oplocks that have had
  189. // an oplock break outstanding for longer than SrvWaitForOplockBreakTime
  190. // should be closed or if the subsequest opens should fail.
  191. //
  192. extern BOOLEAN SrvEnableOplockForceClose;
  193. //
  194. // Overall limits on server memory usage.
  195. //
  196. extern ULONG SrvMaxPagedPoolUsage;
  197. extern ULONG SrvMaxNonPagedPoolUsage;
  198. //
  199. // This BOOLEAN indicates whether the forced logoff code in the scavenger
  200. // thread should actually disconnect a user that remains on beyond
  201. // his logon hours, or just send messages coaxing them to log off.
  202. //
  203. extern BOOLEAN SrvEnableForcedLogoff;
  204. //
  205. // The delay and throughput thresholds used to determine if a link
  206. // is unreliable. The delay is in 100ns. The Throughput is in bytes/s
  207. // SrvLinkInfoValidTime is the time within which the link info is still
  208. // considered valid.
  209. //
  210. extern LARGE_INTEGER SrvMaxLinkDelay;
  211. extern LARGE_INTEGER SrvMinLinkThroughput;
  212. extern LARGE_INTEGER SrvLinkInfoValidTime;
  213. extern LONG SrvScavengerUpdateQosCount;
  214. //
  215. // Used to determine how long a work context block can stay idle
  216. // before being freed.
  217. //
  218. extern ULONG SrvWorkItemMaxIdleTime;
  219. //
  220. // Alert information
  221. //
  222. extern LARGE_INTEGER SrvAlertSchedule;
  223. extern ULONG SrvAlertMinutes;
  224. extern ULONG SrvFreeDiskSpaceThreshold;
  225. extern ULONG SrvFreeDiskSpaceCeiling;
  226. extern ULONG SrvDiskConfiguration;
  227. //
  228. // List of pipes and shares that can be opened by the NULL session.
  229. //
  230. extern PWSTR *SrvNullSessionPipes;
  231. extern PWSTR *SrvNullSessionShares;
  232. #if SRVNTVERCHK
  233. //
  234. // List of domain names that we disallow
  235. //
  236. extern PWSTR *SrvInvalidDomainNames;
  237. #endif
  238. //
  239. // List of pipes that are not remapped, even when we are in a cluster environment
  240. //
  241. extern PWSTR *SrvNoRemapPipeNames;
  242. //
  243. // List of error codes that we do not log to the error log
  244. //
  245. extern NTSTATUS SrvErrorLogIgnore[ SRVMAXERRLOGIGNORE + 1 ];
  246. //
  247. // List of pipes that require a license from the license server
  248. //
  249. extern PWSTR *SrvPipesNeedLicense;
  250. //
  251. // Interval at which SMB statistics are calculated.
  252. //
  253. #define STATISTICS_SMB_INTERVAL 16
  254. //
  255. // Interval at which each thread determines the current system time
  256. //
  257. #define TIME_SMB_INTERVAL 16
  258. //
  259. // Delay and number of retries for opens returning sharing violation
  260. //
  261. extern ULONG SrvSharingViolationRetryCount;
  262. extern LARGE_INTEGER SrvSharingViolationDelay;
  263. //
  264. // Delay for lock requests returning lock violation
  265. //
  266. extern ULONG SrvLockViolationDelay;
  267. extern LARGE_INTEGER SrvLockViolationDelayRelative;
  268. extern ULONG SrvLockViolationOffset;
  269. //
  270. // Upper limit for searches.
  271. //
  272. extern ULONG SrvMaxOpenSearches;
  273. //
  274. // length to switchover to mdl read
  275. //
  276. extern ULONG SrvMdlReadSwitchover;
  277. extern ULONG SrvMpxMdlReadSwitchover;
  278. //
  279. // maximum length of buffers to copy, rather than take the whole buffer.
  280. // currently this is only enabled for WRITE_MPX on direct host IPX.
  281. //
  282. extern ULONG SrvMaxCopyLength;
  283. //
  284. // Globally unique id identifying this server
  285. //
  286. extern
  287. GUID ServerGuid;
  288. //
  289. // Number of open files that can be cached after close.
  290. //
  291. extern ULONG SrvCachedOpenLimit;
  292. //
  293. // Does the server support compressed read/write transfers?
  294. //
  295. extern BOOLEAN SrvSupportsCompression;
  296. //
  297. // *** Change the following defines to limit WinNT (vs. NTAS) parameters.
  298. //
  299. // *** If you make a change here, you need to make the same change in
  300. // srvsvc\server\srvconfg.h!
  301. #define MAX_USERS_WKSTA 10
  302. #define MAX_MAXWORKITEMS_WKSTA 64
  303. #define MAX_THREADS_WKSTA 5
  304. #define MAX_USERS_PERSONAL 5
  305. #define MAX_USERS_WEB_BLADE 10
  306. #endif // def _SRVCONFG_