3.3.5.6 Extension Frame Decoding and Validation
This section defines specific frame validation constraints. The implementation MUST discard frames that are not valid.
The Receive-Frame is a MAIL_REP_MSG_V1 type if the cbDataOffset field is 0, or if the cbDataOffset field is 32 and the dwMsgVersion field is either 0x00000001 or 0x00000004. To be a valid MAIL_REP_MSG_V1, it MUST meet the following constraints.<22>
ProtocolVersionCaller is equal to CURRENT_PROTOCOL_VERSION.
One and only one of the dwMsgType RP or RQ header flags is set.
CompressionVersionCaller is a member of DRS_COMP_ALG_TYPE.
cbDataOffset is equal to 0 or 32.
Receive-Frame length is greater than or equal to MINIMUM_SIZE_OF_MAIL_REP_MSG_V1 + cbDataSize
The Receive-Frame is a MAIL_REP_MSG_V2 type if dwMsgVersion is either 0x00000006 or 0x00000007. To be a valid MAIL_REP_MSG_V2 frame, it MUST meet the following constraints.
ProtocolVersionCaller is equal to CURRENT_PROTOCOL_VERSION.
One and only one of the dwMsgType RP or RQ header flags is set.
CompressionVersionCaller is a member of DRS_COMP_ALG_TYPE.
cbDataOffset is not equal to 0.
cbDataOffset is 8-byte-aligned.
cbExtOffset is 8-byte-aligned.
Receive-Frame length is equal to cbDataOffset + cbDataSize
cbExtOffset is less than cbDataOffset.
cbExtOffset is greater than or equal to MINIMUM_SIZE_OF_MAIL_REP_MSG_V2
cbDataOffset - cbExtOffset is greater than or equal to size of DRS_EXTENSIONS_INT.
Note that MINIMUM_SIZE_OF_MAIL_REP_MSG_V1 and MINIMUM_SIZE_OF_MAIL_REP_MSG_V2 are specified in section 3.2.1.
If the Receive-Frame is neither a MAIL_REP_MSG_V1 nor a MAIL_REP_MSG_V2, it MUST be considered not valid.