2.2.5.5.2 Response
-
Trans_Parameters { USHORT ReadDataAvailable; USHORT MessageBytesLength; USHORT NamedPipeState; } Trans_Data { UCHAR ReadData[TotalDataCount] (variable); }
The server MUST set an error code in the Status field of the SMB Header (section 2.2.3.1) of the response to indicate whether the operation on the named pipe succeeded or failed.
SMB_Parameters: The SMB_Parameters section contains the relevant fields for the TRANS_PEEK_NMPIPE subcommand of the SMB_COM_TRANSACTION response.
-
-
WordCount (1 byte): This field MUST be set to 0x0A.
-
Words (20 bytes):
-
-
TotalParameterCount (2 bytes): This field MUST be set to 0x0006.
-
TotalDataCount (2 bytes): This field MUST be set to the number of bytes read from the named pipe in a peek fashion and in raw format.
-
ParameterCount (2 bytes): This field MUST be set to 0x0006.
-
DataCount (2 bytes): This field MUST be set to less than or equal to the value of the TotalDataCount field.
-
SetupCount (1 byte): The number of setup words. For this response, it MUST be set to 0x00.
-
-
-
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Trans_Parameters |
|||||||||||||||||||||||||||||||
... |
Trans_Data (variable) |
||||||||||||||||||||||||||||||
... |
Trans_Parameters (6 bytes):
-
0
1
2
3
4
5
6
7
8
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1ReadDataAvailable
MessageBytesLength
NamedPipeState
-
ReadDataAvailable (2 bytes): This field contains the total number of bytes available to be read from the pipe.
-
MessageBytesLength (2 bytes): If the named pipe is a message mode pipe, this MUST be set to the number of bytes remaining in the message that was peeked (the number of bytes in the message minus the number of bytes read). If the entire message was read, this value is 0x0000. If the named pipe is a byte mode pipe, this value MUST be set to 0x0000.
-
NamedPipeState (2 bytes): The status of the named pipe.
-
Value
Meaning
0x0001
Named pipe was disconnected by server.
0x0002
Named pipe is listening.
0x0003
Named pipe connection to the server is okay.
0x0004
Server end of named pipe is closed.
-
Trans_Data (variable):
-
0
1
2
3
4
5
6
7
8
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1ReadData (variable)
...
-
ReadData (variable): This field contains the data read from the named pipe.
Error Codes
SMB error class |
SMB error code |
NT status code |
POSIX equivalent |
Description |
---|---|---|---|---|
ERRDOS (0x01) |
ERRbadfid (0x0006) |
STATUS_INVALID_HANDLE (0xC0000008L) STATUS_SMB_BAD_FID (0x00060001) |
EBADF |
Invalid FID. |
ERRDOS (0x01) |
ERRnomem (0x0008) |
STATUS_INSUFF_SERVER_RESOURCES (0xC0000205) |
ENOMEM |
The server is out of resources required to process the request. |
ERRDOS (0x01) |
ERRmoredata (0x00EA) |
STATUS_BUFFER_OVERFLOW (0x80000005L) |
|
There is more data available than can fit in the response buffer based on the MaxDataCount field value in the client request. None of the data was returned in the response. |
ERRSRV (0x02) |
ERRerror (0x0001) |
STATUS_INVALID_SMB (0x00010002) |
|
Invalid SMB. Not enough parameter bytes were sent. |
ERRSRV (0x02) |
ERRinvtid (0x0005) |
STATUS_INVALID_HANDLE (0xC0000008L) STATUS_SMB_BAD_TID (0x00050002) |
|
The TID is no longer valid. |
ERRSRV (0x02) |
ERRbaduid (0x005B) |
STATUS_INVALID_HANDLE (0xC0000008L) STATUS_SMB_BAD_UID (0x005B0002) |
|
The UID supplied is not defined to the session. |