Date: Fri, 20 Feb 1998 09:39:06 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: mike@smith.net.au (Mike Smith) Cc: eivind@yes.no, hackers@FreeBSD.ORG Subject: Re: Adding sysctls Message-ID: <199802200939.CAA09238@usr05.primenet.com> In-Reply-To: <199802200856.AAA10235@dingo.cdrom.com> from "Mike Smith" at Feb 20, 98 00:56:57 am
next in thread | previous in thread | raw e-mail | index | archive | help
> SPX_HACK is an iBCS2 option IIRC. If that's the case, it should
> probably be kern.emulation.ibcs2.net.spx_hack (emulation should
> perhaps be abi, depending on preferences).
Mike is probably right about this particular option. But if you
are going on a rampage, perhaps my previous suggestion would be
a better approach for the rampaging options.
I still think that making the MIB agregation into a linker set
instead of using manifest values in sysctl.h would be a better
idea than what's there.
One real problem with the kern.abi... approach is that the way
the hierarchical relationship is defined means a recompilation of
sysctl:
=========================================================================
Index: sys/sysctl.h
===================================================================
RCS file: /b/cvstree/ncvs/src/sys/sys/sysctl.h,v
retrieving revision 1.57
diff -c -r1.57 sysctl.h
*** 1.57 1997/09/07 16:53:52
--- sysctl.h 1998/02/20 09:33:22
***************
*** 230,236 ****
#define KERN_DUMMY 31 /* unused */
#define KERN_PS_STRINGS 32 /* int: address of PS_STRINGS */
#define KERN_USRSTACK 33 /* int: address of USRSTACK */
! #define KERN_MAXID 34 /* number of valid kern ids */
#define CTL_KERN_NAMES { \
{ 0, 0 }, \
--- 230,237 ----
#define KERN_DUMMY 31 /* unused */
#define KERN_PS_STRINGS 32 /* int: address of PS_STRINGS */
#define KERN_USRSTACK 33 /* int: address of USRSTACK */
! #define KERN_ABI 34 /* node: anything related to ABI */
! #define KERN_MAXID 35 /* number of valid kern ids */
#define CTL_KERN_NAMES { \
{ 0, 0 }, \
***************
*** 267,272 ****
--- 268,274 ----
{ "dummy", CTLTYPE_INT }, \
{ "ps_strings", CTLTYPE_INT }, \
{ "usrstack", CTLTYPE_INT }, \
+ { "abi", CTLTYPE_NODE }, \
}
/*
=========================================================================
This is just a start, since you would have to define the subelement
relationship (hint: look for where CTL_KERN_NAMES is referenced).
The best example in that genre is "kern.ipc..."; you should look at
/sys/kern/uipc_mbuf.c, and look for "max_protohdr" to see what I
mean about implied relationships.
Terry Lambert
terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802200939.CAA09238>
