2.2.3 Data Transfer Message

The Data Transfer message is sent to transfer upper-layer data, manage credits, or perform other functions. This request optionally contains upper-layer data to transfer as the message’s data payload. The sender can send a Data Transfer Request message with no data payload to grant credits, request credits, or perform other functions.


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

CreditsRequested

CreditsGranted

Flags

Reserved

RemainingDataLength

DataOffset

DataLength

Padding (variable)

...

...

Buffer (variable)

...

...

CreditsRequested (2 bytes): The total number of Send Credits requested of the receiver, including any Send Credits already granted.

CreditsGranted (2 bytes): The incremental number of Send Credits granted by the sender.

Flags (2 bytes): The flags indicating how the operation is to be processed. This field MUST be constructed by using any or none of the following values:

Value

Meaning

SMB_DIRECT_RESPONSE_REQUESTED (0x0001)

The peer is requested to promptly send a message in response. This value is used for keep alives.

The Flags field MUST be set to zero if no flag values are specified.

Reserved (2 bytes): The sender SHOULD set this field to 0 and the receiver MUST ignore it on receipt.

RemainingDataLength (4 bytes): The amount of data, in bytes, remaining in a sequence of fragmented messages. If this value is 0x00000000, this message is the final message in the sequence.

DataOffset (4 bytes): The offset, in bytes, from the beginning of the header to the first byte of the message’s data payload. If no data payload is associated with this message, this value MUST be 0. This offset MUST be 8-byte aligned from the beginning of the message.

DataLength (4 bytes): The length, in bytes, of the message’s data payload. If no data payload is associated with this message, this value MUST be 0.

Padding (4 bytes, optional): Additional bytes optionally inserted into the message in order to align the data payload, if present, as defined by the DataOffset and DataLength fields. These bytes SHOULD be set to zero (0x00) by the sender and MUST be ignored by the receiver. Note that because the DataLength field ends on a non-8-byte aligned offset, four bytes of padding are typically present when a data payload is also present.

Buffer (variable): A buffer that contains the data payload as defined by the DataOffset and DataLength fields.