2.2.5.4.2 Response

SMB_Parameters

 Trans_Data
   {
   USHORT     OutputBufferSize;
   USHORT     InputBufferSize;
   UCHAR      MaximumInstances;
   UCHAR      CurrentInstances;
   UCHAR      PipeNameLength;
   SMB_STRING PipeName;
   }
            

The SMB_Parameters section contains the relevant fields for the TRANS_QUERY_NMPIPE_INFO subcommand of the SMB_COM_TRANSACTION response.

WordCount (1 byte): This field value is the total number of SMB parameter words and MUST be 0x0A.

Words (20 bytes):

TotalParameterCount (2 bytes): This field MUST be set to 0x0000 for this request.

TotalDataCount (2 bytes): This field MUST be greater than or equal to 0x0007.

ParameterCount (2 bytes): This field MUST be set to 0x0000.

DataCount (2 bytes): This field MUST be set to less than or equal to the value of the TotalDataCount field.

SetupCount (1 byte): This field MUST be set to 0x00.


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

Trans_Data (variable)

...

Trans_Data (variable):

The Trans_Data section of the SMB_COM_TRANSACTION response contains the parameters and data generated by the transaction TRANS_QUERY_NMPIPE_INFO subcommand.


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

OutputBufferSize

InputBufferSize

MaximumInstances

CurrentInstances

PipeNameLength

PipeName (variable)

...

OutputBufferSize (2 bytes): This field MUST be the actual size of the buffer for outgoing (server) I/O.

InputBufferSize (2 bytes): This field MUST be the actual size of the buffer for incoming (client) I/O.

MaximumInstances (1 byte): This field MUST be the maximum number of allowed instances of the named pipe.

CurrentInstances (1 byte): This field MUST be the current number of named pipe instances. The count increments when the server creates a named pipe and decrements when the server closes the named pipe for an unconnected pipe, or when both the server and the client close the named pipe for a connected pipe.

PipeNameLength (1 byte): This field MUST be the length in bytes of the pipe name, including the terminating null character.

PipeName (variable): This field MUST be a null-terminated string containing the name of the named pipe, not including the initial \\NodeName string (that is, of the form \PIPE\pipename). If SMB_FLAGS2_UNICODE is set in the Flags2 field of the SMB Header (section 2.2.3.1) of the response, the name string MUST be in a null-terminated array of 16-bit Unicode characters. Otherwise, the name string MUST be a null-terminated array of OEM characters. If the PipeName field consists of Unicode characters, this field MUST be aligned to start on a 2-byte boundary from the start of the SMB Header.

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)

ERRinvalidparam

(0x0057)

STATUS_INVALID_PARAMETER

(0xC000000D)

Invalid value in Level field.

ERRDOS

(0x01)

ERRbufftosmall

(0x007A)

STATUS_BUFFER_TOO_SMALL

(0xC0000023)

The MaxDataCount is too small to accept the request information.

ERRDOS

(0x01)

ERRmoredata

(0x00EA)

STATUS_BUFFER_OVERFLOW

(0x80000005L)

There is more data available than can fit based on the MaxDataCount sent by the client. The pipe name has been requested and cannot fit in within the MaxDataCount buffer.

ERRSRV

(0x02)

ERRerror

(0x0001)

STATUS_INVALID_SMB

(0x00010002)

Invalid or corrupt SMB.

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.