The TS_UPDATE_SYNC_PDU_DATA structure is an artifact of the T.128 protocol (see [T128] section 8.6.2) and is ignored by current Microsoft RDP client implementations.
file:///C:/ts_dev/TestSuites/MS-RDPBCGR/TestSuite/Src/TD/latest_XMLS_16may/RDPBCGR/ _rfc_ms-rdpbcgr2_1_8_1_1_3_1_3.xml
Inheritance: RdpbcgrSlowPathUpdatePdu
        /// <summary>
        /// Parse TS_UPDATE_SYNC
        /// </summary>
        /// <param name="updateData">update data (decompressed if were compressed)</param>
        /// <param name="shareDataHeader">share data header</param>
        /// <returns>TS_UPDATE_SYNC</returns>
        private TS_UPDATE_SYNC ParseTsUpdateSyncPduData(
            byte[] updateData,
            TS_SHAREDATAHEADER shareDataHeader)
        {
            // index of update data
            int index = 0;
            TS_UPDATE_SYNC pduData = new TS_UPDATE_SYNC();

            // TS_UPDATE_SYNC: shareDataHeader
            pduData.shareDataHeader = shareDataHeader;

            // TS_UPDATE_SYNC: updateType
            pduData.updateType = ParseUInt16(updateData, ref index, false);

            // TS_UPDATE_SYNC: pad2Octets
            pduData.pad2Octets = ParseUInt16(updateData, ref index, false);

            // Check if data length exceeded expectation
            VerifyDataLength(updateData.Length, index, ConstValue.ERROR_MESSAGE_DATA_LENGTH_EXCEEDED);
            return pduData;
        }
Esempio n. 2
0
        private byte[] EncodeSync(TS_UPDATE_SYNC syncData)
        {
            List<byte> totalBuffer = new List<byte>();

            RdpbcgrEncoder.EncodeStructure(totalBuffer, syncData.shareDataHeader);

            List<byte> buffer = new List<byte>();
            RdpbcgrEncoder.EncodeStructure(buffer, (ushort)syncData.updateType);
            RdpbcgrEncoder.EncodeStructure(buffer, syncData.pad2Octets);

            if (syncData.shareDataHeader.compressedType != compressedType_Values.None)
            {
                RdpbcgrEncoder.EncodeBytes(
                    totalBuffer, serverSessionContext.Compress(syncData.shareDataHeader.compressedType, buffer.ToArray()));
            }
            else
            {
                RdpbcgrEncoder.EncodeBytes(totalBuffer, buffer.ToArray());
            }
            return totalBuffer.ToArray();
        }