2.2.6.1.1 Channel PDU Header (CHANNEL_PDU_HEADER)

The CHANNEL_PDU_HEADER MUST precede all opaque static virtual channel traffic chunks transmitted via RDP between a client and server.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

length

flags

length (4 bytes): A 32-bit, unsigned integer. The total length in bytes of the uncompressed channel data, excluding this header. The data can span multiple Virtual Channel PDUs and the individual chunks will need to be reassembled in that case (section 3.1.5.2.2).

flags (4 bytes): A 32-bit, unsigned integer. The channel control flags.

Flag

Meaning

CHANNEL_FLAG_FIRST

0x00000001

Indicates that the chunk is the first in a sequence.

CHANNEL_FLAG_LAST

0x00000002

Indicates that the chunk is the last in a sequence.

CHANNEL_FLAG_SHOW_PROTOCOL

0x00000010

The Channel PDU Header MUST be visible to the application endpoint (section 2.2.1.3.4.1).

CHANNEL_FLAG_SUSPEND

0x00000020

All virtual channel traffic MUST be suspended. This flag is only valid in server-to-client virtual channel traffic. It MUST be ignored in client-to-server data.

CHANNEL_FLAG_RESUME

0x00000040

All virtual channel traffic MUST be resumed. This flag is only valid in server-to-client virtual channel traffic. It MUST be ignored in client-to-server data.

CHANNEL_FLAG_SHADOW_PERSISTENT

0x00000080

This flag is unused and its value MUST be ignored by the client and server.

CHANNEL_PACKET_COMPRESSED

0x00200000

The virtual channel data is compressed. This flag is equivalent to MPPC bit C (for more information see [RFC2118] section 3.1).

CHANNEL_PACKET_AT_FRONT

0x00400000

The decompressed packet MUST be placed at the beginning of the history buffer. This flag is equivalent to MPPC bit B (for more information see [RFC2118] section 3.1).

CHANNEL_PACKET_FLUSHED

0x00800000

The decompressor MUST reinitialize the history buffer (by filling it with zeros) and reset the HistoryOffset to zero. After it has been reinitialized, the entire history buffer is immediately regarded as valid. This flag is equivalent to MPPC bit A (for more information see [RFC2118] section 3.1). If the CHANNEL_PACKET_COMPRESSED (0x00200000) flag is also present, then the CHANNEL_PACKET_FLUSHED flag MUST be processed first.

CompressionTypeMask

0x000F0000

Indicates the compression package which was used to compress the data. See the discussion which follows this table for a list of compression packages.

If neither the CHANNEL_FLAG_FIRST (0x00000001) nor the CHANNEL_FLAG_LAST (0x00000002) flag is present, the chunk is from the middle of a sequence.

Instructions specifying how to set the compression flags can be found in section 3.1.8.2.1.

Possible compression types are as follows.

Value

Meaning

PACKET_COMPR_TYPE_8K

0x0

RDP 4.0 bulk compression (section 3.1.8.4.1).

PACKET_COMPR_TYPE_64K

0x1

RDP 5.0 bulk compression (section 3.1.8.4.2).

PACKET_COMPR_TYPE_RDP6

0x2

RDP 6.0 bulk compression ([MS-RDPEGDI] section 3.1.8.1).

PACKET_COMPR_TYPE_RDP61

0x3

RDP 6.1 bulk compression ([MS-RDPEGDI] section 3.1.8.2).

Instructions detailing how to compress a data stream are listed in section 3.1.8.2, while decompression of a data stream is described in section 3.1.8.3.