svn commit: r196797 - in head: sys/net sys/netinet usr.bin/netstat

Bruce Simpson bms at incunabulum.net
Sat Sep 5 00:05:04 UTC 2009


Robert Watson wrote:
> For sysctls, explicit versioning doesn't help too much -- what I've 
> been pondering for another structure was including spares and having a 
> capabilities field in the structure where flags are set when fields 
> are known by the kernel.  That way userspace can tell if the kernel 
> knows about the field it cares about and therefore whether they're 
> worth looking at.

One thing that Thrift did was to explicitly all number fields in their 
implementation of RPC. This is useful, because if anything changes over 
time, implementations can be updated to keep track of that.

Whilst I agree that it's unlikely 'struct arpstat' would change, if it 
did, it would be great to have a length field, at a minimum, in front. 
sysctl can determine size at runtime, however, kmem interfaces cannot. 
That's the only real reason why I'd nudge about it. :-)

For igmpstat, at least, the SSM drop adds a LOT of state to the network 
stack which wasn't there before, so having an explicit version field is 
warranted for backwards compatibility (and this is something Robert 
chewed me out about many months ago). Much respect, big yo'self up yo...



More information about the svn-src-head mailing list