Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal dfilter-scanner.l Makefile.am dfilte
gram 1999/07/31 23:28:15 CDT
Modified files:
. Makefile.am dfilter-grammar.y dfilter.c
dfilter.h packet-eth.c packet-fddi.c
packet-ipx.c packet-tr.c proto.c proto.h
Added files:
. dfilter-scanner.l
Log:
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
Revision Changes Path
1.45 +2 -1 ethereal/Makefile.am
1.3 +141 -112 ethereal/dfilter-grammar.y
1.5 +54 -162 ethereal/dfilter.c
1.4 +7 -5 ethereal/dfilter.h
1.14 +1 -11 ethereal/packet-eth.c
1.16 +1 -13 ethereal/packet-fddi.c
1.25 +55 -35 ethereal/packet-ipx.c
1.18 +1 -12 ethereal/packet-tr.c
1.7 +12 -20 ethereal/proto.c
1.5 +2 -3 ethereal/proto.h