다음을 통해 공유


2.2.5.11.2 Response

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 transaction succeeded or failed.

 Trans_Data
   {
   UCHAR ReadData[TotalDataCount];
   }
            

SMB_Parameters:

The SMB_Parameters section contains the relevant fields for the TRANS_READ_NMPIPE (section 2.2.5.8) subcommand of the SMB_COM_TRANSACTION Response (section 2.2.4.33.2).

WordCount (1 byte): This field MUST be set to 0x0A.

Words (20 bytes):

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

TotalDataCount (2 bytes): This field MUST be set to the total number of bytes read from the named pipe.

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

DataCount (2 bytes): This field MUST be set to the number of bytes contained in the Trans_Data.ReadData field. The value MUST be less than or equal to TotalDataCount. If the value is less than TotalDataCount, the server MUST send the remaining bytes in one or more additional response messages.<144>

SetupCount (1 byte): This field SHOULD<145> 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):


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

ReadData (variable)

...

ReadData (variable): This field MUST contain the bytes read from the named pipe. The size of the buffer MUST be equal to the value in the TotalDataCount field of the response.  If the named pipe is a message mode pipe, and the entire message was not read, the Status field in the SMB Header MUST be set to STATUS_BUFFER_OVERFLOW.

Error Codes

SMB error class

SMB error code

NT status code

POSIX equivalent

Description

ERRDOS

(0x01)

ERRnomem

(0x0008)

STATUS_INSUFF_SERVER_RESOURCES

(0xC0000205)

ENOMEM

The server is out of resources required to process the request.

ERRDOS

(0x01)

ERRbadaccess

(0x000C)

STATUS_ACCESS_DENIED

(0xC0000022)

Write permission required.

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.

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.