Connection and Name Resolution

Network mini-redirectors establish connections to remote servers and handle name resolution using several routines. RDBSS abstracts this process into several structures including the SRV_CALL, NET_ROOT, and V_NET_ROOT structures that are reference counted. In network mini-redirector terms, the establishment of a connection is often called a "tree connect." This connection establishment requires creating a SRV_CALL, a NET_ROOT, and a V_NET_ROOT structure. So the normal procedure would be a call to the network mini-redirector MRxCreateSrvCall routine followed by a call to the MRxSrvCallWinnerNotify and MRxCreateVNetRoot routines. These calls are usually issued in response to a request from a user-mode application or service to mount a drive (net use x: \\server\public, for example). These calls can also result from a request for a UNC file object (notepad \\server\public\readme.txt, for example). RDBSS handles both of these cases internally for the network mini-redirector and initiates the MRxCreateSrvCall sequence.

When a connection is deleted, similar finalize calls are made to tear down the SRV_CALL, and NET_ROOT structures and release any memory used. These calls to the network mini-redirector include MRxFinalizeVNetRoot, MRxFinalizeNetRoot, and MRxFinalizeSrvCall.

The original design for RDBSS was that various network mini-redirectors would all share a single copy of RDBSS, but this was not implemented. A holdover from this original design is that various network mini-redirectors compete to fulfill the request for a network connection (\\server\share, for example). The MRxSrvCallWinnerNotify routine is used by RDBSS to notify a network mini-redirector that it was the winner when multiple redirectors could fulfill the request. The winning network mini-redirector is expected to create the SRV_CALL and establish a connection with the server.

Under the implementation of RDBSS in Windows Server 2003, Windows XP, and Windows 2000, each network mini-redirector has its own copy of RDBSS so there are no competing network redirectors at the RDBSS layer. Each network mini-redirector (network provider) and its local copy of RDBSS is called in turn based on the order in a registry setting: The order in which providers are queried is controlled by the following registry value:

ProviderOrder

This registry value is located under the following registry key:

HKLM\CurrentControlSet\Control\NetworkProvider\Order

The MRxSrvCallWinnerNotify routine will be called after every request to create a SRV_CALL structure.

The following table lists the routines that can be implemented by a network mini-redirector for connection and name resolution operations.

Routine Description
MRxCreateSrvCall

RDBSS calls this routine to request that the network mini-redirector create a SRV_CALL structure and establish connection with a server.

MRxCreateVNetRoot

RDBSS calls this routine to request that the network mini-redirector create a V_NET_ROOT structure.

MRxExtractNetRootName

RDBSS calls this routine to request that a network mini-redirector extract the name from the NET_ROOT structure for a given pathname.

MRxFinalizeNetRoot

RDBSS calls this routine to request that a network mini-redirector finalize a NET_ROOT object.

MRxFinalizeSrvCall

RDBSS calls this routine to request that a network mini-redirector finalize a SRV_CALL structure used for establishing connection with a server.

MRxFinalizeVNetRoot

RDBSS calls this routine to request that a network mini-redirector finalize a V_NET_ROOT structure.

MRxPreparseName

RDBSS calls this routine to give a network mini-redirector the opportunity to preparse a name.

MRxSrvCallWinnerNotify

This routine was originally designed to be called by RDBSS to notify a network mini-redirector that it was the winner when multiple redirectors could fulfill the request. The winning network mini-redirector is expected to create the SRV_CALL structure and establish a connection with the server.

Under the current implementation of RDBSS each network mini-redirector has its own copy of RDBSS, so there are no competing network redirectors at the RDBSS layer. This routine will be called before every request to create a SRV_CALL structure.

When multiple redirectors are installed for handling the same UNC namespace, the redirector to service a request is chosen by MUP based on the order of redirectors specified in the registry.