Partager via


3.2.5.15 NetServerEnum3 Command

The Remote Administration Protocol server MUST process the NetServerEnum3Request as follows:

  1. The server MUST validate that the incoming ParamDesc field of the Remote Administration Protocol request contains the ASCII string "WrLehDzz"; if it does not, the server SHOULD format a Remote Administration Protocol response with the Win32ErrorCode set to ERROR_INVALID_PARAMETER (0x0057), and then return the response to the client.<87>

  2. If the information level is any value other than 0x0000 or 0x0001, the server implementing NetServerEnum3 MUST set the Win32ErrorCode value in the Remote Administration Protocol response message to ERROR_INVALID_LEVEL (0x007C).

  3. If the ServerType field in the incoming NetServerEnum3Request contains the SV_TYPE_LOCAL_LIST_ONLY bit, the server MUST return only those servers (or domains) that exist on the same subnet as the server, as specified in [MS-BRWS] section 3.3.4.2. If the server cannot determine the list of servers on the current subnet, or if its list of servers (or domains) on the current subnet is empty, it MUST return an empty set of servers (or domains) and set the Win32ErrorCode value in the Remote Administration Protocol Response Message to ERROR_NO_BROWSER_SERVERS_FOUND (0x17E6).

    If the ServerType field in the incoming NetServerEnum3Request contains the SV_TYPE_DOMAIN_ENUM bit, the server MUST return its list of domains, not its list of servers.

    For any other valid value of the ServerType field in the NetServerEnum3Request, the server MUST return the corresponding list of servers as given in the table in section 2.5.5.3.1. If the server cannot determine the list of servers, or if the list of servers is empty, it MUST return an empty server list and set the Win32ErrorCode value in the Remote Administration Protocol Response Message to ERROR_NO_BROWSER_SERVERS_FOUND (0x17E6).

  4. The server MUST process the incoming domain field of the Remote Administration Protocol request as specified in [MS-BRWS] section 3.3.5.6.

  5. When determining the set of servers (or domains) to return, the Remote Administration Protocol NetServerEnum3 command processor MUST scan through ServerList and return entries in its list of servers starting with the entry named in the FirstNameToReturn parameter. If the FirstNameToReturn string is empty (a single null character), the browser server SHOULD return entries starting with the first server. If the server's list of servers does not contain the FirstNameToReturn entry, it SHOULD return an empty list of servers.<88>

  6. The Remote Administration Protocol server MUST respond to the NetServerEnum3Request with a Remote Administration Protocol response message with the RAPOutParams set to the contents of a NetServerEnum3Response.

  7. If the InfoLevel of the NetServerEnum3Request structure is 0x0000, the Remote Administration Protocol server MUST walk the entries in ServerList, starting with the first entry to return, as previously specified, and fill in the RAPOutData field of the Remote Administration Protocol response with as many NetServerInfo0 structures as can fit within the value specified by the Remote Administration Protocol client's ReceiveBufferSize input parameter (see the packing rules, as specified in section 2.5.11). The server MUST set the EntriesReturned field in the NetServerEnum3Response to the number of NetServerInfo0 structures in the RAPOutData field of the response.

    If the InfoLevel of the NetServerEnum3Request structure is 0x0001, the Remote Administration Protocol server MUST walk the entries in ServerList, starting with the first entry to return, as previously specified, and fill in the RAPOutData field of the Remote Administration Protocol response with as many NetServerInfo1 structures as can fit within the value specified by the Remote Administration Protocol client's ReceiveBufferSize input parameter (see the packing rules, as specified in section 2.5.11). The server MUST set the EntriesReturned field in the NetServerEnum3Response to the number of NetServerInfo1 structures in the RAPOutData field of the response.

  8. If the response in the EntriesReturned field is less than the response in the EntriesAvailable field, the Remote Administration Protocol NetServerEnum3 server MUST set the Win32ErrorCode value in the Remote Administration Protocol response message to ERROR_MORE_DATA (0x00EA).

  9. If any other errors occur during the response processing, the Remote Administration Protocol server MUST fill in the Win32ErrorCode value in the Remote Administration Protocol response message with the Win32 error code corresponding to the error. Otherwise, the Remote Administration Protocol server MUST set Win32ErrorCode to ERROR_SUCCESS (0X0000).