| 1 |
.TH sane\-net 5 "14 Jul 2008" "" "SANE Scanner Access Now Easy" |
| 2 |
.IX sane\-net |
| 3 |
.SH NAME |
| 4 |
sane\-net \- SANE network backend |
| 5 |
.SH DESCRIPTION |
| 6 |
The |
| 7 |
.B sane\-net |
| 8 |
library implements a SANE (Scanner Access Now Easy) backend that |
| 9 |
provides access to image acquisition devices through a network |
| 10 |
connection. This makes it possible to control devices attached to a |
| 11 |
remote host and also provides a means to grant users access to |
| 12 |
protected resources. |
| 13 |
|
| 14 |
.SH "DEVICE NAMES" |
| 15 |
This backend expects device names of the form: |
| 16 |
.PP |
| 17 |
.RS |
| 18 |
.IR host : device |
| 19 |
.RE |
| 20 |
.PP |
| 21 |
Where |
| 22 |
.I host |
| 23 |
is the name (or IP address) of the (remote) host and |
| 24 |
.I device |
| 25 |
is the name of the device on this host that should be addressed. |
| 26 |
If the device name does not contain a colon (:), then the entire string |
| 27 |
is treated as the |
| 28 |
.I device |
| 29 |
string for the default host. The default host is the host listed last |
| 30 |
in the configuration file (see below). |
| 31 |
.PP |
| 32 |
An IPv6 address can be specified enclosed in square brackets: |
| 33 |
.PP |
| 34 |
.RS |
| 35 |
.IR [::1] : device |
| 36 |
.RE |
| 37 |
.SH CONFIGURATION |
| 38 |
The |
| 39 |
.IR net.conf |
| 40 |
file contains both backend options and a list of host names (or IP |
| 41 |
addresses) that should be contacted for scan requests. Anything that |
| 42 |
isn't one of the options listed below will be treated as an host name. |
| 43 |
.PP |
| 44 |
.TP |
| 45 |
.B connect_timeout = nsecs |
| 46 |
Timeout (in seconds) for the initial connection to the |
| 47 |
.BR saned (8) |
| 48 |
server. This will prevent the backend from blocking for several |
| 49 |
minutes trying to connect to an unresponsive |
| 50 |
.BR saned (8) |
| 51 |
host (network outage, host down, ...). The environment variable |
| 52 |
.B SANE_NET_TIMEOUT |
| 53 |
can also be used to specify the timeout at runtime. |
| 54 |
.PP |
| 55 |
Empty lines and lines starting with a hash mark (#) are |
| 56 |
ignored. Note that IPv6 addresses in this file do not need to be enclosed |
| 57 |
in square brackets. A sample configuration file is shown below: |
| 58 |
.PP |
| 59 |
.RS |
| 60 |
scan\-server.somedomain.firm |
| 61 |
.br |
| 62 |
192.168.0.1 |
| 63 |
.br |
| 64 |
# this is a comment |
| 65 |
.br |
| 66 |
localhost |
| 67 |
.br |
| 68 |
::1 |
| 69 |
.RE |
| 70 |
.PP |
| 71 |
The above list of hosts can be extended at run-time using environment |
| 72 |
variable |
| 73 |
.BR SANE_NET_HOSTS . |
| 74 |
This environment variable is a colon-separated list of hostnames or IP |
| 75 |
addresses that should be contacted in addition to the hosts mentioned in |
| 76 |
the configuration file. For example, a user could set the environment |
| 77 |
variable to the string: |
| 78 |
.PP |
| 79 |
.RS |
| 80 |
new.scanner.com:[::1]:192.168.0.2:scanner.univ.edu |
| 81 |
.RE |
| 82 |
.PP |
| 83 |
To request that hosts |
| 84 |
.I new.scanner.com |
| 85 |
, |
| 86 |
.I [::1] |
| 87 |
, |
| 88 |
.I 192.168.0.2 |
| 89 |
and |
| 90 |
.I scanner.univ.edu |
| 91 |
are contacted in addition to the hosts listed above. |
| 92 |
.PP |
| 93 |
For this backend to function properly, it is also necessary to define the |
| 94 |
.B sane\-port |
| 95 |
service in |
| 96 |
.I /etc/services |
| 97 |
using a line of the following form: |
| 98 |
.PP |
| 99 |
.RS |
| 100 |
sane\-port 6566/tcp # SANE network scanner daemon |
| 101 |
.RE |
| 102 |
.PP |
| 103 |
.SH FILES |
| 104 |
.TP |
| 105 |
.I /etc/sane.d/net.conf |
| 106 |
The backend configuration file (see also description of |
| 107 |
.B SANE_CONFIG_DIR |
| 108 |
below). |
| 109 |
.TP |
| 110 |
.I /usr/lib/x86_64-linux-gnu/sane/libsane\-net.a |
| 111 |
The static library implementing this backend. |
| 112 |
.TP |
| 113 |
.I /usr/lib/x86_64-linux-gnu/sane/libsane\-net.so |
| 114 |
The shared library implementing this backend (present on systems that |
| 115 |
support dynamic loading). |
| 116 |
.SH ENVIRONMENT |
| 117 |
.TP |
| 118 |
.B SANE_CONFIG_DIR |
| 119 |
This environment variable specifies the list of directories that may |
| 120 |
contain the configuration file. On *NIX systems, the directories are |
| 121 |
separated by a colon (`:'), under OS/2, they are separated by a |
| 122 |
semi-colon (`;'). If this variable is not set, the configuration file |
| 123 |
is searched in two default directories: first, the current working |
| 124 |
directory (".") and then in |
| 125 |
.IR /etc/sane.d . |
| 126 |
If the value of the |
| 127 |
environment variable ends with the directory separator character, then |
| 128 |
the default directories are searched after the explicitly specified |
| 129 |
directories. For example, setting |
| 130 |
.B SANE_CONFIG_DIR |
| 131 |
to "/tmp/config:" would result in directories |
| 132 |
.IR "tmp/config" , |
| 133 |
.IR "." , |
| 134 |
and |
| 135 |
.I "/etc/sane.d" |
| 136 |
being searched (in this order). |
| 137 |
.TP |
| 138 |
.B SANE_NET_HOSTS |
| 139 |
A colon-separated list of host names or IP addresses to be contacted by this |
| 140 |
backend. |
| 141 |
.TP |
| 142 |
.B SANE_NET_TIMEOUT |
| 143 |
Number of seconds to wait for a response from the |
| 144 |
.BR saned (8) |
| 145 |
server for the initial connection request. |
| 146 |
.TP |
| 147 |
.B SANE_DEBUG_NET |
| 148 |
If the library was compiled with debug support enabled, this |
| 149 |
environment variable controls the debug level for this backend. E.g., |
| 150 |
a value of 128 requests all debug output to be printed. Smaller |
| 151 |
levels reduce verbosity. |
| 152 |
.SH BUGS |
| 153 |
If |
| 154 |
.BR saned (8) |
| 155 |
has timed out, the net backend may loop with authorization requests. |
| 156 |
|
| 157 |
.SH "SEE ALSO" |
| 158 |
.BR sane (7), |
| 159 |
.BR saned (8), |
| 160 |
.BR sane\-dll (5), |
| 161 |
.BR scanimage (1) |
| 162 |
|
| 163 |
.I http://www.penguin-breeder.org/?page=sane\-net |
| 164 |
.SH AUTHOR |
| 165 |
David Mosberger and Andreas Beck |