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.

635 lines
22 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. mrxfFcb.h
  5. Abstract:
  6. This module defines the macros/inline functions and function prototypes used by
  7. the mini redirectors to access the RDBSS wrapper data structures.
  8. IMPORTANT: All mini redirector writers cannot and should not make any assumptions
  9. about the layout of the RDBSS wrapper data structures. They are not guaranteed to
  10. be the same across platforms and even on a single platform are liable to change
  11. across versions.
  12. The following six data structure abstractions are available to the mini
  13. redirector writer.
  14. 1) Server Call Context (SRV_CALL)
  15. The context associated with each known file system server.
  16. 2) Net Roots (NET_ROOT)
  17. The root of a file system volume( local/remote) opened by the user.
  18. 3) Virtual Net Roots (V_NET_ROOT)
  19. The view of a file system volume on a server. The view can be
  20. constrained along multiple dimensions. As an example the view can be
  21. associated with a logon id. which will constrain the operations that
  22. can be performed on the file system volume.
  23. 4) File Control Blocks (FCB)
  24. The RDBSS data structure associated with each unique file opened.
  25. 5) File Object Extensions (FOXB)
  26. 6) ServerSide Open Context (SRV_OPEN)
  27. A common convention that is adopted for defining Flags in all of these data structures
  28. is to define a ULONG ( 32 ) flags and split them into two groups -- those that are visible
  29. to the mini redirector and those that are invisible. These flags are not meant for use
  30. by the mini redirector writers and are reserved for the wrapper.
  31. Author:
  32. Balan Sethu Raman [SethuR] 23-Oct-1995
  33. Revision History:
  34. --*/
  35. #ifndef __MRXFCB_H__
  36. #define __MRXFCB_H__
  37. // The SRVCALL flags are split into two groups, i.e., visible to mini rdrs and invisible to mini rdrs.
  38. // The visible ones are defined above and the definitions for the invisible ones can be found
  39. // in fcb.h. The convention that has been adopted is that the lower 16 flags will be visible
  40. // to the mini rdr and the upper 16 flags will be reserved for the wrapper. This needs to be
  41. // enforced in defining new flags.
  42. #define SRVCALL_FLAG_MAILSLOT_SERVER (0x1)
  43. #define SRVCALL_FLAG_FILE_SERVER (0x2)
  44. #define SRVCALL_FLAG_CASE_INSENSITIVE_NETROOTS (0x4)
  45. #define SRVCALL_FLAG_CASE_INSENSITIVE_FILENAMES (0x8)
  46. #define SRVCALL_FLAG_DFS_AWARE_SERVER (0x10)
  47. #define SRVCALL_FLAG_FORCE_FINALIZED (0x20)
  48. typedef struct _MRX_NORMAL_NODE_HEADER {
  49. NODE_TYPE_CODE NodeTypeCode;
  50. NODE_BYTE_SIZE NodeByteSize;
  51. ULONG NodeReferenceCount;
  52. } MRX_NORMAL_NODE_HEADER;
  53. #ifdef __cplusplus
  54. typedef struct _MRX_SRV_CALL_ : public MRX_NORMAL_NODE_HEADER {
  55. #else // !__cplusplus
  56. typedef struct _MRX_SRV_CALL_ {
  57. MRX_NORMAL_NODE_HEADER;
  58. #endif // __cplusplus
  59. // !!!! changes above this require realignment with fcb.h
  60. // the context fields for extensions required by the mini redirectors
  61. PVOID Context;
  62. PVOID Context2;
  63. // Associated DeviceObject which also contains the dispatch vector
  64. PRDBSS_DEVICE_OBJECT RxDeviceObject;
  65. // the srv call name, the server principal name and the server domain name.
  66. PUNICODE_STRING pSrvCallName;
  67. PUNICODE_STRING pPrincipalName;
  68. PUNICODE_STRING pDomainName;
  69. // Flags used to denote the state of the SRV_CALL.
  70. ULONG Flags;
  71. // Server parameters updated by the mini redirectors.
  72. LONG MaximumNumberOfCloseDelayedFiles;
  73. // Status return from the transport in case of failure
  74. NTSTATUS Status;
  75. } MRX_SRV_CALL, *PMRX_SRV_CALL;
  76. // The various types of NET_ROOT's currently supported by the wrapper.
  77. #define NET_ROOT_DISK ((UCHAR)0)
  78. #define NET_ROOT_PIPE ((UCHAR)1)
  79. #define NET_ROOT_COMM ((UCHAR)2)
  80. #define NET_ROOT_PRINT ((UCHAR)3)
  81. #define NET_ROOT_WILD ((UCHAR)4)
  82. #define NET_ROOT_MAILSLOT ((UCHAR)5)
  83. typedef UCHAR NET_ROOT_TYPE, *PNET_ROOT_TYPE;
  84. // The pipe buffer size for transferring cannot be larger than 0xffff
  85. #define MAX_PIPE_BUFFER_SIZE 0xFFFF
  86. // The possible states associated with a NET_ROOT. These have been defined to be
  87. // line with the definitions foe the LanManager service to avoid redundant mappings.
  88. // These MUST agree with sdkinc\lmuse.h use_ok, etc.....
  89. #define MRX_NET_ROOT_STATE_GOOD ((UCHAR)0)
  90. #define MRX_NET_ROOT_STATE_PAUSED ((UCHAR)1)
  91. #define MRX_NET_ROOT_STATE_DISCONNECTED ((UCHAR)2)
  92. #define MRX_NET_ROOT_STATE_ERROR ((UCHAR)3)
  93. #define MRX_NET_ROOT_STATE_CONNECTED ((UCHAR)4)
  94. #define MRX_NET_ROOT_STATE_RECONN ((UCHAR)5)
  95. typedef UCHAR MRX_NET_ROOT_STATE, *PMRX_NET_ROOT_STATE;
  96. // The file systems on the remote servers provide varying levels of functionality to
  97. // detect aliasing between file names. As an example consider two shares on the same
  98. // file system volume. In the absence of any support from the file system on the server
  99. // the correct and conservative approach is to flush all the files to the server as
  100. // opposed to all the files on the same NET_ROOT to preserve coherency and handle
  101. // delayed close operations.
  102. #define MRX_PURGE_SAME_NETROOT ((UCHAR)0)
  103. #define MRX_PURGE_SAME_SRVCALL ((UCHAR)1)
  104. //these are not implemented yet....
  105. //#define MRX_PURGE_SAME_FCB ((UCHAR)2)
  106. //#define MRX_PURGE_SAME_VOLUME ((UCHAR)3)
  107. //#define MRX_PURGE_ALL ((UCHAR)4)
  108. typedef UCHAR MRX_PURGE_RELATIONSHIP, *PMRX_PURGE_RELATIONSHIP;
  109. #define MRX_PURGE_SYNC_AT_NETROOT ((UCHAR)0)
  110. #define MRX_PURGE_SYNC_AT_SRVCALL ((UCHAR)1)
  111. typedef UCHAR MRX_PURGE_SYNCLOCATION, *PMRX_PURGE_SYNCLOCATION;
  112. // The NET_ROOT flags are split into two groups, i.e., visible to mini rdrs and
  113. // invisible to mini rdrs. The visible ones are defined above and the definitions
  114. // for the invisible ones can be found in fcb.h. The convention that has been
  115. // adopted is that the lower 16 flags will be visible to the mini rdr and the
  116. // upper 16 flags will be reserved for the wrapper. This needs to be enforced
  117. // in defining new flags.
  118. #define NETROOT_FLAG_SUPPORTS_SYMBOLIC_LINKS ( 0x0001 )
  119. #define NETROOT_FLAG_DFS_AWARE_NETROOT ( 0x0002 )
  120. #define NETROOT_FLAG_DEFER_READAHEAD ( 0x0004 )
  121. #define NETROOT_FLAG_VOLUMEID_INITIALIZED ( 0x0008 )
  122. #define NETROOT_FLAG_FINALIZE_INVOKED ( 0x0010 )
  123. #define NETROOT_FLAG_UNIQUE_FILE_NAME ( 0x0020 )
  124. //
  125. // Read ahead amount used for normal data files (32k)
  126. #define DEFAULT_READ_AHEAD_GRANULARITY (0x08000)
  127. //
  128. // the wrapper implements throttling for certain kinds of operations:
  129. // PeekNamedPipe/ReadNamedPipe
  130. // LockFile
  131. //
  132. // a minirdr can set the timing parameters for this in the netroot. leaving them
  133. // as zero will disable throttling.
  134. typedef struct _NETROOT_THROTTLING_PARAMETERS {
  135. ULONG Increment; // Supplies the increase in delay in milliseconds, each time a request
  136. // to the network fails.
  137. ULONG MaximumDelay; // Supplies the longest delay the backoff package can introduce
  138. // in milliseconds.
  139. } NETROOT_THROTTLING_PARAMETERS, *PNETROOT_THROTTLING_PARAMETERS;
  140. #define RxInitializeNetRootThrottlingParameters(__tp,__incr,__maxdelay) { \
  141. PNETROOT_THROTTLING_PARAMETERS tp = (__tp); \
  142. tp->Increment = (__incr); \
  143. tp->MaximumDelay = (__maxdelay); \
  144. }
  145. #ifdef __cplusplus
  146. typedef struct _MRX_NET_ROOT_ : public MRX_NORMAL_NODE_HEADER {
  147. #else // !__cplusplus
  148. typedef struct _MRX_NET_ROOT_ {
  149. MRX_NORMAL_NODE_HEADER;
  150. #endif // __cplusplus
  151. // the MRX_SRV_CALL instance with which this MRX_NET_ROOT instance is associated
  152. PMRX_SRV_CALL pSrvCall;
  153. // !!!! changes above this require realignment with fcb.h
  154. // the context fields used by the mini redirectors for recording
  155. // additional state.
  156. PVOID Context;
  157. PVOID Context2;
  158. // The flags used to denote the state of the NET_ROOT instance.
  159. ULONG Flags;
  160. // We count the number of fcbs, srvopens on the netroot
  161. ULONG NumberOfFcbs;
  162. ULONG NumberOfSrvOpens;
  163. // The current state and the purge relationships based on the support
  164. // provided by the file system on the server.
  165. MRX_NET_ROOT_STATE MRxNetRootState;
  166. NET_ROOT_TYPE Type;
  167. MRX_PURGE_RELATIONSHIP PurgeRelationship;
  168. MRX_PURGE_SYNCLOCATION PurgeSyncLocation;
  169. // the type of device, i.e., file system volume, printer, com port etc.
  170. DEVICE_TYPE DeviceType;
  171. // Name of the NET_ROOT instance
  172. PUNICODE_STRING pNetRootName;
  173. // the name to be prepended to all FCBS associated with this NET_ROOT
  174. UNICODE_STRING InnerNamePrefix;
  175. // Parameters based upon the type of the NET_ROOT.
  176. ULONG ParameterValidationStamp;
  177. union {
  178. struct {
  179. ULONG DataCollectionSize;
  180. NETROOT_THROTTLING_PARAMETERS PipeReadThrottlingParameters;
  181. } NamedPipeParameters;
  182. struct {
  183. ULONG ClusterSize;
  184. ULONG ReadAheadGranularity;
  185. NETROOT_THROTTLING_PARAMETERS LockThrottlingParameters;
  186. ULONG RenameInfoOverallocationSize; //could be a USHORT
  187. GUID VolumeId;
  188. } DiskParameters;
  189. };
  190. } MRX_NET_ROOT, *PMRX_NET_ROOT;
  191. // The VNET_ROOT flags are split into two groups, i.e., visible to mini rdrs and
  192. // invisible to mini rdrs. The visible ones are defined below and the definitions
  193. // for the invisible ones can be found in fcb.h. The convention that has been
  194. // adopted is that the lower 16 flags will be visible to the mini rdr and the
  195. // upper 16 flags will be reserved for the wrapper. This needs to be enforced
  196. // in defining new flags.
  197. #define VNETROOT_FLAG_CSCAGENT_INSTANCE 0x00000001
  198. #define VNETROOT_FLAG_FINALIZE_INVOKED 0x00000002
  199. #define VNETROOT_FLAG_FORCED_FINALIZE 0x00000004
  200. #define VNETROOT_FLAG_NOT_FINALIZED 0x00000008
  201. #ifdef __cplusplus
  202. typedef struct _MRX_V_NET_ROOT_ : public MRX_NORMAL_NODE_HEADER {
  203. #else // !__cplusplus
  204. typedef struct _MRX_V_NET_ROOT_ {
  205. MRX_NORMAL_NODE_HEADER;
  206. #endif // __cplusplus
  207. // the MRX_NET_ROOT instance with which the MRX_V_NET_ROOT instance is associated
  208. PMRX_NET_ROOT pNetRoot;
  209. // !!!! changes above this require realignment with fcb.h
  210. // the context fields provided for storing additional information as deemed
  211. // necessary by the mini redirectors
  212. PVOID Context;
  213. PVOID Context2;
  214. ULONG Flags;
  215. // This field should not be updated by the mini redirectors. Its usage is intended
  216. // to provide an easy mechanism for accessing certain state information
  217. ULONG NumberOfOpens;
  218. // We count the number of Fobxss on the virtual netroot
  219. ULONG NumberOfFobxs;
  220. // the security parameters associated with the V_NET_ROOT instance.
  221. LUID LogonId;
  222. // These are the parameters supplied by the used in a NtCreateFile call in
  223. // which the FILE_CREATE_TREE_CONNECTION flag is specified as part of the
  224. // CreateOptions.
  225. PUNICODE_STRING pUserDomainName;
  226. PUNICODE_STRING pUserName;
  227. PUNICODE_STRING pPassword;
  228. ULONG SessionId;
  229. NTSTATUS ConstructionStatus;
  230. BOOLEAN IsExplicitConnection;
  231. } MRX_V_NET_ROOT, *PMRX_V_NET_ROOT;
  232. // the following flags describe the fcb state. the fcbstate is readonly
  233. // for minirdrs. the buffering/cacheing flags are set in the wrapper in
  234. // response to changebufferingstate calls
  235. #define FCB_STATE_WRITECACHEING_ENABLED ( 0x08000000 )
  236. #define FCB_STATE_WRITEBUFFERING_ENABLED ( 0x04000000 )
  237. #define FCB_STATE_READCACHEING_ENABLED ( 0x02000000 )
  238. #define FCB_STATE_READBUFFERING_ENABLED ( 0x01000000 )
  239. #define FCB_STATE_OPENSHARING_ENABLED ( 0x00800000 )
  240. #define FCB_STATE_COLLAPSING_ENABLED ( 0x00400000 )
  241. #define FCB_STATE_LOCK_BUFFERING_ENABLED ( 0x00200000 )
  242. #define FCB_STATE_FILESIZECACHEING_ENABLED ( 0x00100000 )
  243. #define FCB_STATE_FILETIMECACHEING_ENABLED ( 0x00080000 )
  244. #define FCB_STATE_TIME_AND_SIZE_ALREADY_SET ( 0x00040000 )
  245. #define FCB_STATE_ORPHANED ( 0x00000080 )
  246. #define FCB_STATE_DELETE_ON_CLOSE ( 0x00000001 )
  247. //
  248. // ALL FIELDS IN AN FCB ARE READONLY EXCEPT Context and Context2....
  249. // Also, Context is read only the the mini has specified RDBSS_MANAGE_FCB_EXTENSION
  250. typedef struct _MRX_FCB_ {
  251. FSRTL_ADVANCED_FCB_HEADER Header;
  252. // The MRX_NET_ROOT instance with which this is associated
  253. PMRX_NET_ROOT pNetRoot;
  254. // !!!! changes above this require realignment with fcb.h
  255. // the context fields to store additional information as deemed necessary by the
  256. // mini redirectors.
  257. PVOID Context;
  258. PVOID Context2;
  259. // The reference count: in a different place because we must prefix with
  260. // the FSRTL_COMMON_FCB_HEADER structure.
  261. ULONG NodeReferenceCount;
  262. //
  263. // The internal state of the Fcb. THIS FIELD IS READONLY FOR MINIRDRS
  264. //
  265. ULONG FcbState;
  266. // A count of the number of file objects that have been opened for
  267. // this file/directory, but not yet been cleaned up yet. This count
  268. // is only used for data file objects, not for the Acl or Ea stream
  269. // file objects. This count gets decremented in RxCommonCleanup,
  270. // while the OpenCount below gets decremented in RxCommonClose.
  271. CLONG UncleanCount;
  272. // A count of the number of file objects that have been opened for
  273. // this file/directory, but not yet been cleaned up yet and for which
  274. // cacheing is not supported. This is used in cleanup.c to tell if extra
  275. // purges are required to maintain coherence.
  276. CLONG UncachedUncleanCount;
  277. // A count of the number of file objects that have opened
  278. // this file/directory. For files & directories the FsContext of the
  279. // file object points to this record.
  280. CLONG OpenCount;
  281. // The outstanding locks count: if this count is nonzero, the we silently
  282. // ignore adding LOCK_BUFFERING in a ChangeBufferingState request. This field
  283. // is manipulated by interlocked operations so you only have to have the fcb
  284. // shared to manipulate it but you have to have it exclusive to use it.
  285. ULONG OutstandingLockOperationsCount;
  286. // The actual allocation length as opposed to the valid data length
  287. ULONGLONG ActualAllocationLength;
  288. // Attributes of the MRX_FCB,
  289. ULONG Attributes;
  290. // Intended for future use, currently used to round off allocation to
  291. // DWORD boundaries.
  292. BOOLEAN Spare1;
  293. BOOLEAN fShouldBeOrphaned;
  294. BOOLEAN fMiniInited;
  295. // Type of the associated MRX_NET_ROOT, intended to avoid pointer chasing.
  296. UCHAR CachedNetRootType;
  297. // Header for the list of srv_opens for this FCB....
  298. // THIS FIELD IS READONLY FOR MINIS
  299. LIST_ENTRY SrvOpenList;
  300. // changes whenever the list changes..prevents extra lookups
  301. // THIS FIELD IS READONLY FOR MINIS
  302. ULONG SrvOpenListVersion;
  303. } MRX_FCB, *PMRX_FCB;
  304. // The following flags define the various types of buffering that can be selectively
  305. // enabled or disabled for each SRV_OPEN.
  306. //
  307. #define SRVOPEN_FLAG_DONTUSE_READ_CACHEING (0x1)
  308. #define SRVOPEN_FLAG_DONTUSE_WRITE_CACHEING (0x2)
  309. #define SRVOPEN_FLAG_CLOSED (0x4)
  310. #define SRVOPEN_FLAG_CLOSE_DELAYED (0x8)
  311. #define SRVOPEN_FLAG_FILE_RENAMED (0x10)
  312. #define SRVOPEN_FLAG_FILE_DELETED (0x20)
  313. #define SRVOPEN_FLAG_BUFFERING_STATE_CHANGE_PENDING (0x40)
  314. #define SRVOPEN_FLAG_COLLAPSING_DISABLED (0x80)
  315. #define SRVOPEN_FLAG_BUFFERING_STATE_CHANGE_REQUESTS_PURGED (0x100)
  316. #define SRVOPEN_FLAG_NO_BUFFERING_STATE_CHANGE (0x200)
  317. #define SRVOPEN_FLAG_ORPHANED (0x400)
  318. #ifdef __cplusplus
  319. typedef struct _MRX_SRV_OPEN_ : public MRX_NORMAL_NODE_HEADER {
  320. #else // !__cplusplus
  321. typedef struct _MRX_SRV_OPEN_ {
  322. MRX_NORMAL_NODE_HEADER;
  323. #endif // __cplusplus
  324. // the MRX_FCB instance with which the SRV_OPEN is associated.
  325. PMRX_FCB pFcb;
  326. // the V_NET_ROOT instance with which the SRV_OPEN is associated
  327. PMRX_V_NET_ROOT pVNetRoot;
  328. // !!!! changes above this require realignment with fcb.h
  329. // the context fields to store additional state information as deemed necessary
  330. // by the mini redirectors
  331. PVOID Context;
  332. PVOID Context2;
  333. // The flags are split into two groups, i.e., visible to mini rdrs and invisible
  334. // to mini rdrs. The visible ones are defined above and the definitions for the
  335. // invisible ones can be found in fcb.h. The convention that has been adopted is
  336. // that the lower 16 flags will be visible to the mini rdr and the upper 16 flags
  337. // will be reserved for the wrapper. This needs to be enforced in defining new flags.
  338. ULONG Flags;
  339. // the name alongwith the MRX_NET_ROOT prefix, i.e. fully qualified name
  340. PUNICODE_STRING pAlreadyPrefixedName;
  341. // the number of Fobx's associated with this open for which a cleanup IRP
  342. // has not been processed.
  343. CLONG UncleanFobxCount;
  344. // the number of local opens associated with this open on the server
  345. CLONG OpenCount;
  346. // the Key assigned by the mini redirector for this SRV_OPEN. Since the various mini
  347. // redirectors do not always get to pick the unique id for a open instance, the key
  348. // used to identify the open to the server is different for different mini redirectors
  349. // based upon the convention adopted at the server.
  350. PVOID Key;
  351. // the access and sharing rights specified for this SRV_OPEN. This is used in
  352. // determining is subsequent open requests can be collapsed with an existing
  353. // SRV_OPEN instance.
  354. ACCESS_MASK DesiredAccess;
  355. ULONG ShareAccess;
  356. ULONG CreateOptions;
  357. // The BufferingFlags field is temporal.....it does not really belong to the
  358. // srvopen; rather the srvopen is used as a representative of the fcb. On
  359. // each open, the bufferingflags field of the srvopen is taken as the minirdr's
  360. // contribution to the buffering state. On an oplock break, a srvopen is passed
  361. // (the one that's being broken) whose bufferflags field is taken as the new
  362. // proxy. On a close that changes the minirdr's contribution, the minirdr should
  363. // take steps to cause a ChangeBufferingState to the new state.
  364. //
  365. // just to reiterate, the field is just used to carry the information from
  366. // the minirdr to RxChangeBufferingState and does not hold longterm coherent
  367. // information.
  368. ULONG BufferingFlags;
  369. // List Entry to wire the SRV_OPEN to the list of SRV_OPENS maintained as
  370. // part of theFCB
  371. // THIS FIELD IS READONLY FOR MINIS
  372. ULONG ulFileSizeVersion;
  373. LIST_ENTRY SrvOpenQLinks;
  374. } MRX_SRV_OPEN, *PMRX_SRV_OPEN;
  375. #define FOBX_FLAG_DFS_OPEN (0x0001)
  376. #define FOBX_FLAG_BAD_HANDLE (0x0002)
  377. #define FOBX_FLAG_BACKUP_INTENT (0x0004)
  378. #define FOBX_FLAG_NOT_USED (0x0008)
  379. #define FOBX_FLAG_FLUSH_EVEN_CACHED_READS (0x0010)
  380. #define FOBX_FLAG_DONT_ALLOW_PAGING_IO (0x0020)
  381. #define FOBX_FLAG_DONT_ALLOW_FASTIO_READ (0x0040)
  382. typedef struct _MRX_PIPE_HANDLE_INFORMATION {
  383. ULONG TypeOfPipe;
  384. ULONG ReadMode;
  385. ULONG CompletionMode;
  386. } MRX_PIPE_HANDLE_INFORMATION, *PMRX_PIPE_HANDLE_INFORMATION;
  387. #ifdef __cplusplus
  388. typedef struct _MRX_FOBX_ : public MRX_NORMAL_NODE_HEADER {
  389. #else // !__cplusplus
  390. typedef struct _MRX_FOBX_ {
  391. MRX_NORMAL_NODE_HEADER;
  392. #endif // __cplusplus
  393. // the MRX_SRV_OPEN instance with which the FOBX is associated
  394. PMRX_SRV_OPEN pSrvOpen;
  395. // the FILE_OBJECT with which this FOBX is associated
  396. // In certain instances the I/O subsystem creates a FILE_OBJECT instance
  397. // on the stack in the interests of efficiency. In such cases this field
  398. // is NULL.
  399. PFILE_OBJECT AssociatedFileObject;
  400. // !!!! changes above this require realignment with fcb.h
  401. // The fields provided to accomodate additional state to be associated
  402. // by the various mini redirectors
  403. PVOID Context;
  404. PVOID Context2;
  405. // The FOBX flags are split into two groups, i.e., visible to mini rdrs and invisible to mini rdrs.
  406. // The visible ones are defined above and the definitions for the invisible ones can be found
  407. // in fcb.h. The convention that has been adopted is that the lower 16 flags will be visible
  408. // to the mini rdr and the upper 16 flags will be reserved for the wrapper. This needs to be
  409. // enforced in defining new flags.
  410. ULONG Flags;
  411. union {
  412. struct {
  413. //
  414. // The query template is used to filter directory query requests.
  415. // It originally is set to null and on the first call the NtQueryDirectory
  416. // it is set to the input filename or "*" if the name is not supplied.
  417. // All subsquent queries then use this template.
  418. UNICODE_STRING UnicodeQueryTemplate;
  419. }; //for directories
  420. PMRX_PIPE_HANDLE_INFORMATION PipeHandleInformation; //for pipes
  421. };
  422. //
  423. // The following field is used as an offset into the Eas for a
  424. // particular file. This will be the offset for the next
  425. // Ea to return. A value of 0xffffffff indicates that the
  426. // Ea's are exhausted.
  427. //
  428. // This field is manipulated directly by the smbmini....maybe it should move down
  429. // one thing is that it is a reminder that NT allows a resume on getting EAs
  430. ULONG OffsetOfNextEaToReturn;
  431. } MRX_FOBX, *PMRX_FOBX;
  432. // Resource accquisition routines.
  433. //
  434. // The synchronization resources of interest to mini redirector writers are
  435. // primarily associated with the FCB. There is a paging I/O resource and a
  436. // regular resource. The paging I/O resource is managed by the wrapper. The only
  437. // resource accesible to mini redirector writers is the regular resource which
  438. // should be accessed using the supplied routines.
  439. extern NTSTATUS
  440. RxAcquireExclusiveFcbResourceInMRx(
  441. PMRX_FCB pFcb);
  442. extern NTSTATUS
  443. RxAcquireSharedFcbResourceInMRx(
  444. PMRX_FCB pFcb);
  445. extern VOID
  446. RxReleaseFcbResourceInMRx(
  447. PMRX_FCB pFcb);
  448. #endif // __MRXFCB_H__