public StackPacket DecodeClientAutoDetectResponsePDU(byte[] data,
byte[] decryptedUserData,
SecurityHeaderType type)
{
Client_Auto_Detect_Response_PDU pdu = new Client_Auto_Detect_Response_PDU();
int dataIndex = 0;
pdu.commonHeader = ParseMcsCommonHeader(data, ref dataIndex, type);
int userDataIndex = 0;
pdu.autodetectRspPduData = ParseNetworkDetectionResponse(decryptedUserData, ref userDataIndex);
// ETW Provider Dump Message
if (type != SecurityHeaderType.Basic)
{
// RDP Standard Security
string messageName = "RDPBCGR:" + pdu.GetType().Name;
ExtendedLogger.DumpMessage(messageName, RdpbcgrUtility.DumpLevel_Layer3, pdu.GetType().Name, decryptedUserData);
}
// Check if data length exceeded expectation
VerifyDataLength(decryptedUserData.Length, userDataIndex, ConstValue.ERROR_MESSAGE_DATA_LENGTH_EXCEEDED);
return pdu;
}