[sane-devel] IPv6 patch for saned and net backend

Julien BLACHE jb@jblache.org
Sat, 22 Mar 2003 22:19:01 +0100


Henning Meier-Geinitz <henning@meier-geinitz.de> wrote:

Hi,

I updated the patch, new version at
<http://people.debian.org/~jblache/sane-IPv6-20030322.patch> (50 KB)

Fixes :
 - IN6_* macros : the macros used on Linux are now defined as
   SANE_IN6_*, and used in the code
 - improper usage of getnameinfo fixed, wrt length of the sockaddr
   (thanks solaris, linux didn't barf on this)
 - obvious, non-critical bug in check_host, where the wrong sockaddr
   was used, resulting in a useless, misleading output
 - got rid of sockaddr_storage in check_host, it's not needed

[use interdiff (from patchutils) between the two patches for a summary]

>> Ok, this is related to the IN6_* macros. Definitely need something
>> better than these, it seems.
>
> By the way: On FreeBSD (and the other platforms I reported), these are
> errors (not warnings), too.

Oh, OK. I misread your last mail, then.

[IN6_* macros being defined differently on !Linux]

> So I guess we need a special test. Or just undef the system macros.

I've renamed the macros to SANE_IN6_*, I find this a better solution
than #undefining the system macros ; it could be misleading for
someone reading the code with the macros definitions in mind. At least
with SANE_IN6_* it's clear the macros aren't the ones provided by the
system.

> By the way: For shell access to FreeBSD, OpenBSD, NetBSD, HPUX, Tru64,
> OpenVMS (and several Linux distributions) on several platforms (Alpha,
> Itanium, PA-RISC, x86) see http://testdrive.hp.com/ .

IIRC it's slow and access via ssh isn't possible.

JB.

-- 
Julien BLACHE                                   <http://www.jblache.org> 
<jb@jblache.org>