다음을 통해 공유


2.2.4.55.2 Response

 SMB_Parameters
   {
   UCHAR  WordCount;
   Words
     {
     UCHAR  AndXCommand;
     UCHAR  AndXReserved;
     USHORT AndXOffset;
     USHORT OptionalSupport;
     }
   }
 SMB_Data
   {
   USHORT ByteCount;
   Bytes
     {
     OEM_STRING Service;
  
     SMB_STRING NativeFileSystem;
     }

SMB_Header:

TID (2 bytes): If the command is successful, the TID field in the response header MUST contain the TID identifying the newly created connection.


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

SMB_Parameters

...

SMB_Data (variable)

...

SMB_Parameters (7 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

WordCount

Words

...

WordCount (1 byte): The value of this field MUST be 0x03.

Words (6 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

AndXCommand

AndXReserved

AndXOffset

OptionalSupport

AndXCommand (1 byte): The command code for the next SMB command in the packet. This value MUST be set to 0xFF if there are no additional SMB command responses in the server response packet.

AndXReserved (1 byte): A reserved field. This MUST be set to 0x00 when this response is sent, and the client MUST ignore this field.

AndXOffset (2 bytes): This field MUST be set to the offset in bytes from the start of the SMB Header (section 2.2.3.1) to the start of the WordCount field in the next SMB command response in this packet. This field is valid only if the AndXCommand field is not set to 0xFF. If AndXCommand is 0xFF, this field MUST be ignored by the client.

OptionalSupport (2 bytes): A 16-bit field. The following OptionalSupport field flags are defined. Any combination of the following flags MUST be supported. All undefined values are considered reserved. The server SHOULD set them to 0, and the client MUST ignore them.

Value

Meaning

SMB_SUPPORT_SEARCH_BITS

0x0001

If set, the server supports the use of SMB_FILE_ATTRIBUTES (section 2.2.1.2.4) exclusive search attributes in client requests.

SMB_SHARE_IS_IN_DFS

0x0002

If set, this share is managed by DFS, as specified in [MS-DFSC].

SMB_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

ByteCount

Bytes (variable)

...

ByteCount (2 bytes): The value of this field MUST be greater than or equal to 0x0002.

Bytes (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

Service (variable)

...

NativeFileSystem (variable)

...

Service (variable): The type of the shared resource to which the TID is connected. The Service field MUST be encoded as a null-terminated array of OEM characters, even if the client and server have negotiated to use Unicode strings. The valid values for this field are as follows.

Service string

Description

"A:"

Disk Share

"LPT1:"

Printer Share

"IPC"

Named Pipe

"COMM"

Serial Communications device

NativeFileSystem (variable): The name of the file system on the local resource to which the returned TID is connected. If SMB_FLAGS2_UNICODE is set in the Flags2 field of the SMB Header of the response, this value MUST be a null-terminated string of Unicode characters. Otherwise, this field MUST be a null-terminated string of OEM characters. For resources that are not backed by a file system, such as the IPC$ share used for named pipes, this field MUST be set to the empty string.<107>

Error Codes

SMB error class

SMB error code

NT status code

POSIX equivalent

Description

ERRDOS (0x01)

ERRbadpath

(0x0003)

STATUS_OBJECT_PATH_NOT_FOUND

(0xC000003A)

ENOENT

The share path does not reference a valid resource.

ERRDOS (0x01)

ERRnoaccess

(0x0005)

STATUS_LOGON_FAILURE

(0xC000006D)

EPERM

The server rejected the client logon attempt.

ERRDOS (0x01)

ERRnomem

(0x0008)

STATUS_INSUFF_SERVER_RESOURCES

(0xC0000205)

ENOMEM

The server is out of resources. Out of memory or TIDs.

ERRDOS (0x01)

ERRpaused

(0x0046)

STATUS_SHARING_PAUSED

(0xC00000CF)

The server is temporarily paused.

ERRDOS (0x01)

ERRreqnotaccep

(0x0047)

STATUS_REQUEST_NOT_ACCEPTED

(0xC00000D0)

The server has no more connections available.

ERRSRV

(0x02)

ERRerror

(0x0001)

STATUS_INVALID_SMB

(0x00010002)

Invalid SMB. Not enough parameter bytes were sent.

ERRSRV

(0x02)

ERRbadpw

(0x0002)

STATUS_LOGON_FAILURE

(0xC000006D)

Incorrect password during logon attempt.

ERRSRV

(0x02)

ERRaccess

(0x0004)

STATUS_ACCESS_DENIED

(0xC0000022)

The user is not authorized to access the resource.

ERRSRV

(0x02)

ERRinvnetname

(0x0006)

STATUS_BAD_NETWORK_NAME

(0xC00000CC)

The share path is not valid.

ERRSRV

(0x02)

ERRinvdevice

(0x0007)

STATUS_BAD_DEVICE_TYPE

(0xC00000CB)

Resource type invalid. Value of Service field in the request was invalid.

ERRSRV

(0x02)

ERRbaduid

(0x005B)

STATUS_SMB_BAD_UID

(0x005B0002)

The UID supplied is not defined to the session.