On Tue, 2009-08-25 at 09:24 -0700, Russell Mitchell wrote:
> I know this thread is old, but It directly relates to my problem.
> I'm using ILL_START_WALK_ALL() in my driver, and it is now causing a
> kernel panic with S10 U5.  More specifically, my driver works fine with
> the base installation of S10 U5, but there is a patch (I'm not sure which
> one yet) that enables the failure.  I realize now that I shouldn't be
> using ILL_START_WALK_ALL now, but need help in figuring out the 'right'
> way to do it.  Currently, I'm doing the following:
> 
> ill_t *il;
> ip_stack_t *ipst;
> ill_walk_context_t ctx;
> 
> ipst= netstack_find_by_stackid(GLOBAL_NETSTACKID)->netstack_ip;
> 
> for (il=ILL_START_WALK_ALL( &ctx, ipst ); il!=NULL; il=ill_next( &ctx, il )) {

Yeah, that's using private implementation details of the ip module.

> 
> Can this be done using the ldi_xxx routines, and if so, how?

There is a Public API to do this described in netinfo(9F) and related
man pages (see net_lifgetnext(9F) for example).  This is assuming that
you want to enumerate IP interfaces, and not other things like
datalinks.

-Seb


_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to