2.2.4.21.1 Request
-
SMB_Parameters { UCHAR WordCount; Words { USHORT FID; USHORT CountOfBytesToWrite; ULONG WriteOffsetInBytes; USHORT EstimateOfRemainingBytesToBeWritten; } } SMB_Data { USHORT ByteCount; Bytes { UCHAR BufferFormat; USHORT DataLength; UCHAR Data[DataLength]; } }
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SMB_Parameters |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
SMB_Data (variable) |
||||||||||||||||||||||||||||||
... |
SMB_Parameters (11 bytes):
-
0
1
2
3
4
5
6
7
8
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1WordCount
Words
...
...
-
WordCount (1 byte): This field MUST be 0x05.
-
Words (10 bytes):
-
0
1
2
3
4
5
6
7
8
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1FID
CountOfBytesToWrite
WriteOffsetInBytes
EstimateOfRemainingBytesToBeWritten
-
FID (2 bytes): This field MUST be a valid 16-bit unsigned integer indicating the file to which the data MUST be written.
-
CountOfBytesToWrite (2 bytes): This field is a 16-bit unsigned integer indicating the number of bytes to be written to the file. The client MUST ensure that the amount of data sent can fit in the negotiated maximum buffer size.
-
WriteOffsetInBytes (4 bytes): This field is a 32-bit unsigned integer indicating the offset, in number of bytes, from the beginning of the file at which to begin writing to the file. The client MUST ensure that the amount of data sent can fit in the negotiated maximum buffer size. Because this field is limited to 32 bits, this command is inappropriate for files that have 64-bit offsets.
-
EstimateOfRemainingBytesToBeWritten (2 bytes): This field is a 16-bit unsigned integer indicating the remaining number of bytes that the client designates to write to the file. This is an advisory field and MAY be zero. This information can be used by the server to optimize cache behavior.
-
SMB_Data (variable):
-
0
1
2
3
4
5
6
7
8
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1ByteCount
Bytes (variable)
...
-
ByteCount (2 bytes): This field MUST be greater than or equal to 0x0003. The total value represents the size of the BufferFormat field in bytes plus the size of the DataLength field in bytes plus the value of the CountOfBytesToWrite field. See Data Buffer Format Codes (section 2.2.2.5) for a complete description of data buffer format codes and their usages.
-
Bytes (variable):
-
0
1
2
3
4
5
6
7
8
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1BufferFormat
DataLength
Data (variable)
...
-
BufferFormat (1 byte): This field MUST be 0x01.
-
DataLength (2 bytes): This field MUST be CountOfBytesToWrite.
-
Data (variable): The raw bytes to be written to the file.
-