2.5.2 RAP Response Message

The response to a Remote Administration Protocol command consists of two parts. The first is transmitted in the Parameters field of the SMB_COM_TRANSACTION response; the second is transmitted in the Data field of the same SMB_COM_TRANSACTION response (as specified in [MS-CIFS] section 2.2.4.33).

The following MUST be the layout of the data in the SMB_COM_TRANSACTION response Parameters field.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Win32ErrorCode

Converter

RAPOutParams (variable)

...

Win32ErrorCode (2 bytes): This MUST be a 16-bit unsigned integer. It contains a Win32 error code representing the result of the Remote Administration Protocol command. The following table lists error codes that have particular meaning to the Remote Administration Protocol, as indicated in this specification.

Code/Value

Meaning

ERROR_SUCCESS

0x0000

No errors encountered.

ERROR_MORE_DATA

0x00EA

Additional data is available.

NERR_BufTooSmall

0x084B

The API return buffer is too small.

ERROR_INVALID_LEVEL

0x007C

The specified information level is not supported.

ERROR_INVALID_PARAMETER

0x0057

Data from the client is invalid.

A Remote Administration Protocol server implementation can return Win32 error codes other than those listed in the preceding table. Any such error code SHOULD be drawn from the set of error codes specified in [MS-ERREF], and the client MUST treat any error code not explicitly listed in the preceding table as a failure.

Converter (2 bytes): This field MUST contain a 16-bit signed integer, which a client MUST subtract from the string offset contained in the low 16 bits of a variable-length field in the Remote Administration Protocol response buffer. This is to derive the actual byte offset from the start of the response buffer for that field.

RAPOutParams (variable): (Optional) If present, this structure MUST contain the response information for the Remote Administration Protocol command in the corresponding Remote Administration Protocol request message. Certain RAPOpcodes require a RAPOutParams structure; for Remote Administration Protocol commands that require a RAPOutParams structure, see sections 2.5.5, 2.5.6, 2.5.7, 2.5.8, and 2.5.9.

If the Win32ErrorCode in the Parameters field is either ERROR_SUCCESS (0x0000) or ERROR_MORE_DATA (0x00EA), the Data field of the SMB_COM_TRANSACTION MUST contain the following:


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

RAPOutData (variable)

...

RAPOutData (variable): This is the response data for the Remote Administration Protocol operation. The content of the RAPOutData structure varies according to the Remote Administration Protocol command and the parameters of each Remote Administration Protocol command. See Remote Administration Protocol responses for each Remote Administration Protocol command in sections 2.5.5, 2.5.6, 2.5.7, 2.5.8, and 2.5.9.