From owner-freebsd-hackers Tue Feb 3 13:23:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA07161 for hackers-outgoing; Tue, 3 Feb 1998 13:23:44 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA07149 for ; Tue, 3 Feb 1998 13:23:32 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id NAA08396; Tue, 3 Feb 1998 13:23:01 -0800 (PST) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma008394; Tue Feb 3 13:22:44 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id NAA19083; Tue, 3 Feb 1998 13:22:44 -0800 (PST) From: Archie Cobbs Message-Id: <199802032122.NAA19083@bubba.whistle.com> Subject: Re: Loadable line disciplines In-Reply-To: <199802010359.UAA04677@usr02.primenet.com> from Terry Lambert at "Feb 1, 98 03:59:32 am" To: terry@whistle.com (Terry Lambert) Date: Tue, 3 Feb 1998 13:22:44 -0800 (PST) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" [... 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