2.2.4.12.2 Response

 SMB_Parameters
   {
   UCHAR  WordCount;
   Words
     {
     USHORT CountOfBytesWritten;
     }
   }
 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

SMB_Data

...

SMB_Parameters (3 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 0x01.

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

CountOfBytesWritten

CountOfBytesWritten (2 bytes): Indicates the actual number of bytes written to the file. For successful writes, this MUST equal the CountOfBytesToWrite in the client Request. If the number of bytes written differs from the number requested and no error is indicated, then the server has no resources available to satisfy the complete write.

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

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)

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)

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)

ERRnoaccess

(0x0005)

STATUS_ALREADY_COMMITTED

(0xC0000021)

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 determines has been locked, opened in deny-write mode, or opened in read-only mode.

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)

STATUS_NO_MEMORY

(0xC0000017)

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)

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 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.