tech-net archive

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

Re: routing socket rou(n)ding?

On Feb 18, 2012, at 3:57 PM, Mouse wrote:

>>> #define RT_ROUNDUP2(a, n)       ((a) > 0 ? (1 + (((a) - 1) | ((n) - 1))) : 
>>> (n))
>>> #define RT_ROUNDUP(a)           RT_ROUNDUP2((a), sizeof(uint64_t))
>> Those macros [were] changed for NetBSD-6 so that the routing messages
>> are identical for 32-bit and 64-bit kernels.
> the price of breaking (formerly) correct code dating from the
> days before the macros made it into the include files.
> This is ugly, on a par with the SCM_RIGHTS flag day.  A code author's
> choices are to forego backward compatability, forego forward
> compatability, or write two versions, one for old kernels and one for
> new.  ABI compatability is all very well, but there are at least a few
> of us out here who care about API compatability too.

And why do you think old binaries don't continue to work?  If you bothered
to look at the current sources, you'd see that there compat support for the
old routing socket.  Only newly compiled sources will use the new code.

Home | Main Index | Thread Index | Old Index