Partager via


2.2.4.47.1 Request

The SMB_COM_TRANSACTION2_SECONDARY request message differs from the SMB_COM_TRANSACTION_SECONDARY Request (section 2.2.4.34.1) by the addition of the FID field in the SMB_Parameters.Words section.

            
 SMB_Parameters
   {
   UCHAR  WordCount;
   Words
     {
     USHORT TotalParameterCount;
     USHORT TotalDataCount;
     USHORT ParameterCount;
     USHORT ParameterOffset;
     USHORT ParameterDisplacement;
     USHORT DataCount;
     USHORT DataOffset;
     USHORT DataDisplacement;
     USHORT FID;
     }
   }
 SMB_Data
   {
   USHORT ByteCount;
   Bytes
     {
     UCHAR Pad1[];
     UCHAR Trans2_Parameters[ParameterCount];
     UCHAR Pad2[];
     UCHAR Trans2_Data[DataCount];
     }
   }

SMB_Header:

This command MUST be sent following a successful SMB_COM_TRANSACTION2 Intermediate Response from the server. The PID, MID, TID, and UID MUST be the same for all requests and responses that are part of the same transaction.


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 (variable)

...

SMB_Data (variable)

...

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

Wordcount

Words (variable)

...

Wordcount (1 byte): This value represents the total number of SMB parameter words and MUST be 0x09.

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

TotalParameterCount

TotalDataCount

ParameterCount

ParameterOffset

ParameterDisplacement

DataCount

DataOffset

DataDisplacement

FID

TotalParameterCount (2 bytes): The total number of transaction parameter bytes to be sent to the server over the course of this transaction. This value MAY be less than or equal to the TotalParameterCount in preceding request messages that are part of the same transaction. This value represents transaction parameter bytes, not SMB parameter words.

TotalDataCount (2 bytes): The total number of transaction data bytes to be sent to the server over the course of this transaction. This value MAY be less than or equal to the TotalDataCount in preceding request messages that are part of the same transaction. This value represents transaction data bytes, not SMB data bytes.

ParameterCount (2 bytes): The number of transaction parameter bytes being sent in the SMB message. This value MUST be less than TotalParameterCount. The sum of the ParameterCount values across all of the request messages in a transaction MUST be equal to the TotalParameterCount reported in the last request message of the transaction.

ParameterOffset (2 bytes): The offset, in bytes, from the start of the SMB_Header to the transaction parameter bytes contained in this SMB message. This MUST be the number of bytes from the start of the SMB message to the start of the SMB_Data.Bytes.Trans2_Parameters field. Server implementations MUST use this value to locate the transaction parameter block within the SMB message. If ParameterCount is zero, the client/server MAY set this field to zero.<72>

ParameterDisplacement (2 bytes): The offset relative to all of the transaction parameter bytes sent to the server in this transaction at which this block of parameter bytes SHOULD be placed. This value can be used by the server to correctly reassemble the transaction parameters even if the SMB request messages are received out of order.

DataCount (2 bytes): The number of transaction data bytes being sent in this SMB message. This value MUST be less than the value of TotalDataCount. The sum of the DataCount values across all of the request messages in a transaction MUST be equal to the smallest TotalDataCount value reported to the server.

DataOffset (2 bytes): The offset, in bytes, from the start of the SMB_Header to the transaction data bytes contained in this SMB message. This MUST be the number of bytes from the start of the SMB message to the start of the SMB_Data.Bytes.Trans2_Data field. Server implementations MUST use this value to locate the transaction data block within the SMB message. If DataCount is zero, the client/server MAY set this field to zero.<73>

DataDisplacement (2 bytes): The offset relative to all of the transaction data bytes sent to the server in this transaction at which this block of parameter bytes SHOULD be placed. This value MAY be used by the server to correctly reassemble the transaction data block even if the SMB request messages are received out of order.

FID (2 bytes): Either a valid File ID returned by a previous Open or Create operation, or 0xFFFF. A FID value of 0xFFFF is, by definition, an invalid FID and indicates that no FID is being sent in this request. See the individual descriptions of the Trans2 subcommands for specific information on the use of this field.

SMB_Data (variable):

The SMB_Data section of the SMB_COM_TRANSACTION2_SECONDARY request contains parameters and data bytes being sent to the server.


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 number of bytes in the SMB_Data.Bytes array, which follows.

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

Pad1 (variable)

...

Trans2_Parameters (variable)

...

Pad2 (variable)

...

Trans2_Data (variable)

...

Pad1 (variable): This field SHOULD be used as an array of padding bytes to align the following field to a 4-byte boundary relative to the start of the SMB Header (section 2.2.3.1). This constraint can cause this field to be a zero-length field. This field SHOULD be set to zero by the client/server and MUST be ignored by the server/client.

Trans2_Parameters (variable): Transaction parameter bytes.

Pad2 (variable): This field SHOULD be used as an array of padding bytes to align the following field to a 4-byte boundary relative to the start of the SMB Header. This constraint can cause this field to be a zero-length field. This field SHOULD be set to zero by the client/server and MUST be ignored by the server/client.

Trans2_Data (variable): Transaction data bytes.