Delete SANE Standard input files from the repository

merge-requests/350/head
Olaf Meeuwissen 2020-03-02 20:03:37 +09:00
rodzic d4aa676f72
commit 73db94b706
17 zmienionych plików z 0 dodań i 2621 usunięć

Wyświetl plik

@ -1,36 +0,0 @@
#FIG 3.1
Portrait
Center
Inches
1200 2
6 1650 1650 1800 1800
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
1725 1650 1725 1800
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
1650 1725 1800 1725
-6
6 3300 2700 3450 2850
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
3375 2700 3375 2850
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
3300 2775 3450 2775
-6
6 1725 1725 3375 2775
2 2 0 0 7 7 10 0 18 0.000 0 0 -1 0 0 5
1725 1725 3375 1725 3375 2775 1725 2775 1725 1725
4 1 -1 10 0 16 12 0.0000 4 105 840 2550 2302 scan area\001
-6
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
1200 675 4275 675 4275 3375 1200 3375 1200 675
2 1 0 1 -1 7 10 0 16 0.000 0 0 -1 1 0 2
2 1 1.00 60.00 120.00
1200 525 1200 3825
2 1 0 1 -1 7 10 0 16 0.000 0 0 -1 1 0 2
2 1 1.00 60.00 120.00
1050 675 4650 675
4 1 -1 10 0 16 12 0.0000 4 180 1020 3375 3150 bottom-right\001
4 1 -1 10 0 16 12 0.0000 4 180 615 1725 1500 top-left\001
4 1 -1 10 0 16 12 0.0000 4 135 1080 2700 1050 scan surface\001
4 1 -1 10 0 16 12 0.0000 4 150 105 1050 3600 y\001
4 1 -1 10 0 16 12 0.0000 4 105 90 4425 525 x\001
4 1 -1 10 0 16 12 0.0000 4 135 105 1080 585 0\001

Wyświetl plik

@ -1,40 +0,0 @@
#FIG 3.1
Portrait
Center
Inches
1200 2
6 4200 7305 9945 7575
4 0 -1 0 0 17 18 0.0000 4 270 1500 4200 7515 - go back to\001
4 0 -1 0 0 16 18 0.0000 4 270 1440 5775 7515 sane_start()\001
4 0 -1 0 0 17 18 0.0000 4 210 2670 7275 7515 if more frames desired\001
-6
2 2 0 1 -1 7 10 0 19 0.000 0 0 -1 0 0 5
2700 600 10200 600 10200 9600 2700 9600 2700 600
2 2 0 1 -1 7 8 0 18 0.000 0 0 -1 0 0 5
3300 2400 10200 2400 10200 8925 3300 8925 3300 2400
2 2 0 1 -1 7 8 0 17 0.000 0 0 -1 0 0 5
3900 2925 10200 2925 10200 4650 3900 4650 3900 2925
2 2 0 1 -1 7 8 0 17 0.000 0 0 -1 0 0 5
3900 4800 10200 4800 10200 8250 3900 8250 3900 4800
2 1 0 1 -1 7 8 0 -1 0.000 0 0 -1 0 0 4
10350 3000 10425 3075 10425 4500 10350 4575
2 1 0 1 -1 7 8 0 -1 0.000 0 0 -1 0 0 4
10350 4875 10425 4950 10425 8100 10350 8175
4 0 -1 0 0 17 18 0.0000 4 150 735 4200 3300 - use:\001
4 0 -1 0 0 16 18 0.0000 4 270 1680 4200 5100 - sane_start()\001
4 0 -1 0 0 17 18 0.0000 4 270 4950 4500 4500 repeatedly to configure device as desired\001
4 0 -1 0 0 16 18 0.0000 4 270 2715 5400 4080 sane_control_option()\001
4 0 -1 0 0 16 18 0.0000 4 270 3660 5400 3600 sane_get_option_descriptor()\001
4 0 -1 0 0 17 18 0.0000 4 150 735 4200 5700 - use:\001
4 0 -1 0 0 17 18 0.0000 4 270 4080 4500 6900 repeatedly until read returns EOF\001
4 0 -1 0 0 16 18 0.0000 4 270 2805 5400 6000 sane_get_parameters()\001
4 0 -1 0 0 16 18 0.0000 4 270 1440 5400 6450 sane_read()\001
4 0 -1 0 0 16 18 0.0000 4 270 1935 4200 8100 - sane_cancel()\001
4 0 -1 0 0 16 18 0.0000 4 270 1500 3000 1200 - sane_init()\001
4 0 -1 0 0 16 18 0.0000 4 270 1590 3000 9300 - sane_exit()\001
4 0 -1 0 0 17 18 0.0000 4 270 4845 3600 1800 - pick desired device, possibly by using\001
4 0 -1 0 0 16 18 0.0000 4 270 1770 3600 2700 - sane_open()\001
4 0 -1 0 0 16 18 0.0000 4 270 1800 3600 8700 - sane_close()\001
4 0 -1 0 0 16 18 0.0000 4 270 2415 4800 2175 sane_get_devices()\001
4 0 -1 8 0 17 18 0.0000 4 270 2070 10575 6600 image acquisition\001
4 0 -1 8 0 17 18 0.0000 4 270 1500 10575 3825 device setup\001

