In some email I received from Alfred Perlstein, sie wrote:
> * Darren Reed <[EMAIL PROTECTED]> [010416 13:37] wrote:
> >
> > What do people think about having a range of bits in oid_kind that are
> > not used by FreeBSD but are only to be used by ``private'' sysctl handlers?
> >
> > e.g.
> >
> > #define CTLFLAG_PRIVATE 0x000ffff0
> >
> > Do I need elaborate any further ?
>
> I think a half-paragraph explaining what this does would help. :)
>
> I'm assuming this allows someone to have thier own private numbered
> mib in the sysctl tree, my question is why are you using hardcoded
> numbers rather than names?
Uh, no.
The idea is so you can do this:
#define SYSCTL_IPF(parent, nbr, name, access, ptr, val, descr) \
SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|access, \
ptr, val, sysctl_ipf_int, "I", descr);
SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_tcpidletimeout, CTLFLAG_RW|CTL_PRIV,
&fr_tcpidletimeout, 0, "");
and have CTL_PRIV be a bit which sysctl_ipf_int understands and not
have to worry about the value of CTL_PRIV ever being afflicted with
double-use by a FreeBSD flag because CTL_PRIV is part of CTLFLAG_PRIVATE.
Darren
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message