[Desktop_printing] CUPS 1.2 will have snmp printer discovery backand :-)

Michael Sweet mike at easysw.com
Wed Apr 19 10:25:08 PDT 2006


McDonald, Ira wrote:
> Hi Michael,
> 
> Could you possibly send the man page and the web help page
> as attachments to this list?

That won't help, as they only describe how to configure the backend
and not the details of the implementation.  You can view the current
version of the backend at:

     http://svn.easysw.com/public/cups/trunk/backend/snmp.c

> I'd like to understand exactly how the SNMP discovery backend
> works and which SNMP MIB object(s) are inspected.

Currently the backend broadcasts Get-Request-PDU messages on the
configured network interfaces and communities for Host MIB
(hrDeviceType and hrDeviceDesc) OIDs, collecting addresses and
descriptions along the way.

It then probes on ports 631, 9100, and 515 (in that order) to
determine the best supported protocol.  Currently we only report
all ports of a multi-port print server if it supports IPP.

The backend uses the SNMP hrDeviceDesc, IPP printer-info, or IPP
printer-make-and-model values to advertise the correct make and
model, and has some built-in rewriting rules to ensure that the
value is usable.  If the IPP printer-info attribute contains an
IEEE-1284 device ID, it is also used to populate the CUPS
device-id attribute as well - I may also request the hrDeviceId
OID in a future update, and then ask for the OID it refers to
so that non-IPP printers will have this important information...

I haven't yet added support for the Port Monitor MIB, mainly
because none of the 76 network printers I have in my lab
support it - I'd appreciate any pointers you have to vendors/
printers that either support it or can be upgraded to support
the Port Monitor MIB...

The code currently detects all of the internal network interfaces
and many of the external network print servers we have in our
office; there is a comment block starting around line 125 that
shows the results of my testing so far.  The biggest issue with
the external print servers seems to be that they don't implement
the Host MIB, but it looks like they *do* implement the SNMPv2
MIB's sysDescr OID with JETDIRECT in the string...

> I wrote the Xerox and Sharp corporate standards for order
> of inspection of various SNMP MIB objects during printer
> discovery (prior to the standard PWG Port Monitor MIB)
> and there are some subtleties across different vendors.

I'd appreciate an extra set of eyes on the code, thanks!

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com



More information about the Printing-summit mailing list