support for PPP_IPV6.
This commit is contained in:
parent
ea6e86754f
commit
3ebb62ecc7
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue