xref: /csrg-svn/sys/kern/tty_conf.c (revision 29108)
123389Smckusick /*
2*29108Smckusick  * 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*29108Smckusick  *	@(#)tty_conf.c	7.1 (Berkeley) 06/05/86
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 
228553Sroot #include "bk.h"
238553Sroot #if NBK > 0
248553Sroot int	bkopen(),bkclose(),bkread(),bkinput(),bkioctl();
258553Sroot #endif
268553Sroot 
278553Sroot #include "tb.h"
288553Sroot #if NTB > 0
298553Sroot int	tbopen(),tbclose(),tbread(),tbinput(),tbioctl();
308553Sroot #endif
3126123Skarels #include "sl.h"
3226123Skarels #if NSL > 0
3326123Skarels int	slopen(),slclose(),slinput(),sltioctl(),slstart();
3426123Skarels #endif
358553Sroot 
3626123Skarels 
378553Sroot struct	linesw linesw[] =
388553Sroot {
3926123Skarels 	ttyopen, ttylclose, ttread, ttwrite, nullioctl,	/* 0- OTTYDISC */
4025391Skarels 	ttyinput, nodev, nulldev, ttstart, ttymodem,
418553Sroot #if NBK > 0
4226123Skarels 	bkopen, bkclose, bkread, ttwrite, bkioctl,	/* 1- NETLDISC */
4325391Skarels 	bkinput, nodev, nulldev, ttstart, nullmodem,
448553Sroot #else
458553Sroot 	nodev, nodev, nodev, nodev, nodev,
468553Sroot 	nodev, nodev, nodev, nodev, nodev,
478553Sroot #endif
4826123Skarels 	ttyopen, ttylclose, ttread, ttwrite, nullioctl,	/* 2- NTTYDISC */
4925391Skarels 	ttyinput, nodev, nulldev, ttstart, ttymodem,
508553Sroot #if NTB > 0
518553Sroot 	tbopen, tbclose, tbread, nodev, tbioctl,
5226123Skarels 	tbinput, nodev, nulldev, ttstart, nullmodem,	/* 3- TABLDISC */
538553Sroot #else
548553Sroot 	nodev, nodev, nodev, nodev, nodev,
558553Sroot 	nodev, nodev, nodev, nodev, nodev,
568553Sroot #endif
5726123Skarels #if NSL > 0
5826123Skarels 	slopen, slclose, nodev, nodev, sltioctl,
5926123Skarels 	slinput, nodev, nulldev, slstart, nulldev,	/* 4- SLIPDISC */
6026123Skarels #else
6126123Skarels 	nodev, nodev, nodev, nodev, nodev,
6226123Skarels 	nodev, nodev, nodev, nodev, nodev,
6326123Skarels #endif
648553Sroot };
658553Sroot 
668562Sroot int	nldisp = sizeof (linesw) / sizeof (linesw[0]);
6712753Ssam 
6812753Ssam /*
6912753Ssam  * Do nothing specific version of line
7012753Ssam  * discipline specific ioctl command.
7112753Ssam  */
7212753Ssam /*ARGSUSED*/
7312753Ssam nullioctl(tp, cmd, data, flags)
7412753Ssam 	struct tty *tp;
7512753Ssam 	char *data;
7612753Ssam 	int flags;
7712753Ssam {
7812753Ssam 
7912753Ssam #ifdef lint
8012753Ssam 	tp = tp; data = data; flags = flags;
8112753Ssam #endif
8212753Ssam 	return (-1);
8312753Ssam }
84