Hi Marcel & Samuel,

On 18 February 2011 22:05, Samuel Ortiz <sa...@linux.intel.com> wrote:
> Hi Marcel,
>
> On Fri, Feb 18, 2011 at 11:54:43AM -0800, Marcel Holtmann wrote:
>> Hi Samuel,
>>
>> > > +                 int32 Privacy [readonly]
>> > An int16 would have been just fine.
>> >
>> >
>> > > +                         Enable or disable IPv6 privacy extension
>> > > +                         that is described in RFC 4941. The value
>> > > +                         has only meaning if Method is set to "auto".
>> > > +
>> > > +                         Value <= 0 means that privacy extension is
>> > > +                         disabled and normal autoconf addresses are
>> > > +                         used.
>> > > +                         Value 1 means that privacy extension is
>> > > +                         enabled and system prefers to use public
>> > > +                         addresses over temporary addresses.
>> > > +                         Value >= 2 means that privacy extension is
>> > > +                         enabled and system prefers temporary addresses
>> > > +                         over public addresses.
>> > > +
>> > > +                         Default value is 1.
>> > Now that this is user configurable, the default value should just be 0.
>>
>> can we please do proper strings here and not some magic integer numbers
>> that are related to some kernel internal implementation.
> Yes, that's even better. So something like "disabled", "enabled" and
> "default".

When creating the patch I tried to invent a list of string that would
describe the number values in kernel, but I was not very successfull
so I just used numbers in this version (the numbers are easier to map
to the kernel anyway :)

What kind of mapping would do in your opinion?

One choice would be like this
0 = disabled
1 = default
2 = enabled

but that has the problem that the default is 1 instead of 0.

Also kernel documentation mentions that default is 0 (for most
devices) and -1 (for point-to-point devices). Should we somehow take
this into account in connman?


Regards,
Jukka
_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to