[RDBSS]
[RXCE]
[DDK]
Add an initial implementation of the RXCE and RDBSS libraries that are used to implement mini-redirectors
The associated headers are also added to DDK
The implementation is partial (really!) and is only working for read-only operations.
It leaks memory as hell (no refcounting implemented) and thus, objects freeing is not implemented.
It was tested with NFS41 driver. With such RDBSS, it's possible for the driver to mount a remote share, to list
files, to query their properties, to query volume properties, and finally to read files (with some corruption under
specific conditions).
Please refrain from committing in this (especially for modifying whitespaces or fixing comments...), this is still WIP
and under development, it would mess with my local changes!
In itself, it doesn't bring anything to ReactOS yet, as no mini redirector is available in ReactOS source tree.
This may come later on with NFS41.
More to follow...
CORE-11327
svn path=/trunk/; revision=74674
2017-05-26 20:52:18 +00:00
|
|
|
#ifndef _RX_NTDEFS_DEFINED_
|
|
|
|
#define _RX_NTDEFS_DEFINED_
|
|
|
|
|
|
|
|
#define INLINE __inline
|
|
|
|
#ifndef INVALID_HANDLE_VALUE
|
|
|
|
#define INVALID_HANDLE_VALUE ((HANDLE)-1)
|
|
|
|
#endif
|
|
|
|
|
2017-11-01 10:45:43 +00:00
|
|
|
#ifndef MINIRDR__NAME
|
|
|
|
#define RxCaptureFcb PFCB __C_Fcb = (PFCB)(RxContext->pFcb)
|
|
|
|
#define RxCaptureFobx PFOBX __C_Fobx = (PFOBX)(RxContext->pFobx)
|
|
|
|
#else
|
|
|
|
#define RxCaptureFcb PMRX_FCB __C_Fcb = (RxContext->pFcb)
|
|
|
|
#define RxCaptureFobx PMRX_FOBX __C_Fobx = (RxContext->pFobx)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define RxCaptureParamBlock PIO_STACK_LOCATION __C_IrpSp = RxContext->CurrentIrpSp
|
|
|
|
#define RxCaptureFileObject PFILE_OBJECT __C_FileObject = __C_IrpSp-> FileObject
|
|
|
|
|
|
|
|
#define capFcb __C_Fcb
|
|
|
|
#define capFobx __C_Fobx
|
|
|
|
#define capPARAMS __C_IrpSp
|
|
|
|
#define capFileObject __C_FileObject
|
|
|
|
|
[RDBSS]
[RXCE]
[DDK]
Add an initial implementation of the RXCE and RDBSS libraries that are used to implement mini-redirectors
The associated headers are also added to DDK
The implementation is partial (really!) and is only working for read-only operations.
It leaks memory as hell (no refcounting implemented) and thus, objects freeing is not implemented.
It was tested with NFS41 driver. With such RDBSS, it's possible for the driver to mount a remote share, to list
files, to query their properties, to query volume properties, and finally to read files (with some corruption under
specific conditions).
Please refrain from committing in this (especially for modifying whitespaces or fixing comments...), this is still WIP
and under development, it would mess with my local changes!
In itself, it doesn't bring anything to ReactOS yet, as no mini redirector is available in ReactOS source tree.
This may come later on with NFS41.
More to follow...
CORE-11327
svn path=/trunk/; revision=74674
2017-05-26 20:52:18 +00:00
|
|
|
#define RxAllocatePoolWithTag ExAllocatePoolWithTag
|
|
|
|
#define RxFreePool ExFreePool
|
|
|
|
|
2017-07-08 17:12:33 +00:00
|
|
|
#define RxIsResourceOwnershipStateExclusive(Resource) (FlagOn((Resource)->Flag, ResourceOwnedExclusive))
|
|
|
|
|
[RDBSS]
[RXCE]
[DDK]
Add an initial implementation of the RXCE and RDBSS libraries that are used to implement mini-redirectors
The associated headers are also added to DDK
The implementation is partial (really!) and is only working for read-only operations.
It leaks memory as hell (no refcounting implemented) and thus, objects freeing is not implemented.
It was tested with NFS41 driver. With such RDBSS, it's possible for the driver to mount a remote share, to list
files, to query their properties, to query volume properties, and finally to read files (with some corruption under
specific conditions).
Please refrain from committing in this (especially for modifying whitespaces or fixing comments...), this is still WIP
and under development, it would mess with my local changes!
In itself, it doesn't bring anything to ReactOS yet, as no mini redirector is available in ReactOS source tree.
This may come later on with NFS41.
More to follow...
CORE-11327
svn path=/trunk/; revision=74674
2017-05-26 20:52:18 +00:00
|
|
|
#define RxMdlIsLocked(Mdl) ((Mdl)->MdlFlags & MDL_PAGES_LOCKED)
|
|
|
|
#define RxMdlSourceIsNonPaged(Mdl) ((Mdl)->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL)
|
|
|
|
|
2017-07-08 17:12:33 +00:00
|
|
|
#define RxGetRequestorProcess(RxContext) IoGetRequestorProcess(RxContext->CurrentIrp)
|
|
|
|
|
[RDBSS]
[RXCE]
[DDK]
Add an initial implementation of the RXCE and RDBSS libraries that are used to implement mini-redirectors
The associated headers are also added to DDK
The implementation is partial (really!) and is only working for read-only operations.
It leaks memory as hell (no refcounting implemented) and thus, objects freeing is not implemented.
It was tested with NFS41 driver. With such RDBSS, it's possible for the driver to mount a remote share, to list
files, to query their properties, to query volume properties, and finally to read files (with some corruption under
specific conditions).
Please refrain from committing in this (especially for modifying whitespaces or fixing comments...), this is still WIP
and under development, it would mess with my local changes!
In itself, it doesn't bring anything to ReactOS yet, as no mini redirector is available in ReactOS source tree.
This may come later on with NFS41.
More to follow...
CORE-11327
svn path=/trunk/; revision=74674
2017-05-26 20:52:18 +00:00
|
|
|
#define RxAdjustAllocationSizeforCC(Fcb) \
|
|
|
|
{ \
|
|
|
|
if ((Fcb)->Header.FileSize.QuadPart > (Fcb)->Header.AllocationSize.QuadPart) \
|
|
|
|
{ \
|
|
|
|
PMRX_NET_ROOT NetRoot = (Fcb)->pNetRoot; \
|
|
|
|
ULONGLONG ClusterSize = NetRoot->DiskParameters.ClusterSize; \
|
|
|
|
ULONGLONG FileSize = (Fcb)->Header.FileSize.QuadPart; \
|
|
|
|
ASSERT(ClusterSize != 0); \
|
|
|
|
(Fcb)->Header.AllocationSize.QuadPart = (FileSize + ClusterSize) &~ (ClusterSize - 1); \
|
|
|
|
} \
|
|
|
|
ASSERT ((Fcb)->Header.ValidDataLength.QuadPart <= (Fcb)->Header.FileSize.QuadPart); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|