Date: Tue, 3 Feb 1998 13:22:44 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: terry@whistle.com (Terry Lambert) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Loadable line disciplines Message-ID: <199802032122.NAA19083@bubba.whistle.com> In-Reply-To: <199802010359.UAA04677@usr02.primenet.com> from Terry Lambert at "Feb 1, 98 03:59:32 am"
next in thread | previous in thread | raw e-mail | index | archive | help
[... thread moved from -current to -hackers ...] Terry Lambert writes: > I'd like to change the linesw[] structure a bit, as well as modify > the ldisc_register()/ldisc_deregister() mechanism a bit to make it > a bit more orthoganl. The idea is that existing line disciplines > will all use the registration interface, as well, and that you won't > be able to deregister a discipline while it is in use. It also > gets rid of the dependence on manifest constant values in conf.h > and ioctl_compat.h that must be added for each new discipline. Terry and I have talked about this.. it seems like a good idea to me. Ideally, in addition, ttycom.h would change from this: #define TTYDISC 0 /* termios tty line discipline */ #define TABLDISC 3 /* tablet discipline */ #define SLIPDISC 4 /* serial IP discipline */ #define PPPDISC 5 /* PPP discipline */ to this: #define TTYDISC "tty" /* termios tty line discipline */ #define TABLDISC "tablet" /* tablet discipline */ #define SLIPDISC "slip" /* serial IP discipline */ #define PPPDISC "ppp" /* PPP discipline */ This would be to solve the following problem: if you have a line discipline that is loadable (it registers using ldisc_register()) -- for example in an LKM -- how do you find out its "DISC" number (which can change across reboots)? If these numbers were replaced by unique strings identifying each line discicpline, the problem would go away. However, this would cause some serious backward incompatibility. Perhaps better is to add a parallel ioctl() to translate a string line discipline name into the corresponding "DISC" number. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802032122.NAA19083>