Subject: Re: Use of sun_len in AF_UNIX socket addresses
To: Martin Husemann <martin@duskware.de>
From: SODA Noriyuki <soda@sra.co.jp>
List: tech-net
Date: 10/11/2006 16:55:38
>>>>> On Wed, 11 Oct 2006 09:35:23 +0200,
      Martin Husemann <martin@duskware.de> said:

>> That's practically impossible, at least for third party packages,
>> because only 4.4BSD derived OSes have the sun_len member, and Solaris,
>> HP-UX and Linux don't have the sun_len member.
>> (Even 4.3BSD-tahoe didn't have it, either.)

> Should we consider removing it then?

IMHO, we should leave the sun_len member as is (from userland point of
view, I mean), to not create yet another variant of 4.4BSD,
unless most of other BSDs agree with removing the member.

> We could change the kernel then to consistently use a new version of
> SUN_LEN() that checks for this and does the right thing.

We cannot change the definition of SUN_LEN(), because the macro is
already used by many applications to set the sun_len member. ;-)
(Try http://www.google.com/codesearch?q=SUN_LEN&btnG=Search+Code,
 e.g. http://cvsweb.netbsd.org/bsdweb.cgi/src/dist/bind/lib/irs/Attic/irp.c?rev=1.1.8.2&content-type=text/x-cvsweb-markup
)

If you want such macro for the kernel, new macro name is necessary.
-- 
soda