Discussion:
Bumping up routing socket's RTM_VERSION from 3 to 4
(too old to reply)
Matt Thomas
2010-07-05 06:25:20 UTC
Permalink
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.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Christos Zoulas
2010-07-07 15:32:50 UTC
Permalink
Post by Matt Thomas
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




--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...