Partager via


2.2.4.3.1 Client Request Extensions

An SMB_COM_WRITE_ANDX request is sent by a client to write data to a file or named pipe on a server. These extensions allocate the SMB_Parameters.Words.Reserved field for use as the DataLengthHigh field. This field is used when the CAP_LARGE_WRITEX capability has been negotiated to allow for file writes larger than 0xFFFF bytes in length. All other fields are defined as specified in [MS-CIFS] section 2.2.4.43.1.

 SMB_Parameters
   {
   UCHAR WordCount;
   Words
     {
     UCHAR  AndXCommand;
     UCHAR  AndXReserved;
     USHORT AndXOffset;
     USHORT FID;
     ULONG  Offset;
     ULONG  Timeout;
     USHORT WriteMode;
     USHORT Remaining;
     USHORT DataLengthHigh;
     USHORT DataLength;
     USHORT DataOffset;
     ULONG  OffsetHigh (optional);
     }
   }
 SMB_Data
   {
   USHORT ByteCount;
   Bytes
     {
     UCHAR Pad;
     UCHAR Data[variable];
     }
   }

SMB_Parameters

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

AndXCommand

AndXReserved

AndXOffset

FID

Offset

...

Timeout

...

WriteMode

Remaining

DataLengthHigh

DataLength

DataOffset

OffsetHigh (optional)

DataLengthHigh (2 bytes): This field contains the two most significant bytes of the length of the data to write to the file. If the number of bytes to be written is greater than or equal to 0x00010000( 64 kilobytes), then the client MUST set the two least significant bytes of the length in the DataLength field of the request and the two most significant bytes of the length in the DataLengthHigh field.