xref: /csrg-svn/sys/kern/tty_conf.c (revision 35811)
123389Smckusick /*
229108Smckusick  * Copyright (c) 1982, 1986 Regents of the University of California.
323389Smckusick  * All rights reserved.  The Berkeley software License Agreement
423389Smckusick  * specifies the terms and conditions for redistribution.
523389Smckusick  *
6*35811Smarc  *	@(#)tty_conf.c	7.3 (Berkeley) 10/18/88
723389Smckusick  */
88553Sroot 
917096Sbloom #include "param.h"
1017096Sbloom #include "systm.h"
1117096Sbloom #include "buf.h"
1217575Sbloom #include "ioctl.h"
1317096Sbloom #include "tty.h"
1417096Sbloom #include "conf.h"
158553Sroot 
168553Sroot int	nodev();
178553Sroot int	nulldev();
188553Sroot 
1925391Skarels int	ttyopen(),ttylclose(),ttread(),ttwrite(),nullioctl(),ttstart();
2025391Skarels int	ttymodem(), nullmodem(), ttyinput();
218553Sroot 
22*35811Smarc int	ottyopen(), ottylclose(), ottread(), ottwrite();
23*35811Smarc int	ottyinput(), ottstart(), ottymodem();
24*35811Smarc 
258553Sroot #include "bk.h"
268553Sroot #if NBK > 0
278553Sroot int	bkopen(),bkclose(),bkread(),bkinput(),bkioctl();
288553Sroot #endif
298553Sroot 
308553Sroot #include "tb.h"
318553Sroot #if NTB > 0
328553Sroot int	tbopen(),tbclose(),tbread(),tbinput(),tbioctl();
338553Sroot #endif
3426123Skarels #include "sl.h"
3526123Skarels #if NSL > 0
3626123Skarels int	slopen(),slclose(),slinput(),sltioctl(),slstart();
3726123Skarels #endif
388553Sroot 
3926123Skarels 
408553Sroot struct	linesw linesw[] =
418553Sroot {
42*35811Smarc 	ttyopen, ttylclose, ttread, ttwrite, nullioctl,
43*35811Smarc 	ttyinput, nodev, nulldev, ttstart, ttymodem,	/* 0- termios */
448553Sroot #if NBK > 0
45*35811Smarc 	bkopen, bkclose, bkread, ttwrite, bkioctl,
46*35811Smarc 	bkinput, nodev, nulldev, ttstart, nullmodem,	/* 1- NETLDISC */
478553Sroot #else
488553Sroot 	nodev, nodev, nodev, nodev, nodev,
498553Sroot 	nodev, nodev, nodev, nodev, nodev,
508553Sroot #endif
51*35811Smarc 	nodev, nodev, nodev, nodev, nodev,		/* 2- defunct */
52*35811Smarc 	nodev, nodev, nodev, nodev, nodev,
538553Sroot #if NTB > 0
548553Sroot 	tbopen, tbclose, tbread, nodev, tbioctl,
5526123Skarels 	tbinput, nodev, nulldev, ttstart, nullmodem,	/* 3- TABLDISC */
568553Sroot #else
578553Sroot 	nodev, nodev, nodev, nodev, nodev,
588553Sroot 	nodev, nodev, nodev, nodev, nodev,
598553Sroot #endif
6026123Skarels #if NSL > 0
6126123Skarels 	slopen, slclose, nodev, nodev, sltioctl,
6234488Skarels 	slinput, nodev, nulldev, slstart, nullmodem,	/* 4- SLIPDISC */
6326123Skarels #else
6426123Skarels 	nodev, nodev, nodev, nodev, nodev,
6526123Skarels 	nodev, nodev, nodev, nodev, nodev,
6626123Skarels #endif
678553Sroot };
688553Sroot 
698562Sroot int	nldisp = sizeof (linesw) / sizeof (linesw[0]);
7012753Ssam 
7112753Ssam /*
7212753Ssam  * Do nothing specific version of line
7312753Ssam  * discipline specific ioctl command.
7412753Ssam  */
7512753Ssam /*ARGSUSED*/
7612753Ssam nullioctl(tp, cmd, data, flags)
7712753Ssam 	struct tty *tp;
7812753Ssam 	char *data;
7912753Ssam 	int flags;
8012753Ssam {
8112753Ssam 
8212753Ssam #ifdef lint
8312753Ssam 	tp = tp; data = data; flags = flags;
8412753Ssam #endif
8512753Ssam 	return (-1);
8612753Ssam }
87