summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2004-05-21 05:40:38 +0000
committerBrad Smith <brad@cvs.openbsd.org>2004-05-21 05:40:38 +0000
commit96257ff6f7b7d8640dc8c29aed1d395db677a0b3 (patch)
treef98f7a858f278f62a3fe0e7efb7ee9d857e47040
parent979283625107601b0006e6dcaf431fe08b3719ad (diff)
add DLT_PPP_ETHER support
ok canacar@ From: Marc Huber <pppoe at pro-bono-publico dot de>
-rw-r--r--lib/libpcap/gencode.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libpcap/gencode.c b/lib/libpcap/gencode.c
index 786f6ad213b..ea35c73e627 100644
--- a/lib/libpcap/gencode.c
+++ b/lib/libpcap/gencode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gencode.c,v 1.21 2004/01/27 06:58:03 tedu Exp $ */
+/* $OpenBSD: gencode.c,v 1.22 2004/05/21 05:40:37 brad Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
@@ -571,6 +571,15 @@ init_linktype(type)
off_nl = 4;
return;
+ case DLT_PPP_ETHER:
+ /*
+ * This does not include the Ethernet header, and
+ * only covers session state.
+ */
+ off_linktype = 6;
+ off_nl = 8;
+ return;
+
case DLT_PPP_BSDOS:
off_linktype = 5;
off_nl = 24;
@@ -694,6 +703,7 @@ gen_linktype(proto)
return gen_false();
case DLT_PPP:
+ case DLT_PPP_ETHER:
if (proto == ETHERTYPE_IP)
proto = PPP_IP; /* XXX was 0x21 */
#ifdef INET6