2.2.3 MAIL_REP_MSG_V1

This structure defines the V1 format for a DRS Protocol Extensions for SMTP frame. This structure is not part of the RPC data stream. The RPC data stream from the higher-layer DRS Protocol is encapsulated by this structure and is carried within the payload data field. This frame is "hand-marshaled" as specified in sections 3.2 and 3.3. It appears at the beginning of the attachment data sent using SMTP. All numeric header fields MUST be in the little-endian format.


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

CompressionVersionCaller

ProtocolVersionCaller

cbDataOffset

cbDataSize

cbUncompressedDataSize

cbUnsignedDataSize

dwMsgType

dwMsgVersion

PayloadData (variable)

...

CompressionVersionCaller (4 bytes): A 32-bit, unsigned integer that indicates the compression algorithm that is used for the data in this message. This field MUST be set to a valid value for the enumerated type DRS_COMP_ALG_TYPE, as specified in [MS-DRSR]. If the CP bit in the dwMsgType header field of a received message is 0, the value of this field MUST be ignored and the field treated as if the value was set to DRS_COMP_ALG_NONE.<4>

ProtocolVersionCaller (4 bytes):  A 32-bit, unsigned integer that indicates the protocol version for this message. This field MUST be set to the value of the CURRENT_PROTOCOL_VERSION.

cbDataOffset (4 bytes): A 32-bit, unsigned integer that MUST be set to 0 or the size of the V1 header.<5>

cbDataSize (4 bytes):  A 32-bit, unsigned integer that indicates the size of the payload data (not including this header), starting with the first byte of payload data, in bytes.

cbUncompressedDataSize (4 bytes): A 32-bit, unsigned integer that indicates the size of Send-Message-Serialized-Data byte sequence (as specified in section 3.2.1), not including this header, before compression, in bytes. If the CP bit of the dwMsgType header field is 0, this field MUST be sent as 0 and ignored on receipt.

cbUnsignedDataSize (4 bytes):  A 32-bit, unsigned integer that indicates the size of Send-Message-Compressed-Data byte stream (as specified in section 3.2.1), not including this header, before encryption, in bytes.

dwMsgType (4 bytes): An unsigned 32-bit field that specifies message type options. This value is a combination of one or more of the following bit fields. Bits not specified below MUST be set to 0 by the sender, and MUST be ignored by the receiver.

Value

Meaning

RQ

0x01000000

If set, indicates that this is a Request Message. This field is one of 32 single-bit flags that are included in the dwMsgType field.

RP

0x02000000

If set, indicates that this is a Response Message. This field is one of 32 single-bit flags that are included in the dwMsgType field.

SN

0x00000020

If set, indicates that this message is signed. This field is one of 32 single-bit flags that are included in the dwMsgType field.

SL

0x00000040

If set, indicates that this message is sealed. This field is one of 32 single-bit flags that are included in the dwMsgType field.

CP

0x00000080

If set, indicates that this message is compressed. This field is one of 32 single-bit flags that are included in the dwMsgType field.

dwMsgVersion (4 bytes): A 32-bit, unsigned integer that indicates whether this DRS Message is a V1 request or a V1 response. If the value of the cbDataOffset field is not 0, then the value of this field MUST be one of the following values.<6>

Value

Meaning

0x00000001

This message contains a V1 response. PayloadData contains a DRS_MSG_GETCHGREPLY_V1 message.

0x00000004

This message contains a V1 request. PayloadData contains a DRS_MSG_GETCHGREQ_V4 message.

If the value of the cbDataOffset field is 0, then the value of this field MUST be ignored on receipt. If the RP bit is set in the dwMsgType, then the payload is a DRS_MSG_GETCHGREPLY_V1 message; if the RQ bit is set, then the payload is a DRS_MSG_GETCHGREQ_V4 message.

PayloadData (variable):  Variable-length region that contains the Send-Message-Payload byte stream, as specified in section 3.2.1.