4.1 Port Redirection Annotations
After the Remote Desktop Protocol: Serial and Parallel Port Virtual Channel Extension finishes its initialization, the client sends the client device list announce message to the server. Information about the ports to be redirected is contained within the message.
The following sequence shows a COM2 port being sent to the server for redirection.
-
Channel Name = RDPDR, 28, Client to server 00000000 72 44 41 44 01 00 00 00 01 00 00 00 01 00 00 00 00000010 43 4f 4d 32 00 00 00 00 00 00 00 00 72 44 -> RDPDR_CTYP_CORE = 0x4472 41 44 -> PAKID_CORE_DEVICELIST_ANNOUNCE = 0x4441 01 00 00 00 -> DeviceCount = 0x00000001 01 00 00 00 -> DeviceType (RDPDR_DTYP_SERIAL) = 0x00000001 01 00 00 00 -> DeviceId = 0x00000001 43 4f 4d 32 00 00 00 00 -> PreferredDosName(8 characters) = "COM2" 00 00 00 00 -> DeviceDataLength = 0x00000000
The following sequence shows an LPT1 port being sent for redirection. In this example, the Device Announce packet contains three devices. This example only annotates the header and LPT1 Device portion from this packet.
-
Channel Name = RDPDR, 264, Client to server 00000000 72 44 41 44 03 00 00 00 04 00 00 00 04 00 00 00 00000010 50 52 4e 34 00 00 00 00 50 00 00 00 10 00 00 00 00000020 00 00 00 00 00 00 00 00 1c 00 00 00 1c 00 00 00 00000030 00 00 00 00 41 00 70 00 6f 00 6c 00 6c 00 6f 00 00000040 20 00 50 00 2d 00 31 00 32 00 30 00 30 00 00 00 00000050 41 00 70 00 6f 00 6c 00 6c 00 6f 00 20 00 50 00 00000060 2d 00 31 00 32 00 30 00 30 00 00 00 04 00 00 00 00000070 03 00 00 00 50 52 4e 33 00 00 00 00 74 00 00 00 00000080 12 00 00 00 00 00 00 00 00 00 00 00 2e 00 00 00 00000090 2e 00 00 00 00 00 00 00 43 00 61 00 6e 00 6f 00 000000a0 6e 00 20 00 42 00 75 00 62 00 62 00 6c 00 65 00 000000b0 2d 00 4a 00 65 00 74 00 20 00 42 00 4a 00 2d 00 000000c0 33 00 30 00 00 00 43 00 61 00 6e 00 6f 00 6e 00 000000d0 20 00 42 00 75 00 62 00 62 00 6c 00 65 00 2d 00 000000e0 4a 00 65 00 74 00 20 00 42 00 4a 00 2d 00 33 00 000000f0 30 00 00 00 02 00 00 00 02 00 00 00 4c 50 54 31 00000100 00 00 00 00 00 00 00 00 72 44 -> RDPDR_CTYP_CORE = 0x4472 41 44 -> PAKID_CORE_DEVICELIST_ANNOUNCE = 0x4441 03 00 00 00 -> DeviceCount = 0x00000003 04 00 00 -> DeviceType (RDPDR_DTYP_PRINT) = 0x00000004 04 00 00 00 -> DeviceId = 0x00000004 50 52 4e 34 00 00 00 00 -> PreferredDosName (8 characters) = "PRN4" 50 00 00 00 -> DeviceDataLength = 0x00000050 10 00 00 00 -> Flags( RDPDR_PRINTER_ANNOUNCE_FLAG_XPSFORMAT) = 0x00000010 00 00 00 00 -> CodePage = 0x00000000 00 00 00 00 -> PnPNameLen = 0x00000000 1c 00 00 00 -> DriverNameLen = 0x0000001c 1c 00 00 00 -> PrintNameLen (28 bytes) = 0x0000001c 00 00 00 00 -> CachedFieldsLen = 0x00000000 41 00 70 00 6f 00 6c 00 6c 00 6f 00 20 00 50 00 2d 00 31 00 32 00 30 00 30 00 00 00 -> DriverName (28 bytes) = "Apollo P-1200" 41 00 70 00 6f 00 6c 00 6c 00 6f 00 20 00 50 00 2d 00 31 00 32 00 30 00 30 00 00 00 -> PrintName (28 bytes) = "Apollo P-1200" 04 00 00 00 -> DeviceType (RDPDR_DTYP_PRINT) = 0x00000004 03 00 00 00 -> DeviceId = 0x00000003 50 52 4e 33 00 00 00 00 -> PreferredDosName (8 characters) = "PRN3" 74 00 00 00 -> DeviceDataLength = 0x00000074 12 00 00 00 -> Flags(RDPDR_PRINTER_ANNOUNCE_FLAG_XPSFORMAT | RDPDR_PRINTER_ANNOUNCE_FLAG_DEFAULTPRINTER) = 0x00000012 00 00 00 0 -> CodePage = 0x00000000 00 00 00 00 -> PnPNameLen = 0x00000000 2e 00 00 00 -> DriverNameLen = 0x0000002e 2e 00 00 00 -> PrintNameLen = 0x0000002e 00 00 00 00 -> CachedFieldsLen = 0x00000000 43 00 61 00 6e 00 6f 00 6e 00 20 00 42 00 75 00 62 00 62 00 6c 00 65 00 2d 00 4a 00 65 00 74 00 20 00 42 00 4a 00 2d 00 33 00 30 00 00 00 -> DriverName (46 bytes) = "Canon Bubble-Jet BJ-30" 43 00 61 00 6e 00 6f 00 6e 00 20 00 42 00 75 00 62 00 62 00 6c 00 65 00 2d 00 4a 00 65 00 74 00 20 00 42 00 4a 00 2d 00 33 00 30 00 00 00 -> PrintName (46 bytes) = "Canon Bubble-Jet BJ-30" 02 00 00 00 -> DeviceType (RDPDR_DTYP_PARALLEL) = 0x00000002 02 00 00 00 -> DeviceId = 0x00000002 4c 50 54 31 00 00 00 00 -> PreferredDosName (8 characters) = "LPT1" 00 00 00 00 -> DeviceDataLength = 0x00000000