summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2000-06-20 04:51:55 +0000
committerJason Wright <jason@cvs.openbsd.org>2000-06-20 04:51:55 +0000
commit1ea93d1774a809aa8a417e08ca96e4400a125eb9 (patch)
tree4eb9eb02274089d05f9c5768411471e7dcba6568 /usr.sbin/tcpdump
parentc2e843410915309e5a222fadd335c5b8496457e1 (diff)
more info for pppoe strings
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/print-ppp.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/tcpdump/print-ppp.c b/usr.sbin/tcpdump/print-ppp.c
index f94904ee26f..4fb6cf55552 100644
--- a/usr.sbin/tcpdump/print-ppp.c
+++ b/usr.sbin/tcpdump/print-ppp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ppp.c,v 1.10 2000/02/18 14:39:35 jason Exp $ */
+/* $OpenBSD: print-ppp.c,v 1.11 2000/06/20 04:51:54 jason Exp $ */
/*
* Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ppp.c,v 1.10 2000/02/18 14:39:35 jason Exp $ (LBL)";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ppp.c,v 1.11 2000/06/20 04:51:54 jason Exp $ (LBL)";
#endif
#ifdef PPP
@@ -677,9 +677,12 @@ pppoe_if_print(ethertype, p, length, caplen)
printf(", length %u", t_len);
if (t_len) {
- printf(", value %02x", p[0]);
- for (t_type = 1; t_type < t_len; t_type++)
- printf(":%02x", p[t_type]);
+ for (t_type = 0; t_type < t_len; t_type++) {
+ if (isprint(p[t_type]))
+ printf("%c", p[t_type]);
+ else
+ printf("\\%03o", p[t_type]);
+ }
}
pppoe_len -= t_len;
p += t_len;