I am sponsoring this case for Norm Jacobs.
Requested binding is minor, timeout 09/06/2007.

-Artem

Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI
This information is Copyright 2007 Sun Microsystems
1. Introduction
     1.1. Project/Component Working Name:
         Automatic discovery of network attached printers
     1.2. Name of Document Author/Supplier:
         Author:  Norm Jacobs
     1.3  Date of This Document:
        29 August, 2007
4. Technical Description

Description
-----------

Solaris currently includes USB printer detection and configuration
support via HAL and a desktop applet (ospm-applet).  This support
allows users to hotplug a printer into the USB on a system and
virtually automatically create a print queue for it.  While USB
printers are often used to fill low end desktop user's needs, network
attached printers are slowly moving toward that space and have become
(or are becoming) predominant in homes, small offices, and workgroup
environments, as well as larger scale installations.

In order to better support these devices, this case seeks to extend the
current HAL offering by adding a network attached device discovery
service addon module and a probe module to probe network attached
printers for identifying data.  These modules will be connected to HAL
via .fdi files.

Internally, the discovery service will be managed by D-BUS method calls
with a corresponding public SMF service instance for each discovery
method.  Each service instance will have D-BUS methods that correspond
to enabling, disabling, and refreshing the service.  Management of the
SMF service instances (and modification of their attributes) will be
controlled by instance specific authorizations.  These authorizations
will be added to the "Printer Management" profile.


Network Device Discovery
------------------------

Actual network device discovery will be handled by the HAL addon module
named hald-addon-network-discovery.  This module will be tied into the
HAL device tree at /org/freedesktop/hal/devices/network_attached by
configuration stored in a HAL configuration file,
/etc/hal/fdi/policy/10osvendor/10-network-attached.fdi. At startup,
this module will claim the org.freedesktop.Hal.Device.NetworkDiscovery
interface on the D-BUS and process a set of method calls that control
it's operation.  Actual network attached device discovery will start in
an idle state.  That is to say that network attached device discovery
will not occur until it has been enabled via D-BUS method call(s).

Management of network attached device discovery will be handled by
instances of a new SMF service (svc:/network/device-discovery).  These
service instances will each correspond to a discovery method. The
service instances will make D-BUS method calls in response to being
enabled, disabled, and/or refreshed.  Persistant configuration relevant
to each supported discovery method will be stored in the SMF repository
in a "config" property group associated with each service instance.
Management of the service instances will require authorizations
specific to the discovery method.  Each of these authorizations will be
added to the "Printer Management" profile.

As network attached printers are discovered, they will be added to the
HAL device tree at /org/freedesktop/hal/devices/network_attached/{addr}.
These nodes will contain a set of HAL properties that include elements
of the "printer" property group, "info" property group, and a new
"network_device" property group.  The network_device property group
contains a required "address" property.  The info property group will
list "printer" and "network_device" as two of the device's
capabilities.

HAL does not currently define ownership of devices in it's device tree,
instead all devices are assumed to be under control of the console
owner.  Devices discovered through this module are expected to be
assigned the same way all local devices are assigned.

Since virtually all network attached printers (or attachment devices)
seem to support SNMP v1, the initial implementation will support an
SNMP_GET broadcast mechanism for device discovery.  The SNMP discovery
method will use the following SMF service instance/properties, and
D-BUS methods/arguments

SMF Service Instance                D-BUS Method
svc:/network/device-discovery:snmp  org.freedesktop.Hal.Device.
  enable                              NetworkDiscovery.EnableScanningViaSNMP()
    config/interval                     int32:interval
    config/network                      string:network
    config/community                    string:community
                                    org.freedesktop.Hal.Device.
  disable                             NetworkDiscovery.DisableScanningViaSNMP()
                                    org.freedesktop.Hal.Device.
  refresh                             NetworkDiscovery.ScanViaSNMP()
    config/network                      string:network
    config/community                    string:community

  interval specifies the number of seconds to wait between active SNMP
  scans. community specifies the SNMP community string to use in
  SNMP_GET requests. network specifies the network broadcast address to
  use in the SNMP_GET request.


Network Printer Probe
---------------------

Probing of network attached printers for identifying data will be
handled by a HAL probe module named hal-probe-network-printer.  This
module will be attached to and invoked for each device who's
info.capabilities propery contains the 'printer' capability and
contains a network_device.address.  This will be achieved through
configuration in the HAL configuration file
/etc/hal/fdi/preprobe/10osvendor/20-printers.fdi.

The network attached printer probe will make use of SNMP to probe each
device and extract manufacturer, model, description, serial number,
device-uri, and other information.  Since most SNMP implementations on
network attached printers don't use a standard representation for this
data, several vendor specific MIB objects will be queried, along with
newer standard MIB objects to extract this information.


An example network attached printer entry looks remarkably like this:

  udi = '/org/freedesktop/Hal/devices/network_attached/192_168_0_15'
    printer.commandset = {'PJL', 'MLC', 'BIDI-ECP', 'PCLXL', 'PCL', 'PDF', 
'PJL', 
'MIME', 'POSTSCRIPT'} (string list)
    printer.description = 'Hewlett-Packard color LaserJet 4650'  (string)
    printer.product = 'hp color LaserJet 4650'  (string)
    printer.vendor = 'Hewlett-Packard'  (string)
    info.callouts.add = {'hald-probe-network-printer'} (string list)
    info.udi = '/org/freedesktop/Hal/devices/network_attached/192_168_0_15'  
