diff options
Diffstat (limited to 'sys/net/ppp_tty.c')
-rw-r--r-- | sys/net/ppp_tty.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index be3ec82..ce05012 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -851,15 +851,14 @@ pppinput(c, tp) if ((tp->t_state & TS_CONNECTED) == 0) { if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: no carrier\n", sc->sc_if.if_unit); + if_printf(&sc->sc_if, "no carrier\n"); goto flush; } if (c & TTY_ERRORMASK) { /* framing error or overrun on this char - abort packet */ if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: line error %x\n", sc->sc_if.if_unit, - c & TTY_ERRORMASK); + if_printf(&sc->sc_if, "line error %x\n", c & TTY_ERRORMASK); goto flush; } @@ -915,8 +914,8 @@ pppinput(c, tp) sc->sc_flags |= SC_PKTLOST; /* note the dropped packet */ if ((sc->sc_flags & (SC_FLUSH | SC_ESCAPED)) == 0){ if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: bad fcs %x, pkt len %d\n", - sc->sc_if.if_unit, sc->sc_fcs, ilen); + if_printf(&sc->sc_if, "bad fcs %x, pkt len %d\n", + sc->sc_fcs, ilen); sc->sc_if.if_ierrors++; sc->sc_stats.ppp_ierrors++; } else @@ -928,7 +927,7 @@ pppinput(c, tp) if (ilen < PPP_HDRLEN + PPP_FCSLEN) { if (ilen) { if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: too short (%d)\n", sc->sc_if.if_unit, ilen); + if_printf(&sc->sc_if, "too short (%d)\n", ilen); s = spltty(); sc->sc_if.if_ierrors++; sc->sc_stats.ppp_ierrors++; @@ -1000,7 +999,7 @@ pppinput(c, tp) pppgetm(sc); if (sc->sc_m == NULL) { if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: no input mbufs!\n", sc->sc_if.if_unit); + if_printf(&sc->sc_if, "no input mbufs!\n"); goto flush; } } @@ -1013,8 +1012,8 @@ pppinput(c, tp) if (c != PPP_ALLSTATIONS) { if (sc->sc_flags & SC_REJ_COMP_AC) { if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: garbage received: 0x%x (need 0xFF)\n", - sc->sc_if.if_unit, c); + if_printf(&sc->sc_if, + "garbage received: 0x%x (need 0xFF)\n", c); goto flush; } *sc->sc_mp++ = PPP_ALLSTATIONS; @@ -1025,8 +1024,7 @@ pppinput(c, tp) } if (sc->sc_ilen == 1 && c != PPP_UI) { if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: missing UI (0x3), got 0x%x\n", - sc->sc_if.if_unit, c); + if_printf(&sc->sc_if, "missing UI (0x3), got 0x%x\n", c); goto flush; } if (sc->sc_ilen == 2 && (c & 1) == 1) { @@ -1037,15 +1035,15 @@ pppinput(c, tp) } if (sc->sc_ilen == 3 && (c & 1) == 0) { if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: bad protocol %x\n", sc->sc_if.if_unit, - (sc->sc_mp[-1] << 8) + c); + if_printf(&sc->sc_if, "bad protocol %x\n", + (sc->sc_mp[-1] << 8) + c); goto flush; } /* packet beyond configured mru? */ if (++sc->sc_ilen > sc->sc_mru + PPP_HDRLEN + PPP_FCSLEN) { if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: packet too big\n", sc->sc_if.if_unit); + if_printf(&sc->sc_if, "packet too big\n"); goto flush; } @@ -1056,7 +1054,7 @@ pppinput(c, tp) pppgetm(sc); if (m->m_next == NULL) { if (sc->sc_flags & SC_DEBUG) - printf("ppp%d: too few input mbufs!\n", sc->sc_if.if_unit); + if_printf(&sc->sc_if, "too few input mbufs!\n"); goto flush; } } |