Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.RdpbcgrServerDecoder.DecodeClientAutoDetectResponsePDU C# (CSharp) Method

DecodeClientAutoDetectResponsePDU() public method

Decode Client Auto Detect Response PDU
public DecodeClientAutoDetectResponsePDU ( byte data, byte decryptedUserData, SecurityHeaderType type ) : Microsoft.Protocols.TestTools.StackSdk.StackPacket
data byte
decryptedUserData byte
type SecurityHeaderType
return Microsoft.Protocols.TestTools.StackSdk.StackPacket
        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;
        }
RdpbcgrServerDecoder