(string)
    printer.device = 'socket://192.168.0.15:9100'  (string)
    network_device.address = '192.168.0.15'  (string)
    info.capabilities = {'printer', 'network_device'} (string list)
    info.category = 'printer'  (string)
    info.parent = '/org/freedesktop/Hal/devices/network_attached'  (string)

In this example, all of the info.*, network_device.*, and the
printer.device properties were supplied by the discovery service addon
module.  The balance of the printer properties were supplied by the
network-printer-probe.


EXPORTED INTERFACES
-------------------
/usr/lib/hal/
   hald-addon-network-discovery       Project Private  discovery service addon
   hald-network-printer-probe         Project Private  printer property probe
   /etc/hal/fdi/policy/10osvendor/
   10-network-attached.fdi            Project Private  Attach discovery service
                                                       to HAL
/etc/hal/fdi/preprobe/10osvendor/
   20-printers.fdi                    Project Private  Attach network printer
                                                       probe to newly discovered
                                                       network attached printers

/org/freedesktop/hal/devices/                      HAL Device Tree
   network_attached                   Volatile        Discovery service node
   network_attached/{addr}            Volatile        Device node
   HAL Device properties
   network_device.address             Project Private
   network_device.snmp_community      Project Private
   org.freedesktop.                                   D-BUS Network API
Hal.Device.NetworkDiscovery          Volatile        "   discovery service
                                                          interface
   EnableScanningViaSNMP()            Volatile      Start periodic SNMP device
                                                      discovery
   DisableScanningViaSNMP()           Volatile      Stop periodic SNMP device
                                                      discovery
   ScanViaSNMP()                      Volatile      Search the network once
                                                      for attached devices
                                                      using SNMP
   svc:/network/device-discovery:snmp   Committed     SMF FMRI to start/stop
                                                      SNMP device discovery

   config/network                     Committed     broadcast address for
                                                      active SNMP scanning
   config/community                   Committed     SNMP community string for
                                                      active scanning
   config/interval                    Committed     seconds between active
                                                      network scans

   solaris.smf.manage.discovery.snmp  Committed     Authorization required to
                                                      manage SNMP discovery
   solaris.smf.value.discovery.snmp   Committed     Authorization required to
                                                      manipulate SNMP discovery
                                                      properties.

Binding: minor

IMPORTED INTERFACES
-------------------
libhal                               Volatile
libdbus-1                            Volatile
libdbus-glib-1                       Volatile
fdi(4) file format                   Volatile
hal-device(1M)                       Volatile
dbus-send(1M)                        Volatile      Utility to send a message
                                                      on the D-BUS message bus.
libnetsnmp                           Stable        Core SNMP library

SNMPv2-MIB::sysDescr.0               Committed     SNMP MIB system description
HOST-RESOURCES-MIB::hrDeviceDescr.1  Committed     Host-Resource MIB device
                                                      description
SNMPv2-SMI::enterprises.
   2699.1.2.1.1.1.3                   Committed     PWG PortMon MIB
                                                      1284 Device ID
   253.8.51.1.2.1.20.1                Committed     Xerox MIB 1284 Device ID
   253.8.53.3.2.1.2.1                 Committed     Xerox MIB Description
   253.8.53.3.2.1.3.1                 Committed     Xerox MIB Serial Number
   128.2.1.3.1.1.0                    Committed     Xerox MIB Manufacturer
   128.2.1.3.1.2.0                    Committed     Xerox MIB Model
   128.2.1.3.6.23.1.5.1               Committed     Xerox MIB Device-URI
   23.2.32.3.2.1.10.1.16              Committed     Xerox MIB Manufacturer
   23.2.32.3.2.1.10.1.17              Committed     Xerox MIB Model
   23.2.32.4.1.0                      Committed     Xerox MIB Manufacturer
   23.2.32.4.2.0                      Committed     Xerox MIB Model
   367.3.2.1.1.1.11.0                 Committed     Ricoh MIB 1284 Device ID
   367.3.2.1.2.1.4.0                  Committed     Ricoh MIB Serial Number
   2001.1.2.683.1.3                   Committed     OKIdata MIB Product Name
   2001.1.2.683.1.5                   Committed     OKIdata MIB Serial Number
   2590.1.1.2.1.5.7.14.2.1.1.16.1     Committed     QMS MIB Product Name
   2590.1.1.1.5.5.1.1.3.2             Committed     QMS MIB Serial Number
   2590.1.1.2.1.5.7.14.2.2.1.3.1.1    Committed     QMS MIB Device-URI
   641.2.1.2.1.3.1                    Committed     Lexmark MIB 1284 Device ID
   641.2.1.2.1.6.1                    Committed     Lexmark MIB Serial Number
   2435.2.3.9.1.1.7.0                 Committed     Brother MIB 1284 Device ID
   2435.2.3.9.4.2.1.5.5.1.0           Committed     Brother MIB Serial Number
   11.2.3.9.1.1.7.0                   Committed     HP MIB 1284 Device ID
   11.2.3.9.4.2.2.5.1.1.17            Committed     HP MIB Serial Number


Related ARC Cases
-----------------
   LSARC/2003/103  Solaris Management Agent 1.0
   PSARC/2005/399  Tamarack: Removable Media Enhancements in Solaris
   PSARC/2005/562  Multicast DNS and Service Discovery
   LSARC/2006/368  D-BUS Message Bus System
   PSARC/2006/467  Printers Devfs Events
   LSARC/2007/287  Presto (Phase I) - Automatic detection of local
                                      USB printers

6. Resources and Schedule
     6.4. Steering Committee requested information
        6.4.1. Consolidation C-team Name:
                ON
     6.5. ARC review type: FastTrack
     6.6. ARC Exposure: open


Reply via email to