3.2.5.3 NetServerGetInfo Command
The Remote Administration Protocol server MUST process the NetServerGetInfoRequest as follows:
The server MUST validate that the incoming ParamDesc field of the Remote Administration Protocol request contains the ASCII string "WrLh"; 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.<70>
If the request in the ReceiveBuffersSize field is less than the response in the TotalBytesAvailable field, the Remote Administration Protocol server MUST set the Win32ErrorCode value in the Remote Administration Protocol response message to ERROR_MORE_DATA (0x00EA).
If the information level is any value other than 0 or 1, the server implementing RAP NetServerGetInfo MUST set the Win32ErrorCode value in the RAP response message to ERROR_INVALID_LEVEL (0x007C).
The Remote Administration Protocol server MUST query the local machine for server information as specified in [MS-SRVS] 3.1.4.17, passing in the following parameters:
Parameter
Value
ServerName
The local machine name
Level
101
If the call succeeds, the server MUST use the resulting SERVER_INFO_101 structure to generate the response. The mapping between fields in the SERVER_INFO_101 structure returned from NetrServerGetInfo and the RAP NetServerInfo0 and NetServerInfo1 structures is as follows:
RAP structure and field
SERVER_INFO_101 structure
NetServerInfo0.ServerName
sv101_name
NetServerInfo1.ServerName
sv101_name
NetServerInfo1.MajorVersion
sv101_version_major
NetServerInfo1.MinorVersion
sv101_version_minor
NetServerInfo1.ServerType
sv101_type
NetServerInfo1.ServerComment
sv101_comment
The Remote Administration Protocol server MUST create a Remote Administration Protocol response message with the RapOutParams set to the contents of a NetServerGetInfoResponse message.
If any other errors occur during the response processing, the Remote Administration Protocol server MUST fill the Win32ErrorCode value in the Remote Administration Protocol response message with the Win32ErrorCode corresponding to the error, as specified in [MS-ERREF]. Otherwise, the Remote Administration Protocol server MUST set Win32ErrorCode to ERROR_SUCCESS (0X0000).