summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
authorCan Erkin Acar <canacar@cvs.openbsd.org>2007-07-09 06:01:06 +0000
committerCan Erkin Acar <canacar@cvs.openbsd.org>2007-07-09 06:01:06 +0000
commit2fe91bab448dd7503b14ec319b12e55eb3291245 (patch)
treeb6900830c56422f8fd3ffdd442e84100f9ddaa9a /usr.sbin/tcpdump
parent6489a79ff514cbae05c01baf2d06bb1a3e9e35c9 (diff)
Handle IPv6 on PPP printer, from Stuart Henderson
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/print-ppp.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-ppp.c b/usr.sbin/tcpdump/print-ppp.c
index 743de314c87..11577c193b8 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.17 2007/06/04 15:10:12 henning Exp $ */
+/* $OpenBSD: print-ppp.c,v 1.18 2007/07/09 06:01:05 canacar 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.17 2007/06/04 15:10:12 henning Exp $ (LBL)";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-ppp.c,v 1.18 2007/07/09 06:01:05 canacar Exp $ (LBL)";
#endif
#ifdef PPP
@@ -77,6 +77,7 @@ static struct protonames protonames[] = {
{ PPP_PAP, "PAP" }, /* Password Authentication Protocol */
{ PPP_LQR, "LQR" }, /* Link Quality Report protocol */
{ PPP_CHAP, "CHAP" }, /* Cryptographic Handshake Auth. Proto */
+ { PPP_IPV6, "IPV6" }, /* Internet Protocol v6 */
};
/* LCP */
@@ -540,6 +541,10 @@ ppp_if_print(user, h, p)
case ETHERTYPE_IP:
ip_print((const u_char *)(p + PPP_HDRLEN), length);
break;
+ case PPP_IPV6:
+ case ETHERTYPE_IPV6:
+ ip6_print((const u_char *)(p + PPP_HDRLEN), length);
+ break;
case PPP_IPX:
case ETHERTYPE_IPX:
ipx_print((const u_char *)(p + PPP_HDRLEN), length);
@@ -660,6 +665,9 @@ ppp_ether_if_print(user, h, p)
case PPP_IP:
ip_print(p + 2, length - 2);
break;
+ case PPP_IPV6:
+ ip6_print(p + 2, length - 2);
+ break;
case PPP_IPX:
ipx_print(p + 2, length - 2);
}
@@ -829,6 +837,9 @@ pppoe_if_print(ethertype, p, length, caplen)
case PPP_IP:
ip_print(p + 2, length - 2);
break;
+ case PPP_IPV6:
+ ip6_print(p + 2, length - 2);
+ break;
case PPP_IPX:
ipx_print(p + 2, length - 2);
}