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.

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