diff options
| author | itojun <itojun@NetBSD.org> | 1999-07-25 00:15:22 +0000 |
|---|---|---|
| committer | itojun <itojun@NetBSD.org> | 1999-07-25 00:15:22 +0000 |
| commit | 3ebb62ecc76063c771bb2cf71a5e796d3ead833f (patch) | |
| tree | 7e0e1f23cca535ba48c7c472a554baad4fdf3863 /lib/libpcap/gencode.c | |
| parent | ea6e86754fa46e8f783991769b0b4e8bf60d17df (diff) | |
support for PPP_IPV6.
Diffstat (limited to 'lib/libpcap/gencode.c')
| -rw-r--r-- | lib/libpcap/gencode.c | 16 |
1 files changed, 13 insertions, 3 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 |
