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.

167 lines
4.8 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. srvconst.h
  5. Abstract:
  6. This module defines manifest constants for the LAN Manager server.
  7. Author:
  8. Chuck Lenzmeier (chuckl) 22-Sep-1989
  9. Revision History:
  10. --*/
  11. #ifndef _SRVCONST_
  12. #define _SRVCONST_
  13. // !!! #include <lmcons.h>
  14. // !!! The following constant should be gotten from netcons.h
  15. #define COMPUTER_NAME_LENGTH 15
  16. //
  17. // This is the size of the data for doing oplock breaks. Used to compute
  18. // round trip propagation delays.
  19. //
  20. #define SRV_PROPAGATION_DELAY_SIZE (ULONG) \
  21. (sizeof(SMB_HEADER) + sizeof(REQ_LOCKING_ANDX) + \
  22. sizeof(SMB_HEADER) + sizeof(RESP_LOCKING_ANDX) + 100)
  23. //
  24. // The number of slots in the error log record array, must be a power
  25. // of 2.
  26. //
  27. #define NUMBER_OF_SLOTS 8
  28. //
  29. // The number of entries in the SrvMfcbHashTable. Arbitrary.
  30. //
  31. #define NMFCB_HASH_TABLE 131
  32. //
  33. // The number of resources which guard entries in SrvMfcbHashTable. Only makes
  34. // sense for this number to be <= NMFCB_HASH_TABLE.
  35. //
  36. #define NMFCB_HASH_TABLE_LOCKS 10 // arbitrary
  37. //
  38. // The number of entries in the SrvShareHashTable. Arbitrary
  39. //
  40. #define NSHARE_HASH_TABLE 17
  41. //
  42. // The number of pieces of pool we'll hang onto in a LOOK_ASIDE_LIST
  43. // after deallocation for quick re-allocation. Per processor.
  44. // Involves a linear search...
  45. //
  46. #define LOOK_ASIDE_MAX_ELEMENTS 4
  47. //
  48. // Two look aside lists for quick pool allocation and deallocation are
  49. // kept, and a POOL_HEADER goes on one list or the other depending on
  50. // the size of the allocated block. This is to reduce memory wastage.
  51. // LOOK_ASIDE_SWITCHOVER is the maximum block size for a memory chunk
  52. // to end up on the SmallFreeList in the LOOK_ASIDE_LIST
  53. //
  54. #define LOOK_ASIDE_SWITCHOVER 32
  55. //
  56. // We have to multiply the ea size we get back from the system to get
  57. // the buffer size we need to query the ea. This is because the returned
  58. // ea size is the os/2 ea size.
  59. //
  60. #define EA_SIZE_FUDGE_FACTOR 2
  61. #define ENDPOINT_LOCK_COUNT 4
  62. #define ENDPOINT_LOCK_MASK (ENDPOINT_LOCK_COUNT-1)
  63. //
  64. // The server keeps a table of NTSTATUS codes that it will avoid putting in
  65. // the error log. This is the number of codes we can hold
  66. //
  67. #define SRVMAXERRLOGIGNORE 50
  68. //
  69. // The following constants are copied from net\inc\apinums.h
  70. // This is a list of apis and apinumbers that are callable
  71. // on the null session.
  72. //
  73. #define API_WUserGetGroups 59
  74. #define API_WUserPasswordSet2 115
  75. #define API_NetServerEnum2 104
  76. #define API_WNetServerReqChallenge 126
  77. #define API_WNetServerAuthenticate 127
  78. #define API_WNetServerPasswordSet 128
  79. #define API_WNetAccountDeltas 129
  80. #define API_WNetAccountSync 130
  81. #define API_WWkstaUserLogoff 133
  82. #define API_WNetWriteUpdateLog 208
  83. #define API_WNetAccountUpdate 209
  84. #define API_WNetAccountConfirmUpdate 210
  85. #define API_SamOEMChgPasswordUser2_P 214
  86. #define API_NetServerEnum3 215
  87. //
  88. // This is the presumed cache line size for the processor
  89. //
  90. #define CACHE_LINE_SIZE 32
  91. //
  92. // This is the number of ULONGS in a cache line
  93. //
  94. #define ULONGS_IN_CACHE (CACHE_LINE_SIZE / sizeof( ULONG ))
  95. //
  96. // This is the number of samples used to compute the average WORK_QUEUE depth.
  97. // Must be a power of 2
  98. //
  99. #define QUEUE_SAMPLES 8
  100. //
  101. // This is Log2( QUEUE_SAMPLES )
  102. //
  103. #define LOG2_QUEUE_SAMPLES 3
  104. //
  105. // If we have an IPX client, we want to drop every few retries of the same SMB
  106. // by the client to decrease the server load. WIN95 backs off its requests
  107. // when it gets ERR_WORKING, but wfw does not. So, there's no value (from the
  108. // server's perspective) in responding very often to the wfw client. The WfW
  109. // client retries approx every 300mS, and must receive a response in approx 9
  110. // seconds. Therefore, we choose 9 drops as approx 3 seconds. This will allow two
  111. // of our responses to be dropped and will allow enough time for the client to
  112. // try a third time.
  113. //
  114. #define MIN_IPXDROPDUP 2
  115. #define MAX_IPXDROPDUP 9
  116. //
  117. // The number of configuration work items. This roughly governs the number of kernel
  118. // worker threads which will be occupied processing configuration irps
  119. //
  120. #define MAX_CONFIG_WORK_ITEMS 2
  121. //
  122. // The maximum size of the buffer associated with a TRANSACTION
  123. //
  124. #define MAX_TRANSACTION_TAIL_SIZE 65*1024
  125. //
  126. // The number of times we will continue doing paged writes with WriteThrough
  127. // set before we try and go back to cached writes. This is used in situations
  128. // where the cache manager has hit the cache throttle to prevent deadlocks
  129. //
  130. #define MAX_FORCED_WRITE_THROUGH 64
  131. #endif // ndef _SRVCONST_