Compartilhar via


2.2.4.43.2 Response

 SMB_Parameters
   {
   UCHAR  WordCount;
   Words
     {
     UCHAR   AndXCommand;
     UCHAR   AndXReserved;
     USHORT  AndXOffset;
     USHORT  Count;
     USHORT  Available;
            
     ULONG   Reserved;
     }
   }
 SMB_Data
   {
   USHORT ByteCount;
   }
            


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 (13 bytes)

...

...

...

SMB_Data (variable)

...

SMB_Parameters (13 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): This field MUST be 0x06. The length in two-byte words of the remaining SMB_Parameters.

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

Count

Available

Reserved

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.

Count (2 bytes): The number of bytes written to the file.

Available (2 bytes): This field is valid when writing to named pipes or I/O devices. This field indicates the number of bytes remaining to be written after the requested write was completed. If the client wrote to a disk file, this field MUST be set to 0xFFFF.<62>

Reserved (4 bytes): This field MUST be 0x00000000.

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

ByteCount (2 bytes): This field MUST be 0x0000. No data is sent by this message.

Error Codes

SMB error class

SMB error code

NT status code

POSIX equivalent

Description

SUCCESS

(0x00)

SUCCESS

(0x0000)

STATUS_SUCCESS

(0x00000000)

EFBIG

The file has grown too large and no more data can be written to the file. A Count of zero (0x0000) MUST be returned to the client in the server response. This indicates to the client that the file system is full.

SUCCESS

(0x00)

SUCCESS

(0x0000)

STATUS_SUCCESS

(0x00000000)

NOSPC

No space on the file system. The server MUST return a zero (0x0000) in the Count field of the response. This indicates that the file system is full.

ERRDOS

(0x01)

ERRnoaccess

(0x0005)

EAGAIN

Resources for I/O on the server are temporarily exhausted.

ERRDOS

(0x01)

ERRlock

(0x0021)

STATUS_FILE_LOCK_CONFLICT

(0xC0000054)

ENOLCK

A record lock has been taken on the file or the client has attempted to write to a portion of the file that the server detects has been locked.

ERRDOS

(0x01)

ERRbadfid

(0x0006)

STATUS_INVALID_HANDLE

(0xC0000008)

STATUS_SMB_BAD_FID

(0x00060001)

ENFILE

Invalid FID, or FID mapped to a valid server FID but it was not acceptable to the operating system.

ERRDOS

(0x01)

ERRnomem

(0x0008)

STATUS_INSUFF_SERVER_RESOURCES

(0xC0000205)

ENOMEM

The server is out of resources.

ERRDOS

(0x01)

ERRbadaccess

(0x000C)

STATUS_ACCESS_DENIED

(0xC0000022)

Write permission required.

ERRDOS

(0x01)

ERRlock

(0x0021)

STATUS_FILE_LOCK_CONFLICT

(0xC0000054)

The requested byte range was already locked by a different process (PID).

ERRDOS

(0x01)

ERRpipebusy

(0x00E7)

STATUS_PIPE_BUSY

(0xC00000AE)

EAGAIN

Attempted to read from a busy pipe.

ERRDOS

(0x01)

ERRnotconnected

(0x00E9)

STATUS_PIPE_DISCONNECTED

(0xC00000B0)

EPIPE

Write to a named pipe with no reader.

ERRSRV

(0x02)

ERRerror

(0x0001)

EDEADLK

The write would block due to locking and deadlock would result.

ERRSRV

(0x02)

ERRerror

(0x0001)

ERANGE

Attempted write size is outside of the minimum or maximum ranges that can be written to the supplied FID.

ERRSRV

(0x02)

ERRerror

(0x0001)

STATUS_INVALID_SMB

(0x00010002)

A corrupt or invalid SMB request was received.

ERRSRV

(0x02)

ERRinvtid

(0x0005)

STATUS_SMB_BAD_TID

(0x00050002)

Invalid TID in request.

ERRSRV

(0x02)

ERRqfull

(0x0031)

STATUS_PRINT_QUEUE_FULL

(0xC00000C6)

Print queue is full--too many queued items.

ERRSRV

(0x02)

ERRqtoobig

(0x0032)

STATUS_NO_SPOOL_SPACE

(0xC00000C7)

Print queue is full--too many queued items.

ERRSRV

(0x02)

ERRbaduid

(0x005B)

STATUS_SMB_BAD_UID

(0x005B0002)

The UID specified is not known as a valid ID on this server session, or the user identified by the UID does not have sufficient privileges.

ERRHRD

(0x03)

ERRdata

(0x0017)

STATUS_DATA_ERROR

(0xC000003E)

EIO

A problem has occurred in the physical I/O.

ERRHRD

(0x03)

ERRwrite

(0x001D)

ENXIO

The device associated with the file descriptor is a block-special or character-special file and the value of the file pointer is out of range.

ERRHRD

(0x03)

ERRdiskfull

(0x0027)

STATUS_DISK_FULL

(0xC000007F)

ENOSPC

The file system is full.