2.2.8.1.1.1.2 Share Data Header (TS_SHAREDATAHEADER)

The TS_SHAREDATAHEADER header is a T.128 header ([T128] section 8.3) that MUST be present in all Data PDUs. A definitive list of all Data PDUs is given in the description of the pduType2 field.


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

shareControlHeader

...

shareID

...

pad1

streamID

uncompressedLength

pduType2

compressedType

compressedLength

shareControlHeader (6 bytes): Share Control Header (section 2.2.8.1.1.1.1) containing information about the packet. The PDUVersion subfield of the pduType field of the Share Control Header MUST be set to TS_PROTOCOL_VERSION (0x1).

shareID (4 bytes): A 32-bit, unsigned integer. Share identifier for the packet (see [T128] section 8.4.2 for more information about share IDs).

pad1 (1 byte): An 8-bit, unsigned integer. Padding. Values in this field MUST be ignored.

streamID (1 byte): An 8-bit, unsigned integer. The stream identifier for the packet.

Value

Meaning

STREAM_UNDEFINED

0x00

Undefined stream priority. This value might be used in the Server Synchronize PDU (section 2.2.1.19) due to a server-side RDP bug. It MUST NOT be used in conjunction with any other PDUs.

STREAM_LOW

0x01

Low-priority stream.

STREAM_MED

0x02

Medium-priority stream.

STREAM_HI

0x04

High-priority stream.

uncompressedLength (2 bytes): A 16-bit, unsigned integer. The uncompressed length of the packet in bytes.

pduType2 (1 byte): An 8-bit, unsigned integer. The type of Data PDU.

Value

Meaning

PDUTYPE2_UPDATE

0x02

Graphics Update PDU (section 2.2.9.1.1.3)

PDUTYPE2_CONTROL

0x14

Control PDU (section 2.2.1.15.1)

PDUTYPE2_POINTER

0x1B

Pointer Update PDU (section 2.2.9.1.1.4)

PDUTYPE2_INPUT

0x1C

Input Event PDU (section 2.2.8.1.1.3)

PDUTYPE2_SYNCHRONIZE

0x1F

Synchronize PDU (section 2.2.1.14.1)

PDUTYPE2_REFRESH_RECT

0x21

Refresh Rect PDU (section 2.2.11.2.1)

PDUTYPE2_PLAY_SOUND

0x22

Play Sound PDU (section 2.2.9.1.1.5.1)

PDUTYPE2_SUPPRESS_OUTPUT

0x23

Suppress Output PDU (section 2.2.11.3.1)

PDUTYPE2_SHUTDOWN_REQUEST

0x24

Shutdown Request PDU (section 2.2.2.1.1)

PDUTYPE2_SHUTDOWN_DENIED

0x25

Shutdown Request Denied PDU (section 2.2.2.2.1)

PDUTYPE2_SAVE_SESSION_INFO

0x26

Save Session Info PDU (section 2.2.10.1.1)

PDUTYPE2_FONTLIST

0x27

Font List PDU (section 2.2.1.18.1)

PDUTYPE2_FONTMAP

0x28

Font Map PDU (section 2.2.1.22.1)

PDUTYPE2_SET_KEYBOARD_INDICATORS

0x29

Set Keyboard Indicators PDU (section 2.2.8.2.1.1)

PDUTYPE2_BITMAPCACHE_PERSISTENT_LIST

0x2B

Persistent Key List PDU (section 2.2.1.17.1)

PDUTYPE2_BITMAPCACHE_ERROR_PDU

0x2C

Bitmap Cache Error PDU ([MS-RDPEGDI] section 2.2.2.3.1)

PDUTYPE2_SET_KEYBOARD_IME_STATUS

0x2D

Set Keyboard IME Status PDU (section 2.2.8.2.2.1)

PDUTYPE2_OFFSCRCACHE_ERROR_PDU

0x2E

Offscreen Bitmap Cache Error PDU ([MS-RDPEGDI] section 2.2.2.3.2)

PDUTYPE2_SET_ERROR_INFO_PDU

0x2F

Set Error Info PDU (section 2.2.5.1.1)

PDUTYPE2_DRAWNINEGRID_ERROR_PDU

0x30

DrawNineGrid Cache Error PDU ([MS-RDPEGDI] section 2.2.2.3.3)

PDUTYPE2_DRAWGDIPLUS_ERROR_PDU

0x31

GDI+ Error PDU ([MS-RDPEGDI] section 2.2.2.3.4)

PDUTYPE2_ARC_STATUS_PDU

0x32

Auto-Reconnect Status PDU (section 2.2.4.1.1)

PDUTYPE2_STATUS_INFO_PDU

0x36

Status Info PDU (section 2.2.5.2)

PDUTYPE2_MONITOR_LAYOUT_PDU

0x37

Monitor Layout PDU (section 2.2.12.1)

compressedType (1 byte): An 8-bit, unsigned integer. The compression type and flags specifying the data following the Share Data Header (section 2.2.8.1.1.1.2).

Flag

Meaning

CompressionTypeMask

0x0F

Indicates the package which was used for compression. See the table which follows for a list of compression packages.

PACKET_COMPRESSED

0x20

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

PACKET_AT_FRONT

0x40

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).

PACKET_FLUSHED

0x80

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 PACKET_COMPRESSED (0x20) flag is also present, then the PACKET_FLUSHED flag MUST be processed first.

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 specifying 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.

compressedLength (2 bytes): A 16-bit, unsigned integer. The compressed length of the packet in bytes.