1 /* 2 * Copyright (c) 1982, 1986 Regents of the University of California. 3 * All rights reserved. The Berkeley software License Agreement 4 * specifies the terms and conditions for redistribution. 5 * 6 * @(#)tty_conf.c 7.3 (Berkeley) 10/18/88 7 */ 8 9 #include "param.h" 10 #include "systm.h" 11 #include "buf.h" 12 #include "ioctl.h" 13 #include "tty.h" 14 #include "conf.h" 15 16 int nodev(); 17 int nulldev(); 18 19 int ttyopen(),ttylclose(),ttread(),ttwrite(),nullioctl(),ttstart(); 20 int ttymodem(), nullmodem(), ttyinput(); 21 22 int ottyopen(), ottylclose(), ottread(), ottwrite(); 23 int ottyinput(), ottstart(), ottymodem(); 24 25 #include "bk.h" 26 #if NBK > 0 27 int bkopen(),bkclose(),bkread(),bkinput(),bkioctl(); 28 #endif 29 30 #include "tb.h" 31 #if NTB > 0 32 int tbopen(),tbclose(),tbread(),tbinput(),tbioctl(); 33 #endif 34 #include "sl.h" 35 #if NSL > 0 36 int slopen(),slclose(),slinput(),sltioctl(),slstart(); 37 #endif 38 39 40 struct linesw linesw[] = 41 { 42 ttyopen, ttylclose, ttread, ttwrite, nullioctl, 43 ttyinput, nodev, nulldev, ttstart, ttymodem, /* 0- termios */ 44 #if NBK > 0 45 bkopen, bkclose, bkread, ttwrite, bkioctl, 46 bkinput, nodev, nulldev, ttstart, nullmodem, /* 1- NETLDISC */ 47 #else 48 nodev, nodev, nodev, nodev, nodev, 49 nodev, nodev, nodev, nodev, nodev, 50 #endif 51 nodev, nodev, nodev, nodev, nodev, /* 2- defunct */ 52 nodev, nodev, nodev, nodev, nodev, 53 #if NTB > 0 54 tbopen, tbclose, tbread, nodev, tbioctl, 55 tbinput, nodev, nulldev, ttstart, nullmodem, /* 3- TABLDISC */ 56 #else 57 nodev, nodev, nodev, nodev, nodev, 58 nodev, nodev, nodev, nodev, nodev, 59 #endif 60 #if NSL > 0 61 slopen, slclose, nodev, nodev, sltioctl, 62 slinput, nodev, nulldev, slstart, nullmodem, /* 4- SLIPDISC */ 63 #else 64 nodev, nodev, nodev, nodev, nodev, 65 nodev, nodev, nodev, nodev, nodev, 66 #endif 67 }; 68 69 int nldisp = sizeof (linesw) / sizeof (linesw[0]); 70 71 /* 72 * Do nothing specific version of line 73 * discipline specific ioctl command. 74 */ 75 /*ARGSUSED*/ 76 nullioctl(tp, cmd, data, flags) 77 struct tty *tp; 78 char *data; 79 int flags; 80 { 81 82 #ifdef lint 83 tp = tp; data = data; flags = flags; 84 #endif 85 return (-1); 86 } 87