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.

758 lines
22 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. smbmrx.h
  5. Abstract:
  6. The global include file for SMB mini redirector
  7. Author:
  8. Balan Sethu Raman (SethuR) - Created 2-March-95
  9. Revision History:
  10. --*/
  11. #ifndef _SMBMRX_H_
  12. #define _SMBMRX_H_
  13. #include "align.h"
  14. #define INCLUDE_SMB_ALL
  15. #define INCLUDE_SMB_CAIRO
  16. #include "status.h"
  17. #include "smbtypes.h"
  18. #include "smbmacro.h"
  19. #include "smb.h"
  20. #include "smbtrans.h"
  21. #include "smbtrace.h"
  22. #include "smbtrsup.h"
  23. #include "smbgtpt.h"
  24. #include "smb64.h"
  25. #define RX_MAP_STATUS(__xxx) ((NTSTATUS)STATUS_##__xxx) //temporary.....
  26. #include "remboot.h"
  27. #include "mrxglbl.h" // global data declarations/defines etc.
  28. #include "smbpoolt.h" // Pool tag definitions
  29. #define SMBMRX_MINIRDR_PARAMETERS \
  30. L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\MRxSmb\\Parameters"
  31. #define SMBMRX_WORKSTATION_PARAMETERS \
  32. L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\LanmanWorkStation\\Parameters"
  33. #define SMBMRX_REDIR_PARAMETERS \
  34. L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Redir\\Parameters"
  35. #define EVENTLOG_MRXSMB_PARAMETERS \
  36. L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\EventLog\\System\\mrxsmb"
  37. #define SYSTEM_SETUP_PARAMETERS \
  38. L"\\Registry\\Machine\\System\\Setup"
  39. typedef ULONG CSC_SHARE_HANDLE, *PCSC_SHARE_HANDLE;
  40. typedef ULONG CSC_SHADOW_HANDLE, *PCSC_SHADOW_HANDLE;
  41. typedef struct tagCSC_ROOT_INFO {
  42. CSC_SHARE_HANDLE hShare;
  43. CSC_SHADOW_HANDLE hRootDir;
  44. USHORT ShareStatus;
  45. USHORT Flags;
  46. }
  47. CSC_ROOT_INFO, *PCSC_ROOT_INFO;
  48. #define CSC_ROOT_INFO_FLAG_DFS_ROOT 0x0001
  49. //
  50. typedef enum _SMBFCB_HOLDING_STATE {
  51. SmbFcb_NotHeld = 0,
  52. SmbFcb_HeldShared = 1,
  53. SmbFcb_HeldExclusive = 2
  54. } SMBFCB_HOLDING_STATE;
  55. //
  56. // With respect to CSC the server entry is in one of the following states
  57. // it is being shadowed in connected mode
  58. // it has been setup for disconnected mode of operation
  59. // it has been transitioned from disconnected mode to connected mode of operation
  60. //
  61. // The following enumerated type captures these states for the server
  62. typedef enum _SERVER_CSC_STATE_ {
  63. ServerCscShadowing,
  64. ServerCscDisconnected,
  65. ServerCscTransitioningToShadowing,
  66. ServerCscTransitioningToDisconnected
  67. } SERVER_CSC_STATE, *PSERVER_CSC_STATE;
  68. #if defined(REMOTE_BOOT)
  69. //
  70. // On a remote boot system, we need to save the parameters passed to
  71. // RxFinishFcbInitialization until later. This structure saves them.
  72. //
  73. typedef struct _FINISH_FCB_INIT_PARAMETERS {
  74. BOOLEAN CallFcbFinishInit;
  75. BOOLEAN InitPacketProvided;
  76. RX_FILE_TYPE FileType;
  77. FCB_INIT_PACKET InitPacket;
  78. } FINISH_FCB_INIT_PARAMETERS, *PFINISH_FCB_INIT_PARAMETERS;
  79. #endif
  80. //
  81. // Sometimes for Csc, we need to pass in a structure that's like a SMB_MRX_FCB
  82. // but it only contains certain fields: i.e. the shadow handles and the status
  83. // we declare these separately so that we can declare just the minimal thing but
  84. // still we can find the containing record if necessary.
  85. // hShadowRenamed and it's parent have to be added because after the rename the name
  86. // in the fcb is still the same, so if there is a delete pending on this fcb
  87. // we endup deleting to source of the rename instead of the target.
  88. // most of the time this not a problem, but when word saves a file the following sequence happens
  89. // ren foo.doc -> ~w000x.tmp
  90. // ren ~w000y.tmp foo.doc
  91. // del ~w000x.tmp
  92. // The last delete causes foo.doc to be deleted becuase in DeleteAfterCloseEpilogue
  93. // we endup looking the inode based on the wrong name and delete that.
  94. // We do the lookup becuase we set hShadow to 0. This is done becuase of a complicated
  95. // set of reasons. So we endup having to have two more entries to identify the new
  96. // inode after rename
  97. typedef struct _MINIMAL_CSC_SMBFCB {
  98. CSC_SHADOW_HANDLE hShadow;
  99. CSC_SHADOW_HANDLE hParentDir;
  100. CSC_SHADOW_HANDLE hShadowRenamed; // these are set of an inode is renamed
  101. CSC_SHADOW_HANDLE hParentDirRenamed; // we use these for deleteonclose
  102. PMRX_FCB ContainingFcb;
  103. USHORT ShadowStatus;
  104. USHORT LocalFlags;
  105. USHORT LastComponentOffset;
  106. USHORT LastComponentLength;
  107. ULONG cntLocalOpens; // count of local opens on this FCB
  108. // can be non-zero only for VDO shares
  109. CSC_ROOT_INFO sCscRootInfo;
  110. UNICODE_STRING uniDfsPrefix; // Dfs reverse mapping strings
  111. UNICODE_STRING uniActualPrefix;
  112. BOOL fDoBitCopy;
  113. LPVOID lpDirtyBitmap;
  114. } MINIMAL_CSC_SMBFCB, *PMINIMAL_CSC_SMBFCB;
  115. //
  116. // A pointer to an instance of MRX_SMB_FCB is stored in the context field of
  117. // MRX_FCBs handled by the SMB mini rdr.
  118. //
  119. typedef struct _MRX_SMB_FCB_ {
  120. //M for Minirdr
  121. ULONG MFlags;
  122. USHORT WriteOnlySrvOpenCount;
  123. USHORT NumberOfFailedCompressedWrites;
  124. SMB_TREE_ID Tid;
  125. USHORT LastOplockLevel;
  126. // The SID used to open this file
  127. // A Sid is a variable length data structure. This way we allocate the max
  128. // number of bytes we could need, while still making it so we can just access
  129. // FULL_DIR_CACHE.Sid.whatever
  130. union {
  131. SID Sid;
  132. BYTE SidBuffer[SECURITY_MAX_SID_SIZE];
  133. };
  134. // CODE.IMPROVEMENT all this stuff is for CSC.... it could/should be allocated
  135. // independently
  136. union {
  137. MINIMAL_CSC_SMBFCB;
  138. MINIMAL_CSC_SMBFCB MinimalCscSmbFcb;
  139. };
  140. LIST_ENTRY ShadowReverseTranslationLinks;
  141. BOOLEAN ShadowIsCorrupt;
  142. ULONG LastCscTimeStampLow;
  143. ULONG LastCscTimeStampHigh;
  144. LARGE_INTEGER NewShadowSize;
  145. LARGE_INTEGER OriginalShadowSize;
  146. ULONG dwFileAttributes;
  147. PMRX_SRV_OPEN SurrogateSrvOpen;
  148. PMRX_FOBX CopyChunkThruOpen;
  149. //read/write synchronization
  150. LIST_ENTRY CscReadWriteWaitersList;
  151. LONG CscOutstandingReaders; //-1 => a single writer
  152. FAST_MUTEX CscShadowReadWriteMutex;
  153. LARGE_INTEGER ExpireTime; // It's time for get attributs from server
  154. LARGE_INTEGER IndexNumber; // Fid
  155. #if defined(REMOTE_BOOT)
  156. //stores saved RxFinishFcbInitialization parameters
  157. PFINISH_FCB_INIT_PARAMETERS FinishFcbInitParameters;
  158. #endif
  159. } MRX_SMB_FCB, *PMRX_SMB_FCB;
  160. #define AttributesSyncInterval 10 // Number of seconds before local file attributes expired
  161. #define MRxSmbGetFcbExtension(pFcb) \
  162. (((pFcb) == NULL) ? NULL : (PMRX_SMB_FCB)((pFcb)->Context))
  163. #define SMB_FCB_FLAG_SENT_DISPOSITION_INFO 0x00000001
  164. #define SMB_FCB_FLAG_WRITES_PERFORMED 0x00000002
  165. #define SMB_FCB_FLAG_LONG_FILE_NAME 0x00000004
  166. #define SMB_FCB_FLAG_CSC_TRUNCATED_SHADOW 0x00000008
  167. typedef struct _SMBPSE_FILEINFO_BUNDLE {
  168. FILE_BASIC_INFORMATION Basic;
  169. FILE_STANDARD_INFORMATION Standard;
  170. FILE_INTERNAL_INFORMATION Internal;
  171. } SMBPSE_FILEINFO_BUNDLE, *PSMBPSE_FILEINFO_BUNDLE;
  172. typedef struct _MRXSMB_CREATE_PARAMETERS {
  173. //this is done this way for when this expands...as it's likely too
  174. //CODE.IMPROVEMENT for example, we should put the mapped stuff in here
  175. ULONG Pid;
  176. UCHAR SecurityFlags;
  177. } MRXSMB_CREATE_PARAMETERS, *PMRXSMB_CREATE_PARAMETERS;
  178. typedef struct _MRX_SMB_DEFERRED_OPEN_CONTEXT {
  179. NT_CREATE_PARAMETERS NtCreateParameters; // a copy of the createparameters
  180. ULONG RxContextFlags;
  181. MRXSMB_CREATE_PARAMETERS SmbCp;
  182. USHORT RxContextCreateFlags;
  183. } MRX_SMB_DEFERRED_OPEN_CONTEXT, *PMRX_SMB_DEFERRED_OPEN_CONTEXT;
  184. //
  185. // A pointer to an instance of MRX_SMB_SRV_OPEN is stored in the context fields
  186. // of MRX_SRV_OPEN handled by the SMB mini rdr. This encapsulates the FID used
  187. // to identify open files/directories in the SMB protocol.
  188. typedef struct _MRX_SMB_SRV_OPEN_ {
  189. ULONG Flags;
  190. ULONG Version;
  191. SMB_FILE_ID Fid;
  192. UCHAR OplockLevel;
  193. //for CSC
  194. PVOID hfShadow;
  195. ACCESS_MASK MaximalAccessRights;
  196. ACCESS_MASK GuestMaximalAccessRights;
  197. PMRX_SMB_DEFERRED_OPEN_CONTEXT DeferredOpenContext;
  198. // the following fields are used for to save the results of a GetFileAttributes
  199. // and to validate whether the fields should be reused or not
  200. ULONG RxContextSerialNumber;
  201. LARGE_INTEGER TimeStampInTicks;
  202. SMBPSE_FILEINFO_BUNDLE FileInfo;
  203. // the following fields are used for preventing multiple reconnection activties
  204. // to the remote boot server while the connection is lost.
  205. LIST_ENTRY ReconnectSynchronizationExchanges;
  206. LONG HotReconnectInProgress;
  207. BOOLEAN NumOfSrvOpenAdded; // debug only
  208. BOOLEAN DeferredOpenInProgress;
  209. LIST_ENTRY DeferredOpenSyncContexts;
  210. USHORT FileStatusFlags;
  211. BOOLEAN IsNtCreate;
  212. } MRX_SMB_SRV_OPEN, *PMRX_SMB_SRV_OPEN;
  213. typedef struct _DEFERRED_OPEN_SYNC_CONTEXT_ {
  214. LIST_ENTRY ListHead;
  215. PRX_CONTEXT RxContext;
  216. NTSTATUS Status;
  217. } DEFERRED_OPEN_SYNC_CONTEXT, *PDEFERRED_OPEN_SYNC_CONTEXT;
  218. typedef struct _PAGING_FILE_CONTEXT_ {
  219. PMRX_SRV_OPEN pSrvOpen;
  220. PMRX_FOBX pFobx;
  221. // The following LIST_ENTRY is used for two purposes.
  222. // while a reconnect is not in progress it is threaded together to maintain
  223. // a list of all SRV_OPEN instances corresponding to paging files. Note
  224. // that this is not done for non paging files.
  225. // When a reconnect is in progress the field is used to ensure that
  226. // there is atmost one reconnect request in progress for any given SRV_OPEN
  227. // instance at the server
  228. // All manipulation of this list is done while owning the SmbCeSpinLock,
  229. LIST_ENTRY ContextList;
  230. } PAGING_FILE_CONTEXT, *PPAGING_FILE_CONTEXT;
  231. #define SMB_SRVOPEN_FLAG_NOT_REALLY_OPEN 0x00000001
  232. #define SMB_SRVOPEN_FLAG_SUCCESSFUL_OPEN 0x00000002
  233. #define SMB_SRVOPEN_FLAG_CANT_GETATTRIBS 0x00000004
  234. #define SMB_SRVOPEN_FLAG_DEFERRED_OPEN 0x00000008
  235. #define SMB_SRVOPEN_FLAG_WRITE_ONLY_HANDLE 0x00000010
  236. #define SMB_SRVOPEN_FLAG_COPYCHUNK_OPEN 0x00000020
  237. #define SMB_SRVOPEN_FLAG_OPEN_SURROGATED 0x00000040
  238. #define SMB_SRVOPEN_FLAG_DISCONNECTED_OPEN 0x00000080
  239. #define SMB_SRVOPEN_FLAG_FILE_DELETED 0x00000100
  240. #define SMB_SRVOPEN_FLAG_LOCAL_OPEN 0x00000200
  241. #define SMB_SRVOPEN_FLAG_SHADOW_DATA_MODIFIED 0x00000400
  242. #define SMB_SRVOPEN_FLAG_SHADOW_ATTRIB_MODIFIED 0x00000800
  243. #define SMB_SRVOPEN_FLAG_SHADOW_LWT_MODIFIED 0x00001000
  244. #define SMB_SRVOPEN_FLAG_AGENT_COPYCHUNK_OPEN 0x00002000
  245. #define SMB_SRVOPEN_FLAG_SHADOW_MODIFIED (SMB_SRVOPEN_FLAG_SHADOW_DATA_MODIFIED|\
  246. SMB_SRVOPEN_FLAG_SHADOW_ATTRIB_MODIFIED|\
  247. SMB_SRVOPEN_FLAG_SHADOW_LWT_MODIFIED)
  248. #define MRxSmbGetSrvOpenExtension(pSrvOpen) \
  249. (((pSrvOpen) == NULL) ? NULL : (PMRX_SMB_SRV_OPEN)((pSrvOpen)->Context))
  250. INLINE
  251. BOOLEAN
  252. MRxSmbIsThisADisconnectedOpen(PMRX_SRV_OPEN SrvOpen)
  253. {
  254. PMRX_SMB_SRV_OPEN smbSrvOpen = MRxSmbGetSrvOpenExtension(SrvOpen);
  255. return BooleanFlagOn(
  256. smbSrvOpen->Flags,
  257. SMB_SRVOPEN_FLAG_DISCONNECTED_OPEN);
  258. }
  259. typedef USHORT SMB_SEARCH_HANDLE;
  260. typedef struct _MRX_SMB_DIRECTORY_RESUME_INFO {
  261. REQ_FIND_NEXT2 FindNext2_Request;
  262. //now we have to include space for a resume name........
  263. WCHAR NameSpace[MAXIMUM_FILENAME_LENGTH+1]; //trailing null
  264. USHORT ParametersLength;
  265. } MRX_SMB_DIRECTORY_RESUME_INFO, *PMRX_SMB_DIRECTORY_RESUME_INFO;
  266. // A pointer to an instance of MRX_SMB_FOBX is stored in the context field
  267. // of MRX_FOBXs handled by the SMB mini rdr. Depending upon the file type
  268. // i.e., file or directory the appropriate context information is stored.
  269. typedef struct _MRX_SMB_FOBX_ {
  270. union {
  271. struct {
  272. struct {
  273. SMB_SEARCH_HANDLE SearchHandle;
  274. ULONG Version;
  275. union {
  276. //the close code will try to free this!
  277. PMRX_SMB_DIRECTORY_RESUME_INFO ResumeInfo;
  278. PSMB_RESUME_KEY CoreResumeKey;
  279. };
  280. struct {
  281. //unaligned direntry sidebuffering params
  282. PBYTE UnalignedDirEntrySideBuffer; //close will try to free this too
  283. ULONG SerialNumber;
  284. BOOLEAN EndOfSearchReached;
  285. BOOLEAN IsUnicode;
  286. BOOLEAN IsNonNtT2Find;
  287. ULONG FilesReturned;
  288. ULONG EntryOffset;
  289. ULONG TotalDataBytesReturned;
  290. //ULONG ReturnedEntryOffset;
  291. };
  292. };
  293. NTSTATUS ErrorStatus;
  294. USHORT Flags;
  295. USHORT FileNameOffset;
  296. USHORT FileNameLengthOffset;
  297. BOOLEAN WildCardsFound;
  298. } Enumeration;
  299. };
  300. union {
  301. struct {
  302. //dont do this yet
  303. //ULONG MaximumReadBufferLength;
  304. //ULONG MaximumWriteBufferLength;
  305. USHORT Flags;
  306. } File;
  307. };
  308. } MRX_SMB_FOBX, *PMRX_SMB_FOBX;
  309. #define MRxSmbGetFileObjectExtension(pFobx) \
  310. (((pFobx) == NULL) ? NULL : (PMRX_SMB_FOBX)((pFobx)->Context))
  311. #define SMBFOBX_ENUMFLAG_SEARCH_NOT_THE_FIRST 0x0001
  312. #define SMBFOBX_ENUMFLAG_SEARCH_HANDLE_OPEN 0x0002
  313. #define SMBFOBX_ENUMFLAG_FAST_RESUME 0x0004
  314. #define SMBFOBX_ENUMFLAG_CORE_SEARCH_IN_PROGRESS 0x0008
  315. #define SMBFOBX_ENUMFLAG_LOUD_FINALIZE 0x0010
  316. #define SMBFOBX_ENUMFLAG_READ_FROM_CACHE 0x0020
  317. #define SMBFOBX_ENUMFLAG_IS_CSC_SEARCH 0x0100
  318. #define SMBFOBX_ENUMFLAG_NO_WILDCARD 0x0200
  319. #define SMBFOBX_ENUMFLAG_FULL_DIR_CACHE 0x0400
  320. typedef
  321. NTSTATUS
  322. (NTAPI *PMRXSMB_CANCEL_ROUTINE) (
  323. PRX_CONTEXT pRxContext);
  324. // The RX_CONTEXT instance has four fields ( ULONG's ) provided by the wrapper
  325. // which can be used by the mini rdr to store its context. This is used by
  326. // the SMB mini rdr to identify the parameters for request cancellation
  327. typedef struct _MRXSMB_RX_CONTEXT {
  328. PMRXSMB_CANCEL_ROUTINE pCancelRoutine;
  329. PVOID pCancelContext;
  330. struct _SMB_EXCHANGE *pExchange;
  331. struct _SMBSTUFFER_BUFFER_STATE *pStufferState;
  332. } MRXSMB_RX_CONTEXT, *PMRXSMB_RX_CONTEXT;
  333. #define MRxSmbGetMinirdrContext(pRxContext) \
  334. ((PMRXSMB_RX_CONTEXT)(&(pRxContext)->MRxContext[0]))
  335. #define MRxSmbMakeSrvOpenKey(Tid,Fid) \
  336. ULongToPtr(((ULONG)(Tid) << 16) | (ULONG)(Fid))
  337. //
  338. // forward declarations for all dispatch vector methods.
  339. //
  340. extern NTSTATUS
  341. MRxSmbStart (
  342. IN OUT struct _RX_CONTEXT * RxContext,
  343. IN OUT PRDBSS_DEVICE_OBJECT RxDeviceObject
  344. );
  345. extern NTSTATUS
  346. MRxSmbStop (
  347. IN OUT struct _RX_CONTEXT * RxContext,
  348. IN OUT PRDBSS_DEVICE_OBJECT RxDeviceObject
  349. );
  350. extern NTSTATUS
  351. MRxSmbMinirdrControl (
  352. IN OUT PRX_CONTEXT RxContext,
  353. IN OUT PVOID pContext,
  354. IN OUT PUCHAR SharedBuffer,
  355. IN ULONG InputBufferLength,
  356. IN ULONG OutputBufferLength,
  357. OUT PULONG CopyBackLength
  358. );
  359. extern NTSTATUS
  360. MRxSmbDevFcb (
  361. IN OUT PRX_CONTEXT RxContext
  362. );
  363. extern NTSTATUS
  364. MRxSmbDevFcbXXXControlFile (
  365. IN OUT PRX_CONTEXT RxContext
  366. );
  367. extern NTSTATUS
  368. MRxSmbCreate (
  369. IN OUT PRX_CONTEXT RxContext
  370. );
  371. extern NTSTATUS
  372. MRxSmbCollapseOpen (
  373. IN OUT PRX_CONTEXT RxContext
  374. );
  375. extern NTSTATUS
  376. MRxSmbShouldTryToCollapseThisOpen (
  377. IN OUT PRX_CONTEXT RxContext
  378. );
  379. extern NTSTATUS
  380. MRxSmbRead (
  381. IN OUT PRX_CONTEXT RxContext
  382. );
  383. extern NTSTATUS
  384. MRxSmbWrite (
  385. IN OUT PRX_CONTEXT RxContext
  386. );
  387. extern NTSTATUS
  388. MRxSmbLocks(
  389. IN OUT PRX_CONTEXT RxContext
  390. );
  391. extern NTSTATUS
  392. MRxSmbFlush(
  393. IN OUT PRX_CONTEXT RxContext
  394. );
  395. extern NTSTATUS
  396. MRxSmbFsCtl(
  397. IN OUT PRX_CONTEXT RxContext
  398. );
  399. NTSTATUS
  400. MRxSmbIoCtl(
  401. IN OUT PRX_CONTEXT RxContext
  402. );
  403. extern NTSTATUS
  404. MRxSmbNotifyChangeDirectory(
  405. IN OUT PRX_CONTEXT RxContext
  406. );
  407. #if 0
  408. extern NTSTATUS
  409. MRxSmbUnlockRoutine (
  410. IN OUT PRX_CONTEXT RxContext,
  411. IN PFILE_LOCK_INFO LockInfo
  412. );
  413. #endif
  414. extern NTSTATUS
  415. MRxSmbComputeNewBufferingState(
  416. IN OUT PMRX_SRV_OPEN pSrvOpen,
  417. IN PVOID pMRxContext,
  418. OUT ULONG *pNewBufferingState);
  419. extern NTSTATUS
  420. MRxSmbFlush (
  421. IN OUT PRX_CONTEXT RxContext
  422. );
  423. extern NTSTATUS
  424. MRxSmbCloseWithDelete (
  425. IN OUT PRX_CONTEXT RxContext
  426. );
  427. extern NTSTATUS
  428. MRxSmbZeroExtend (
  429. IN OUT PRX_CONTEXT RxContext
  430. );
  431. extern NTSTATUS
  432. MRxSmbTruncate (
  433. IN OUT PRX_CONTEXT RxContext
  434. );
  435. extern NTSTATUS
  436. MRxSmbCleanupFobx (
  437. IN OUT PRX_CONTEXT RxContext
  438. );
  439. extern NTSTATUS
  440. MRxSmbCloseSrvOpen (
  441. IN OUT PRX_CONTEXT RxContext
  442. );
  443. extern NTSTATUS
  444. MRxSmbClosedSrvOpenTimeOut (
  445. IN OUT PRX_CONTEXT RxContext
  446. );
  447. extern NTSTATUS
  448. MRxSmbQueryDirectory (
  449. IN OUT PRX_CONTEXT RxContext
  450. );
  451. extern NTSTATUS
  452. MRxSmbIsValidDirectory (
  453. IN OUT PRX_CONTEXT RxContext,
  454. IN PUNICODE_STRING DirectoryName
  455. );
  456. extern NTSTATUS
  457. MRxSmbQueryEaInformation (
  458. IN OUT PRX_CONTEXT RxContext
  459. );
  460. extern NTSTATUS
  461. MRxSmbSetEaInformation (
  462. IN OUT struct _RX_CONTEXT * RxContext
  463. );
  464. extern NTSTATUS
  465. MRxSmbQuerySecurityInformation (
  466. IN OUT PRX_CONTEXT RxContext
  467. );
  468. extern NTSTATUS
  469. MRxSmbSetSecurityInformation (
  470. IN OUT struct _RX_CONTEXT * RxContext
  471. );
  472. extern NTSTATUS
  473. MRxSmbQueryVolumeInformation (
  474. IN OUT PRX_CONTEXT RxContext
  475. );
  476. extern NTSTATUS
  477. MRxSmbSetVolumeInformation (
  478. IN OUT PRX_CONTEXT RxContext
  479. );
  480. extern NTSTATUS
  481. MRxSmbLowIOSubmit (
  482. IN OUT PRX_CONTEXT RxContext
  483. );
  484. extern NTSTATUS
  485. MRxSmbCreateVNetRoot(
  486. IN OUT PMRX_CREATENETROOT_CONTEXT pContext
  487. );
  488. extern NTSTATUS
  489. MRxSmbFinalizeVNetRoot(
  490. IN OUT PMRX_V_NET_ROOT pVirtualNetRoot,
  491. IN PBOOLEAN ForceDisconnect);
  492. extern NTSTATUS
  493. MRxSmbFinalizeNetRoot(
  494. IN OUT PMRX_NET_ROOT pNetRoot,
  495. IN PBOOLEAN ForceDisconnect);
  496. extern NTSTATUS
  497. MRxSmbUpdateNetRootState(
  498. IN PMRX_NET_ROOT pNetRoot);
  499. VOID
  500. MRxSmbExtractNetRootName(
  501. IN PUNICODE_STRING FilePathName,
  502. IN PMRX_SRV_CALL SrvCall,
  503. OUT PUNICODE_STRING NetRootName,
  504. OUT PUNICODE_STRING RestOfName OPTIONAL
  505. );
  506. extern NTSTATUS
  507. MRxSmbCreateSrvCall(
  508. PMRX_SRV_CALL pSrvCall,
  509. PMRX_SRVCALL_CALLBACK_CONTEXT pCallbackContext);
  510. extern NTSTATUS
  511. MRxSmbFinalizeSrvCall(
  512. PMRX_SRV_CALL pSrvCall,
  513. BOOLEAN Force);
  514. extern NTSTATUS
  515. MRxSmbSrvCallWinnerNotify(
  516. IN OUT PMRX_SRV_CALL pSrvCall,
  517. IN BOOLEAN ThisMinirdrIsTheWinner,
  518. IN OUT PVOID pSrvCallContext);
  519. extern NTSTATUS
  520. MRxSmbQueryFileInformation (
  521. IN OUT PRX_CONTEXT RxContext
  522. );
  523. extern NTSTATUS
  524. MRxSmbQueryNamedPipeInformation (
  525. IN OUT PRX_CONTEXT RxContext,
  526. IN FILE_INFORMATION_CLASS FileInformationClass,
  527. IN OUT PVOID Buffer,
  528. IN OUT PULONG pLengthRemaining
  529. );
  530. extern NTSTATUS
  531. MRxSmbSetFileInformation (
  532. IN OUT PRX_CONTEXT RxContext
  533. );
  534. extern NTSTATUS
  535. MRxSmbSetNamedPipeInformation (
  536. IN OUT PRX_CONTEXT RxContext,
  537. IN FILE_INFORMATION_CLASS FileInformationClass,
  538. IN PVOID pBuffer,
  539. IN ULONG BufferLength
  540. );
  541. NTSTATUS
  542. MRxSmbSetFileInformationAtCleanup(
  543. IN OUT PRX_CONTEXT RxContext
  544. );
  545. NTSTATUS
  546. MRxSmbDeallocateForFcb (
  547. IN OUT PMRX_FCB pFcb
  548. );
  549. NTSTATUS
  550. MRxSmbDeallocateForFobx (
  551. IN OUT PMRX_FOBX pFobx
  552. );
  553. NTSTATUS
  554. MRxSmbIsLockRealizable (
  555. IN OUT PMRX_FCB pFcb,
  556. IN PLARGE_INTEGER ByteOffset,
  557. IN PLARGE_INTEGER Length,
  558. IN ULONG LowIoLockFlags
  559. );
  560. extern NTSTATUS
  561. MRxSmbForcedClose (
  562. IN OUT PMRX_SRV_OPEN SrvOpen
  563. );
  564. extern NTSTATUS
  565. MRxSmbExtendForCache (
  566. IN OUT struct _RX_CONTEXT * RxContext,
  567. IN OUT PLARGE_INTEGER pNewFileSize,
  568. OUT PLARGE_INTEGER pNewAllocationSize
  569. );
  570. extern NTSTATUS
  571. MRxSmbExtendForNonCache (
  572. IN OUT struct _RX_CONTEXT * RxContext,
  573. IN OUT PLARGE_INTEGER pNewFileSize,
  574. OUT PLARGE_INTEGER pNewAllocationSize
  575. );
  576. extern NTSTATUS
  577. MRxSmbCompleteBufferingStateChangeRequest (
  578. IN OUT PRX_CONTEXT RxContext,
  579. IN OUT PMRX_SRV_OPEN SrvOpen,
  580. IN PVOID pContext
  581. );
  582. //csc dcon needs to see this
  583. NTSTATUS
  584. MRxSmbGetFsAttributesFromNetRoot(
  585. IN OUT PRX_CONTEXT RxContext
  586. );
  587. #include "smbwmi.h"
  588. #include "smbutils.h"
  589. #include "smbce.h"
  590. #include "midatlas.h"
  591. #include "smbcedbp.h"
  592. #include "smbcedb.h"
  593. #include "smbxchng.h"
  594. #include "stuffer.h"
  595. #include "smbpse.h"
  596. #include "smbcaps.h"
  597. #include "transprt.h"
  598. #include "transact.h"
  599. #include "recursvc.h" // recurrent service definitions
  600. #include "smbadmin.h"
  601. #include "smbmrxmm.h" // memory mgmt. routines
  602. #include "smbprocs.h" // crossreferenced routines
  603. #include "manipmdl.h" // routines for MDL substringing
  604. #include "devfcb.h" // includes Statistics data strcutures/macros
  605. #include "smbea.h"
  606. #include "csc.h"
  607. #endif // _SMBMRX_H_