[PATCH 0/6] s3-spoolss: Add printer port generation
jchevrier at gmail.com
Wed Aug 31 13:03:08 MDT 2011
The following patch series (based on the latest GIT) expands printer port support in Samba.
First, a bit of background. We are currently evaluating a Ricoh multifunction laser printer (Aficio MP C3001). As there are various options that can be added to the base printer the Windows driver queries the printer to determine what functionality is available and options have been installed and reflects those options in the printer properties dialog. This communication happens via SNMP. To determine what the IP address of the printer is, the driver first does an OpenPrinterEx with a printer name in this format: ",XcvPort <portname>" to determine if the port exists. If Windows reports that the port exists the driver then issues XcvData "IPAddress" and "GetConfigInfo" commands. Finally the driver uses the results of these commands to communicate with the printer via SNMP.
Currenly Samba doesn't support any of the above. This patch series implements all of the above by creating actual ports based on the printer URLs from CUPS and storing port data in the registry in the same format Windows does.
This has been successfully tested on a Windows XP SP3 client using the latest Ricoh PCL6 drivers for the printer mentioned above.
Bug 6296: https://bugzilla.samba.org/show_bug.cgi?id=6296 appears to be at least partially related to the above and may be improved by this patch set.
I'm not making use of the 'enumports_hook' function, so there is no ability to use a shell command on enumeration of ports. Not sure if this is desired (aka we're heading towards everything being in the registry), or if both need to be an option. I've left all of the enumports_hook functionality in place, I'm just not calling it.
Local or unrecognized CUPS urls will map to the current placeholder name: "Samba Printer Port".
No testing has been done with any other backend besides CUPS.
Go easy on me, I've probably made some foolish mistakes along the way.
[PATCH 1/6] s3-spoolss: Store the correct structure size
[PATCH 2/6] s3-spoolss: Pull printer URI from CUPS and add support for URIs to printer_list
[PATCH 3/6] s3-spoolss: Add port registry functions
[PATCH 4/6] s3-spoolss: Hookup port creation basing name on parsed CUPS URIs
[PATCH 5/6] s3-spoolss: Support opening ports via OpenPrinterEx
[PATCH 6/6] s3-spoolss: Add support for IPAddress and GetConfigInfo XcvData commands
More information about the samba-technical