2.2.5.7.2 Response

The server MUST set an error code in the SMB_Header.Status field of the response to indicate whether the read from the named pipe succeeded or failed.

 Trans_Parameters
   {
   USHORT BytesWritten;
   }
            

SMB_Parameters: The SMB_Parameters section contains the relevant fields for the TRANS_RAW_WRITE_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 0x0002.

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

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

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

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_Parameters

Trans_Parameters (2 bytes):


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

BytesWritten

BytesWritten (2 bytes): This field MUST be set to the number of bytes written to the 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)

ERRinvalidparam

(0x0057)

STATUS_INVALID_PARAMETER

(0xC000000D)

The named pipe indicated by the FID is not in message mode or this is not a 2-byte write request that contains two null padding bytes.

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.