Wyświetl plik

@ -1,79 +0,0 @@
#FIG 3.1
Landscape
Center
Inches
1200 2
6 10500 4500 12300 5400
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
10650 4785 12150 4785 12150 5385 10650 5385 10650 4785
4 1 -1 0 0 16 18 0.0000 4 210 660 11399 5182 qcam\001
-6
6 7200 4500 9000 5400
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
7350 4785 8850 4785 8850 5385 7350 5385 7350 4785
4 1 -1 0 0 16 18 0.0000 4 270 315 8099 5182 hp\001
-6
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
2250 1185 3750 1185 3750 1785 2250 1785 2250 1185
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
450 2985 1950 2985 1950 3585 450 3585 450 2985
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
2250 2985 3750 2985 3750 3585 2250 3585 2250 2985
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
4050 2985 5550 2985 5550 3585 4050 3585 4050 2985
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
8850 1185 10350 1185 10350 1785 8850 1785 8850 1185
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
2700 1800 1200 3000
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
3000 1800 3000 3000
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
3300 1800 4800 3000
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
9600 1800 9600 2100
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
9450 2700 8100 4800
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
11400 4200 11400 4800
2 2 0 0 0 0 10 0 2 0.000 0 0 -1 0 0 5
5700 3825 300 3825 300 300 5700 300 5700 3825
2 2 0 0 0 0 10 0 2 0.000 0 0 -1 0 0 5
12300 5550 7200 5550 7200 300 12300 300 12300 5550
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
1200 3600 1200 4200
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
3000 3600 3000 4125
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
7875 5400 7350 5850
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
8250 5400 8775 5850
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
11475 5400 11475 5850
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
8850 2100 10350 2100 10350 2700 8850 2700 8850 2100
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
10650 3600 12150 3600 12150 4200 10650 4200 10650 3600
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2
9750 2700 11400 3600
3 2 0 1 -1 7 0 0 -1 0.000 0 0 0 7
4800 3600 4275 4500 5025 5475 6150 4575 6525 1350 9450 900
9600 1200
0.00 0.00 4390.23 4024.37 4258.98 4249.38 4300.21 4894.51
4554.60 5418.20 5575.94 5541.53 5962.09 4914.18 6573.46 3810.63
5758.15 2145.68 7223.99 624.74 8573.68 446.85 9524.49 938.52
9561.99 1013.52 0.00 0.00
4 1 -1 0 0 16 18 0.0000 4 210 525 1199 3382 pnm\001
4 1 -1 0 0 16 18 0.0000 4 210 870 2999 3382 mustek\001
4 1 -1 0 0 17 14 0.0000 4 210 855 1200 4425 pnm files\001
4 1 -1 0 0 17 14 0.0000 4 120 765 3000 4380 scanner\001
4 1 -1 0 0 17 14 0.0000 4 150 945 7350 6165 scanner 1\001
4 1 -1 0 0 17 14 0.0000 4 150 945 8925 6165 scanner 2\001
4 1 -1 0 0 17 14 0.0000 4 165 1290 11475 6135 video camera\001
4 1 -1 0 0 17 14 0.0000 4 165 1035 3000 600 machine A\001
4 1 -1 0 0 17 14 0.0000 4 165 1020 9600 630 machine B\001
4 1 -1 0 0 17 14 0.0000 4 165 1860 4725 5850 network connection\001
4 1 -1 0 0 16 18 0.0000 4 210 285 2999 1582 dll\001
4 1 -1 0 0 16 18 0.0000 4 195 390 4799 3382 net\001
4 1 -1 0 0 16 18 0.0000 4 210 735 9599 1582 saned\001
4 1 -1 0 0 16 18 0.0000 4 210 285 9599 2482 dll\001
4 1 -1 0 0 16 18 0.0000 4 210 960 11399 3982 autolum\001

