The Demand Active PDU is a Standard RDP Connection Sequence PDU sent from server to client during the Capabilities Negotiation phase (see section ). It is sent upon successful completion of the Licensing phase (see section ) of the connection sequence.
file:///C:/ts_dev/TestSuites/MS-RDPBCGR/TestSuite/Src/TD/latest_XMLS_16may/RDPBCGR/ _rfc_ms-rdpbcgr2_1_1_13_1.xml
Inheritance: RdpbcgrServerPdu
示例#1
0
        /// <summary>
        /// Create an instance of the class that is identical to the current PDU. 
        /// </summary>
        /// <returns>The new instance.</returns>
        public override StackPacket Clone()
        {
            Server_Demand_Active_Pdu cloneServerDemandActivePdu = new Server_Demand_Active_Pdu(serverSessionContext);
            cloneServerDemandActivePdu.commonHeader = commonHeader.Clone();

            if (demandActivePduData != null)
            {
                cloneServerDemandActivePdu.demandActivePduData = new TS_DEMAND_ACTIVE_PDU();
                cloneServerDemandActivePdu.demandActivePduData.shareControlHeader =
                    demandActivePduData.shareControlHeader;
                cloneServerDemandActivePdu.demandActivePduData.shareId = demandActivePduData.shareId;
                cloneServerDemandActivePdu.demandActivePduData.lengthCombinedCapabilities =
                    demandActivePduData.lengthCombinedCapabilities;
                cloneServerDemandActivePdu.demandActivePduData.lengthSourceDescriptor =
                    demandActivePduData.lengthSourceDescriptor;
                cloneServerDemandActivePdu.demandActivePduData.sourceDescriptor =
                    RdpbcgrUtility.CloneByteArray(demandActivePduData.sourceDescriptor);
                cloneServerDemandActivePdu.demandActivePduData.numberCapabilities =
                    demandActivePduData.numberCapabilities;
                cloneServerDemandActivePdu.demandActivePduData.pad2Octets = demandActivePduData.pad2Octets;
                cloneServerDemandActivePdu.demandActivePduData.sessionId = demandActivePduData.sessionId;

                if (demandActivePduData.capabilitySets != null)
                {
                    cloneServerDemandActivePdu.demandActivePduData.capabilitySets = new Collection<ITsCapsSet>();
                    for (int i = 0; i < demandActivePduData.capabilitySets.Count; ++i)
                    {
                        cloneServerDemandActivePdu.demandActivePduData.capabilitySets.Add(
                            RdpbcgrUtility.CloneCapabilitySet(demandActivePduData.capabilitySets[i]));
                    }

                }
            }

            return cloneServerDemandActivePdu;
        }
        /// <summary>
        /// [TD Reference 3.2.5.3.13.1]
        /// Decode Demand Active PDU
        /// </summary>
        /// <param name="data">data to be parsed</param>
        /// <param name="decryptedUserData">decrypted user data to be parsed</param>
        /// <param name="type">security header type</param>
        /// <returns>decoded Demand Active PDU</returns>
        public StackPacket DecodeDemandActivePDU(
            byte[] data,
            byte[] decryptedUserData,
            SecurityHeaderType type)
        {
            Server_Demand_Active_Pdu pdu = new Server_Demand_Active_Pdu();

            // data index
            int dataIndex = 0;

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

            // user data index
            int userDataIndex = 0;

            // DemandActivePDU: demandActivePduData
            pdu.demandActivePduData = ParseTsDemandActivePdu(decryptedUserData, ref userDataIndex);

            // Check if data length exceeded expectation
            VerifyDataLength(decryptedUserData.Length, userDataIndex, ConstValue.ERROR_MESSAGE_DATA_LENGTH_EXCEEDED);
            return pdu;
        }
 public Server_Demand_Active_Pdu_Ex(Server_Demand_Active_Pdu orgPdu, RdpbcgrServerSessionContext serverSessionContext)
     : base(serverSessionContext)
 {
     this.commonHeader = orgPdu.commonHeader;
     //this.commonHeader.tpktHeader = orgPdu.commonHeader.tpktHeader;
     //this.commonHeader.x224Data = orgPdu.commonHeader.x224Data;
     //this.commonHeader.securityHeader = orgPdu.commonHeader.securityHeader;
     this.demandActivePduData = orgPdu.demandActivePduData;
 }