Date: Sun, 24 Jan 1999 17:41:59 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: julian@whistle.com (Julian Elischer) Cc: wollman@khavrinen.lcs.mit.edu, mike@smith.net.au, current@FreeBSD.ORG Subject: Re: sysctl oids (was: Re: kvm question) Message-ID: <199901250141.RAA23396@bubba.whistle.com> In-Reply-To: <Pine.BSF.3.95.990124140935.6880C-100000@current1.whistle.com> from Julian Elischer at "Jan 24, 99 02:15:08 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer writes: > That is at least my opinion.. you may and do disagree. I guess you will > say that numbers are just as dynamic, etc.etc. well I just think that in > the REAL WORLD, as opposed to the theoretical world, names (which require > no co-ordination between authors), are a better choice than numbers, > which require some central naming authority. A "real world" example of this is the idea of dynamically registered tty line disciplines. Line disciplines are identified by hard-wired constant integers (sys/ttycom.h): #define TTYDISC 0 /* termios tty line discipline */ #define TABLDISC 3 /* tablet discipline */ #define SLIPDISC 4 /* serial IP discipline */ #define PPPDISC 5 /* PPP discipline */ A KLD can dynamically register a new line discipline. But guess what? There's no way for your user program to easily figure out what number it got. It will vary depending on what other line disciplines are registered. If instead line disciplines were identified by strings, like "tty", "ppp", "slip", etc. then this problem would be a lot easier. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901250141.RAA23396>
