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.

217 lines
4.7 KiB

4 years ago
  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. #if DBG
  42. ULONG
  43. BowserMailslotDatagramThreshold = 10;
  44. ULONG
  45. BowserGetBrowserListThreshold = 10;
  46. ULONG
  47. BowserServerDeletionThreshold = 20;
  48. ULONG
  49. BowserDomainDeletionThreshold = 50;
  50. #else
  51. ULONG
  52. BowserMailslotDatagramThreshold = 0xffffffff;
  53. ULONG
  54. BowserGetBrowserListThreshold = 0xffffffff;
  55. ULONG
  56. BowserServerDeletionThreshold = 0xffffffff;
  57. ULONG
  58. BowserDomainDeletionThreshold = 0xffffffff;
  59. #endif
  60. ULONG
  61. BowserRandomSeed = {0};
  62. LONG
  63. BowserNumberOfOpenFiles = {0};
  64. //
  65. // A pointer to the browser's device object
  66. //
  67. PBOWSER_FS_DEVICE_OBJECT
  68. BowserDeviceObject = {0};
  69. #ifdef ALLOC_DATA_PRAGMA
  70. #pragma data_seg()
  71. #endif
  72. //
  73. // The redirector name and other initialization parameters are protected
  74. // by the BowserDataResource. All reads of the initialization variables
  75. // should acquire the name resource before they continue.
  76. //
  77. //
  78. ERESOURCE
  79. BowserDataResource = {0};
  80. //
  81. // Browser static data protected by BowserDataResource.
  82. //
  83. BOWSERDATA
  84. BowserData = {0};
  85. ULONG
  86. BowserCurrentTime = {0};
  87. KSPIN_LOCK
  88. BowserTransportMasterNameSpinLock = {0};
  89. LONG
  90. BowserEventLogResetFrequency = {0};
  91. LONG
  92. BowserIllegalDatagramCount = {0};
  93. BOOLEAN
  94. BowserIllegalDatagramThreshold = {0};
  95. ULONG
  96. BowserNumberOfMissedMailslotDatagrams = {0};
  97. ULONG
  98. BowserNumberOfMissedGetBrowserServerListRequests = {0};
  99. BOWSER_STATISTICS
  100. BowserStatistics = {0};
  101. KSPIN_LOCK
  102. BowserStatisticsLock = {0};
  103. #ifdef PAGED_DBG
  104. ULONG ThisCodeCantBePaged = 0;
  105. #endif
  106. #if DBG
  107. LONG BowserDebugTraceLevel = /* DPRT_ERROR | DPRT_DISPATCH */
  108. /*DPRT_FSDDISP | DPRT_FSPDISP | DPRT_CREATE | DPRT_READWRITE |*/
  109. /*DPRT_CLOSE | DPRT_FILEINFO | DPRT_VOLINFO | DPRT_DIRECTORY |*/
  110. /*DPRT_FILELOCK | DPRT_CACHE | DPRT_EAFUNC | */
  111. /*DPRT_ACLQUERY | DPRT_CLEANUP | DPRT_CONNECT | DPRT_FSCTL |*/
  112. /*DPRT_TDI | DPRT_SMBBUF | DPRT_SMB | DPRT_SECURITY | */
  113. /*DPRT_SCAVTHRD | DPRT_QUOTA | DPRT_FCB | DPRT_OPLOCK | */
  114. /*DPRT_SMBTRACE | DPRT_INIT |*/0;
  115. LONG BowserDebugLogLevel = /* DPRT_ERROR | DPRT_DISPATCH */
  116. /*DPRT_FSDDISP | DPRT_FSPDISP | DPRT_CREATE | DPRT_READWRITE |*/
  117. /*DPRT_CLOSE | DPRT_FILEINFO | DPRT_VOLINFO | DPRT_DIRECTORY |*/
  118. /*DPRT_FILELOCK | DPRT_CACHE | DPRT_EAFUNC | */
  119. /*DPRT_ACLQUERY | DPRT_CLEANUP | DPRT_CONNECT | DPRT_FSCTL |*/
  120. /*DPRT_TDI | DPRT_SMBBUF | DPRT_SMB | DPRT_SECURITY | */
  121. /*DPRT_SCAVTHRD | DPRT_QUOTA | DPRT_FCB | DPRT_OPLOCK | */
  122. /*DPRT_SMBTRACE | DPRT_INIT |*/0;
  123. #endif // BOWSERDBG
  124. #ifdef ALLOC_DATA_PRAGMA
  125. #pragma data_seg("INIT")
  126. #endif
  127. BOWSER_CONFIG_INFO
  128. BowserConfigEntries[] = {
  129. { BOWSER_CONFIG_IRP_STACK_SIZE, &BowserIrpStackSize, REG_DWORD, sizeof(DWORD) },
  130. { BOWSER_CONFIG_MAILSLOT_THRESHOLD, &BowserMailslotDatagramThreshold, REG_DWORD, sizeof(DWORD) },
  131. { BOWSER_CONFIG_GETBLIST_THRESHOLD, &BowserGetBrowserListThreshold, REG_DWORD, sizeof(DWORD) },
  132. { BOWSER_CONFIG_SERVER_DELETION_THRESHOLD, &BowserServerDeletionThreshold, REG_DWORD, sizeof(DWORD) },
  133. { BOWSER_CONFIG_DOMAIN_DELETION_THRESHOLD, &BowserDomainDeletionThreshold, REG_DWORD, sizeof(DWORD) },
  134. { BOWSER_CONFIG_FIND_MASTER_TIMEOUT, &BowserFindMasterTimeout, REG_DWORD, sizeof(DWORD) },
  135. { BOWSER_CONFIG_MINIMUM_CONFIGURED_BROWSER, &BowserMinimumConfiguredBrowsers, REG_DWORD, sizeof(DWORD) },
  136. #if DBG
  137. { L"BowserDebugTraceLevel", &BowserDebugTraceLevel, REG_DWORD, sizeof(DWORD) },
  138. { L"BowserDebugLogLevel", &BowserDebugLogLevel, REG_DWORD, sizeof(DWORD) },
  139. #endif
  140. { NULL, NULL, REG_NONE, 0}
  141. };
  142. ULONG
  143. BowserIrpStackSize = BOWSER_DEFAULT_IRP_STACK_SIZE;
  144. //
  145. // STRING containing name of bowser device
  146. //
  147. UNICODE_STRING
  148. BowserNameString = {0};
  149. #ifdef ALLOC_DATA_PRAGMA
  150. #pragma data_seg()
  151. #endif