CUPS
- the print spooler that wants to print via IPP-over-USB.ippusb_manager
- service that helps establish communication between the print spooler and ippusbxd
. Developed specifically for IPP-over-USB printing in Chromium OS.ippusbxd
- service that facilitates IPP-over-USB communication. Heavily patched for use in Chromium OS. Known to differ substantially from upstream.ippusb://<VID>_<PID>/ipp/print
.ippusb://
scheme.lpadmin
and to the ipp
backend.ippusb://
scheme, then CUPS sends a request to ippusb_manager
to broker a socket for communication with the printer by way of ippusbxd
.ippusb://
scheme is specific to Chromium OS.ippusb://
scheme in CUPS configuration etc. on-device, but rewrite the URI to use the ipp://
scheme before communicating with the printer.CUPS
and ippusbxd
./run/ippusb/ippusb_manager.sock
./run/ippusb/<VID>_<PID>.sock
and /run/ippusb/<VID>_<PID>_keep_alive.sock
, andippusbxd
, checked by sending a keep-alive message on the latter socket.CUPS
with the basename of the socket over which it can communicate with ippusbxd
.ippusb_manager
to ippusbxd
to preempt the latter from its timed idle exit.ippusb_manager
listens for an explicit acknowledgement before declaring ippusbxd
alive and reusing the extant sockets.ippusb_manager
tries to wait for the sockets to disappear (i.e. that ippusbxd
has exited) before spawning a new instance of ippusbxd
.ippusb_manager
, as mentioned above.ippusbxd
receives a keep-alive from ippusb_manager
, it resets the idle timer in anticipation of imminent activity.CUPS
and the printer.ippusb
interface on a given printer: one for each direction of communication.ippusb
interfaces on the printer until exit.ippusb_manager
and ippusbxd
are run from inside minijail instances and retain their own seccomp filters.ippusb_manager
forks ippusbxd
, the former seccomp filter must be a superset of the latter.How much of ippusbxd do we use?
We don't use any of the avahi code.
(WRT ippusb_manager) why Unix sockets; why not D-Bus?
We didn't consider D-Bus at the time. The messages are quite simple and CUPS
already had code for dealing with Unix sockets.
Can a user plug in more than one USB printer?
Yes, as long as they do not appear to be the same (i.e. present identical VIDs and PIDs). We opine that this is an uncommon enough use case to be an issue.
Can ippusb_manager and ippusbxd have multiple clients?
Preliminary testing indicates that this should work. Sockets are connection-oriented.
See the design doc for information about the overall design and how ippusb_manager
fits into it. This is accessible only within google.
This repository contains the following subdirectories:
Subdirectory | Description |
---|---|
etc/init | Upstart config files for launching ippusb_manager |
udev/ | udev rules for setting group permissions on ipp-usb printers |