Section: SANE Scanner Access Now Easy (5)
Updated: 14 Jul 2008
The sane-net library implements a SANE (Scanner Access Now Easy) backend that provides access to image acquisition devices through a network connection. This makes it possible to control devices attached to a remote host and also provides a means to grant users access to protected resources.
This backend expects device names of the form:
Where host is the name (or IP address) of the (remote) host and device is the name of the device on this host that should be addressed. If the device name does not contain a colon (:), then the entire string is treated as the device string for the default host. The default host is the host listed last in the configuration file (see below).
An IPv6 address can be specified enclosed in square brackets:
The net.conf file contains both backend options and a list of host names (or IP addresses) that should be contacted for scan requests. Anything that isn't one of the options listed below will be treated as an host name.
Empty lines and lines starting with a hash mark (#) are ignored. Note that IPv6 addresses in this file do not need to be enclosed in square brackets. A sample configuration file is shown below:
The above list of hosts can be extended at run-time using environment variable SANE_NET_HOSTS. This environment variable is a colon-separated list of hostnames or IP addresses that should be contacted in addition to the hosts mentioned in the configuration file. For example, a user could set the environment variable to the string:
To request that hosts new.scanner.com , [::1] , 192.168.0.2 and scanner.univ.edu are contacted in addition to the hosts listed above.
For this backend to function properly, it is also necessary to define the sane-port service in /etc/services. The sane service should be defined using a line of the following form:
David Mosberger and Andreas Beck
Tutoriais de Tecnologia Web