Network redirector driver sample question

Hi All,

I am trying to develop a network redirector driver.

Since I am new to file system driver development so I’d like to find out a sample project to start with,
Unfortunately I can’t found such a sample from https://docs.microsoft.com/en-us/windows-hardware/drivers/samples/

I’ve found project nulmrx which was released by Microsoft but it didn’t put to current sample set and looks it lost maintain for a long time, I can’t make it work under win10.

Could sb share some information where could I get a workable win10 network redirector driver sample?

Thanks very much!

The only samples I have ever seen are nulmrx and smbmrx (which is of the
same vintage as nulmrx). Both are very old samples that are no longer
maintained.

Also note that both of these samples are mini-redirectors, which means they
use RxRegisterMinirdr to register with the Redirected Drive Buffering
Subsystem (RDBSS). RDBSS then deals with most of their Windows host
interactions (e.g. dealing with the Windows Cache Manager) and the
mini-redirector “just” worries about their network activity.

It is possible to write a network file system *without* using RDBSS, which
would be called a “monolithic redirector”. This means your file system is
responsible for all the Windows host interactions as well as your network
activity. In this case you register your file system directly with the
Multiple UNC Provider (MUP) by calling FsRtlRegisterUncProviderEx.

ASIDE: To confuse things even worse, Windows also has the concept of a
“monolithic mini-redirector”. This is the same thing as a mini-redirector,
but you statically link to RDBSSLIB.LIB instead of dynamically linking to
RDBSS.SYS.

I have worked on monolithic redirectors, but haven’t ever tried tackling a
mini-redirector. Both undoubtedly have their challenges, though we (OSR)
historically went with monolithic so that we weren’t subject to the RDBSS
black box (we have enough black boxes to deal with as it is…)

I honestly don’t know of any other (public) examples of either a monolithic
or mini-redirector. For fun I searched GitHub for RxRegisterMinirdr and
there are a few hits (the VirtualBox guest file system is one). Same goes
for searching for FsRtlRegisterUncProviderEx (looks like there’s an AFS
implementation out there)

I did not look any closer than this, so I can’t say if these are any good,
but they might be useful as reference material.

Sadly writing a network file system for Windows is not a common task, so
don’t expect a wealth of information to be available.

-scott
OSR
@OSRDrivers

Two projects that are actively maintained as GPL are

Dokany https://github.com/dokan-dev/dokany/
WinFSP http://www.secfs.net/winfsp/

Both use the network redirector as front-ends to a user-mode file system
interface. I have used WinFSP.

I also wrote my own, first as a mini-redirector. I had a lot of strange
“black box” problems with rdbss and eventually dropped it in favor of the
monolithic approach. Writing a “monolithic” redirector is not really that
much more work, is more flexible, and it is easier to find examples and
help. I could not find any active projects that use rdbss.

Thanks Scott & nlited,

I am really appreciate your valuable information very much!

They could be a good start point for me to kick off my network redirector driver learning & development.

Thank you!