Subject: Re: sysctl: How to get softc address in a helper function?
To: None <tech-kern@NetBSD.org>
From: TAMURA Kent <kent@NetBSD.org>
List: tech-kern
Date: 10/25/2004 22:39:01
> >How to get softc address in a sysctl helper function?  I'm
> >trying to implement per-device-instance sysctl items (not
> >per-device-driver like ath and bge.)
> 
> pass the softc address to the createv call?

Thanks.  Your advice and ethfoo example pointed by Quentin use
the same way, and it worked for me, too.

> note that you don't need to track the mib number of you're not going
> to handle more than one type of request with the helper, and that you
> can use sysctl_data to hold the address of the softc.

Right.

If we need multiple items and need no softc-dependent operation,
we may use strcmp(node->sysctl_name, "...") :-)

-- 
TAMURA Kent <kent2004? at hauN.org> <kent at NetBSD.org>