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 17:06:13
>>>>> On Wed, 11 Oct 2006 10:01:54 +0200,
Martin Husemann <martin@duskware.de> said:
>> If you want such macro for the kernel, new macro name is necessary.
> Yes, that was my intention - the question is: can we rely on sun_len be
> either zero intialized or correctly set to the path len?
Do you mean userland point of view?
If so, the answer is no.
Currently we are not using the value of sa_len provided by the
userland, but using the 3rd argument (namelen) of bind(2) and
connect(2), aren't we (as you see in "sa->sa_len = buflen" in
sockargs(9)))?
We should keep that code, shouldn't we?
--
soda