The Kernel Network Mini-Redirector Driver
A kernel network mini-redirector driver implements a number of callback routines that are used by the Redirected Drive Buffering Subsystem (RDBSS) to communicate with the driver. In the remainder of this document, a kernel network mini-redirector driver will be referred to as a network mini-redirector driver.
When a network mini-redirector driver first starts (in its DriverEntry routine), the driver calls the RDBSS RxRegisterMinirdr routine to register the network mini-redirector driver with RDBSS. The network mini-redirector driver passes in a MINIRDR_DISPATCH structure, which includes configuration data along with pointers to the routines that the network mini-redirector driver implements (a dispatch table).
A network mini-redirector can choose to implement only some of these routines. Any routine that is not implemented by the network mini-redirector should be set to a NULL pointer in the MINIRDR_DISPATCH structure passed to RxRegisterMinirdr. RDBSS will only call routines implemented by the network mini-redirector.
One special category of routines implemented by a network mini-redirector are the low I/O operations that represent the traditional file I/O calls for read, write, and other file operations. All of the low I/O routines can be called asynchronously by RDBSS. A kernel driver for a network mini-redirector must make certain that any low I/O routines that are implemented can be safely called asynchronously. The low I/O routines are passed in as an array of routine pointers as part of the MINIRDR_DISPATCH structure from the DriverEntry routine. The value of the array entry is the low I/O operation to perform. All of the low I/O routines expect a pointer to an RX_CONTEXT structure to be passed in as a parameter. The RX_CONTEXT data structure has a LowIoContext.Operation member that also specifies the low I/O operation to perform. It is possible for several of the low I/O routines to point to the same routine in a network mini-redirector driver since this LowIoContext.Operation member can be used to specify the low I/O operation requested. For example, all of the low I/O calls related to file locks could call the same low I/O routine in the network mini-redirector and this routine could use the LowIoContext.Operation member to specify the lock or unlock operation requested.
RDBSS also assumes asynchronous operation for a few other routines implemented by a network mini-redirector. These routines are used for establishing a connection with a remote resource. Since connection operations can take a considerable amount of time to complete, RDBSS assumes these routines are implemented as asynchronous operations.
RDBSS assumes that all routines implemented by a network mini-redirector other than the low I/O and connection-related routines are based on synchronous calls. However, this is subject to change in future releases of the Windows operating system.
All of the routines implemented by a network mini-redirector return an NTSTATUS value on completion. Most routines return STATUS_SUCCESS on success or an appropriate NTSTATUS value. In addition to return values specific to a particular routine, there are two generic categories of errors that can be returned for most routines :
Possible network errors include the following:
The I/O request to the remote server has timed out.
The I/O request was to a network path that does not exist. This error can occur if a directory was renamed or deleted.
The network is unreachable from the client.
The remote server is not listening for connections.
The user session on the server has been deleted. The session may have timed out, the server may have been restarted causing all existing user sessions to be deleted, or an administrator on the server may have forced a delete of the user session .
The connection to the remote server was disconnected.
The I/O request is for a network name that has been deleted.
Possible authentication errors include the following:
The login request to the remote server failed.
There was a conflict with the network credentials that were presented.
A change of the network protocol used by the client to communicate with the server was detected by the server and the change was to an older version of the protocol.
There is a restriction on workstation logins to the server.
The following sections discuss in detail the routines that can be implemented by a network mini-redirector:
The routines implemented by a network mini-redirector can be organized into the following categories based on their function:
Send feedback about: