Subject: Re: netstat(1) broken for some time now
To: Elad Efrat <elad@NetBSD.org>
From: Rui Paulo <email@example.com>
Date: 09/14/2006 21:04:22
On Sep 14, 2006, at 9:58 PM, Elad Efrat wrote:
> Rui Paulo wrote:
>> Ask Elad:
>> #ifdef notyet /* XXX elad */
>> printf("%6d %8ld ", (int)rtm->rtm_rmx.rmx_refcnt,
> There are several issues with this bit, aside the fact the variable
> names are just incorrect for the old behavior.
> First, these variables are just incorrect for the old usage. We should
> be using 'rt_refcnt' and 'rt_use'.
> Also, we previously would read the rtentry directly; now we don't. We
> don't pass anything that can be used as 'refcnt'. We need to add a
> variable for that in either 'rt_msghdr' or 'rt_metrics'.
> Then, we *do* pass something that can be used for the 'Use' field, but
> the types for 'rt_use' (u_long) and 'rtm_use' (int) differ.
> The code to solve it is really simple; I'm just not sure what would be
> the implications of adding a new variable in (one of) the struct(s) we
> pass and/or changing the type for one of the 'use' variables.
Just one more tiny note: if we change rt_metrics, rt_msghdr will also
change as it includes the former.
I'm okay with changing one of the structs and bumping the kernel
-- Rui Paulo