X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=ultrix%2Fppp_tty.c;h=49f831647d09534dfc82a2581506dc6e5b8fd3dc;hp=38d643897751ef3860778d51254c73b406131ec8;hb=427e3d851c86e35655e14f1dfa9c831a8fab94d9;hpb=c5871dbfa014bb554c101e65150c48fc8ba80c7b diff --git a/ultrix/ppp_tty.c b/ultrix/ppp_tty.c index 38d6438..49f8316 100644 --- a/ultrix/ppp_tty.c +++ b/ultrix/ppp_tty.c @@ -2,20 +2,43 @@ * ppp_tty.c - Point-to-Point Protocol (PPP) driver for asynchronous * tty devices. * - * Copyright (c) 1989 Carnegie Mellon University. - * All rights reserved. + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by Carnegie Mellon University. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Drew D. Perkins * Carnegie Mellon University @@ -73,7 +96,7 @@ * Robert Olsson and Paul Mackerras. */ -/* $Id: ppp_tty.c,v 1.7 1996/07/01 01:24:28 paulus Exp $ */ +/* $Id: ppp_tty.c,v 1.9 2002/12/06 09:49:16 paulus Exp $ */ /* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */ /* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */ @@ -670,7 +693,7 @@ pppasyncstart(sc) /* * This gets called when a received packet is placed on - * the inq, at splsoftnet. + * the inq, at splnet. */ static void pppasyncctlp(sc) @@ -690,7 +713,7 @@ pppasyncctlp(sc) /* * Start output on async tty interface. If the transmit queue * has drained sufficiently, arrange for pppasyncstart to be - * called later at splsoftnet. + * called later at splnet. * Called at spltty or higher. */ int @@ -786,27 +809,20 @@ pppinput(c, tp) ++tk_nin; ++sc->sc_stats.ppp_ibytes; - if (c & TTY_FE) { - /* framing error or overrun on this char - abort packet */ - if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: bad char %x\n", sc->sc_if.if_unit, c); - goto flush; - } - c &= 0xff; /* * Handle software flow control of output. */ if (tp->t_iflag & IXON) { - if (c == tp->t_cc[VSTOP] && tp->t_cc[VSTOP] != _POSIX_VDISABLE) { + if (c == tp->t_cc[VSTOP] && tp->t_cc[VSTOP] != 0) { if ((tp->t_state & TS_TTSTOP) == 0) { tp->t_state |= TS_TTSTOP; (*cdevsw[major(tp->t_dev)].d_stop)(tp, 0); } return 0; } - if (c == tp->t_cc[VSTART] && tp->t_cc[VSTART] != _POSIX_VDISABLE) { + if (c == tp->t_cc[VSTART] && tp->t_cc[VSTART] != 0) { tp->t_state &= ~TS_TTSTOP; if (tp->t_oproc != NULL) (*tp->t_oproc)(tp);