2.2.2.3 Add Printer Cachedata (DR_PRN_ADD_CACHEDATA)

This message is sent from the server to the client when a printer queue is created manually on the redirected port (port redirection is explained in [MS-RDPESP]) on the 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

Header

EventId

PortDosName

...

PnPNameLen

DriverNameLen

PrintNameLen

CachedFieldsLen

PnPName (variable)

...

DriverName (variable)

...

PrinterName (variable)

...

CachedPrinterConfigData (variable)

...

Header (4 bytes): The common message header (as specified in [MS-RDPEFS] section 2.2.1.1). The Component field MUST be set to RDPDR_CTYP_PRN and the PacketId field MUST be set to PAKID_PRN_CACHE_DATA.

EventId (4 bytes): A SERVER_PRINTER_CACHE_EVENT (section 2.2.1.1) packet. The cachedata field MUST be set to RDPDR_ADD_PRINTER_EVENT (0x00000001).

PortDosName (8 bytes): A string of ASCII characters with a maximum length of 8 characters that represent the name of the device as it appears on the client. If this field is not be null-terminated, then the PortDosName string is equal to all 8 characters.

PnPNameLen (4 bytes): A 32-bit unsigned integer that specifies the number of bytes in the PnPName field, including its null terminator.

DriverNameLen (4 bytes): A 32-bit unsigned integer that specifies the number of bytes in the DriverName field, including its null terminator.

PrintNameLen (4 bytes): A 32-bit unsigned integer that specifies the number of bytes in the PrintName field, including its null terminator.

CachedFieldsLen (4 bytes):  A 32-bit unsigned integer that specifies the number of bytes in the CachedPrinterConfigData field.

PnPName (variable): A null-terminated Unicode string. This field can be set to any valid Unicode string and MUST be ignored on receipt.

DriverName (variable): A null-terminated Unicode string. This string specifies the printer driver name that is associated with the printer configuration data.

PrinterName (variable): A null-terminated Unicode string that specifies the client printer, which was sent for this configuration data message.

CachedPrinterConfigData (variable): A variable-length array of bytes. This field is a BLOB of data that describes the cached printer configuration (see section 3.1.1.1).