6.2.2.3.4.2 Main Entry Point

The CreateIntersiteConnections method is the beginning of the control flow. This method invokes the remainder of the methods, directly or indirectly.

 /***** CreateIntersiteConnections *****/
 /* Computes an NC replica graph for each NC replica that "should be
  * present" on the local DC or "is present" on any DC in the same site
  * as the local DC. For each edge directed to an NC replica on such a
  * DC from an NC replica on a DC in another site, the KCC creates an
  * nTDSConnection object to imply that edge if one does not already
  * exist.
  *
  * OUT: keepConnections - A sequence of objectGUID values of
  *      nTDSConnection objects for edges that are directed to the
  *      local DC's site in one or more NC replica graphs.
  * RETURNS: TRUE if spanning trees were created for all NC replica
  *      graphs, otherwise FALSE.
  */
 CreateIntersiteConnections(OUT SEQUENCE<GUID> keepConnections) : bool
 {
     LET allConnected be TRUE
     SET keepConnections to an empty sequence of GUID
     
     LET crossRefList be the set containing each object o of class
     crossRef such that o is a child of the CN=Partitions child of the
     config NC 
  
     FOR each crossRef object cr in crossRefList
         IF cr!enabled has a value and is false, or if FLAG_CR_NTDS_NC
         is clear in cr!systemFlags, skip cr.
         LET g be the GRAPH return of SetupGraph()
         
         /* Create nTDSConnection objects, routing replication traffic
          * around "failed" DCs. */
         LET foundFailedDC be a Boolean variable
         LET c be the Boolean return of CreateConnections(g, cr, TRUE,
         keepConnections, foundFailedDC)
         
         IF !c
             SET allConnected to FALSE
             IF foundFailedDC
                 /* One or more failed DCs preclude use of the ideal NC
                  * replica graph. Add connections for the ideal graph.
                  */
                 CALL CreateConnections(graph, cr, FALSE,
                 keepConnections, foundFailedDCs)
             ENDIF
         ENDIF
     ENDFOR
     
     RETURN allConnected
 }