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.

233 lines
5.3 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. bowdata.c
  5. Abstract:
  6. Redirector Data Variables
  7. This module contains all of the definitions of the redirector data
  8. structures.
  9. Author:
  10. Larry Osterman (LarryO) 30-May-1990
  11. Revision History:
  12. 30-May-1990 LarryO
  13. Created
  14. --*/
  15. #include "precomp.h"
  16. #pragma hdrstop
  17. //
  18. // Paging out these pagable variables actually GROWS the browser by 512 bytes
  19. // so it's not worth doing it.
  20. //
  21. #ifdef ALLOC_DATA_PRAGMA
  22. #pragma data_seg("PAGE")
  23. #endif
  24. LIST_ENTRY
  25. BowserNameHead = {0};
  26. LIST_ENTRY
  27. BowserTransportHead = {0};
  28. LARGE_INTEGER
  29. BowserStartTime = {0};
  30. PEPROCESS
  31. BowserFspProcess = {0};
  32. BOOLEAN
  33. BowserLogElectionPackets = {0};
  34. //
  35. // Time out FindMaster requests after 30 seconds.
  36. //
  37. ULONG
  38. BowserFindMasterTimeout = 30;
  39. ULONG
  40. BowserMinimumConfiguredBrowsers = MIN_CONFIGURED_BROWSERS;
  41. ULONG
  42. BowserMaximumBrowseEntries = MAX_BROWSE_ENTRIES;
  43. #if DBG
  44. ULONG
  45. BowserMailslotDatagramThreshold = 10;
  46. ULONG
  47. BowserGetBrowserListThreshold = 10;
  48. ULONG
  49. BowserServerDeletionThreshold = 20;
  50. ULONG
  51. BowserDomainDeletionThreshold = 50;
  52. #else
  53. ULONG
  54. BowserMailslotDatagramThreshold = 0xffffffff;
  55. ULONG
  56. BowserGetBrowserListThreshold = 0xffffffff;
  57. ULONG
  58. BowserServerDeletionThreshold = 0xffffffff;
  59. ULONG
  60. BowserDomainDeletionThreshold = 0xffffffff;
  61. #endif
  62. ULONG
  63. BowserRandomSeed = {0};
  64. LONG
  65. BowserNumberOfOpenFiles = {0};
  66. //
  67. // A pointer to the browser's device object
  68. //
  69. PBOWSER_FS_DEVICE_OBJECT
  70. BowserDeviceObject = {0};
  71. #ifdef ALLOC_DATA_PRAGMA
  72. #pragma data_seg()
  73. #endif
  74. //
  75. // The redirector name and other initialization parameters are protected
  76. // by the BowserDataResource. All reads of the initialization variables
  77. // should acquire the name resource before they continue.
  78. //
  79. //
  80. ERESOURCE
  81. BowserDataResource = {0};
  82. //
  83. // Browser static data protected by BowserDataResource.
  84. //
  85. BOWSERDATA
  86. BowserData = {0};
  87. ULONG BowserOperationCount = 0;
  88. ULONG
  89. BowserCurrentTime = {0};
  90. KSPIN_LOCK
  91. BowserTransportMasterNameSpinLock = {0};
  92. LONG
  93. BowserEventLogResetFrequency = {0};
  94. LONG
  95. BowserIllegalDatagramCount = {0};
  96. BOOLEAN
  97. BowserIllegalDatagramThreshold = {0};
  98. LONG
  99. BowserIllegalNameCount = {0};
  100. BOOLEAN
  101. BowserIllegalNameThreshold = {0};
  102. ULONG
  103. BowserNumberOfMissedMailslotDatagrams = {0};
  104. ULONG
  105. BowserNumberOfMissedGetBrowserServerListRequests = {0};
  106. BOWSER_STATISTICS
  107. BowserStatistics = {0};
  108. KSPIN_LOCK
  109. BowserStatisticsLock = {0};
  110. BOOLEAN
  111. BowserRefuseReset = FALSE;
  112. #ifdef PAGED_DBG
  113. ULONG ThisCodeCantBePaged = 0;
  114. #endif
  115. #if DBG
  116. LONG BowserDebugTraceLevel = /* DPRT_ERROR | DPRT_DISPATCH */
  117. /*DPRT_FSDDISP | DPRT_FSPDISP | DPRT_CREATE | DPRT_READWRITE |*/
  118. /*DPRT_CLOSE | DPRT_FILEINFO | DPRT_VOLINFO | DPRT_DIRECTORY |*/
  119. /*DPRT_FILELOCK | DPRT_CACHE | DPRT_EAFUNC | */
  120. /*DPRT_ACLQUERY | DPRT_CLEANUP | DPRT_CONNECT | DPRT_FSCTL |*/
  121. /*DPRT_TDI | DPRT_SMBBUF | DPRT_SMB | DPRT_SECURITY | */
  122. /*DPRT_SCAVTHRD | DPRT_QUOTA | DPRT_FCB | DPRT_OPLOCK | */
  123. /*DPRT_SMBTRACE | DPRT_INIT |*/0;
  124. LONG BowserDebugLogLevel = /* DPRT_ERROR | DPRT_DISPATCH */
  125. /*DPRT_FSDDISP | DPRT_FSPDISP | DPRT_CREATE | DPRT_READWRITE |*/
  126. /*DPRT_CLOSE | DPRT_FILEINFO | DPRT_VOLINFO | DPRT_DIRECTORY |*/
  127. /*DPRT_FILELOCK | DPRT_CACHE | DPRT_EAFUNC | */
  128. /*DPRT_ACLQUERY | DPRT_CLEANUP | DPRT_CONNECT | DPRT_FSCTL |*/
  129. /*DPRT_TDI | DPRT_SMBBUF | DPRT_SMB | DPRT_SECURITY | */
  130. /*DPRT_SCAVTHRD | DPRT_QUOTA | DPRT_FCB | DPRT_OPLOCK | */
  131. /*DPRT_SMBTRACE | DPRT_INIT |*/0;
  132. #endif // BOWSERDBG
  133. #ifdef ALLOC_DATA_PRAGMA
  134. #pragma data_seg("INIT")
  135. #endif
  136. BOWSER_CONFIG_INFO
  137. BowserConfigEntries[] = {
  138. { BOWSER_CONFIG_IRP_STACK_SIZE, &BowserIrpStackSize, REG_DWORD, sizeof(DWORD) },
  139. { BOWSER_CONFIG_MAILSLOT_THRESHOLD, &BowserMailslotDatagramThreshold, REG_DWORD, sizeof(DWORD) },
  140. { BOWSER_CONFIG_GETBLIST_THRESHOLD, &BowserGetBrowserListThreshold, REG_DWORD, sizeof(DWORD) },
  141. { BOWSER_CONFIG_SERVER_DELETION_THRESHOLD, &BowserServerDeletionThreshold, REG_DWORD, sizeof(DWORD) },
  142. { BOWSER_CONFIG_DOMAIN_DELETION_THRESHOLD, &BowserDomainDeletionThreshold, REG_DWORD, sizeof(DWORD) },
  143. { BOWSER_CONFIG_FIND_MASTER_TIMEOUT, &BowserFindMasterTimeout, REG_DWORD, sizeof(DWORD) },
  144. { BOWSER_CONFIG_MINIMUM_CONFIGURED_BROWSER, &BowserMinimumConfiguredBrowsers, REG_DWORD, sizeof(DWORD) },
  145. { BROWSER_CONFIG_MAXIMUM_BROWSE_ENTRIES, &BowserMaximumBrowseEntries, REG_DWORD, sizeof(DWORD) },
  146. { BROWSER_CONFIG_REFUSE_RESET, &BowserRefuseReset, REG_BOOLEAN, sizeof(DWORD) },
  147. #if DBG
  148. { L"BowserDebugTraceLevel", &BowserDebugTraceLevel, REG_DWORD, sizeof(DWORD) },
  149. { L"BowserDebugLogLevel", &BowserDebugLogLevel, REG_DWORD, sizeof(DWORD) },
  150. #endif
  151. { NULL, NULL, REG_NONE, 0}
  152. };
  153. ULONG
  154. BowserIrpStackSize = BOWSER_DEFAULT_IRP_STACK_SIZE;
  155. //
  156. // STRING containing name of bowser device
  157. //
  158. UNICODE_STRING
  159. BowserNameString = {0};
  160. #ifdef ALLOC_DATA_PRAGMA
  161. #pragma data_seg()
  162. #endif