On Friday 20 October 2006 14:48, you wrote:
>       Hello again,

Hi,

> For consistency with the current getaddrinfo and
> setsockopt usage, I think the preference flags ought
> to be an "int" rather than an "uin32_t", 

What should we be consistent with? I don't understand 
how that would be more consistent...

A flag set is really no more than a bitstring, each 
bits encoding one flag, I don't see how that can be 
signed... Or did you meant it should be an uint rather 
that uint32_t?

> and that resetting the socket option to system
> default should be achieved by passing "-1" as the
> socket option value, rather than using getsockopt()
> before setsockopt().

I don't think we discussed that already on the ML. 

What we discussed however is to restore system default 
by passing the value zero, and the draft does not use 
that method because it is problematic; quoting Erik:

> The issue is that we want the semantics of a 
> setsockopt that doesn't include any of a X and a 
> not-X pair not to affect the X-related setting. For 
> instance, a setsockopt that only specifies Y (or Y|
> not-Z) shouldn't affect X. With that approach the 
> logical effect of a setsockopt with no flags set 
> (zero) must be a no-op. Thus it would be very odd to 
> define that no flags set (i.e. zero) has some other 
> semantics.        

Now if I consider your proposal of passing -1 as a 
method to restore system defaults, that would mean 
that all bits in the flags set bitstring are set to 1, 
i.e. all possible flags are set. 

I don't think it is semantically clean to affect a 
"restore system default" semantic to a flag set with 
all possible flags set. Therefore it would probably be 
required to reserve that semantic to the sign bit, and 
don't use it for encoding any address preference flag. 

IMHO it's not simpler that what we have today, but 
perhaps I'm missing something.

Best,

--julien

--------------------------------------------------------------------
IETF IPv6 working group mailing list
ipv6@ietf.org
Administrative Requests: https://www1.ietf.org/mailman/listinfo/ipv6
--------------------------------------------------------------------

Reply via email to