Windows NT 4.0 source code leak
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.

157 lines
4.4 KiB

4 years ago
  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
  30. // Must be a power of 2.
  31. //
  32. #define NMFCB_HASH_TABLE 128
  33. //
  34. // The number of resources which guard entries in SrvMfcbHashTable. Only makes
  35. // sense for this number to be <= NMFCB_HASH_TABLE. Need not be a power of 2.
  36. //
  37. #define NMFCB_HASH_TABLE_LOCKS 10 // arbitrary
  38. //
  39. // The number of entries in the SrvShareHashTable.
  40. // Must be a power of 2.
  41. //
  42. #define NSHARE_HASH_TABLE 16
  43. //
  44. // The number of pieces of pool we'll hang onto in a LOOK_ASIDE_LIST
  45. // after deallocation for quick re-allocation. Per processor.
  46. // Involves a linear search...
  47. //
  48. #define LOOK_ASIDE_MAX_ELEMENTS 4
  49. //
  50. // Two look aside lists for quick pool allocation and deallocation are
  51. // kept, and a POOL_HEADER goes on one list or the other depending on
  52. // the size of the allocated block. This is to reduce memory wastage.
  53. // LOOK_ASIDE_SWITCHOVER is the maximum block size for a memory chunk
  54. // to end up on the SmallFreeList in the LOOK_ASIDE_LIST
  55. //
  56. #define LOOK_ASIDE_SWITCHOVER 32
  57. //
  58. // We have to multiply the ea size we get back from the system to get
  59. // the buffer size we need to query the ea. This is because the returned
  60. // ea size is the os/2 ea size.
  61. //
  62. #define EA_SIZE_FUDGE_FACTOR 2
  63. #define ENDPOINT_LOCK_COUNT 4
  64. #define ENDPOINT_LOCK_MASK (ENDPOINT_LOCK_COUNT-1)
  65. //
  66. // The server keeps a table of NTSTATUS codes that it will avoid putting in
  67. // the error log. This is the number of codes we can hold
  68. //
  69. #define SRVMAXERRLOGIGNORE 50
  70. //
  71. // The following constants are copied from net\inc\apinums.h
  72. // This is a list of apis and apinumbers that are callable
  73. // on the null session.
  74. //
  75. #define API_WUserGetGroups 59
  76. #define API_WUserPasswordSet2 115
  77. #define API_NetServerEnum2 104
  78. #define API_WNetServerReqChallenge 126
  79. #define API_WNetServerAuthenticate 127
  80. #define API_WNetServerPasswordSet 128
  81. #define API_WNetAccountDeltas 129
  82. #define API_WNetAccountSync 130
  83. #define API_WWkstaUserLogoff 133
  84. #define API_WNetWriteUpdateLog 208
  85. #define API_WNetAccountUpdate 209
  86. #define API_WNetAccountConfirmUpdate 210
  87. #define API_SamOEMChgPasswordUser2_P 214
  88. #define API_NetServerEnum3 215
  89. //
  90. // This is the presumed cache line size for the processor
  91. //
  92. #define CACHE_LINE_SIZE 32
  93. //
  94. // This is the number of ULONGS in a cache line
  95. //
  96. #define ULONGS_IN_CACHE (CACHE_LINE_SIZE / sizeof( ULONG ))
  97. //
  98. // This is the number of samples used to compute the average WORK_QUEUE depth.
  99. // Must be a power of 2
  100. //
  101. #define QUEUE_SAMPLES 8
  102. //
  103. // This is Log2( QUEUE_SAMPLES )
  104. //
  105. #define LOG2_QUEUE_SAMPLES 3
  106. //
  107. // If we have an IPX client, we want to drop every few retries of the same SMB
  108. // by the client to decrease the server load. WIN95 backs off its requests
  109. // when it gets ERR_WORKING, but wfw does not. So, there's no value (from the
  110. // server's perspective) in responding very often to the wfw client. The WfW
  111. // client retries approx every 300mS, and must receive a response in approx 9
  112. // seconds. Therefore, we choose 9 drops as approx 3 seconds. This will allow two
  113. // of our responses to be dropped and will allow enough time for the client to
  114. // try a third time.
  115. //
  116. #define MIN_IPXDROPDUP 2
  117. #define MAX_IPXDROPDUP 9
  118. //
  119. // The number of configuration work items. This roughly governs the number of kernel
  120. // worker threads which will be occupied processing configuration irps
  121. //
  122. #define MAX_CONFIG_WORK_ITEMS 2
  123. #endif // ndef _SRVCONST_