Wyświetl plik

@ -1,63 +0,0 @@
#FIG 3.1
Portrait
Center
Inches
1200 2
6 1725 450 5925 1650
6 1800 975 3150 1350
2 2 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
1800 1200 3150 1200 3150 1350 1800 1350 1800 1200
4 0 -1 0 0 16 12 0.0000 4 135 1260 1875 1125 7 6 5 4 3 2 1 0\001
-6
6 3150 975 4500 1350
2 2 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
3150 1200 4500 1200 4500 1350 3150 1350 3150 1200
4 0 -1 0 0 16 12 0.0000 4 135 1260 3225 1125 7 6 5 4 3 2 1 0\001
-6
6 4500 975 5850 1350
2 2 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
4500 1200 5850 1200 5850 1350 4500 1350 4500 1200
4 0 -1 0 0 16 12 0.0000 4 135 1260 4575 1125 7 6 5 4 3 2 1 0\001
-6
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
1800 1200 5850 1200 5850 1350 1800 1350 1800 1200
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 7
1800 900 1950 825 3750 825 3825 750 3900 825 5700 825
5850 900
4 0 -1 0 0 16 12 0.0000 4 105 60 2475 1575 r\001
4 1 -1 0 0 16 12 0.0000 4 150 105 3825 1575 g\001
4 1 -1 0 0 16 12 0.0000 4 135 105 5175 1575 b\001
4 1 -1 0 0 16 12 0.0000 4 180 555 3825 600 pixel 0\001
-6
6 5850 975 7200 1350
2 2 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
5850 1200 7200 1200 7200 1350 5850 1350 5850 1200
4 0 -1 0 0 16 12 0.0000 4 135 1260 5925 1125 7 6 5 4 3 2 1 0\001
-6
6 7200 975 8550 1350
2 2 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
7200 1200 8550 1200 8550 1350 7200 1350 7200 1200
4 0 -1 0 0 16 12 0.0000 4 135 1260 7275 1125 7 6 5 4 3 2 1 0\001
-6
6 8550 975 9900 1350
2 2 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
8550 1200 9900 1200 9900 1350 8550 1350 8550 1200
4 0 -1 0 0 16 12 0.0000 4 135 1260 8625 1125 7 6 5 4 3 2 1 0\001
-6
2 2 0 2 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
5850 1200 9900 1200 9900 1350 5850 1350 5850 1200
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 7
5850 900 6000 825 7800 825 7875 750 7950 825 9750 825
9900 900
4 0 -1 0 0 16 12 0.0000 4 105 60 6525 1575 r\001
4 1 -1 0 0 16 12 0.0000 4 150 105 7875 1575 g\001
4 1 -1 0 0 16 12 0.0000 4 135 105 9225 1575 b\001
4 1 -1 0 0 16 12 0.0000 4 180 555 7875 600 pixel 1\001
4 1 -1 0 0 16 12 0.0000 4 180 525 9225 1950 byte 5\001
4 1 -1 0 0 16 12 0.0000 4 180 525 7875 1950 byte 4\001
4 1 -1 0 0 16 12 0.0000 4 180 525 6525 1950 byte 3\001
4 1 -1 0 0 16 12 0.0000 4 180 525 5175 1950 byte 2\001
4 1 -1 0 0 16 12 0.0000 4 180 465 3825 1950 byte1\001
4 1 -1 0 0 16 12 0.0000 4 180 465 2475 1950 byte0\001
4 1 -1 0 0 16 12 0.0000 4 15 180 10050 1275 ....\001
4 2 -1 0 0 16 12 0.0000 4 135 240 1725 1125 bit:\001

Wyświetl plik

