summaryrefslogtreecommitdiff
path: root/lib/libpcap/scanner.l
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2007-01-02 18:31:22 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2007-01-02 18:31:22 +0000
commit7355916064bc8f0d820e4d8adeaa4ad3181d5a8f (patch)
treeec4e245ea655beb0623ef7c46e92280ab25839ba /lib/libpcap/scanner.l
parente4dd67e23b287074f915425c4632e4bfbc4ae009 (diff)
define bpf filters to match address and header fields in IEEE 802.11
wlan frames (DLT_IEEE802_11 and DLT_IEEE802_11_RADIO linktypes). see tcpdump(8) for details. "Works for me" claudio@ ok jmc@ deraadt@
Diffstat (limited to 'lib/libpcap/scanner.l')
-rw-r--r--lib/libpcap/scanner.l13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/libpcap/scanner.l b/lib/libpcap/scanner.l
index 6473b655f03..6aa93c19c0a 100644
--- a/lib/libpcap/scanner.l
+++ b/lib/libpcap/scanner.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: scanner.l,v 1.18 2006/04/18 18:17:52 otto Exp $ */
+/* $OpenBSD: scanner.l,v 1.19 2007/01/02 18:31:21 reyk Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -24,7 +24,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /cvs/OpenBSD/src/lib/libpcap/scanner.l,v 1.18 2006/04/18 18:17:52 otto Exp $ (LBL)";
+ "@(#) $Header: /cvs/OpenBSD/src/lib/libpcap/scanner.l,v 1.19 2007/01/02 18:31:21 reyk Exp $ (LBL)";
#endif
#include <sys/types.h>
@@ -235,6 +235,15 @@ srnr|subrulenum return PF_SRNR;
reason return PF_REASON;
action return PF_ACTION;
+wlan return LINK;
+type return TYPE;
+subtype return SUBTYPE;
+direction|dir return DIR;
+address1|addr1 return ADDR1;
+address2|addr2 return ADDR2;
+address3|addr3 return ADDR3;
+address4|addr4 return ADDR4;
+
[ \n\t] ;
[+\-*/:\[\]!<>()&|=] return yytext[0];
">=" return GEQ;