[sane-devel] What's local_only and what's not?

Johannes Meixner jsmeix at suse.de
Wed Nov 13 08:48:58 GMT 2019


Hello,

On Nov 12 18:06 Olaf Meeuwissen wrote (excerpt):
>
> #130: https://gitlab.com/sane-project/backends/issues/130
> #141: https://gitlab.com/sane-project/backends/issues/141

I agree with the initial reporters that the usually expected
meaning of 'local' is in particular 'not via network'.

Therefore the special case that a scanner with a network interface
that is directly connected by a network cable to a dedicated
network interface on the computer where SANE runs
is not a local scanner regardless that the scanner is directly
attached with a cable to the computer where SANE runs.


> Discussing what `sane_get_devices()` should be considered `local_only`,
> we are no longer sure what is and is not local :-o
...
>> FWIW, the SANE Standard, in section 4.3.3 sane_get_devices, has the
>> following to say:
...
>>  ... If argument
>>  `local_only` is true, only local devices are returned (devices
>>  directly attached to the machine that SANE is running on).

I think the word 'attached' has the implicit meaning that
a connection method is used where usually a cable is used
and not only electromagnetic waves like for Bluetooth
or any other connection method that is usually wireless.

Therefore the special case that a USB cable is replaced
with a pair of USB-thingies that replace the USB cable with
a wireless connection is still 'directly attached'.


I think the terms 'local' and 'directly attached' are
technically vague and should be replaced with technically
more precise terms.

In this case I think the connection type is what should make
the difference so that the sane_get_devices() documentation
should be more explanatory and more precise for example like:
------------------------------------------------------------------
If argument 'local_only' is true, only local devices are returned.

Local devices are those that are directly attached to the machine
that SANE is running on.

Directly attached means that a connection method is used
where usually a direct cable connection is used and
that is in general not a network connection.

The following connection methods are 'directly attached':

USB
parallel port
SCSI

All other connection methods are not 'directly attached'.

Accordingly if argument 'local_only' is true, only devices are
returned that are connected via USB or parallel port or SCSI.
------------------------------------------------------------------
Of course that could be simplified to:
------------------------------------------------------------------
If argument 'local_only' is true, only devices are returned
that are connected to the machine that SANE is running on
via USB or parallel port or SCSI.
------------------------------------------------------------------
But then is does no longer explain the reasoning behind
so things may again break apart when a new connection method
gets supported by SANE (e.g. Tap-proof Wired Bluetooth ;-)
Aren't there scanners/AIOs for Mac that use Thunderbolt?


FWIW,
cf. https://en.opensuse.org/YaST_Printer
that reads (excerpt):
------------------------------------------------------------------
There is a difference between "local/remote queue"
and "local/remote printer":

"Local queue" means a print queue which is configured on the
local computer (strictly speaking the computer where the YaST
printer module runs) which is usually the computer where the
user sits in front of.

"Remote queue" means a print queue which exists on whatever
computer in the network or on whatever network printer.


"Local printer" means a printer device which is directly connected
to the local computer (usually a USB printer).

"Remote printer" means a printer device which is not directly
connected to the local computer (usually a printer with a
built-in network interface). 
------------------------------------------------------------------

Accordingly a printer with a built-in network interface that is
directly connected by a network cable to a dedicated network
interface on the computer is not a local printer and
a USB printer where the usual USB cable is replaced by
whatever wireless technique (that may even reach out
into the next building) is still a local printer.


Kind Regards
Johannes Meixner
-- 
SUSE Software Solutions Germany GmbH
(HRB 36809, AG Nuernberg) GF: Felix Imendoerffer




More information about the sane-devel mailing list