[sane-devel] Byte ordering

Ben Olden-Cooligan ben.cyanfish at gmail.com
Mon Jun 9 05:29:48 BST 2025


On Wed, Jun 4, 2025 at 9:02 AM Ralph Little <skelband at gmail.com> wrote:

> Hi,
> OK, I will draft something up for the standard.
>
> If there is anything else to update the standard with, perhaps people
> could let me know.
> Just to be clear, I am not changing the interface with this update, just
> adding come clarification, so if anybody feels that there is anything else
> unclear in the standard, they should possibly raise it now.
>

Something that would be nice (though perhaps a bigger ask): document how
network discovery (with Avahi/Zeroconf/Bonjour/mDNS) and TCP connection
works with the saned/net. The current version of the spec says "SANE does
not specify a specific transport protocol" but it would be nice if it
contained enough information to implement an actual alternative sane-net
client or server.

According to here, it looks like the mDNS service type is "_sane-port._tcp",
but I'm not sure about the rest.
https://gitlab.com/sane-project/backends/-/blob/master/frontend/saned.c#L171



> I will add address this on the weekend.
>
> Cheers,
> Ralph
>
> On Wed, Jun 4, 2025 at 8:57 AM m. allan noah <kitno455 at gmail.com> wrote:
>
>> Makes sense to me.
>>
>> On Wed, Jun 4, 2025 at 10:12 AM Ralph Little <skelband at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> On Tue, Jun 3, 2025 at 11:36 PM <sane-devel at symme.link> wrote:
>>>
>>>> On Tue, Jun 03, 2025 at 10:00:45PM -0700, Ralph Little wrote:
>>>> > On Tue, Jun 3, 2025 at 9:54 PM James Ring <sjr at jdns.org> wrote:
>>>> > > On Tue, Jun 3, 2025 at 9:46 PM Ralph Little <skelband at gmail.com>
>>>> wrote:
>>>> > >> Someone has asked the question about byte order in multi-byte
>>>> image data
>>>> > >> that we might get from a SANE backend.
>>>>
>>>> Hi, it's me, I had the question.
>>>>
>>>> > >> It is not enough to assume the local machine byte order since we
>>>> may get
>>>> > >> data through the net backend from a remote machine with a
>>>> different byte
>>>> > >> order.
>>>>
>>>> The `net` backend explicitly swaps to local machine byte order:
>>>>
>>>> https://gitlab.com/sane-project/backends/-/blob/master/backend/net.c?ref_type=heads#L2356-2362
>>>>
>>>> So, it does seem like the de facto standard is that backends produce
>>>> data in local machine byte order.
>>>>
>>>> (The protocol documentation reinforces this as a standard:
>>>>
>>>
>>> Agreed. Perhaps this is something we should add to the SANE API
>>> specification?
>>> Allan, do you concur?
>>>
>>> Cheers,
>>> Ralph
>>>
>>
>>
>> --
>> "well, I stand up next to a mountain- and I chop it down with the edge of
>> my hand"
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20250608/e85ee0df/attachment.htm>


More information about the sane-devel mailing list