@ -1,32 +0,0 @@
#FIG 3.1
Portrait
Center
Inches
1200 2
6 2325 3150 8175 3750
2 1 0 2 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
2 1 2.00 120.00 240.00
2400 3300 8100 3300
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
2 1 2.00 120.00 240.00
8100 3375 2400 3675
-6
6 2325 3600 8175 4200
2 1 0 2 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
2 1 2.00 120.00 240.00
2400 3750 8100 3750
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
2 1 2.00 120.00 240.00
8100 3825 2400 4125
-6
2 2 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 5
2250 3150 8250 3150 8250 6150 2250 6150 2250 3150
2 1 0 2 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
2 1 2.00 120.00 240.00
2400 4200 8100 4200
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
2 1 2.00 120.00 240.00
8100 4275 2400 4575
2 1 0 2 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
2 1 2.00 120.00 240.00
2400 4650 8100 4650

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 225 B

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 180 B

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 172 B

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 172 B

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 220 B

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 220 B

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 247 B

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 247 B

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 145 B

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 145 B

Wyświetl plik

@ -1,479 +0,0 @@
\chapter{Network Protocol}\label{chap:net}
The SANE interface has been designed to facilitate network access to
image acquisition devices. In particular, most SANE implementations
are expected to support a network backend (net client) and a
corresponding network daemon (net server) that allows accessing image
acquisition devices through a network connection. Network access is
useful in several situations:
\begin{itemize}
\item To provide controlled access to resources that are inaccessible
to a regular user. For example, a user may want to access a device
on a host where she has no account on. With the network protocol,
it is possible to allow certain users to access scanners without
giving them full access to the system.
Controlling access through the network daemon can be useful even in
the local case: for example, certain backends may require root
privileges to access a device. Rather than installing each frontend
as setuid-root, a system administrator could instead install the
SANE network daemon as setuid-root. This enables regular users to
access the privileged device through the SANE daemon (which,
presumably, supports a more fine-grained access control mechanism
than the simple setuid approach). This has the added benefit that
the system administrator only needs to trust the SANE daemon, not
each and every frontend that may need access to the privileged
device.
\item Network access provides a sense of ubiquity of the available
image acquisition devices. For example, in a local area network
environment, this allows a user to log onto any machine and have
convenient access to any resource available to any machine on the
network (subject to permission constraints).
\item For devices that do not require physical access when used (e.g.,
video cameras), network access allows a user to control and use
these devices without being in physical proximity. Indeed, if such
devices are connected to the Internet, access from any place in the
world is possible.
\end{itemize}
The network protocol described in this chapter has been design with
the following goals in mind:
\begin{enumerate}
\item Image transmission should be efficient (have low encoding
overhead).
\item Accessing option descriptors on the client side must be
efficient (since this is a very common operation).
\item Other operations, such as setting or inquiring the value of an
option are less performance critical since they typically require
explicit user action.
\item The network protocol should be simple and easy to implement on
any host architecture and any programming language.
\end{enumerate}
The SANE protocol can be run across any transport protocol that
provides reliable data delivery. While SANE does not specify a
specific transport protocol, it is expected that TCP/IP will be among
the most commonly used protocols.
\section{Data Type Encoding}
\subsection{Primitive Data Types}
The four primitive types of the SANE standard are encoded as follows:
\begin{description}
\item[\code{\defn{SANE\_Byte}}:] A byte is encoded as an 8 bit value.
Since the transport protocol is assumed to be byte-orientd, the bit
order is irrelevant.
\item[\code{\defn{SANE\_Word}}:] A word is encoded as 4 bytes (32
bits). The bytes are ordered from most-significant to
least-significant byte (big-endian byte-order).
\item[\code{\defn{SANE\_Char}}:] A character is currently encoded as an 8-bit
ISO LATIN-1 value. An extension to support wider character sets (16 or 32
bits) is planned for the future, but not supported at this point.
\item[\code{\defn{SANE\_String}}:] A string pointer is encoded as a
\code{SANE\_Char} array. The trailing NUL byte is considered part
of the array and a \code{NULL} pointer is encoded as a zero-length
array.
\item[\code{\defn{SANE\_Handle}}:] A handle is encoded like a word.
The network backend needs to take care of converting these integer
values to the opaque pointer values that are presented to the user
of the network backend. Similarly, the SANE daemon needs to take
care of converting the opaque pointer values it receives from its
backends into 32-bit integers suitable for use for network encoding.
\item[{\em\defn{enumeration types}}:] Enumeration types are encoded
like words.
\end{description}
\subsection{Type Constructors}
Closely following the type constructors of the C language, the SANE network
protocol supports the following four constructors:
\begin{description}
\item[{\em\defn{pointer}}:] A pointer is encoded by a word that indicates
whether the pointer is a NULL-pointer which is then followed by the
value that the pointer points to (in the case of a non-NULL pointer;
in the case of a NULL pointer, no bytes are encoded for the pointer
value).
\item[{\em\defn{array}}:] An array is encoded by a word that indicates
the length of the array followed by the values of the elements in
the array. The length may be zero in which case no bytes are
encoded for the element values.
\item[{\em\defn{structure}}:] A structure is encoded by simply encoding the
structure members in the order in which they appear in the
corresponding C type declaration.
\item[{\em\defn{union}}:] A union must always be accompanied by a tag
value that indicates which of the union members is the currently the
active one. For this reason, the union itself is encoded simply by
encoding the value of the currently active member.
\end{description}
Note that for type constructors, the pointer, element, or member
values themselves may have a constructed type. Thus, the above rules
should be applied recursively until a sequence of primitive types has
been found.
Also SANE had no need for encoding of circular structures. This
greatly simplifies the network protocol.
\section{Remote Procedure Call Requests}
The SANE network protocol is a client/server-style remote procedure
call (RPC) protocol. This means that all activity is initiated by the
client side (the network backend)---a server is restricted to
answering requests sent by the client.
The data transferred from the client to the server is comprised of the RPC code
(as a \code{SANE\_WORD}), followed by arguments defined in the {\bf request}
column below. The format of the server's answer is given in the {\bf reply}
column.
\subsection{\code{\defn{SANE\_NET\_INIT}}}
RPC Code: 0
This RPC establishes a connection to a particular SANE network daemon.
It must be the first call in a SANE network session. The parameter
and reply arguments for this call are shown in the table below:
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{SANE\_Word version\_code} & \code{SANE\_Word status} \\
\code{SANE\_String user\_name} & \code{SANE\_Word version\_code} \\
\end{tabular}
\end{center}
The \code{version\_code} argument in the request is the SANE
version-code of the network backend that is contacting the network
daemon (see Section~\ref{sec:saneversioncode}). The
``build-revision'' in the version code is used to hold the network
protocol version. The SANE network daemon receiving such a request
must make sure that the network protocol version corresponds to a
supported version since otherwise the encoding of the network stream
may be incompatible (even though the SANE interface itself may be
compatible). The \code{user\_name} argument is the name of the user
on whose behalf this call is being performed. If the network backend
cannot determine a user-name, it passes a \code{NULL} pointer for this
argument. No trust should be placed in the authenticity of this
user-name. The intent of this string is to provide more convenience
to the user. E.g., it could be used as the default-user name in
subsequent authentication calls.
In the reply, \code{status} indicates the completion status. If the
value is anything other than \code{SANE\_STA\-TUS\_GOOD}, the
remainder of the reply has undefined values.\footnote{The sane network
daemon should be careful not to leak information in the undefined
portion of the reply.} The \code{version\_code} argument returns the
SANE version-code that the network daemon supports. See the comments
in the previous paragraph on the meaning of the build-revision in this
version code.
\subsection{\code{\defn{SANE\_NET\_GET\_DEVICES}}}
RPC Code: 1
This RPC is used to obtain the list of devices accessible by the SANE
daemon.
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{void} & \code{SANE\_Word status} \\
& \code{SANE\_Device ***device\_list} \\
\end{tabular}
\end{center}
There are no arguments in the request for this call.
In the reply, \code{status} indicates the completion status. If the
value is anything other than \code{SANE\_STA\-TUS\_GOOD}, the
remainder of the reply has undefined values. The \code{device\_list}
argument is a pointer to a \code{NULL}-terminated array of
\code{SANE\_Device} pointers.
\subsection{\code{\defn{SANE\_NET\_OPEN}}}
RPC Code: 2
This RPC is used to open a connection to a remote SANE device.
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{SANE\_String device\_name} & \code{SANE\_Word status} \\
& \code{SANE\_Word handle} \\
& \code{SANE\_String resource} \\
\end{tabular}
\end{center}
The \code{device\_name} argument specifies the name of the device to
open.
In the reply, \code{status} indicates the completion status. If the
value is anything other than \code{SANE\_STA\-TUS\_GOOD}, the
remainder of the reply has undefined values. The \code{handle}
argument specifies the device handle that uniquely identifies the
connection. The \code{resource} argument is used to request
authentication. If it has a non-\code{NULL} value, the network
backend should authenticate the specified resource and then retry this
operation (see Section~\ref{sec:authorization} for details on how to
authorize a resource).
\subsection{\code{\defn{SANE\_NET\_CLOSE}}}
RPC Code: 3
This RPC is used to close a connection to a remote SANE device.
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{SANE\_Word handle} & \code{SANE\_Word dummy} \\
\end{tabular}
\end{center}
The \code{handle} argument identifies the connection that should be
closed.
In the reply, the \code{dummy} argument is unused. Its purpose is to
ensure proper synchronization (without it, a net client would not be
able to determine when the RPC has completed).
\subsection{\code{\defn{SANE\_NET\_GET\_OPTION\_DESCRIPTORS}}}
RPC Code: 4
This RPC is used to obtain {\em all\/} the option descriptors for a
remote SANE device.
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{SANE\_Word handle} & \code{Option\_Descriptor\_Array odesc} \\
\end{tabular}
\end{center}
The \code{handle} argument identifies the remote device whose option
descriptors should be obtained.
In the reply, the \code{odesc} argument is used to return the array of
option descriptors. The option descriptor array has the following
structure:
\begin{quote}\index{Option\_Descriptor\_Array}
\begin{verbatim}
struct Option_Descriptor_Array
{
SANE_Word num_options;
SANE_Option_Descriptor **desc;
};
\end{verbatim}
\end{quote}
\subsection{\code{\defn{SANE\_NET\_CONTROL\_OPTION}}}
RPC Code: 5
This RPC is used to control (inquire, set, or set to automatic) a
specific option of a remote SANE device.
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{SANE\_Word handle} & \code{SANE\_Status status} \\
\code{SANE\_Word option} & \code{SANE\_Word info} \\
\code{SANE\_Word action} & \code{SANE\_Word value\_type} \\
\code{SANE\_Word value\_type} & \code{SANE\_Word value\_size} \\
\code{SANE\_Word value\_size} & \code{void *value} \\
\code{void *value} & \code{SANE\_String *resource} \\
\end{tabular}
\end{center}
The \code{handle} argument identifies the remote device whose option
should be controlled. Argument \code{option} is the number (index) of
the option that should be controlled. Argument \code{action}
specifies what action should be taken (get, set, or set automatic).
Argument \code{value\_type} specifies the type of the option value
(must be one of \code{SANE\_TYPE\_BOOL}, \code{SANE\_TYPE\_INT},
\code{SANE\_TYPE\_FIXED}, \code{SANE\_TYPE\_STR\-ING},
\code{SANE\_TYPE\_BUTTON}). Argument \code{value\_size} specifies
the size of the option value in number of bytes (see
Section~\ref{sec:valuesize} for the precise meaning of this value).
Finally, argument \code{value} is a pointer to the option value. It
must be a writeable area that is at least \code{value\_size} bytes
large. (Note that this area must be writable even if the action is to
set the option value. This is because the backend may not be able to
set the exact option value, in which case the option value is used to
return the next best value that the backend has chosen.)
In the reply, argument \code{resource} is set to the name of the
resource that must be authorized before this call can be retried. If
this value is non-\code{NULL}, all other arguments have undefined
values (see Section~\ref{sec:authorization} for details on how to
authorize a resource). Argument \code{status} indicates the
completion status. If the value is anything other than
\code{SANE\_STA\-TUS\_GOOD}, the remainder of the reply has undefined
values. The \code{info} argument returns the information on how well
the backend was able to satisfy the request. For details, see the
description of the corresponding argument in
Section~\ref{sec:control}. Arguments \code{value\_type} and
\code{value\_size} have the same values as the arguments by the same
name in corresponding request. The values are repeated here to ensure
that both the request and the reply are self-contained (i.e., they can
be encoded and decoded independently). Argument \code{value} is holds
the value of the option that has become effective as a result of this
RPC.
\subsection{\code{\defn{SANE\_NET\_GET\_PARAMETERS}}}
RPC Code: 6
This RPC is used to obtain the scan parameters of a remote SANE
device.
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{SANE\_Word handle} & \code{SANE\_Status status} \\
& \code{SANE\_Parameters params} \\
\end{tabular}
\end{center}
The \code{handle} argument identifies the connection to the remote
device whose scan parameters should be returned.
In the reply, \code{status} indicates the completion status. If the
value is anything other than \code{SANE\_STA\-TUS\_GOOD}, the
remainder of the reply has undefined values. The argument
\code{params} is used to return the scan parameters.
\subsection{\code{\defn{SANE\_NET\_START}}}
RPC Code: 7
This RPC is used to start image acquisition (scanning).
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{SANE\_Word handle} & \code{SANE\_Status status} \\
& \code{SANE\_Word port} \\
& \code{SANE\_Word byte\_order} \\
& \code{SANE\_String resource} \\
\end{tabular}
\end{center}
The \code{handle} argument identifies the connection to the remote
device from which the image should be acquired.
In the reply, argument \code{resource} is set to the name of the
resource that must be authorized before this call can be retried. If
this value is non-\code{NULL}, all other arguments have undefined
values (see Section~\ref{sec:authorization} for details on how to
authorize a resource). Argument, \code{status} indicates the
completion status. If the value is anything other than
\code{SANE\_STA\-TUS\_GOOD}, the remainder of the reply has
undefined values. The argument \code{port} returns the port number
from which the image data will be available. To read the image data,
a network client must connect to the remote host at the indicated port
number. Through this port, the image data is transmitted as a
sequence of data records. Each record starts with the data length in
bytes. The data length is transmitted as a sequence of four bytes.
These bytes should be interpreted as an unsigned integer in big-endian
format. The four length bytes are followed by the number of data
bytes indicated by the length. Except for byte-order, the data is in
the same format as defined for \code{sane\_read()}. Since some
records may contain no data at all, a length value of zero is
perfectly valid. The special length value of \code{0xffffffff} is
used to indicate the end of the data stream. That is, after receiving
a record length of \code{0xffffffff}, the network client should close
the data connection and stop reading data.
Argument \code{byte\_order} specifies the byte-order of the image
data. A value of 0x1234 indicates little-endian format, a value of
0x4321 indicates big-endian format. All other values are presently
undefined and reserved for future enhancements of this protocol. The
intent is that a network server sends data in its own byte-order and
the client is responsible for adjusting the byte-order, if necessary.
This approach causes no unnecessary overheads in the case where the
server and client byte-order match and puts the extra burden on the
client side when there is a byte-order mismatch. Putting the burden
on the client-side improves the scalability properties of this
protocol.
\subsection{\code{\defn{SANE\_NET\_CANCEL}}}
RPC Code: 8
This RPC is used to cancel the current operation of a remote SANE
device.
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{SANE\_Word handle} & \code{SANE\_Word dummy} \\
\end{tabular}
\end{center}
The \code{handle} argument identifies the connection whose operation
should be cancelled.
In the reply, the \code{dummy} argument is unused. Its purpose is to
ensure proper synchronization (without it, a net client would not be
able to determine when the RPC has completed).
\subsection{\code{\defn{SANE\_NET\_AUTHORIZE}}}\label{sec:authorization}
\index{network authorization}
RPC Code: 9
This RPC is used to pass authorization data from the net client to the
net server.
\begin{center}
\begin{tabular}{ll}
{\bf request:} & {\bf reply:} \\
\code{SANE\_String resource} & \code{SANE\_Word dummy} \\
\code{SANE\_String username} & \\
\code{SANE\_String password} & \\
\end{tabular}
\end{center}
The \code{resource} argument specifies the name of the resource to be
authorized. This argument should be set to the string returned in the
\code{resource} argument of the RPC reply that required this
authorization call. The \code{username} and \code{password} are the
name of the user that is accessing the resource and the password for
the specified resource/user pair.
Since the password is not encrypted during network transmission, it is
recommended to use the following extension:
If the server adds the string `\code{\$MD5\$}' to the resource-name followed
by a random string not longer then 128 bytes, the client may answer with the
MD5 digest of the concatenation of the password and the random string. To
differentiate between the MD5 digest and a strange password the client prepends
the MD5 digest with the string `\code{\$MD5\$}'.
In the reply, \code{dummy} is completely unused. Note that there is
no direct failure indication. This is unnecessary since a net client
will retry the RPC that resulted in the authorization request until
that call succeeds (or until the request is cancelled). The RPC that resulted
in the authorization request continues after the reply from the client and may
fail with \code{SANE\_STATUS\_ACCESS\_DENIED}.
\subsection{\code{\defn{SANE\_NET\_EXIT}}}
RPC Code: 10
This RPC is used to disconnect a net client from a net server. There
are no request or reply arguments in this call. As a result of this
call, the connection between the client and the server that was
established by the \code{SANE\_NET\_INIT} call will be closed.
% Local Variables:
% mode: latex
% TeX-master: "sane.tex"
% End:

Plik diff jest za duży Load Diff