tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bumping up routing socket's RTM_VERSION from 3 to 4



In article <F23D0EFC-9520-461E-9D3F-12351B39C7A7%3am-software.com@localhost>,
Matt Thomas  <matt%3am-software.com@localhost> wrote:
>
>One of the problem with the current protocol used by the routing socket
>(and thusly by sysctl) is that it's not 64bit clean.  That means program
>under COMPAT_NETBSD32 can't use it and things like ifconfig/route fail.
>
>While a netbsd32 shim could be written, it wouldn't be easy.  It seemed
>to me that it would wiser to spend that time and effort to make the
>routing socket protocol so that it only uses fixed sized types. 
>
>With the changes in http://www.netbsd.org/~matt/rtm4-diffs.txt (which
>are for netbsd-5), ifconfig, route,
>and getifaddrs(3) all work in COMPAT_NETBSD32 as well as in the native
>NetBSD emulation.
>
>This change requires any program that uses the routing socket to be
>recompiled.  There can be no compatibility between RTM3 and RTM4, the
>structures are just too different.
>
>If you want to run a 32bit userland on a 64bit kernel, having a working
>ifconfig(8) and route(8) is not optional.  And this seems the best
>method to get there.

Instead of u_quad_t, I would use uint64_t everywhere. I would also
convert the remaining timevals/time_t's to timespecs, fix the rt_msghdr
structure to use fix sized types, etc. There are many other structs
in route.h that could use some type sanity.

christos





Home | Main Index | Thread Index | Old Index