From d3b63b723f6605c08198b4c8a78bedb14bdfd551 Mon Sep 17 00:00:00 2001 From: brian Date: Sat, 1 Aug 1998 01:02:12 +0000 Subject: Cosmetic: Diagnostic wording (Unknown -> Unexpected) --- usr.sbin/ppp/hdlc.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c index d6f113d..5a2152b 100644 --- a/usr.sbin/ppp/hdlc.c +++ b/usr.sbin/ppp/hdlc.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: hdlc.c,v 1.33 1998/06/16 19:40:37 brian Exp $ + * $Id: hdlc.c,v 1.34 1998/06/27 23:48:44 brian Exp $ * * TODO: */ @@ -375,6 +375,7 @@ hdlc_DecodePacket(struct bundle *bundle, u_short proto, struct mbuf * bp, { struct physical *p = link2physical(l); u_char *cp; + const char *type; log_Printf(LogDEBUG, "DecodePacket: proto = 0x%04x\n", proto); @@ -438,9 +439,18 @@ hdlc_DecodePacket(struct bundle *bundle, u_short proto, struct mbuf * bp, } /* Fall through */ default: - log_Printf(LogPHASE, "%s protocol 0x%04x (%s)\n", - proto == PROTO_MP ? "Unexpected" : "Unknown", - proto, hdlc_Protocol2Nam(proto)); + switch (proto) { + case PROTO_MP: + case PROTO_COMPD: + case PROTO_ICOMPD: + type = "Unexpected"; + break; + default: + type = "Unknown"; + break; + } + log_Printf(LogPHASE, "%s protocol 0x%04x (%s)\n", type, proto, + hdlc_Protocol2Nam(proto)); bp->offset -= 2; bp->cnt += 2; cp = MBUF_CTOP(bp); -- cgit v1.1