4.3 Adding a New Link to a Domain-Based DFS Namespace
The following example describes the steps for adding a new DFS link to an existing domainv1-based DFS namespace that has two root targets. The illustration in this example also shows how the DFS root target uses NetrDfsSetInfo, Level parameter 101, and DFS_VOLUME_STATE_RESYNCHRONIZE to update the DFS metadata of the domain-based DFS namespace with the new DFS link information, and then notifies the other root targets.
A client issues a NetrDfsAdd RPC method to the DFS root target CFS-41X-2C02 for the domainv1-based DFS namespace.
The DFS root target CFS-41X-2C02 issues an LDAP search operation to retrieve the pKTGuid attribute in the object for the domainv1-based DFS namespace to the PDC for the domain. The following illustration shows the DN of the object and the attribute searched.
The LDAP search is successful, and the value of the PktGuid attribute is returned.
The DFS root target CFS-41X-2C02 determines that the DFS metadata in its cache is up-to-date and determines whether the new link target is already in another DFS namespace. This is done by issuing the NetrShareGetInfo method, as specified in [MS-SRVS], specifying a Level parameter 1005 to the DFS link target CFS-44X-2B08 to check the link target share's properties. For more information on the NetrShareGetInfo method, see [MS-SRVS].
The NetrShareGetInfo RPC method returns an indication that the DFS link target share is not a DFS namespace. This information is used to determine the value of the PKT_ENTRY_TYPE_OUTSIDE_MY_DOM bit of the Type field of the DFSRootOrLinkIDBLOB (for more information, see section 2.3.3.1.1.2) for the DFS link. For this example, the bit is set to 0.
DFS link target CFS-41X-2C02 issues an LDAP modify operation to the PDC with a new pKTGuid value and the updated DFS metadata containing the new DFS link information.
The LDAP modify operation is successful.
The NetrDfsAdd method invoked by the client completes successfully.
The DFS root target, which updated the DFS metadata, issues the NetrDfsSetInfo method with the Level parameter 101 and the State field of DFS_INFO_101 set to DFS_VOLUME_STATE_RESYNCHRONIZE to all of the other root targets. CFS-41X-2C02, in this example, is notifying CFS-41X-2C03.
On receiving the NetrDfsSetInfo method, Level parameter 101, and DFS_VOLUME_STATE_RESYNCHRONIZE, CFS-41X-2C03 issues an LDAP search to the PDC to verify whether the DFS metadata in its cache is up-to-date.
The LDAP search operation is successful and contains the pKTGuid attribute's value.
CFS-41X-2C03 determines that the cached DFS metadata it has needs to be refreshed. It then issues an LDAP search operation to retrieve the value of the pKT attribute, which contains the actual DFS metadata.
The LDAP search is successful and contains the DFS metadata in the reply.
In this example, CFS-41X-2C03 performs the required changes to its local state by adding the new DFS link. The NetrDfsSetInfo method that CFS-41X-2C02 issued is then completed.

Figure 4: Adding a new link to a domainv1-based DFS namespace