summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2010-06-26 16:47:08 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2010-06-26 16:47:08 +0000
commit6be3f3fc5395980de076d96fe6a0b49f2fafe4a7 (patch)
tree822ccb7fedb849c7389f7132a58ae28cf63b87b4 /lib
parent655a24356fe84ac3e110431aaaa1f8ba3deb6cf4 (diff)
remove support for the old pflog format, replaced in 2003
ok ryan theo & herr reyksminister
Diffstat (limited to 'lib')
-rw-r--r--lib/libpcap/gencode.c35
-rw-r--r--lib/libpcap/pcap.c3
2 files changed, 2 insertions, 36 deletions
diff --git a/lib/libpcap/gencode.c b/lib/libpcap/gencode.c
index 9a5297ffd5b..834590def50 100644
--- a/lib/libpcap/gencode.c
+++ b/lib/libpcap/gencode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gencode.c,v 1.32 2009/09/18 23:32:13 bluhm Exp $ */
+/* $OpenBSD: gencode.c,v 1.33 2010/06/26 16:47:07 henning Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
@@ -658,11 +658,6 @@ init_linktype(type)
off_nl = 12;
return;
- case DLT_OLD_PFLOG:
- off_linktype = 0;
- off_nl = 28;
- return;
-
case DLT_PFLOG:
off_linktype = 0;
/* XXX read from header? */
@@ -799,17 +794,6 @@ gen_linktype(proto)
else
return gen_false();
break;
- case DLT_OLD_PFLOG:
- if (proto == ETHERTYPE_IP)
- return (gen_cmp(0, BPF_W, (bpf_int32)AF_INET));
-#ifdef INET6
- else if (proto == ETHERTYPE_IPV6)
- return (gen_cmp(0, BPF_W, (bpf_int32)AF_INET6));
-#endif /* INET6 */
- else
- return gen_false();
- break;
-
case DLT_PFLOG:
if (proto == ETHERTYPE_IP)
return (gen_cmp(offsetof(struct pfloghdr, af), BPF_B,
@@ -2981,11 +2965,6 @@ gen_inbound(dir)
(bpf_int32)((dir == 0) ? PF_IN : PF_OUT));
break;
- case DLT_OLD_PFLOG:
- b0 = gen_cmp(offsetof(struct old_pfloghdr, dir), BPF_H,
- (bpf_int32)((dir == 0) ? PF_IN : PF_OUT));
- break;
-
default:
bpf_error("inbound/outbound not supported on linktype 0x%x",
linktype);
@@ -3006,9 +2985,6 @@ gen_pf_ifname(char *ifname)
if (linktype == DLT_PFLOG) {
len = sizeof(((struct pfloghdr *)0)->ifname);
off = offsetof(struct pfloghdr, ifname);
- } else if (linktype == DLT_OLD_PFLOG) {
- len = sizeof(((struct old_pfloghdr *)0)->ifname);
- off = offsetof(struct old_pfloghdr, ifname);
} else {
bpf_error("ifname not supported on linktype 0x%x", linktype);
/* NOTREACHED */
@@ -3053,9 +3029,6 @@ gen_pf_rnr(int rnr)
if (linktype == DLT_PFLOG) {
b0 = gen_cmp(offsetof(struct pfloghdr, rulenr), BPF_W,
(bpf_int32)rnr);
- } else if (linktype == DLT_OLD_PFLOG) {
- b0 = gen_cmp(offsetof(struct old_pfloghdr, rnr), BPF_H,
- (bpf_int32)rnr);
} else {
bpf_error("rnr not supported on linktype 0x%x", linktype);
/* NOTREACHED */
@@ -3090,9 +3063,6 @@ gen_pf_reason(int reason)
if (linktype == DLT_PFLOG) {
b0 = gen_cmp(offsetof(struct pfloghdr, reason), BPF_B,
(bpf_int32)reason);
- } else if (linktype == DLT_OLD_PFLOG) {
- b0 = gen_cmp(offsetof(struct old_pfloghdr, reason), BPF_H,
- (bpf_int32)reason);
} else {
bpf_error("reason not supported on linktype 0x%x", linktype);
/* NOTREACHED */
@@ -3110,9 +3080,6 @@ gen_pf_action(int action)
if (linktype == DLT_PFLOG) {
b0 = gen_cmp(offsetof(struct pfloghdr, action), BPF_B,
(bpf_int32)action);
- } else if (linktype == DLT_OLD_PFLOG) {
- b0 = gen_cmp(offsetof(struct old_pfloghdr, action), BPF_H,
- (bpf_int32)action);
} else {
bpf_error("action not supported on linktype 0x%x", linktype);
/* NOTREACHED */
diff --git a/lib/libpcap/pcap.c b/lib/libpcap/pcap.c
index 9bf613921c0..190c37305a9 100644
--- a/lib/libpcap/pcap.c
+++ b/lib/libpcap/pcap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcap.c,v 1.11 2007/09/02 15:19:18 deraadt Exp $ */
+/* $OpenBSD: pcap.c,v 1.12 2010/06/26 16:47:07 henning Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998
@@ -246,7 +246,6 @@ DLT_CHOICE(DLT_ENC, "IPSEC enc type (af header, spi, flags)"),
DLT_CHOICE(DLT_RAW, "raw IP"),
DLT_CHOICE(DLT_SLIP_BSDOS, "BSD/OS Serial Line IP"),
DLT_CHOICE(DLT_PPP_BSDOS, "BSD/OS Point-to-point Protocol"),
-DLT_CHOICE(DLT_OLD_PFLOG, "Packet filter logging, old (XXX remove?)"),
DLT_CHOICE(DLT_PFSYNC, "Packet filter state syncing"),
DLT_CHOICE(DLT_PPP_ETHER, "PPP over Ethernet; session only w/o ether header"),
DLT_CHOICE(DLT_IEEE802_11, "IEEE 802.11 wireless"),