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.

2120 lines
46 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. smbprocs.h
  5. Abstract:
  6. Prototypes for routines that cross protocol-selection boundaries
  7. Author:
  8. Revision History:
  9. --*/
  10. #ifndef _SMBPROCS_H_
  11. #define _SMBPROCS_H_
  12. #include "exsessup.h"
  13. #include "tdikrnl.h"
  14. //cross-referenced internal routines
  15. //from rename.c
  16. MRxSmbRename(
  17. IN PRX_CONTEXT RxContext
  18. );
  19. //from openclos.c
  20. NTSTATUS
  21. MRxSmbBuildClose (
  22. PSMBSTUFFER_BUFFER_STATE StufferState
  23. );
  24. NTSTATUS
  25. MRxSmbBuildFindClose (
  26. PSMBSTUFFER_BUFFER_STATE StufferState
  27. );
  28. PSMBCE_TRANSPORT
  29. SmbCeFindTransport(
  30. PUNICODE_STRING pTransportName);
  31. //paged internal routines
  32. NTSTATUS
  33. MRxSmbSetConfigurationInformation(
  34. IN PRX_CONTEXT RxContext
  35. );
  36. NTSTATUS
  37. MRxSmbGetConfigurationInformation(
  38. IN PRX_CONTEXT RxContext
  39. );
  40. NTSTATUS
  41. MRxSmbSetDomainName(
  42. IN PRX_CONTEXT RxContext
  43. );
  44. NTSTATUS
  45. MRxSmbSetServerGuid(
  46. IN PRX_CONTEXT RxContext
  47. );
  48. NTSTATUS
  49. MRxSmbTestDevIoctl(
  50. IN PRX_CONTEXT RxContext
  51. );
  52. NTSTATUS
  53. MRxSmbExternalStart (
  54. IN PRX_CONTEXT RxContext
  55. );
  56. NTSTATUS
  57. MRxSmbGetStatistics(
  58. IN OUT PRX_CONTEXT RxContext
  59. );
  60. NTSTATUS
  61. MRxSmbDevFcbXXXControlFile (
  62. IN OUT PRX_CONTEXT RxContext
  63. );
  64. NTSTATUS
  65. MRxSmbQueryEaInformation (
  66. IN OUT PRX_CONTEXT RxContext
  67. );
  68. NTSTATUS
  69. MRxSmbSetEaInformation (
  70. IN OUT struct _RX_CONTEXT * RxContext
  71. );
  72. NTSTATUS
  73. MRxSmbQuerySecurityInformation (
  74. IN OUT PRX_CONTEXT RxContext
  75. );
  76. NTSTATUS
  77. MRxSmbSetSecurityInformation (
  78. IN OUT struct _RX_CONTEXT * RxContext
  79. );
  80. NTSTATUS
  81. MRxSmbQueryQuotaInformation (
  82. IN OUT PRX_CONTEXT RxContext
  83. );
  84. NTSTATUS
  85. MRxSmbSetQuotaInformation (
  86. IN OUT struct _RX_CONTEXT * RxContext
  87. );
  88. NTSTATUS
  89. MRxSmbLoadEaList(
  90. IN PRX_CONTEXT RxContext,
  91. IN PUCHAR UserEaList,
  92. IN ULONG UserEaListLength,
  93. OUT PFEALIST *ServerEaList
  94. );
  95. VOID
  96. MRxSmbNtGeaListToOs2 (
  97. IN PFILE_GET_EA_INFORMATION NtGetEaList,
  98. IN ULONG GeaListLength,
  99. IN PGEALIST GeaList
  100. );
  101. PGEA
  102. MRxSmbNtGetEaToOs2 (
  103. OUT PGEA Gea,
  104. IN PFILE_GET_EA_INFORMATION NtGetEa
  105. );
  106. NTSTATUS
  107. MRxSmbQueryEasFromServer(
  108. IN PRX_CONTEXT RxContext,
  109. IN PFEALIST ServerEaList,
  110. IN PVOID Buffer,
  111. IN OUT PULONG BufferLengthRemaining,
  112. IN BOOLEAN ReturnSingleEntry,
  113. IN BOOLEAN UserEaListSupplied
  114. );
  115. ULONG
  116. MRxSmbNtFullEaSizeToOs2 (
  117. IN PFILE_FULL_EA_INFORMATION NtFullEa
  118. );
  119. VOID
  120. MRxSmbNtFullListToOs2 (
  121. IN PFILE_FULL_EA_INFORMATION NtEaList,
  122. IN PFEALIST FeaList
  123. );
  124. PVOID
  125. MRxSmbNtFullEaToOs2 (
  126. OUT PFEA Fea,
  127. IN PFILE_FULL_EA_INFORMATION NtFullEa
  128. );
  129. NTSTATUS
  130. MRxSmbSetEaList(
  131. IN PRX_CONTEXT RxContext,
  132. IN PFEALIST ServerEaList
  133. );
  134. NTSTATUS
  135. MRxSmbCreateFileSuccessTail (
  136. PRX_CONTEXT RxContext,
  137. PBOOLEAN MustRegainExclusiveResource,
  138. SMBFCB_HOLDING_STATE *SmbFcbHoldingState,
  139. RX_FILE_TYPE StorageType,
  140. SMB_FILE_ID Fid,
  141. ULONG ServerVersion,
  142. UCHAR OplockLevel,
  143. ULONG CreateAction,
  144. PSMBPSE_FILEINFO_BUNDLE FileInfo
  145. );
  146. NTSTATUS
  147. SmbCeInitializeExtendedSessionSetupExchange(
  148. PSMB_EXCHANGE* pExchangePtr,
  149. PMRX_V_NET_ROOT pVNetRoot);
  150. VOID
  151. SmbCeDiscardExtendedSessionSetupExchange(
  152. PSMB_EXTENDED_SESSION_SETUP_EXCHANGE pExtSessionSetupExchange);
  153. NTSTATUS
  154. SmbExtSecuritySessionSetupExchangeStart(
  155. PSMB_EXCHANGE pExchange);
  156. NTSTATUS
  157. SmbExtSecuritySessionSetupExchangeReceive(
  158. IN struct _SMB_EXCHANGE *pExchange, // The exchange instance
  159. IN ULONG BytesIndicated,
  160. IN ULONG BytesAvailable,
  161. OUT ULONG *pBytesTaken,
  162. IN PSMB_HEADER pSmbHeader,
  163. OUT PMDL *pDataBufferPointer,
  164. OUT PULONG pDataSize,
  165. IN ULONG ReceiveFlags);
  166. NTSTATUS
  167. SmbExtSecuritySessionSetupExchangeSendCompletionHandler(
  168. IN PSMB_EXCHANGE pExchange, // The exchange instance
  169. IN PMDL pXmitBuffer,
  170. IN NTSTATUS SendCompletionStatus);
  171. NTSTATUS
  172. SmbConstructNetRootExchangeFinalize(
  173. PSMB_EXCHANGE pExchange,
  174. BOOLEAN *pPostFinalize);
  175. VOID
  176. __MRxSmbAllocateSideBuffer(
  177. IN OUT PRX_CONTEXT RxContext,
  178. IN OUT PMRX_SMB_FOBX smbFobx,
  179. IN USHORT Setup
  180. #if DBG
  181. ,IN PUNICODE_STRING smbtemplate
  182. #endif
  183. );
  184. VOID
  185. MRxSmbDeallocateSideBuffer(
  186. IN OUT PRX_CONTEXT RxContext,
  187. IN OUT PMRX_SMB_FOBX smbFobx,
  188. IN PSZ where
  189. );
  190. VOID
  191. MRxSmbTranslateLanManFindBuffer(
  192. PRX_CONTEXT RxContext,
  193. PULONG PreviousReturnedEntry,
  194. PBYTE ThisEntryInBuffer
  195. );
  196. NTSTATUS
  197. MrxSmbUnalignedDirEntryCopyTail(
  198. IN OUT PRX_CONTEXT RxContext,
  199. IN FILE_INFORMATION_CLASS FileInformationClass,
  200. IN OUT PVOID pBuffer,
  201. IN OUT PULONG pLengthRemaining,
  202. IN OUT PMRX_SMB_FOBX smbFobx
  203. );
  204. NTSTATUS
  205. MRxSmbQueryDirectory(
  206. IN OUT PRX_CONTEXT RxContext
  207. );
  208. NTSTATUS
  209. MRxSmbQueryVolumeInformation(
  210. IN OUT PRX_CONTEXT RxContext
  211. );
  212. NTSTATUS
  213. MRxSmbQueryVolumeInformationWithFullBuffer(
  214. IN OUT PRX_CONTEXT RxContext
  215. );
  216. NTSTATUS
  217. MRxSmbSetVolumeInformation(
  218. IN OUT PRX_CONTEXT pRxContext
  219. );
  220. NTSTATUS
  221. MRxSmbSetFileInformation (
  222. IN PRX_CONTEXT RxContext
  223. );
  224. NTSTATUS
  225. MRxSmbQueryNamedPipeInformation(
  226. IN PRX_CONTEXT RxContext,
  227. IN FILE_INFORMATION_CLASS FileInformationClass,
  228. IN OUT PVOID pBuffer,
  229. IN OUT PULONG pLengthRemaining);
  230. NTSTATUS
  231. MRxSmbSetNamedPipeInformation(
  232. IN PRX_CONTEXT RxContext,
  233. IN FILE_INFORMATION_CLASS FileInformationClass,
  234. IN PVOID pBuffer,
  235. IN ULONG BufferLength);
  236. NTSTATUS
  237. MRxSmbSetFileInformationAtCleanup(
  238. IN PRX_CONTEXT RxContext
  239. );
  240. NTSTATUS
  241. MRxSmbIsValidDirectory(
  242. IN OUT PRX_CONTEXT RxContext,
  243. IN PUNICODE_STRING DirectoryName
  244. );
  245. NTSTATUS
  246. MRxSmbFabricateAttributesOnNetRoot(
  247. IN OUT PSMBCE_NET_ROOT psmbNetRoot,
  248. IN PSMBCE_SERVER pServer
  249. );
  250. NTSTATUS
  251. MRxSmbCoreInformation(
  252. IN OUT PRX_CONTEXT RxContext,
  253. IN ULONG InformationClass,
  254. IN OUT PVOID pBuffer,
  255. IN OUT PULONG pBufferLength,
  256. IN SMB_PSE_ORDINARY_EXCHANGE_ENTRYPOINTS EntryPoint
  257. );
  258. NTSTATUS
  259. MRxSmbLoadCoreFileSearchBuffer(
  260. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  261. );
  262. VOID MRxSmbCoreFileSeach_AssertFields(void);
  263. NTSTATUS
  264. MRxSmbCoreFileSearch(
  265. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  266. );
  267. NTSTATUS
  268. MrxSmbOemVolumeInfoToUnicode(
  269. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE,
  270. ULONG *VolumeLabelLengthReturned
  271. );
  272. MrxSmbCoreQueryFsVolumeInfo(
  273. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  274. );
  275. NTSTATUS
  276. MrxSmbQueryFsVolumeInfo(
  277. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  278. );
  279. NTSTATUS
  280. MrxSmbCoreQueryDiskAttributes(
  281. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  282. );
  283. NTSTATUS
  284. MrxSmbQueryDiskAttributes(
  285. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  286. );
  287. NTSTATUS
  288. SmbPseExchangeStart_CoreInfo(
  289. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  290. );
  291. NTSTATUS
  292. MRxSmbFinishSearch (
  293. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  294. PRESP_SEARCH Response
  295. );
  296. NTSTATUS
  297. MRxSmbFinishQueryDiskInfo (
  298. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  299. PRESP_QUERY_INFORMATION_DISK Response
  300. );
  301. NTSTATUS
  302. MRxSmbExtendForCache(
  303. IN OUT struct _RX_CONTEXT * RxContext,
  304. IN PLARGE_INTEGER pNewFileSize,
  305. OUT PLARGE_INTEGER pNewAllocationSize
  306. );
  307. NTSTATUS
  308. MRxSmbExtendForNonCache(
  309. IN OUT struct _RX_CONTEXT * RxContext,
  310. IN PLARGE_INTEGER pNewFileSize,
  311. OUT PLARGE_INTEGER pNewAllocationSize
  312. );
  313. NTSTATUS
  314. MRxSmbGetNtAllocationInfo (
  315. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  316. );
  317. NTSTATUS
  318. __MRxSmbSimpleSyncTransact2(
  319. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE,
  320. IN SMB_PSE_ORDINARY_EXCHANGE_TYPE OEType,
  321. IN ULONG TransactSetupCode,
  322. IN PVOID Params,
  323. IN ULONG ParamsLength,
  324. IN PVOID Data,
  325. IN ULONG DataLength,
  326. IN PSMB_PSE_OE_T2_FIXUP_ROUTINE FixupRoutine
  327. );
  328. NTSTATUS
  329. MRxSmbFinishTransaction2 (
  330. IN OUT PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  331. IN PRESP_TRANSACTION Response
  332. );
  333. NTSTATUS
  334. MRxSmbFsCtl(
  335. IN OUT PRX_CONTEXT RxContext);
  336. VOID
  337. MRxSmbNotifyChangeDirectoryCompletion(
  338. struct _SMB_NOTIFY_CHANGE_DIRECTORY_CONTEXT_ *pNotificationContext);
  339. NTSTATUS
  340. MRxSmbNotifyChangeDirectory(
  341. IN OUT PRX_CONTEXT RxContext);
  342. NTSTATUS
  343. MRxSmbNamedPipeFsControl(PRX_CONTEXT RxContext);
  344. NTSTATUS
  345. MRxSmbFsCtlUserTransact(PRX_CONTEXT RxContext);
  346. NTSTATUS
  347. MRxSmbMailSlotFsControl(PRX_CONTEXT RxContext);
  348. NTSTATUS
  349. MRxSmbDfsFsControl(PRX_CONTEXT RxContext);
  350. NTSTATUS
  351. MRxSmbFsControl(PRX_CONTEXT RxContext);
  352. NTSTATUS
  353. MRxSmbIoCtl(
  354. IN OUT PRX_CONTEXT RxContext);
  355. NTSTATUS
  356. DriverEntry(
  357. IN PDRIVER_OBJECT DriverObject,
  358. IN PUNICODE_STRING RegistryPath
  359. );
  360. VOID
  361. MRxSmbInitUnwind(
  362. IN PDRIVER_OBJECT DriverObject,
  363. IN enum _MRXSMB_INIT_STATES MRxSmbInitState
  364. );
  365. VOID
  366. MRxSmbInitUnwindSmb(
  367. IN PDRIVER_OBJECT DriverObject,
  368. IN enum _MRXSMB_INIT_STATES MRxSmbInitState
  369. );
  370. VOID
  371. MRxSmbInitUnwindBowser(
  372. IN PDRIVER_OBJECT DriverObject,
  373. IN enum _MRXSMB_INIT_STATES MRxSmbInitState
  374. );
  375. VOID
  376. MRxSmbUnload(
  377. IN PDRIVER_OBJECT DriverObject
  378. );
  379. NTSTATUS
  380. MRxSmbStart(
  381. PRX_CONTEXT RxContext,
  382. IN OUT PRDBSS_DEVICE_OBJECT RxDeviceObject
  383. );
  384. NTSTATUS
  385. MRxSmbStop(
  386. PRX_CONTEXT RxContext,
  387. IN OUT PRDBSS_DEVICE_OBJECT RxDeviceObject
  388. );
  389. NTSTATUS
  390. MRxSmbInitializeSecurity (VOID);
  391. NTSTATUS
  392. MRxSmbUninitializeSecurity(VOID);
  393. VOID
  394. MRxSmbReadMiscellaneousRegistryParameters();
  395. NTSTATUS
  396. SmbCeGetConfigurationInformation();
  397. NTSTATUS
  398. MRxSmbFsdDispatch (
  399. IN PDEVICE_OBJECT DeviceObject,
  400. IN PIRP Irp
  401. );
  402. VOID
  403. MRxSmbPreUnload(
  404. VOID
  405. );
  406. NTSTATUS
  407. MRxSmbDeallocateForFcb (
  408. IN OUT PMRX_FCB pFcb
  409. );
  410. NTSTATUS
  411. MRxSmbDeallocateForFobx (
  412. IN OUT PMRX_FOBX pFobx
  413. );
  414. NTSTATUS
  415. MRxSmbGetUlongRegistryParameter(
  416. HANDLE ParametersHandle,
  417. PWCHAR ParameterName,
  418. PULONG ParamUlong,
  419. BOOLEAN LogFailure
  420. );
  421. NTSTATUS
  422. MRxSmbInitializeTables(void);
  423. NTSTATUS
  424. MRxSmbLocks(
  425. IN PRX_CONTEXT RxContext);
  426. NTSTATUS
  427. MRxSmbBuildLocksAndX (
  428. PSMBSTUFFER_BUFFER_STATE StufferState);
  429. NTSTATUS
  430. MRxSmbBuildLockAssert (
  431. PSMBSTUFFER_BUFFER_STATE StufferState
  432. );
  433. NTSTATUS
  434. SmbPseExchangeStart_Locks(
  435. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  436. );
  437. NTSTATUS
  438. MRxSmbFinishLocks (
  439. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  440. PRESP_LOCKING_ANDX Response
  441. );
  442. NTSTATUS
  443. MRxSmbUnlockRoutine (
  444. IN PRX_CONTEXT RxContext,
  445. IN PFILE_LOCK_INFO LockInfo
  446. );
  447. NTSTATUS
  448. MRxSmbCompleteBufferingStateChangeRequest(
  449. IN OUT PRX_CONTEXT RxContext,
  450. IN OUT PMRX_SRV_OPEN SrvOpen,
  451. IN PVOID pContext
  452. );
  453. NTSTATUS
  454. MRxSmbBuildFlush (
  455. PSMBSTUFFER_BUFFER_STATE StufferState
  456. );
  457. NTSTATUS
  458. MRxSmbFlush(
  459. IN PRX_CONTEXT RxContext);
  460. NTSTATUS
  461. MRxSmbIsLockRealizable (
  462. IN OUT PMRX_FCB pFcb,
  463. IN PLARGE_INTEGER ByteOffset,
  464. IN PLARGE_INTEGER Length,
  465. IN ULONG LowIoLockFlags
  466. );
  467. NTSTATUS
  468. MRxSmbFinishFlush (
  469. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  470. PRESP_FLUSH Response
  471. );
  472. VOID
  473. _InitializeMidMapFreeList(struct _MID_MAP_ *pMidMap);
  474. PMID_ATLAS
  475. FsRtlCreateMidAtlas(
  476. USHORT MaximumNumberOfMids,
  477. USHORT MidsAllocatedAtStart);
  478. VOID
  479. _UninitializeMidMap(
  480. struct _MID_MAP_ *pMidMap,
  481. PCONTEXT_DESTRUCTOR pContextDestructor);
  482. VOID
  483. FsRtlDestroyMidAtlas(
  484. PMID_ATLAS pMidAtlas,
  485. PCONTEXT_DESTRUCTOR pContextDestructor);
  486. NTSTATUS
  487. BuildSessionSetupSecurityInformation(
  488. PSMB_EXCHANGE pExchange,
  489. PBYTE pSmbBuffer,
  490. PULONG pSmbBufferSize);
  491. NTSTATUS
  492. BuildTreeConnectSecurityInformation(
  493. PSMB_EXCHANGE pExchange,
  494. PBYTE pBuffer,
  495. PBYTE pPasswordLength,
  496. PULONG pSmbBufferSize);
  497. VOID
  498. MRxSmbMungeBufferingIfWriteOnlyHandles (
  499. ULONG WriteOnlySrvOpenCount,
  500. PMRX_SRV_OPEN SrvOpen
  501. );
  502. VOID
  503. MRxSmbCopyAndTranslatePipeState(
  504. IN OUT PRX_CONTEXT RxContext,
  505. IN ULONG PipeState
  506. );
  507. BOOLEAN
  508. IsReconnectRequired(
  509. PMRX_SRV_CALL SrvCall);
  510. BOOLEAN
  511. MRxSmbIsCreateWithEasSidsOrLongName(
  512. IN OUT PRX_CONTEXT RxContext,
  513. OUT PULONG DialectFlags
  514. );
  515. NTSTATUS
  516. MRxSmbShouldTryToCollapseThisOpen (
  517. IN PRX_CONTEXT RxContext
  518. );
  519. NTSTATUS
  520. MRxSmbCreate (
  521. IN OUT PRX_CONTEXT RxContext
  522. );
  523. NTSTATUS
  524. MRxSmbDeferredCreate (
  525. IN OUT PRX_CONTEXT RxContext
  526. );
  527. NTSTATUS
  528. MRxSmbCollapseOpen(
  529. IN OUT PRX_CONTEXT RxContext
  530. );
  531. NTSTATUS
  532. MRxSmbComputeNewBufferingState(
  533. IN OUT PMRX_SRV_OPEN pMRxSrvOpen,
  534. IN PVOID pMRxContext,
  535. OUT PULONG pNewBufferingState);
  536. NTSTATUS
  537. MRxSmbConstructDeferredOpenContext (
  538. IN OUT PRX_CONTEXT RxContext
  539. );
  540. VOID
  541. MRxSmbAdjustCreateParameters (
  542. PRX_CONTEXT RxContext,
  543. PMRXSMB_CREATE_PARAMETERS smbcp
  544. );
  545. VOID
  546. MRxSmbAdjustReturnedCreateAction(
  547. IN OUT PRX_CONTEXT RxContext
  548. );
  549. NTSTATUS
  550. MRxSmbBuildNtCreateAndX (
  551. PSMBSTUFFER_BUFFER_STATE StufferState,
  552. PMRXSMB_CREATE_PARAMETERS smbcp
  553. );
  554. NTSTATUS
  555. MRxSmbBuildOpenAndX (
  556. PSMBSTUFFER_BUFFER_STATE StufferState,
  557. PMRXSMB_CREATE_PARAMETERS smbcp
  558. );
  559. NTSTATUS
  560. MRxSmbBuildOpenPrintFile (
  561. PSMBSTUFFER_BUFFER_STATE StufferState
  562. );
  563. NTSTATUS
  564. SmbPseExchangeStart_Create(
  565. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  566. );
  567. VOID
  568. MRxSmbSetSrvOpenFlags (
  569. PRX_CONTEXT RxContext,
  570. RX_FILE_TYPE StorageType,
  571. PMRX_SRV_OPEN SrvOpen,
  572. PMRX_SMB_SRV_OPEN smbSrvOpen
  573. );
  574. NTSTATUS
  575. MRxSmbCreateFileSuccessTail (
  576. PRX_CONTEXT RxContext,
  577. PBOOLEAN MustRegainExclusiveResource,
  578. SMBFCB_HOLDING_STATE *SmbFcbHoldingState,
  579. RX_FILE_TYPE StorageType,
  580. SMB_FILE_ID Fid,
  581. ULONG ServerVersion,
  582. UCHAR OplockLevel,
  583. ULONG CreateAction,
  584. PSMBPSE_FILEINFO_BUNDLE FileInfo
  585. );
  586. NTSTATUS
  587. MRxSmbFinishNTCreateAndX (
  588. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  589. PRESP_NT_CREATE_ANDX Response
  590. );
  591. NTSTATUS
  592. MRxSmbFinishOpenAndX (
  593. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  594. PRESP_OPEN_ANDX Response
  595. );
  596. NTSTATUS
  597. MRxSmbFinishCreatePrintFile (
  598. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  599. PRESP_OPEN_PRINT_FILE Response
  600. );
  601. NTSTATUS
  602. MRxSmbFinishT2OpenFile (
  603. IN OUT PRX_CONTEXT RxContext,
  604. IN PRESP_OPEN2 Response,
  605. IN OUT PBOOLEAN MustRegainExclusiveResource,
  606. IN OUT SMBFCB_HOLDING_STATE *SmbFcbHoldingState,
  607. IN ULONG ServerVersion
  608. );
  609. NTSTATUS
  610. MRxSmbT2OpenFile(
  611. IN OUT PRX_CONTEXT RxContext,
  612. IN OUT SMBFCB_HOLDING_STATE *SmbFcbHoldingState
  613. );
  614. NTSTATUS
  615. MRxSmbFinishLongNameCreateFile (
  616. IN OUT PRX_CONTEXT RxContext,
  617. IN PRESP_CREATE_WITH_SD_OR_EA Response,
  618. IN PBOOLEAN MustRegainExclusiveResource,
  619. IN OUT SMBFCB_HOLDING_STATE *SmbFcbHoldingState,
  620. IN ULONG ServerVersion
  621. );
  622. NTSTATUS
  623. MRxSmbCreateWithEasSidsOrLongName(
  624. IN OUT PRX_CONTEXT RxContext,
  625. IN OUT SMBFCB_HOLDING_STATE *SmbFcbHoldingState
  626. );
  627. NTSTATUS
  628. MRxSmbZeroExtend(
  629. IN PRX_CONTEXT pRxContext);
  630. NTSTATUS
  631. MRxSmbTruncate(
  632. IN PRX_CONTEXT pRxContext);
  633. NTSTATUS
  634. MRxSmbCleanupFobx(
  635. IN PRX_CONTEXT RxContext);
  636. NTSTATUS
  637. MRxSmbForcedClose(
  638. IN PMRX_SRV_OPEN pSrvOpen);
  639. NTSTATUS
  640. MRxSmbCloseSrvOpen(
  641. IN PRX_CONTEXT RxContext
  642. );
  643. NTSTATUS
  644. MRxSmbBuildClose (
  645. PSMBSTUFFER_BUFFER_STATE StufferState
  646. );
  647. NTSTATUS
  648. MRxSmbBuildClosePrintFile (
  649. PSMBSTUFFER_BUFFER_STATE StufferState
  650. );
  651. NTSTATUS
  652. MRxSmbBuildFindClose (
  653. PSMBSTUFFER_BUFFER_STATE StufferState
  654. );
  655. NTSTATUS
  656. SmbPseExchangeStart_Close(
  657. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  658. );
  659. NTSTATUS
  660. MRxSmbFinishClose (
  661. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  662. PRESP_CLOSE Response
  663. );
  664. NTSTATUS
  665. MRxSmbGetFileAttributes(
  666. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  667. );
  668. NTSTATUS
  669. MRxSmbCoreDeleteForSupercedeOrClose(
  670. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE,
  671. BOOLEAN DeleteDirectory
  672. );
  673. NTSTATUS
  674. MRxSmbCoreCheckPath(
  675. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  676. );
  677. NTSTATUS
  678. MRxSmbCoreOpen(
  679. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE,
  680. ULONG OpenShareMode,
  681. ULONG Attribute
  682. );
  683. NTSTATUS
  684. MRxSmbSetFileAttributes(
  685. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE,
  686. ULONG SmbAttributes
  687. );
  688. NTSTATUS
  689. MRxSmbCoreCreateDirectory(
  690. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  691. );
  692. NTSTATUS
  693. MRxSmbCoreCreate(
  694. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE,
  695. ULONG Attribute,
  696. BOOLEAN CreateNew
  697. );
  698. NTSTATUS
  699. MRxSmbCloseAfterCoreCreate(
  700. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  701. );
  702. NTSTATUS
  703. MRxSmbCoreTruncate(
  704. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE,
  705. ULONG Fid,
  706. ULONG FileTruncationPoint
  707. );
  708. NTSTATUS
  709. MRxSmbDownlevelCreate(
  710. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  711. );
  712. NTSTATUS
  713. MRxSmbFinishCoreCreate (
  714. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  715. PRESP_CREATE Response
  716. );
  717. VOID
  718. MRxSmbPopulateFileInfoInOE(
  719. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  720. USHORT FileAttributes,
  721. ULONG LastWriteTimeInSeconds,
  722. ULONG FileSize
  723. );
  724. NTSTATUS
  725. MRxSmbFinishCoreOpen (
  726. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  727. PRESP_OPEN Response
  728. );
  729. NTSTATUS
  730. MRxSmbPseudoOpenTailFromCoreCreateDirectory (
  731. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  732. USHORT Attributes
  733. );
  734. NTSTATUS
  735. MRxSmbPseudoOpenTailFromFakeGFAResponse (
  736. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  737. RX_FILE_TYPE StorageType
  738. );
  739. NTSTATUS
  740. MRxSmbPseudoOpenTailFromGFAResponse (
  741. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange
  742. );
  743. LARGE_INTEGER
  744. MRxSmbConvertSmbTimeToTime (
  745. //IN PSMB_EXCHANGE Exchange OPTIONAL,
  746. IN PSMBCE_SERVER Server OPTIONAL,
  747. IN SMB_TIME Time,
  748. IN SMB_DATE Date
  749. );
  750. BOOLEAN
  751. MRxSmbConvertTimeToSmbTime (
  752. IN PLARGE_INTEGER InputTime,
  753. IN PSMB_EXCHANGE Exchange OPTIONAL,
  754. OUT PSMB_TIME Time,
  755. OUT PSMB_DATE Date
  756. );
  757. BOOLEAN
  758. MRxSmbTimeToSecondsSince1970 (
  759. IN PLARGE_INTEGER CurrentTime,
  760. IN PSMBCE_SERVER Server OPTIONAL,
  761. OUT PULONG SecondsSince1970
  762. );
  763. VOID
  764. MRxSmbSecondsSince1970ToTime (
  765. IN ULONG SecondsSince1970,
  766. //IN PSMB_EXCHANGE Exchange OPTIONAL,
  767. IN PSMBCE_SERVER Server,
  768. OUT PLARGE_INTEGER CurrentTime
  769. );
  770. ULONG
  771. MRxSmbMapSmbAttributes (
  772. IN USHORT SmbAttribs
  773. );
  774. USHORT
  775. MRxSmbMapDisposition (
  776. IN ULONG Disposition
  777. );
  778. ULONG
  779. MRxSmbUnmapDisposition (
  780. IN USHORT SmbDisposition,
  781. ULONG Disposition
  782. );
  783. USHORT
  784. MRxSmbMapDesiredAccess (
  785. IN ULONG DesiredAccess
  786. );
  787. USHORT
  788. MRxSmbMapShareAccess (
  789. IN USHORT ShareAccess
  790. );
  791. USHORT
  792. MRxSmbMapFileAttributes (
  793. IN ULONG FileAttributes
  794. );
  795. NTSTATUS
  796. MRxSmbRead(
  797. IN PRX_CONTEXT RxContext
  798. );
  799. NTSTATUS
  800. MRxSmbBuildReadAndX (
  801. PSMBSTUFFER_BUFFER_STATE StufferState,
  802. PLARGE_INTEGER ByteOffsetAsLI,
  803. ULONG ByteCount,
  804. ULONG RemainingBytes
  805. );
  806. NTSTATUS
  807. MRxSmbBuildCoreRead (
  808. PSMBSTUFFER_BUFFER_STATE StufferState,
  809. PLARGE_INTEGER ByteOffsetAsLI,
  810. ULONG ByteCount,
  811. ULONG RemainingBytes
  812. );
  813. NTSTATUS
  814. MRxSmbBuildSmallRead (
  815. PSMBSTUFFER_BUFFER_STATE StufferState,
  816. PLARGE_INTEGER ByteOffsetAsLI,
  817. ULONG ByteCount,
  818. ULONG RemainingBytes
  819. );
  820. NTSTATUS
  821. SmbPseExchangeStart_Read(
  822. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  823. );
  824. NTSTATUS
  825. MRxSmbFinishNoCopyRead (
  826. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange
  827. );
  828. MRxSmbRename(
  829. IN PRX_CONTEXT RxContext
  830. );
  831. NTSTATUS
  832. MRxSmbBuildRename (
  833. PSMBSTUFFER_BUFFER_STATE StufferState
  834. );
  835. NTSTATUS
  836. MRxSmbBuildDeleteForRename (
  837. PSMBSTUFFER_BUFFER_STATE StufferState
  838. );
  839. NTSTATUS
  840. SmbPseExchangeStart_Rename(
  841. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  842. );
  843. NTSTATUS
  844. MRxSmbFinishRename (
  845. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  846. PRESP_RENAME Response
  847. );
  848. NTSTATUS
  849. MRxSmbBuildCheckEmptyDirectory (
  850. PSMBSTUFFER_BUFFER_STATE StufferState
  851. );
  852. NTSTATUS
  853. SmbPseExchangeStart_SetDeleteDisposition(
  854. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  855. );
  856. MRxSmbSetDeleteDisposition(
  857. IN PRX_CONTEXT RxContext
  858. );
  859. VOID
  860. MRxSmbInitializeRecurrentService(
  861. PRECURRENT_SERVICE_CONTEXT pRecurrentServiceContext,
  862. PRECURRENT_SERVICE_ROUTINE pServiceRoutine,
  863. PVOID pServiceRoutineParameter,
  864. PLARGE_INTEGER pTimeInterval);
  865. VOID
  866. MRxSmbCancelRecurrentService(
  867. PRECURRENT_SERVICE_CONTEXT pRecurrentServiceContext);
  868. VOID
  869. MRxSmbRecurrentServiceDispatcher(
  870. PVOID pContext);
  871. NTSTATUS
  872. MRxSmbActivateRecurrentService(
  873. PRECURRENT_SERVICE_CONTEXT pRecurrentServiceContext);
  874. NTSTATUS
  875. MRxSmbInitializeRecurrentServices();
  876. VOID
  877. MRxSmbTearDownRecurrentServices();
  878. NTSTATUS
  879. MRxSmbInitializeScavengerService(
  880. PMRXSMB_SCAVENGER_SERVICE_CONTEXT pScavengerServiceContext);
  881. VOID
  882. MRxSmbTearDownScavengerService(
  883. PMRXSMB_SCAVENGER_SERVICE_CONTEXT pScavengerServiceContext);
  884. NTSTATUS
  885. SmbCeNegotiate(
  886. PSMBCEDB_SERVER_ENTRY pServerEntry,
  887. PMRX_SRV_CALL pSrvCall,
  888. BOOLEAN RemoteBootSession);
  889. NTSTATUS
  890. SmbCeSendEchoProbe(
  891. PSMBCEDB_SERVER_ENTRY pServerEntry,
  892. PMRXSMB_ECHO_PROBE_SERVICE_CONTEXT pEchoProbeContext);
  893. NTSTATUS
  894. SmbCeDisconnect(
  895. PSMBCE_V_NET_ROOT_CONTEXT pVNetRootContext);
  896. NTSTATUS
  897. SmbCeLogOff(
  898. PSMBCEDB_SERVER_ENTRY pServerEntry,
  899. PSMBCEDB_SESSION_ENTRY pSessionEntry);
  900. NTSTATUS
  901. SmbCeInitializeAdminExchange(
  902. PSMB_ADMIN_EXCHANGE pSmbAdminExchange,
  903. PSMBCEDB_SERVER_ENTRY pServerEntry,
  904. PSMBCEDB_SESSION_ENTRY pSessionEntry,
  905. PSMBCEDB_NET_ROOT_ENTRY pNetRootEntry,
  906. UCHAR SmbCommand);
  907. VOID
  908. SmbCeDiscardAdminExchange(
  909. PSMB_ADMIN_EXCHANGE pSmbAdminExchange);
  910. NTSTATUS
  911. SmbCeCompleteAdminExchange(
  912. PSMB_ADMIN_EXCHANGE pSmbAdminExchange);
  913. NTSTATUS
  914. SmbAdminExchangeStart(
  915. PSMB_EXCHANGE pExchange);
  916. VOID
  917. SmbCeCreateSrvCall(
  918. PMRX_SRVCALL_CALLBACK_CONTEXT pCallbackContext);
  919. NTSTATUS
  920. MRxSmbCreateSrvCall(
  921. PMRX_SRV_CALL pSrvCall,
  922. PMRX_SRVCALL_CALLBACK_CONTEXT pCallbackContext);
  923. NTSTATUS
  924. MRxSmbFinalizeSrvCall(
  925. PMRX_SRV_CALL pSrvCall,
  926. BOOLEAN Force);
  927. NTSTATUS
  928. MRxSmbSrvCallWinnerNotify(
  929. IN PMRX_SRV_CALL pSrvCall,
  930. IN BOOLEAN ThisMinirdrIsTheWinner,
  931. IN OUT PVOID pSrvCallContext);
  932. NTSTATUS
  933. MRxSmbInitializeEchoProbeService(
  934. PMRXSMB_ECHO_PROBE_SERVICE_CONTEXT pEchoProbeContext);
  935. VOID
  936. MRxSmbTearDownEchoProbeService(
  937. PMRXSMB_ECHO_PROBE_SERVICE_CONTEXT pEchoProbeContext);
  938. VOID
  939. MRxSmbMaskNegotiateSmb ();
  940. NTSTATUS
  941. BuildNegotiateSmb(
  942. PVOID *pSmbBufferPointer,
  943. PULONG pSmbBufferLength,
  944. BOOLEAN RemoteBootSession);
  945. LARGE_INTEGER
  946. ConvertSmbTimeToTime (
  947. IN SMB_TIME Time,
  948. IN SMB_DATE Date
  949. );
  950. VOID
  951. __SmbPseDbgCheckOEMdls(
  952. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  953. PSZ MsgPrefix,
  954. PSZ File,
  955. unsigned Line
  956. );
  957. NTSTATUS
  958. SmbPseContinueOrdinaryExchange(
  959. IN OUT PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange
  960. );
  961. NTSTATUS
  962. SmbPseOrdinaryExchange(
  963. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE,
  964. IN SMB_PSE_ORDINARY_EXCHANGE_TYPE OEType
  965. );
  966. NTSTATUS
  967. __SmbPseCreateOrdinaryExchange (
  968. IN PRX_CONTEXT RxContext,
  969. IN PMRX_V_NET_ROOT VNetRoot,
  970. IN SMB_PSE_ORDINARY_EXCHANGE_ENTRYPOINTS EntryPoint,
  971. IN PSMB_PSE_OE_START_ROUTINE StartRoutine,
  972. IN OUT SMBFCB_HOLDING_STATE *SmbFcbHoldingState OPTIONAL,
  973. OUT PSMB_PSE_ORDINARY_EXCHANGE *OrdinaryExchangePtr
  974. );
  975. VOID
  976. SmbPseFinalizeOETrace(PSZ text,ULONG finalstate);
  977. BOOLEAN
  978. SmbPseFinalizeOrdinaryExchange (
  979. IN OUT PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange
  980. );
  981. NTSTATUS
  982. SmbPseExchangeAssociatedExchangeCompletionHandler_default(
  983. IN OUT PSMB_EXCHANGE pExchange,
  984. OUT BOOLEAN *pPostFinalize
  985. );
  986. NTSTATUS
  987. SmbPseExchangeStart_default(
  988. IN PSMB_EXCHANGE pExchange
  989. );
  990. NTSTATUS
  991. SmbPseExchangeCopyDataHandler_Read(
  992. IN PSMB_EXCHANGE pExchange,
  993. IN PMDL pCopyDataBuffer,
  994. IN ULONG CopyDataSize
  995. );
  996. VOID
  997. __SmbPseRMTableEntry(
  998. UCHAR SmbCommand,
  999. UCHAR Flags,
  1000. SMBPSE_RECEIVE_HANDLER_TOKEN ReceiveHandlerToken,
  1001. PSMBPSE_RECEIVE_HANDLER ReceiveHandler
  1002. #if DBG
  1003. ,
  1004. PBYTE IndicationString,
  1005. SMB_PSE_ORDINARY_EXCHANGE_TYPE LowType,
  1006. SMB_PSE_ORDINARY_EXCHANGE_TYPE HighType
  1007. #endif
  1008. );
  1009. VOID
  1010. SmbPseInitializeTables(
  1011. void
  1012. );
  1013. NTSTATUS
  1014. MRxSmbQueryDosVolumeInformation(
  1015. IN OUT PRX_CONTEXT RxContext,
  1016. IN OUT PVOID pBuffer,
  1017. IN OUT PULONG pBufferLength
  1018. );
  1019. VOID
  1020. MRxSmbSetFixedStufferStateFields (
  1021. IN OUT PSMBSTUFFER_BUFFER_STATE StufferState,
  1022. IN PMDL Mdl,
  1023. IN PSMB_EXCHANGE pExchange,
  1024. IN PRX_CONTEXT RxContext,
  1025. IN PBYTE ActualBufferBase,
  1026. IN PBYTE BufferBase,
  1027. IN PBYTE BufferLimit
  1028. );
  1029. VOID SMBStuffHexDump(
  1030. IN PBYTE Base,
  1031. IN PBYTE Limit,
  1032. IN ULONG AddressOffset
  1033. );
  1034. VOID
  1035. MRxSmbFakeUpAnMdl(
  1036. IN OUT PMDL Mdl,
  1037. IN PBYTE Base,
  1038. IN ULONG Length
  1039. );
  1040. VOID MRxSmbStfTestReadAndWrite();
  1041. VOID MRxSmbStfTestSessionStuff();
  1042. VOID MRxSmbStfTestMoreOpenStuff();
  1043. NTSTATUS
  1044. MRxSmbStufferDebug(
  1045. IN PRX_CONTEXT RxContext
  1046. );
  1047. NTSTATUS
  1048. MRxSmbBuildSmbHeaderTestSurrogate(
  1049. PSMB_EXCHANGE pExchange,
  1050. PVOID pBuffer,
  1051. ULONG BufferLength,
  1052. PULONG pBufferConsumed,
  1053. PUCHAR pLastCommandInHeader,
  1054. PUCHAR *pNextCommandPtr);
  1055. VOID
  1056. SmbStuffWrapRtlAssert(
  1057. IN PVOID FailedAssertion,
  1058. IN PVOID FileName,
  1059. IN ULONG LineNumber,
  1060. IN PCHAR Message
  1061. );
  1062. NTSTATUS
  1063. SmbMrxFinalizeStufferFacilities(
  1064. void
  1065. );
  1066. NTSTATUS
  1067. MRxSmbSetInitialSMB (
  1068. IN OUT PSMBSTUFFER_BUFFER_STATE StufferState
  1069. STUFFERTRACE_CONTROLPOINT_ARGS
  1070. );
  1071. NTSTATUS
  1072. MRxSmbStartSMBCommand (
  1073. IN OUT PSMBSTUFFER_BUFFER_STATE StufferState,
  1074. IN INITIAL_SMBBUG_DISPOSITION InitialSMBDisposition,
  1075. IN UCHAR Command, //joejoe this next four params could come from a table...2offset and you're smaller
  1076. IN ULONG MaximumBufferUsed,
  1077. IN ULONG MaximumSize,
  1078. IN ULONG InitialAlignment,
  1079. IN ULONG MaximumResponseHeader,
  1080. IN UCHAR Flags,
  1081. IN UCHAR FlagsMask,
  1082. IN USHORT Flags2,
  1083. IN USHORT Flags2Mask
  1084. STUFFERTRACE_CONTROLPOINT_ARGS
  1085. );
  1086. BOOLEAN
  1087. MrxSMBWillThisFit(
  1088. IN PSMBSTUFFER_BUFFER_STATE StufferState,
  1089. IN ULONG AlignmentUnit,
  1090. IN ULONG DataSize
  1091. );
  1092. NTSTATUS
  1093. MRxSmbStuffSMB (
  1094. IN OUT PSMBSTUFFER_BUFFER_STATE StufferState,
  1095. ...
  1096. );
  1097. VOID
  1098. MRxSmbStuffAppendRawData(
  1099. IN OUT PSMBSTUFFER_BUFFER_STATE StufferState,
  1100. IN PMDL Mdl
  1101. );
  1102. VOID
  1103. MRxSmbStuffAppendSmbData(
  1104. IN OUT PSMBSTUFFER_BUFFER_STATE StufferState,
  1105. IN PMDL Mdl
  1106. );
  1107. VOID
  1108. MRxSmbStuffSetByteCount(
  1109. IN OUT PSMBSTUFFER_BUFFER_STATE StufferState
  1110. );
  1111. NTSTATUS
  1112. MRxSmbWrite (
  1113. IN PRX_CONTEXT RxContext);
  1114. NTSTATUS
  1115. MRxSmbWriteMailSlot(
  1116. PRX_CONTEXT RxContext
  1117. );
  1118. NTSTATUS
  1119. MRxSmbBuildWriteRequest(
  1120. PSMB_PSE_ORDINARY_EXCHANGE OrdinaryExchange,
  1121. BOOLEAN IsPagingIo,
  1122. UCHAR WriteCommand,
  1123. ULONG ByteCount,
  1124. PLARGE_INTEGER ByteOffsetAsLI,
  1125. PBYTE Buffer,
  1126. PMDL BufferAsMdl);
  1127. NTSTATUS
  1128. SmbPseExchangeStart_Write (
  1129. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE
  1130. );
  1131. NTSTATUS
  1132. BuildCanonicalNetRootInformation(
  1133. PUNICODE_STRING pServerName,
  1134. PUNICODE_STRING pNetRootName,
  1135. NET_ROOT_TYPE NetRootType,
  1136. BOOLEAN fUnicode,
  1137. BOOLEAN fPostPendServiceString,
  1138. PBYTE *pBufferPointer,
  1139. PULONG pBufferSize);
  1140. NTSTATUS
  1141. CoreBuildTreeConnectSmb(
  1142. PSMB_EXCHANGE pExchange,
  1143. PGENERIC_ANDX pAndXSmb,
  1144. PULONG pAndXSmbBufferSize);
  1145. NTSTATUS
  1146. LmBuildTreeConnectSmb(
  1147. PSMB_EXCHANGE pExchange,
  1148. PGENERIC_ANDX pAndXSmb,
  1149. PULONG pAndXSmbBufferSize);
  1150. NTSTATUS
  1151. NtBuildTreeConnectSmb(
  1152. PSMB_EXCHANGE pExchange,
  1153. PGENERIC_ANDX pAndXSmb,
  1154. PULONG pAndXSmbBufferSize);
  1155. BOOLEAN
  1156. MRxSmbPackStringIntoConnectInfo(
  1157. IN PUNICODE_STRING String,
  1158. IN PUNICODE_STRING Source,
  1159. IN OUT PCHAR * BufferStart,
  1160. IN OUT PCHAR * BufferEnd,
  1161. IN ULONG BufferDisplacement,
  1162. IN OUT PULONG TotalBytes
  1163. );
  1164. BOOLEAN
  1165. MRxSmbPackConnectEntry (
  1166. IN OUT PRX_CONTEXT RxContext,
  1167. IN ULONG Level,
  1168. IN OUT PCHAR *BufferStart,
  1169. IN OUT PCHAR *BufferEnd,
  1170. IN PV_NET_ROOT VNetRoot,
  1171. IN OUT ULONG BufferDisplacement,
  1172. OUT PULONG TotalBytesNeeded
  1173. );
  1174. VOID
  1175. MRxSmbGetConnectInfoLevel3Fields(
  1176. IN OUT PLMR_CONNECTION_INFO_3 ConnectionInfo,
  1177. IN PSMBCEDB_SERVER_ENTRY pServerEntry,
  1178. IN BOOL fAgentCall
  1179. );
  1180. NTSTATUS
  1181. MRxSmbEnumerateConnections (
  1182. IN PRX_CONTEXT RxContext,
  1183. OUT PBOOLEAN PostToFsp
  1184. );
  1185. NTSTATUS
  1186. MRxSmbGetConnectionInfo (
  1187. IN PRX_CONTEXT RxContext,
  1188. OUT PBOOLEAN PostToFsp
  1189. );
  1190. NTSTATUS
  1191. MRxSmbDeleteConnection (
  1192. IN PRX_CONTEXT RxContext,
  1193. OUT PBOOLEAN PostToFsp
  1194. );
  1195. NTSTATUS
  1196. MRxEnumerateTransports(
  1197. IN PRX_CONTEXT RxContext,
  1198. OUT PBOOLEAN pPostToFsp);
  1199. NTSTATUS
  1200. MRxEnumerateTransportBindings(
  1201. IN PLMR_REQUEST_PACKET pLmrRequestPacket,
  1202. IN ULONG LmrRequestPacketLength,
  1203. OUT PVOID pBindingBuffer,
  1204. IN OUT ULONG BindingBufferLength);
  1205. VOID
  1206. MRxSmbDbgDumpMdlChain (
  1207. PMDL MdlChain,
  1208. PMDL WatchMdl,
  1209. PSZ Tagstring
  1210. );
  1211. VOID MRxSmbTestStudCode(void);
  1212. NTSTATUS
  1213. MRxSmbUpdateNetRootState(
  1214. IN OUT PMRX_NET_ROOT pNetRoot);
  1215. ULONG
  1216. MRxSmbGetDialectFlagsFromSrvCall(
  1217. PMRX_SRV_CALL SrvCall
  1218. );
  1219. NTSTATUS
  1220. MRxSmbCreateVNetRoot(
  1221. IN PMRX_CREATENETROOT_CONTEXT pCreateNetRootContext
  1222. );
  1223. NTSTATUS
  1224. MRxSmbFinalizeVNetRoot(
  1225. IN PMRX_V_NET_ROOT pVNetRoot,
  1226. IN PBOOLEAN ForceDisconnect);
  1227. NTSTATUS
  1228. MRxSmbFinalizeNetRoot(
  1229. IN PMRX_NET_ROOT pNetRoot,
  1230. IN PBOOLEAN ForceDisconnect);
  1231. NTSTATUS
  1232. SmbCeReconnect(
  1233. IN PMRX_V_NET_ROOT pVNetRoot);
  1234. NTSTATUS
  1235. SmbCeEstablishConnection(
  1236. IN OUT PMRX_V_NET_ROOT pVNetRoot,
  1237. IN PMRX_CREATENETROOT_CONTEXT pCreateNetRootContext,
  1238. IN BOOLEAN fInitializeNetRoot
  1239. );
  1240. NTSTATUS
  1241. SmbConstructNetRootExchangeStart(
  1242. PSMB_EXCHANGE pExchange);
  1243. NTSTATUS
  1244. SmbConstructNetRootExchangeCopyDataHandler(
  1245. IN PSMB_EXCHANGE pExchange,
  1246. IN PMDL pCopyDataBuffer,
  1247. IN ULONG DataSize);
  1248. NTSTATUS
  1249. SmbConstructNetRootExchangeFinalize(
  1250. PSMB_EXCHANGE pExchange,
  1251. BOOLEAN *pPostFinalize);
  1252. VOID
  1253. MRxSmbExtractNetRootName(
  1254. IN PUNICODE_STRING FilePathName,
  1255. IN PMRX_SRV_CALL SrvCall,
  1256. OUT PUNICODE_STRING NetRootName,
  1257. OUT PUNICODE_STRING RestOfName OPTIONAL
  1258. );
  1259. NTSTATUS
  1260. MRxSmbInitializeSmbCe();
  1261. NTSTATUS
  1262. SmbCeReferenceServer(
  1263. PSMB_EXCHANGE pExchange);
  1264. VOID
  1265. SmbCeSerializeSessionSetupRequests(
  1266. PSMBCEDB_SESSION_ENTRY pSessionEntry);
  1267. VOID
  1268. SmbCeUnblockSerializedSessionSetupRequests(
  1269. PSMBCEDB_SESSION_ENTRY pSessionEntry);
  1270. NTSTATUS
  1271. SmbCeReferenceSession(
  1272. PSMB_EXCHANGE pExchange);
  1273. NTSTATUS
  1274. SmbCeReferenceNetRoot(
  1275. PSMB_EXCHANGE pExchange);
  1276. NTSTATUS
  1277. SmbCeInitiateExchange(
  1278. PSMB_EXCHANGE pExchange);
  1279. NTSTATUS
  1280. SmbCeInitiateAssociatedExchange(
  1281. PSMB_EXCHANGE pExchange,
  1282. BOOLEAN EnableCompletionHandlerInMasterExchange);
  1283. NTSTATUS
  1284. SmbCeExchangeAbort(
  1285. PSMB_EXCHANGE pExchange);
  1286. NTSTATUS
  1287. SmbCeBuildSmbHeader(
  1288. IN OUT PSMB_EXCHANGE pExchange,
  1289. IN OUT PVOID pBuffer,
  1290. IN ULONG BufferLength,
  1291. OUT PULONG pBufferConsumed,
  1292. OUT PUCHAR pLastCommandInHeader,
  1293. OUT PUCHAR *pNextCommandPtr);
  1294. NTSTATUS
  1295. SmbCeResumeExchange(
  1296. PSMB_EXCHANGE pExchange);
  1297. NTSTATUS
  1298. SmbCepInitializeExchange(
  1299. PSMB_EXCHANGE *pExchangePointer,
  1300. PRX_CONTEXT pRxContext,
  1301. PSMBCEDB_SERVER_ENTRY pServerEntry,
  1302. PMRX_V_NET_ROOT pVNetRoot,
  1303. SMB_EXCHANGE_TYPE Type,
  1304. PSMB_EXCHANGE_DISPATCH_VECTOR pDispatchVector);
  1305. NTSTATUS
  1306. SmbCeInitializeAssociatedExchange(
  1307. PSMB_EXCHANGE *pAssociatedExchangePointer,
  1308. PSMB_EXCHANGE pMasterExchange,
  1309. SMB_EXCHANGE_TYPE Type,
  1310. PSMB_EXCHANGE_DISPATCH_VECTOR pDispatchVector);
  1311. NTSTATUS
  1312. SmbCeTransformExchange(
  1313. PSMB_EXCHANGE pExchange,
  1314. SMB_EXCHANGE_TYPE NewType,
  1315. PSMB_EXCHANGE_DISPATCH_VECTOR pDispatchVector);
  1316. NTSTATUS
  1317. SmbCePrepareExchangeForReuse(
  1318. PSMB_EXCHANGE pExchange);
  1319. NTSTATUS
  1320. SmbCeUpdateSessionEntryAndVNetRootContext(
  1321. PSMB_EXCHANGE pExchange);
  1322. VOID
  1323. SmbCeDiscardExchange(PVOID pExchange);
  1324. VOID
  1325. SmbCeDiscardExchangeWorkerThreadRoutine(PVOID pExchange);
  1326. NTSTATUS
  1327. SmbCeCancelExchange(
  1328. PRX_CONTEXT pRxContext);
  1329. VOID
  1330. SmbCeFinalizeExchangeWorkerThreadRoutine(
  1331. PSMB_EXCHANGE pExchange);
  1332. VOID
  1333. SmbCepFinalizeExchange(
  1334. PSMB_EXCHANGE pExchange);
  1335. BOOLEAN
  1336. SmbCeCanExchangeBeFinalized(
  1337. PSMB_EXCHANGE pExchange,
  1338. PSMBCE_EXCHANGE_STATUS pExchangeStatus);
  1339. VOID
  1340. SmbCeFinalizeExchangeOnDisconnect(
  1341. PSMB_EXCHANGE pExchange);
  1342. VOID
  1343. SmbCeSetExpiryTime(
  1344. PSMB_EXCHANGE pExchange);
  1345. BOOLEAN
  1346. SmbCeDetectExpiredExchanges(
  1347. PSMBCEDB_SERVER_ENTRY pServerEntry);
  1348. NTSTATUS
  1349. DefaultSmbExchangeIndError(
  1350. IN PSMB_EXCHANGE pExchange);
  1351. NTSTATUS
  1352. DefaultSmbExchangeIndReceive(
  1353. IN PSMB_EXCHANGE pExchange);
  1354. NTSTATUS
  1355. DefaultSmbExchangeIndSendCallback(
  1356. IN PSMB_EXCHANGE pExchange);
  1357. VOID
  1358. MRxSmbBindTransportCallback(
  1359. IN PUNICODE_STRING pTransportName
  1360. );
  1361. VOID
  1362. MRxSmbUnbindTransportCallback(
  1363. IN PUNICODE_STRING pTransportName
  1364. );
  1365. NTSTATUS
  1366. MRxSmbRegisterForPnpNotifications();
  1367. VOID
  1368. MRxSmbpBindTransportCallback(
  1369. IN struct _TRANSPORT_BIND_CONTEXT_ *pTransportContext);
  1370. VOID
  1371. MRxSmbpBindTransportWorkerThreadRoutine(
  1372. IN struct _TRANSPORT_BIND_CONTEXT_ *pTransportContext);
  1373. VOID
  1374. MRxSmbpUnbindTransportCallback(
  1375. PSMBCE_TRANSPORT pTransport);
  1376. NTSTATUS
  1377. MRxSmbDeregisterForPnpNotifications();
  1378. NTSTATUS
  1379. SmbCePnpBindBrowser( PUNICODE_STRING pTransportName, BOOLEAN IsBind);
  1380. NTSTATUS
  1381. SmbCeDereferenceTransportArray(
  1382. PSMBCE_TRANSPORT_ARRAY pTransportArray);
  1383. NTSTATUS
  1384. SmbCeInitializeTransactionParameters(
  1385. PVOID pSetup,
  1386. USHORT SetupLength,
  1387. PVOID pParam,
  1388. ULONG ParamLength,
  1389. PVOID pData,
  1390. ULONG DataLength,
  1391. PSMB_TRANSACTION_PARAMETERS pTransactionParameters
  1392. );
  1393. VOID
  1394. SmbCeUninitializeTransactionParameters(
  1395. PSMB_TRANSACTION_PARAMETERS pTransactionParameters
  1396. );
  1397. VOID
  1398. SmbCeDiscardTransactExchange(PSMB_TRANSACT_EXCHANGE pTransactExchange);
  1399. NTSTATUS
  1400. SmbCeSubmitTransactionRequest(
  1401. PRX_CONTEXT RxContext,
  1402. PSMB_TRANSACTION_OPTIONS pOptions,
  1403. PSMB_TRANSACTION_PARAMETERS pSendParameters,
  1404. PSMB_TRANSACTION_PARAMETERS pReceiveParameters,
  1405. PSMB_TRANSACTION_RESUMPTION_CONTEXT pResumptionContext );
  1406. NTSTATUS
  1407. _SmbCeTransact(
  1408. PRX_CONTEXT RxContext,
  1409. PSMB_TRANSACTION_OPTIONS pOptions,
  1410. PVOID pInputSetupBuffer,
  1411. ULONG InputSetupBufferLength,
  1412. PVOID pOutputSetupBuffer,
  1413. ULONG OutputSetupBufferLength,
  1414. PVOID pInputParamBuffer,
  1415. ULONG InputParamBufferLength,
  1416. PVOID pOutputParamBuffer,
  1417. ULONG OutputParamBufferLength,
  1418. PVOID pInputDataBuffer,
  1419. ULONG InputDataBufferLength,
  1420. PVOID pOutputDataBuffer,
  1421. ULONG OutputDataBufferLength,
  1422. PSMB_TRANSACTION_RESUMPTION_CONTEXT pResumptionContext);
  1423. NTSTATUS
  1424. SmbTransactBuildHeader(
  1425. PSMB_TRANSACT_EXCHANGE pTransactExchange,
  1426. UCHAR SmbCommand,
  1427. PSMB_HEADER pHeader);
  1428. NTSTATUS
  1429. SmbTransactExchangeStart(
  1430. PSMB_EXCHANGE pExchange);
  1431. NTSTATUS
  1432. SmbTransactExchangeAbort(
  1433. PSMB_EXCHANGE pExchange);
  1434. NTSTATUS
  1435. SmbTransactExchangeErrorHandler(
  1436. IN PSMB_EXCHANGE pExchange);
  1437. NTSTATUS
  1438. SmbTransactExchangeSendCallbackHandler(
  1439. IN PSMB_EXCHANGE pExchange,
  1440. IN PMDL pXmitBuffer,
  1441. IN NTSTATUS SendCompletionStatus);
  1442. NTSTATUS
  1443. SmbTransactExchangeCopyDataHandler(
  1444. IN PSMB_EXCHANGE pExchange,
  1445. IN PMDL pDataBuffer,
  1446. IN ULONG DataSize);
  1447. NTSTATUS
  1448. SmbCeInitializeTransactExchange(
  1449. PSMB_TRANSACT_EXCHANGE pTransactExchange,
  1450. PRX_CONTEXT RxContext,
  1451. PSMB_TRANSACTION_OPTIONS pOptions,
  1452. PSMB_TRANSACTION_SEND_PARAMETERS pSendParameters,
  1453. PSMB_TRANSACTION_RECEIVE_PARAMETERS pReceiveParameters,
  1454. PSMB_TRANSACTION_RESUMPTION_CONTEXT pResumptionContext);
  1455. NTSTATUS
  1456. SmbTransactExchangeFinalize(
  1457. PSMB_EXCHANGE pExchange,
  1458. BOOLEAN *pPostFinalize);
  1459. NTSTATUS
  1460. SendSecondaryRequests(PVOID pContext);
  1461. NTSTATUS SmbMmInit();
  1462. VOID SmbMmTearDown();
  1463. VOID
  1464. SmbCeCompleteVNetRootContextInitialization(
  1465. PVOID pContext);
  1466. VOID
  1467. SmbCepDereferenceVNetRootContext(
  1468. PSMBCE_V_NET_ROOT_CONTEXT pVNetRootContext);
  1469. NTSTATUS
  1470. SmbCeDestroyAssociatedVNetRootContext(
  1471. PMRX_V_NET_ROOT pVNetRoot);
  1472. VOID
  1473. SmbCeTearDownVNetRootContext(
  1474. PSMBCE_V_NET_ROOT_CONTEXT pVNetRootContext);
  1475. VOID
  1476. SmbCeDecrementNumberOfActiveVNetRootOnSession(
  1477. PSMBCE_V_NET_ROOT_CONTEXT pVNetRootContext
  1478. );
  1479. NTSTATUS
  1480. SmbCeScavenger(
  1481. PVOID pContext);
  1482. NTSTATUS
  1483. SmbCeScavengeRelatedContexts(
  1484. PSMBCEDB_SERVER_ENTRY pServerEntry);
  1485. NTSTATUS
  1486. SmbCeRemoteBootReconnect(
  1487. PSMB_EXCHANGE pExchange,
  1488. PRX_CONTEXT RxContext);
  1489. BOOLEAN
  1490. SmbCeIsReconnectionRequired(
  1491. PSMB_EXCHANGE pExchange,
  1492. PRX_CONTEXT pRxContext);
  1493. NTSTATUS
  1494. SmbCeSyncExchangeForSecuritySignature(
  1495. PSMB_EXCHANGE pExchange
  1496. );
  1497. VOID
  1498. SmbCheckSecuritySignature(
  1499. IN PSMB_EXCHANGE pExchange,
  1500. IN PSMBCE_SERVER Server,
  1501. IN ULONG MessageLength,
  1502. IN PVOID pBuffer
  1503. );
  1504. BOOLEAN
  1505. SmbCheckSecuritySignaturePartial(
  1506. IN PSMB_EXCHANGE pExchange,
  1507. IN PSMBCE_SERVER Server,
  1508. IN ULONG DataLength,
  1509. IN PVOID pBuffer
  1510. );
  1511. BOOLEAN
  1512. SmbCheckSecuritySignatureWithMdl(
  1513. IN PSMB_EXCHANGE pExchange,
  1514. IN PSMBCE_SERVER Server,
  1515. IN ULONG DataLength,
  1516. IN PMDL Mdl);
  1517. NTSTATUS
  1518. SmbCepRemoteBootReconnect(
  1519. PSMB_EXCHANGE pExchange,
  1520. PRX_CONTEXT RxContext);
  1521. NTSTATUS
  1522. SmbCeRemoteBootReconnect(
  1523. PSMB_EXCHANGE pExchange,
  1524. PRX_CONTEXT RxContext);
  1525. VOID
  1526. MRxSmbCreateFileInfoCache(
  1527. PRX_CONTEXT RxContext,
  1528. PSMBPSE_FILEINFO_BUNDLE FileInfo,
  1529. PSMBCEDB_SERVER_ENTRY pServerEntry,
  1530. NTSTATUS Status);
  1531. VOID
  1532. MRxSmbCreateBasicFileInfoCache(
  1533. PRX_CONTEXT RxContext,
  1534. PFILE_BASIC_INFORMATION Basic,
  1535. PSMBCEDB_SERVER_ENTRY pServerEntry,
  1536. NTSTATUS Status);
  1537. VOID
  1538. MRxSmbCreateStandardFileInfoCache(
  1539. PRX_CONTEXT RxContext,
  1540. PFILE_STANDARD_INFORMATION Standard,
  1541. PSMBCEDB_SERVER_ENTRY pServerEntry,
  1542. NTSTATUS Status);
  1543. VOID
  1544. MRxSmbCreateInternalFileInfoCache(
  1545. PRX_CONTEXT RxContext,
  1546. PFILE_INTERNAL_INFORMATION Internal,
  1547. PSMBCEDB_SERVER_ENTRY pServerEntry,
  1548. NTSTATUS Status);
  1549. VOID
  1550. MRxSmbUpdateFileInfoCacheStatus(
  1551. PRX_CONTEXT RxContext,
  1552. NTSTATUS Status);
  1553. VOID
  1554. MRxSmbUpdateBasicFileInfoCacheStatus(
  1555. PRX_CONTEXT RxContext,
  1556. NTSTATUS Status);
  1557. VOID
  1558. MRxSmbUpdateStandardFileInfoCacheStatus(
  1559. PRX_CONTEXT RxContext,
  1560. NTSTATUS Status);
  1561. VOID
  1562. MRxSmbInvalidateFileInfoCache(
  1563. PRX_CONTEXT RxContext);
  1564. VOID
  1565. MRxSmbInvalidateBasicFileInfoCache(
  1566. PRX_CONTEXT RxContext);
  1567. VOID
  1568. MRxSmbInvalidateInternalFileInfoCache(
  1569. PRX_CONTEXT RxContext);
  1570. VOID
  1571. MRxSmbInvalidateStandardFileInfoCache(
  1572. PRX_CONTEXT RxContext);
  1573. VOID
  1574. MRxSmbUpdateFileInfoCacheFileSize(
  1575. PRX_CONTEXT RxContext,
  1576. PLARGE_INTEGER FileSize);
  1577. VOID
  1578. MRxSmbUpdateBasicFileInfoCache(
  1579. PRX_CONTEXT RxContext,
  1580. ULONG FileAttributes,
  1581. PLARGE_INTEGER pLastWriteTime);
  1582. VOID
  1583. MRxSmbUpdateBasicFileInfoCacheAll(
  1584. PRX_CONTEXT RxContext,
  1585. PFILE_BASIC_INFORMATION Basic);
  1586. VOID
  1587. MRxSmbUpdateStandardFileInfoCache(
  1588. PRX_CONTEXT RxContext,
  1589. PFILE_STANDARD_INFORMATION Standard,
  1590. BOOLEAN IsDirectory);
  1591. BOOLEAN
  1592. MRxSmbIsFileInfoCacheFound(
  1593. PRX_CONTEXT RxContext,
  1594. PSMBPSE_FILEINFO_BUNDLE FileInfo,
  1595. NTSTATUS *Status,
  1596. PUNICODE_STRING OriginalFileName);
  1597. BOOLEAN
  1598. MRxSmbIsBasicFileInfoCacheFound(
  1599. PRX_CONTEXT RxContext,
  1600. PFILE_BASIC_INFORMATION Basic,
  1601. NTSTATUS *Status,
  1602. PUNICODE_STRING OriginalFileName);
  1603. BOOLEAN
  1604. MRxSmbIsStandardFileInfoCacheFound(
  1605. PRX_CONTEXT RxContext,
  1606. PFILE_STANDARD_INFORMATION Standard,
  1607. NTSTATUS *Status,
  1608. PUNICODE_STRING OriginalFileName);
  1609. BOOLEAN
  1610. MRxSmbIsInternalFileInfoCacheFound(
  1611. PRX_CONTEXT RxContext,
  1612. PFILE_INTERNAL_INFORMATION Internal,
  1613. NTSTATUS *Status,
  1614. PUNICODE_STRING OriginalFileName);
  1615. NTSTATUS
  1616. MRxSmbGetFileInfoCacheStatus(
  1617. PRX_CONTEXT RxContext);
  1618. BOOLEAN
  1619. MRxSmbIsFileNotFoundCached(
  1620. PRX_CONTEXT RxContext);
  1621. VOID
  1622. MRxSmbCacheFileNotFound(
  1623. PRX_CONTEXT RxContext);
  1624. VOID
  1625. MRxSmbInvalidateFileNotFoundCache(
  1626. PRX_CONTEXT RxContext);
  1627. VOID
  1628. MRxSmbInvalidateFileNotFoundCacheForRename(
  1629. PRX_CONTEXT RxContext
  1630. );
  1631. BOOLEAN
  1632. MRxSmbIsStreamFile(
  1633. PUNICODE_STRING FileName,
  1634. PUNICODE_STRING AdjustFileName);
  1635. VOID
  1636. MRxSmbUpdateFileInfoCacheFromDelete(
  1637. PRX_CONTEXT RxContext);
  1638. NTSTATUS
  1639. MRxSmbQueryFileInformationFromPseudoOpen(
  1640. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE,
  1641. FILE_INFORMATION_CLASS FileInformationClass);
  1642. BOOLEAN
  1643. MRxSmbIsLongFileName(
  1644. PRX_CONTEXT RxContext);
  1645. VOID
  1646. SmbInitializeSmbSecuritySignature(
  1647. IN OUT PSMBCE_SERVER Server,
  1648. IN PUCHAR SessionKey,
  1649. IN PUCHAR ChallengeResponse,
  1650. IN ULONG ChallengeResponseLength);
  1651. NTSTATUS
  1652. MRxSmbAreFilesAliased(
  1653. IN PFCB Fcb1,
  1654. IN PFCB Fcb2);
  1655. NTSTATUS
  1656. MRxSmbPreparseName(
  1657. IN OUT PRX_CONTEXT RxContext,
  1658. IN PUNICODE_STRING Name
  1659. );
  1660. NTSTATUS
  1661. MRxSmbGetConnectionId(
  1662. IN OUT PRX_CONTEXT RxContext,
  1663. IN OUT PRX_CONNECTION_ID RxConnectionId
  1664. );
  1665. VOID
  1666. MRxSmbCacheFullDirectory(
  1667. PRX_CONTEXT RxContext,
  1668. IN PVOID Contents,
  1669. IN ULONG Length,
  1670. IN OUT PMRX_SMB_FOBX smbFobx);
  1671. VOID
  1672. MRxSmbInvalidateFullDirectoryCache(
  1673. PRX_CONTEXT RxContext);
  1674. BOOLEAN
  1675. MRxSmbIsFullDirectoryCached(
  1676. PRX_CONTEXT RxContext,
  1677. OUT PVOID Contents,
  1678. OUT PULONG Length,
  1679. IN OUT PMRX_SMB_FOBX smbFobx,
  1680. OUT NTSTATUS *Status);
  1681. VOID
  1682. MRxSmbCreateParentFullDirPrefix(
  1683. IN PUNICODE_STRING Source,
  1684. IN OUT PUNICODE_STRING Target);
  1685. VOID
  1686. MRxSmbInvalidateFullDirectoryCacheParent(
  1687. PRX_CONTEXT RxContext,
  1688. BOOLEAN Benign);
  1689. VOID
  1690. MRxSmbInvalidateFullDirectoryCacheParentForRename(
  1691. PRX_CONTEXT RxContext,
  1692. BOOLEAN Benign);
  1693. VOID
  1694. MRxSmbCreateSuffix(
  1695. PUNICODE_STRING Source,
  1696. PUNICODE_STRING Target);
  1697. VOID
  1698. MRxSmbCreateTargetFullDirPrefix(
  1699. IN PUNICODE_STRING Source,
  1700. IN OUT PUNICODE_STRING Target);
  1701. BOOLEAN
  1702. MRxSmbIsFileInFullDirectoryCache(
  1703. PRX_CONTEXT RxContext,
  1704. PBOOLEAN FileFound,
  1705. PFILE_BASIC_INFORMATION pBuffer
  1706. );
  1707. BOOLEAN
  1708. MRxSmbIsFileInPartialDirectoryCache (
  1709. PNAME_CACHE NameCache,
  1710. PUNICODE_STRING OriginalFileName,
  1711. PBOOLEAN CacheValid,
  1712. PFILE_BASIC_INFORMATION pBuffer);
  1713. BOOLEAN
  1714. MRxSmbNonTrivialFileName(
  1715. PRX_CONTEXT RxContext);
  1716. #if DBG
  1717. #define MRxSmbAllocateSideBuffer(a,b,c,d) __MRxSmbAllocateSideBuffer(a,b,c,d)
  1718. #else
  1719. #define MRxSmbAllocateSideBuffer(a,b,c,d) __MRxSmbAllocateSideBuffer(a,b,c)
  1720. #endif
  1721. #endif // _SMBMRX_H_