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

DecodeSynchronizePDU() public method

Decode Synchronize PDU
public DecodeSynchronizePDU ( byte data, byte decryptedUserData, SecurityHeaderType type ) : StackPacket
data byte data to be parsed
decryptedUserData byte decrypted user data to be parsed
type SecurityHeaderType security header type
return StackPacket
        public StackPacket DecodeSynchronizePDU(
            byte[] data,
            byte[] decryptedUserData,
            SecurityHeaderType type)
        {
            Client_Synchronize_Pdu pdu = new Client_Synchronize_Pdu();

            // data index
            int dataIndex = 0;

            // SynchronizePDU: commonHeader
            pdu.commonHeader = ParseMcsCommonHeader(data, ref dataIndex, type);

            // user data index
            int userDataIndex = 0;

            // SynchronizePDU: synchronizePduData
            pdu.synchronizePduData = ParseTsSynchronizePdu(decryptedUserData, ref userDataIndex);

            // ETW Provider Dump Message
            if (pdu.commonHeader.securityHeader != null)
            {
                // 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