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.

273 lines
7.8 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. Data.h
  5. Abstract:
  6. This module declares the global data used by the NetWare redirector
  7. file system.
  8. Author:
  9. Colin Watson [ColinW] 15-Dec-1992
  10. Anoop Anantha [AnoopA] 24-Jun-1998
  11. Revision History:
  12. --*/
  13. #ifndef _NWDATA_
  14. #define _NWDATA_
  15. extern PEPROCESS FspProcess;
  16. extern PDEVICE_OBJECT FileSystemDeviceObject;
  17. extern RCB NwRcb;
  18. extern KSPIN_LOCK ScbSpinLock;
  19. extern KSPIN_LOCK NwTimerSpinLock;
  20. extern LIST_ENTRY ScbQueue;
  21. extern NONPAGED_SCB NwPermanentNpScb;
  22. extern SCB NwPermanentScb;
  23. extern LARGE_INTEGER NwMaxLarge;
  24. extern ULONG NwAbsoluteTotalWaitTime;
  25. extern TDI_ADDRESS_IPX OurAddress;
  26. extern UNICODE_STRING IpxTransportName;
  27. extern HANDLE IpxHandle;
  28. extern PDEVICE_OBJECT pIpxDeviceObject;
  29. extern PFILE_OBJECT pIpxFileObject;
  30. extern LIST_ENTRY LogonList;
  31. extern LOGON Guest;
  32. extern LARGE_INTEGER DefaultLuid;
  33. extern LIST_ENTRY GlobalVcbList;
  34. extern ULONG CurrentVcbEntry;
  35. //
  36. // Drive mapping table of redirected drives.
  37. //
  38. extern PVCB GlobalDriveMapTable[]; //Terminal Server merge
  39. // NDS Preferred Server from registry key
  40. extern UNICODE_STRING NDSPreferredServer; //Terminal Server merge
  41. extern WCHAR NDSPrefSvrName[]; //Terminal Server merge
  42. //extern PVCB DriveMapTable[];
  43. //
  44. // The global structure used to contain our fast I/O callbacks
  45. //
  46. extern FAST_IO_DISPATCH NwFastIoDispatch;
  47. //
  48. // Configurable paramaters
  49. //
  50. extern SHORT DefaultRetryCount;
  51. extern ULONG NwScavengerTickCount;
  52. extern ULONG NwScavengerTickRunCount;
  53. extern KSPIN_LOCK NwScavengerSpinLock;
  54. extern LIST_ENTRY NwGetMessageList;
  55. extern KSPIN_LOCK NwMessageSpinLock;
  56. extern LIST_ENTRY NwPendingLockList;
  57. extern KSPIN_LOCK NwPendingLockSpinLock;
  58. extern ERESOURCE NwOpenResource;
  59. extern LONG PreferNDSBrowsing;
  60. #if 0
  61. extern LIST_ENTRY FnList; // HACKHACK
  62. #endif
  63. extern BOOLEAN NwBurstModeEnabled;
  64. extern ULONG NwMaxSendSize;
  65. extern ULONG NwMaxReceiveSize;
  66. extern ULONG NwPrintOptions;
  67. extern UNICODE_STRING NwProviderName;
  68. extern LONG MaxSendDelay;
  69. extern LONG MaxReceiveDelay;
  70. extern LONG MinSendDelay;
  71. extern LONG MinReceiveDelay;
  72. extern LONG BurstSuccessCount;
  73. extern LONG BurstSuccessCount2;
  74. extern LONG AllowGrowth;
  75. extern LONG DontShrink;
  76. extern LONG SendExtraNcp;
  77. extern LONG DefaultMaxPacketSize;
  78. extern LONG PacketThreshold;
  79. extern LONG LargePacketAdjustment;
  80. extern LONG LipPacketAdjustment;
  81. extern LONG LipAccuracy;
  82. extern LONG MaxWriteTimeout;
  83. extern LONG MaxReadTimeout;
  84. extern LONG WriteTimeoutMultiplier;
  85. extern LONG ReadTimeoutMultiplier;
  86. extern ULONG DisableAltFileName;
  87. #define MAX_NDS_OBJECT_CACHE_SIZE (0x00000080)
  88. extern ULONG NdsObjectCacheSize;
  89. #define MAX_NDS_OBJECT_CACHE_TIMEOUT (0x00000258) // (10 minutes)
  90. extern ULONG NdsObjectCacheTimeout;
  91. extern ULONG EnableMultipleConnects;
  92. extern ULONG AllowSeedServerRedirection;
  93. extern ULONG ReadExecOnlyFiles;
  94. extern KQUEUE KernelQueue;
  95. extern BOOLEAN WorkerThreadRunning;
  96. extern HANDLE WorkerThreadHandle;
  97. #ifdef _PNP_POWER_
  98. extern BOOLEAN fSomePMDevicesAreActive;
  99. extern BOOLEAN fPoweringDown;
  100. #endif
  101. extern LONG Japan; // Controls special DBCS translation
  102. extern LONG Korean; // Controls special Korean translation
  103. extern LONG DisableReadCache ;
  104. extern LONG DisableWriteCache ;
  105. extern LONG FavourLongNames ; // use LFN where possible
  106. extern DWORD LongNameFlags;
  107. #define LFN_FLAG_DISABLE_LONG_NAMES (0x00000001)
  108. extern ULONG DirCacheEntries;
  109. #define MAX_DIR_CACHE_ENTRIES (0x00000080)
  110. extern LARGE_INTEGER TimeOutEventInterval;
  111. extern NW_REDIR_STATISTICS Stats;
  112. extern ULONG ContextCount;
  113. extern SECTION_DESCRIPTOR NwSectionDescriptor;
  114. extern ERESOURCE NwUnlockableCodeResource;
  115. extern ULONG LockTimeoutThreshold;
  116. #ifndef _PNP_POWER_
  117. extern HANDLE TdiBindingHandle;
  118. extern UNICODE_STRING TdiIpxDeviceName;
  119. #endif
  120. extern BOOLEAN DelayedProcessLineChange;
  121. extern PIRP DelayedLineChangeIrp;
  122. #ifdef NWDBG
  123. #define DEBUG_TRACE_ALWAYS (0x00000000)
  124. #define DEBUG_TRACE_CLEANUP (0x00000001)
  125. #define DEBUG_TRACE_CLOSE (0x00000002)
  126. #define DEBUG_TRACE_CREATE (0x00000004)
  127. #define DEBUG_TRACE_FSCTRL (0x00000008)
  128. #define DEBUG_TRACE_IPX (0x00000010)
  129. #define DEBUG_TRACE_LOAD (0x00000020)
  130. #define DEBUG_TRACE_EXCHANGE (0x00000040)
  131. #define DEBUG_TRACE_FILOBSUP (0x00000080)
  132. #define DEBUG_TRACE_STRUCSUP (0x00000100)
  133. #define DEBUG_TRACE_FSP_DISPATCHER (0x00000200)
  134. #define DEBUG_TRACE_FSP_DUMP (0x00000400)
  135. #define DEBUG_TRACE_WORKQUE (0x00000800)
  136. #define DEBUG_TRACE_UNWIND (0x00001000)
  137. #define DEBUG_TRACE_CATCH_EXCEPTIONS (0x00002000)
  138. #define DEBUG_TRACE_ICBS (0x00004000)
  139. #define DEBUG_TRACE_FILEINFO (0x00008000)
  140. #define DEBUG_TRACE_DIRCTRL (0x00010000)
  141. #define DEBUG_TRACE_CONVERT (0x00020000)
  142. #define DEBUG_TRACE_WRITE (0x00040000)
  143. #define DEBUG_TRACE_READ (0x00080000)
  144. #define DEBUG_TRACE_VOLINFO (0x00100000)
  145. #define DEBUG_TRACE_LOCKCTRL (0x00200000)
  146. #define DEBUG_TRACE_USERNCP (0x00400000)
  147. #define DEBUG_TRACE_SECURITY (0x00800000)
  148. #define DEBUG_TRACE_CACHE (0x01000000)
  149. #define DEBUG_TRACE_LIP (0x02000000)
  150. #define DEBUG_TRACE_MDL (0x04000000)
  151. #define DEBUG_TRACE_PNP (0x08000000)
  152. #define DEBUG_TRACE_NDS (0x10000000)
  153. #define DEBUG_TRACE_SCAVENGER (0x40000000)
  154. #define DEBUG_TRACE_TIMER (0x80000000)
  155. extern ULONG NwDebug;
  156. extern ULONG NwMemDebug;
  157. extern LONG NwDebugTraceIndent;
  158. #define DebugTrace( I, L, M, P ) RealDebugTrace( I, L, "%08lx: %*s"M, (PVOID)(P) )
  159. #define DebugUnwind(X) { \
  160. if (AbnormalTermination()) { \
  161. DebugTrace(0, DEBUG_TRACE_UNWIND, #X ", Abnormal termination.\n", 0); \
  162. } \
  163. }
  164. //
  165. // The following variables are used to keep track of the total amount
  166. // of requests processed by the file system, and the number of requests
  167. // that end up being processed by the Fsp thread. The first variable
  168. // is incremented whenever an Irp context is created (which is always
  169. // at the start of an Fsd entry point) and the second is incremented
  170. // by read request.
  171. //
  172. extern ULONG NwFsdEntryCount;
  173. extern ULONG NwFspEntryCount;
  174. extern ULONG NwIoCallDriverCount;
  175. extern ULONG NwTotalTicks[];
  176. extern KSPIN_LOCK NwDebugInterlock;
  177. extern ERESOURCE NwDebugResource;
  178. extern LIST_ENTRY NwPagedPoolList;
  179. extern LIST_ENTRY NwNonpagedPoolList;
  180. extern ULONG MdlCount;
  181. extern ULONG IrpCount;
  182. #define DebugDoit(X) {X;}
  183. extern LONG NwPerformanceTimerLevel;
  184. #define TimerStart(LEVEL) { \
  185. LARGE_INTEGER TStart, TEnd; \
  186. LARGE_INTEGER TElapsed; \
  187. TStart = KeQueryPerformanceCounter( NULL ); \
  188. #define TimerStop(LEVEL,s) \
  189. TEnd = KeQueryPerformanceCounter( NULL ); \
  190. TElapsed = RtlLargeIntegerSubtract( TEnd, TStart ); \
  191. /* NwTotalTicks[NwLogOf(LEVEL)] += TElapsed.LowPart; */ \
  192. if (FlagOn( NwPerformanceTimerLevel, (LEVEL))) { \
  193. DbgPrint("Time of %s %ld\n", (s), TElapsed.LowPart ); \
  194. } \
  195. }
  196. #else
  197. #define DebugTrace(INDENT,LEVEL,X,Y) {NOTHING;}
  198. #define DebugUnwind(X) {NOTHING;}
  199. #define DebugDoit(X) {NOTHING;}
  200. #define TimerStart(LEVEL)
  201. #define TimerStop(LEVEL,s)
  202. #endif // NWDBG
  203. #endif // _NWDATA_