summaryrefslogtreecommitdiff
path: root/lib/libpcap
diff options
context:
space:
mode:
authoritojun <itojun@NetBSD.org>1999-07-25 00:15:22 +0000
committeritojun <itojun@NetBSD.org>1999-07-25 00:15:22 +0000
commit3ebb62ecc76063c771bb2cf71a5e796d3ead833f (patch)
tree7e0e1f23cca535ba48c7c472a554baad4fdf3863 /lib/libpcap
parentea6e86754fa46e8f783991769b0b4e8bf60d17df (diff)
support for PPP_IPV6.
Diffstat (limited to 'lib/libpcap')
-rw-r--r--lib/libpcap/gencode.c16
-rw-r--r--lib/libpcap/ppp.h4
2 files changed, 16 insertions, 4 deletions
diff --git a/lib/libpcap/gencode.c b/lib/libpcap/gencode.c
index 8223719482f..3a407a9efde 100644
--- a/lib/libpcap/gencode.c
+++ b/lib/libpcap/gencode.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gencode.c,v 1.15 1999/07/05 20:04:50 mjacob Exp $ */
+/* $NetBSD: gencode.c,v 1.16 1999/07/25 00:15:22 itojun Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -26,7 +26,7 @@
static const char rcsid[] =
"@(#) Header: gencode.c,v 1.93 97/06/12 14:22:47 leres Exp (LBL)";
#else
-__RCSID("$NetBSD: gencode.c,v 1.15 1999/07/05 20:04:50 mjacob Exp $");
+__RCSID("$NetBSD: gencode.c,v 1.16 1999/07/25 00:15:22 itojun Exp $");
#endif
#endif
@@ -631,6 +631,10 @@ gen_linktype(proto)
case DLT_PPP:
if (proto == ETHERTYPE_IP)
proto = PPP_IP; /* XXX was 0x21 */
+#ifdef INET6
+ else if (proto == ETHERTYPE_IPV6)
+ proto = PPP_IPV6;
+#endif /* INET6 */
break;
case DLT_PPP_BSDOS:
@@ -644,6 +648,12 @@ gen_linktype(proto)
gen_or(b1, b0);
return b0;
+#ifdef INET6
+ case ETHERTYPE_IPV6:
+ proto = PPP_IPV6;
+ break;
+#endif /* INET6 */
+
case ETHERTYPE_DN:
proto = PPP_DECNET;
break;
@@ -663,7 +673,7 @@ gen_linktype(proto)
if (proto == ETHERTYPE_IP)
return (gen_cmp(0, BPF_W, (bpf_int32)htonl(AF_INET)));
#ifdef INET6
- if (proto == ETHERTYPE_IPV6)
+ else if (proto == ETHERTYPE_IPV6)
return (gen_cmp(0, BPF_W, (bpf_int32)htonl(AF_INET6)));
#endif /* INET6 */
else
diff --git a/lib/libpcap/ppp.h b/lib/libpcap/ppp.h
index bd407cbb520..a7020c61140 100644
--- a/lib/libpcap/ppp.h
+++ b/lib/libpcap/ppp.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ppp.h,v 1.1.1.1 1997/10/03 15:38:55 christos Exp $ */
+/* $NetBSD: ppp.h,v 1.2 1999/07/25 00:15:22 itojun Exp $ */
/* @(#) Header: ppp.h,v 1.7 95/05/04 17:52:46 mccanne Exp (LBL) */
/*
@@ -32,6 +32,7 @@
#define PPP_BRPDU 0x0031 /* Bridging PDU */
#define PPP_STII 0x0033 /* Stream Protocol (ST-II) */
#define PPP_VINES 0x0035 /* Banyan Vines */
+#define PPP_IPV6 0x0057 /* Internet Protocol Version 6 */
#define PPP_HELLO 0x0201 /* 802.1d Hello Packets */
#define PPP_LUXCOM 0x0231 /* Luxcom */
@@ -45,6 +46,7 @@
#define PPP_IPXCP 0x802b /* Novell IPX Control Protocol */
#define PPP_STIICP 0x8033 /* Strean Protocol Control Protocol */
#define PPP_VINESCP 0x8035 /* Banyan Vines Control Protocol */
+#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */
#define PPP_LCP 0xc021 /* Link Control Protocol */
#define PPP_PAP 0xc023 /* Password Authentication Protocol */