3.3.5.6 Receiving a NetServerEnum2 or NetServerEnum3 Request

Browser clients issue NetServerEnum2 or NetServerEnum3 Remote Administration Protocol requests, as specified in [MS-RAP], to retrieve the list of servers or machine groups.

Browser servers receiving the NetServerEnum2 or NetServerEnum3 request whose Current Role is equal to Potential Browser Server MUST respond with Win32ErrorCode set to ERROR_REQ_NOT_ACCEP (as specified in [MS-ERREF]).

If the incoming NetServerEnum2 or NetServerEnum3 request specifies the SV_TYPE_LOCAL_LIST_ONLY flag in the ServerType parameter (as specified in [MS-RAP] section 2.5.5.2.1), the browser server MUST restrict the list of servers and machine groups returned to the client to the servers and machine groups on the same subnet as the browser server.

If the ServerType parameter of the incoming NetServerEnum2 or NetServerEnum3 request specifies the SV_TYPE_DOMAIN_ENUM flag, and any other field in the ServerType field is set, the browser server MUST respond with the Win32ErrorCode set to ERROR_INVALID_FUNCTION (as specified in [MS-ERREF] section 2.2).

If the incoming NetServerEnum2 or NetServerEnum3 request specifies the SV_TYPE_DOMAIN_ENUM flag in the ServerType parameter (as specified in [MS-RAP] section 2.5.5.2.1), the browser server MUST return the server's list of machine groups to the client.

If the incoming NetServerEnum2 or NetServerEnum3 request specifies the ServerType as 0xFFFFFFFF, the browser server MUST return the complete list of servers to the client.

If the incoming NetServerEnum2 or NetServerEnum3 request specifies the ServerType as any value other than the preceding, the server MUST return only those servers with a ServerType field that contains one of the values in the request ServerType parameter.

If the browser server is processing a NetServerEnum3 request, it MUST return entries starting from its list of servers or machine groups beginning with the server whose name matches the FirstServerToReturn parameter of the RAP NetServerEnum3Request packet, as specified in [MS-RAP].

If the request is for a list of servers in a domain that is different from the machine group that it serves, the local master browser SHOULD issue a NetServerEnum2 (or NetServerEnum3) request to the domain master browser server for the specified domain (which it can find in its list of machine groups and their domain master browser servers). If the domain master browser server returns a NetServerEnum response, that response MUST then be returned to the requester. If the local master browser fails to locate the domain master browser server for the specified domain, or if the request to the domain master browser server fails, the local master browser MUST respond with the Win32ErrorCode set to NERR_DevNotRedirected (0x0000083B).

If the incoming NetServerEnum2 or NetServerEnum3 request specifies the Domain as NULL, servers from the primary domain, logon domain, and other domain are enumerated and returned.

If the incoming NetServerEnum2 or NetServerEnum3 request specifies the Domain is not one of the primary domain, logon domain, and other domain, the error code will be mapped to either NERR_Success (with an empty list) for non-NT clients, or remain ERROR_NO_BROWSER_SERVERS_FOUND for NT clients.