Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpcap support for PPP_IPV6.
details: https://anonhg.NetBSD.org/src/rev/7cbd77bc3029
branches: trunk
changeset: 474882:7cbd77bc3029
user: itojun <itojun%NetBSD.org@localhost>
date: Sun Jul 25 00:15:22 1999 +0000
description:
support for PPP_IPV6.
diffstat:
lib/libpcap/gencode.c | 16 +++++++++++++---
lib/libpcap/ppp.h | 4 +++-
2 files changed, 16 insertions(+), 4 deletions(-)
diffs (76 lines):
diff -r f8c90a0f3d20 -r 7cbd77bc3029 lib/libpcap/gencode.c
--- a/lib/libpcap/gencode.c Sun Jul 25 00:13:07 1999 +0000
+++ b/lib/libpcap/gencode.c Sun Jul 25 00:15:22 1999 +0000
@@ -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 @@
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_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 @@
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 -r f8c90a0f3d20 -r 7cbd77bc3029 lib/libpcap/ppp.h
--- a/lib/libpcap/ppp.h Sun Jul 25 00:13:07 1999 +0000
+++ b/lib/libpcap/ppp.h Sun Jul 25 00:15:22 1999 +0000
@@ -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 */
Home |
Main Index |
Thread Index |
Old Index