Compartilhar via


3.3.3 Initialization

The browser server MUST register NetBIOS names <Machine Group Name>[0x00] and <Machine Group Name>[0x1E]. Information on how to register NetBIOS names is as specified in [RFC1001].

Current Role MUST be initialized to potential browser server.

BrowserServerUpTime is set to the time when the Browser service was initially started.

Backup Browser List MUST be initialized to an empty list.

Machine Group Name: MUST be set to the NetBIOS name of the domain or workgroup the client is a member of.

Machine Groups List MUST be initialized to an empty list.

DomainAnnouncement Timer Count MUST be set to 0.

LocalMasterAnnouncement Timer Count MUST be set to 0.

MasterAnnouncement Timer Count MUST be set to 0.

The server MUST enable advertising of the browser service by invoking [MS-SRVS] section 3.1.6.9, passing SV_TYPE_POTENTIAL_BROWSER as the input parameter.

The browser server MUST query the current domain role for the machine on which it is running by calling SamrQueryInformationDomain as specified in [MS-SAMR] section 3.1.5.5.2.

The browser server first performs a SamrConnect using its own name as the server name and an access mask of SAM_SERVER_CONNECT. The out parameter ServerHandle is used to perform a SamrQueryInformationDomain using the DomainServerRoleInformation value (as specified in [MS-SAMR] section 2.2.3.16). The returned buffer contains a DOMAIN_SERVER_ROLE_INFORMATION structure (see [MS-SAMR] section 2.2.3.1 for a detailed explanation of the fields).

If the call succeeds, the IsDomainController and IsPrimaryDomainController SHOULD be initialized based on the DomainServerRole value in the returned SAMPR_DOMAIN_GENERAL_INFORMATION structure as specified in the following table.<45>

For DomainServerRole:

Enumeration DOMAIN_SERVER_ROLE value

unsigned long value

DomainServerRoleBackup

IsDomainController set to TRUE

IsPrimaryDomainController set to FALSE

2

DomainServerRolePrimary

IsPrimaryDomainController set to TRUE

IsDomainController set to TRUE

3

If IsDomainController is TRUE, the server MUST set the DomainControllerRoleMonitor Timer to 1 second.

If IsPrimaryDomainController is TRUE, the server MUST force an election by sending a RequestElection (section 2.2.3) frame. It MUST set the preferred master bit in the Criteria in all RequestElection frames it sends.

If IsPrimaryDomainController is FALSE, the server MUST send a HostAnnouncement frame as specified in 3.2.5.2, and if a BecomeBackup frame is received, it MUST become a backup server.<46>

The server MUST disable advertising of the service by invoking [MS-SRVS] section 3.1.6.10, passing SV_TYPE_DOMAIN_CTRL and SV_TYPE_DOMAIN_BAKCTRL as input parameters.

If IsPrimaryDomainController is TRUE, the server MUST enable advertising of the PDC service as specified in [MS-SRVS] section 3.1.6.9, passing SV_TYPE_DOMAIN_CTRL as the input parameter.

If IsDomainController is TRUE but IsPrimaryDomainController is FALSE, the server MUST enable advertising as a domain controller as specified in [MS-SRVS] section 3.1.6.9, passing  SV_TYPE_DOMAIN_BAKCTRL as the input parameter.

If both IsDomainController and IsPrimaryDomainController are FALSE, the server SHOULD<47> enable advertising of the NT service as specified in [MS-SRVS] section 3.1.6.9, passing SV_TYPE_SERVER_NT as the input parameter.