Subject: Re: sysctl function and ROUNDUP kernel bug
To: David Waitzman <djw@BBNPLANET.COM>
From: None <Chris_G_Demetriou@NIAGARA.NECTAR.CS.CMU.EDU>
List: port-alpha
Date: 01/30/1996 17:07:35
> I am trying to port gated to netbsd/alpha (sys.951220) and am having
> problems with reading the interface list using the sysctl function on
> variable CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST.  Dereferencing longs
> in the middle of the returned data causes bus errors.  It appears that
> the longs are embedded in structures that are on 4 byte but not 8 byte
> alignment.  

could you provide some sample code that demonstrates this?  I'd like
to replicate the problem before i fix it.  8-)


> Can anyone suggest if changing ROUNDUP is the right thing to do?

It might be; i'm running a test kernel with that change, now...
It seems to work OK, but i dunno if i have any code that actually
tests that code path.


> I also note that the man pages are less than helpful.  sysctl(3) says
> to look at route(4) for information on the above variable.  route(4)
> doesn't mention the variable.  It does mention the getkerninfo(2)
> system call which doesn't exist anymore.  sysctl(3) should also
> mention the undocumented system call __sysctl(2).

these questions are more appropriate for current-users@netbsd.org, and
i've replied to them there.


chris