Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.RdpbcgrDecoder.DecodeServerRedirectionPDU C# (CSharp) Method

DecodeServerRedirectionPDU() public method

Decode Standard Security Server Redirection PDU.
public DecodeServerRedirectionPDU ( 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 DecodeServerRedirectionPDU(
            byte[] data,
            byte[] decryptedUserData,
            SecurityHeaderType type)
        {
            Server_Redirection_Pdu pdu = new Server_Redirection_Pdu();

            // data index
            int dataIndex = 0;

            UpdateSecurityHeaderType(ref type);

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

            // user data index
            int userDataIndex = 0;

            // Server_Redirection_PDU: serverRedirectionPdu
            pdu.serverRedirectionPdu = ParseRdpServerRedirectionPacket(decryptedUserData, ref userDataIndex);

            // Check if data length exceeded expectation
            VerifyDataLength(decryptedUserData.Length, userDataIndex, ConstValue.ERROR_MESSAGE_DATA_LENGTH_EXCEEDED);
            return pdu;
        }
RdpbcgrDecoder