共用方式為


2.2.1.5 Status Codes (SMB_ERROR)

An SMB_ERROR MUST be interpreted in one of two ways, depending on the capabilities negotiated between client and server: either as an NTSTATUS value (a 32-bit value in little-endian byte order used to encode an error message, as defined in [MS-ERREF] section 2.3), or as an SMBSTATUS value (as defined following).

 SMBSTATUS
   {
   UCHAR  ErrorClass;
   UCHAR  Reserved;
   USHORT ErrorCode;
   }


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

ErrorClass

Reserved

ErrorCode

ErrorClass (1 byte): An SMB error class code.

Reserved (1 byte): This field is reserved and MUST be ignored by both server and client.

ErrorCode (2 bytes): An SMB error code.

The set of NTSTATUS values defined in [MS-ERREF] is extended in this document to include 32-bit CIFS-specific error codes.  Each CIFS-specific error code is wire-identical to the equivalent SMBSTATUS ErrorClass/ErrorCode pair, as listed in section 2.2.2.4. CIFS-specific error codes can be interpreted by the client either as 32-bit values or as SMBSTATUS values.<18>