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

DecodeStatusInfoPDU() public method

Decode Server Status Info PDU
public DecodeStatusInfoPDU ( byte data, byte decryptedUserData, SecurityHeaderType type ) : StackPacket
data byte data to be parsed
decryptedUserData byte decrypted user data
type SecurityHeaderType security header type
return StackPacket
        public StackPacket DecodeStatusInfoPDU(
            byte[] data,
            byte[] decryptedUserData,
            SecurityHeaderType type)
        {
            Server_Status_Info_Pdu pdu = new Server_Status_Info_Pdu();

            // data index
            int dataIndex = 0;

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

            // user data index
            int userDataIndex = 0;

            // StatusInfoPDU: shareDataHeader
            pdu.shareDataHeader = ParseTsShareDataHeader(decryptedUserData, ref userDataIndex);

            // StatusInfoPDU: statusCode
            pdu.statusCode = (StatusCode_Values)ParseUInt32(decryptedUserData, ref userDataIndex, false);

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