2.5.1 RAP Request Message
Each Remote Administration Protocol request message MUST be transmitted in the parameters section of an SMB_COM_TRANSACTION protocol exchange (as specified in [MS-CIFS] section 2.2.4.33). The Remote Administration Protocol request message MUST have the following format.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RAPOpcode |
ParamDesc (variable) |
||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
DataDesc (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
RAPParams (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
AuxDesc (variable) |
|||||||||||||||||||||||||||||||
... |
RAPOpcode (2 bytes): The operation code for the particular operation. For more information on valid operation codes, see 2.5.4.
ParamDesc (variable): This value MUST be a null-terminated ASCII descriptor string. The server SHOULD<4> validate that the ParamDesc value passed by the client matches what is specified by the RAPOpcode. The following table specifies the descriptor character and the notation for each data type.
-
Descriptor
Data type
Format
b
BYTE
Indicates bytes (octets). Can be followed by an ASCII number indicating number of bytes.
D
unsigned long
Indicates parameter type of 32-bit integer (dword).
e
ENTCOUNT
Indicates a word is to be received which shows the number of entries returned.
F
PAD
Indicates Pad bytes (octets). Can be followed by an ASCII number indicating the number of bytes.
g
BYTE *
Indicates a byte is to be received. Can be followed by an ASCII number indicating the number of bytes to receive.
h
unsigned short *
Indicates a word is to be received.
i
unsigned long *
Indicates a dword is to be received.
L
RCVBUFLEN
16-bit integer containing length of receive data buffer in (16 bit) words.
O
NULL
Indicates a NULL pointer.
P
PARAMNUM
Indicates number of parameters. A (16 bit) word.
r
RCVBUF
Pointer to receive data buffer in response parameter section.
s
SNDBUF
Pointer to send data buffer in request parameter section.
T
SNDBUFLEN
16-bit integer containing length of send data buffer in (16 bit) words.
W
unsigned short
Indicates parameter type of 16 bit integer (word).
z
char
Indicates a null-terminated ASCII string present in the parameter area.
DataDesc (variable): (Optional) If this value is specified, it MUST be a null-terminated ASCII descriptor string that describes the contents of the data returned to the client.<5> Certain RAPOpcodes specify a DataDesc field; for a list of Remote Administration Protocol commands that specify a DataDesc field, see section 2.5.5.
If no DataDesc field is specified for the Remote Administration Protocol command, this field MUST be set to null. The following table specifies the descriptor character and the notation for each data type.
Descriptor |
Data type |
Format |
---|---|---|
B |
BYTE |
Indicates item of data type 8-bit byte (octet). The indicated number of bytes is present in the data. Descriptor char can be followed by an ASCII number indicating the number of 8-bit bytes present. |
D |
unsigned long |
Indicates data type of 32-bit integer (dword). Descriptor char can be followed by an ASCII number indicating the number of 32-bit words present. |
N |
AUXCOUNT |
Indicates number of auxiliary data structures. The transaction response data section contains an unsigned 16-bit number corresponding to this data item. |
O |
NULL |
Indicates a NULL pointer. |
W |
unsigned short |
Indicates data type of 16-bit integer (word). Descriptor char can be followed by an ASCII number indicating the number of 16-bit words present. |
z |
char * |
Indicates a 32-bit pointer to a null-terminated ASCII string is present in the response parameter area. The actual string is in the response data area and the pointer in the parameter area points to the string in the data area. The high word of the pointer MUST be ignored. The converter word present in the response parameter section MUST be subtracted from the low 16-bit value to obtain an offset into the data area indicating where the data area resides. |
RAPParams (variable): Remote Administration Protocol command-specific parameters, as specified in sections 2.5.5, 2.5.6, 2.5.7, 2.5.8, and 2.5.9.
AuxDesc (variable): (Optional) If this value is specified, it MUST be a null-terminated ASCII descriptor string that describes auxiliary data returned to the client.<6> If no AuxDesc field is specified for the Remote Administration Protocol command, this field MUST NOT be present. For the origin of the descriptor string values, see section 4.2.
In addition, if the command specifies that it also uses the Data field of the SMB_COM_TRANSACTION, the format of the Data field MUST be the following.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RAPInData (variable) |
|||||||||||||||||||||||||||||||
... |
RAPInData (variable): Additional data for the Remote Administration Protocol request. This field MUST be present in the NetPrintJobSetInfoRequest command. This field cannot be present in any other command.