aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter
AgeCommit message (Collapse)AuthorFilesLines
2003-08-27Add a "contains" operator for byte-strings, strings, and tvbuffs (protocols).Gilbert Ramirez8-30/+62
The search uses a naive approach; more work is required to add a Boyer-Moore Search algorithm. svn path=/trunk/; revision=8280
2003-07-25Add to the fundamental types passed between the scanner and the parser.Gilbert Ramirez5-45/+198
Besides "STRING", there is now "UNPARSED_STRING", where the distinction is that "STRING" was a double-quoted string and "UNPARSED_STRING" is just a sequence of characters that the scanner didn't know how to scan/parse, so it's up to the Ftype to parse it. This gives us more flexibility and prepares the dfilter parsing engine for the upcoming addition of the "contains" operator. In the process of doing this, I also re-did the double-quoted string support in the scanner, so that instead of the naively-simple support we used to have, double-quoted strings now can have embedded dobule-quotes, embedded octal sequences, and embedded hexadecimal sequences: "\"" embedded double-quote "\110" embedded octal "\x48" embedded hex Enhance the dfilter unit test script to be able to run a single collection of tests instead of having to run all of them all the time. svn path=/trunk/; revision=8083
2003-06-14Define GLIB_CFLAGS and GTK_CFLAGS variables in config.nmake (based onGuy Harris1-4/+2
variables the user configures - the user isn't expected to change GLIB_CFLAGS or GTK_CFLAGS, and there's a comment nothing that users shouldn't have to do so), which contain the appropriate "/I" flags for building stuff that requires only GLib, and stuff that required GTK+ and GLib, respectively, and use those macros in the Makefile.nmake files. svn path=/trunk/; revision=7884
2003-06-13Handle the case of a comparison between two ranges (or, at least, don'tGuy Harris1-1/+4
dump core if the user tries it). svn path=/trunk/; revision=7875
2003-06-13Oops, a range of N-N is valid and means "the byte at offset N".Guy Harris1-4/+4
svn path=/trunk/; revision=7874
2003-06-13Add some sanity checking for ranges, so that you can't say "foo[M-N]"Guy Harris1-1/+66
where N is less than or equal to M. svn path=/trunk/; revision=7873
2002-12-19Add a new field type FT_FRAMENUM; an FT_FRAMENUM is a 32-bit unsignedGuy Harris1-1/+5
frame number, which is always decimal. If you select an FT_FRAMENUM field, there are menu items that let you go to the frame whose frame number appears in that field. Add FT_FRAMENUM fields for the ONC RPC "matching request is in this frame" and "matching reply is in this frame" protocol tree items. svn path=/trunk/; revision=6802
2002-12-02"dfilter_compile()" doesn't modify the string pointed to by its firstGuy Harris2-4/+4
argument; make it a const pointer. svn path=/trunk/; revision=6724
2002-11-28Make the "strings" pointer in a "header_field_info" structure a constGuy Harris1-4/+4
pointer, and put "const" into the casts in "VALS()" and "TFS()" macros, so we don't un-constify pointers to "value_string" arrays and "true_false_string" structures. Make some things "const" to keep the compiler happy with the previous change. svn path=/trunk/; revision=6684
2002-11-01Fix a problem when using the same field more than once in a displayGilbert Ramirez1-11/+14
filter, as in "ip.src == x.x.x.x || ip.src == y.y.y.y". My previous change to allow filtering on multiple fields of the same name moved some code into the wrong block within the function, causing the error. svn path=/trunk/; revision=6544
2002-10-16Make the dfilter code support multiple header_field_info's withGilbert Ramirez4-59/+101
the same name (abbreviation). Thus, if multiple protocols or fields are registered with the same name, you can still filter on the name and have the filtering work as expected. svn path=/trunk/; revision=6434
2002-09-09"dfilter_prime_proto_tree()" doesn't modify the "dfilter_t" to whichGuy Harris2-4/+4
it's handed a pointer, which means that "epan_dissect_prime_dfilter()" doesn't do so either; make that argument a "const dfilter_t *" in both cases. svn path=/trunk/; revision=6239
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer20-97/+97
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2002-08-24From Ulf Lamping: add a new FT_FLOAT type, for single-precisionGuy Harris1-1/+4
floating-point numbers, and display all the significant digits for both single-precision and double-precision floating-point numbers in the protocol tree, not just what "%g" does (6 digits). Put in comments explaining how the length of filter strings is computed, and fix some of the computations. svn path=/trunk/; revision=6081
2002-05-09Merge the work in Novell_NCP_branch into the mainline code.Gilbert Ramirez5-19/+19
A little work still needs to be done on the new NCP dissector -- make some of the COL_INFO texts more useful, handle a Unicode issue, and modify some of the cases that use "request conditions". But the NCP dissector as it stands is very usable now. Note: I didn't merge in the PROTO_LENGTH_UNTIL_END macro... I wanted to think about the various possible macros and review an email conversation I had with Guy on the subject. svn path=/trunk/; revision=5432
2002-04-29Move the code to build the balanced tree of fields into "proto_init()",Guy Harris3-104/+5
move the code from "dfilter_lookup_token()" into "proto_registrar_get_byname()", and get rid of "dfilter_lookup_token()" and have its callers call "proto_registrar_get_byname()" instead. svn path=/trunk/; revision=5287
2002-04-11Add "-" (hyphen) to the pattern for field-name/non-quoted string.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=5139
2002-04-08Make some variables and functions static.Gilbert Ramirez3-27/+23
svn path=/trunk/; revision=5129
2002-03-02From Joerg Mayer: get rid of "-Wno-unused" flag in some configureGuy Harris3-8/+8
scripts, and check in changes to add _U_ to some unused arguments (some other should perhaps be used, so we leave the _U_ out so that the warnings serve as a reminder to check those). svn path=/trunk/; revision=4848
2002-02-27Remove unused variables, structure definitions, and functions.Gilbert Ramirez1-22/+22
From Joerg Mayer. svn path=/trunk/; revision=4827
2002-02-27From Joerg Mayer:Guy Harris1-1/+6
In the "configure.in" files, add -D_U_="__attribute__((unused))" to CFLAGS if we're using GCC, and add -D_U_="" otherwise, so _U_ can be used to mark arguments as unused. Add -D_U_="" arguments to the Makefile.nmake files as well, so _U_ works with Microsoft Visual C++ as well. Add comments and RCS IDs to the Makefile.nmake files that don't already have them. svn path=/trunk/; revision=4824
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris7-28/+22
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
2002-01-04From Hamish Moffatt:Guy Harris1-2/+13
Additional Windows Makefile dependencies, so more stuff gets built as needed. Additional stuff cleaned up by "make clean" (well, "nmake -f makefile.nmake clean", anyway) Make PDB_FILE be "vc*.pdb", so it referes to the PDB files either for VC++ 5.0 or VC++ 6.0. svn path=/trunk/; revision=4481
2001-12-18Provide for per-protocol-tree data in the proto_tree code.Gilbert Ramirez7-10/+96
Put a hash-table of "interesting" fields in the per-proto-tree data. The dfilter code records which fields/protocols are "interesting" (by which I mean, their value or existence is checked). Thus, the proto_tree routines can create special arrays of field_info*'s that are ready for the dfilter engine to use during a filter operation. Also store the "proto_tree_is_visible" boolean, renamed "visible", in the per-proto-tree data. Move epan_dissect_t to its own header file to make #include dependencies easier to handle. Provide epan_dissect_fill_in_columns(), which accepts just the epan_dissect_t* as an argument. epan_dissect_new() needs to be followed by epan_dissect_run() for the dissection to actually take place. Between those two calls, epan_dissect_prime_dfilter() can be run 0, 1, or multiple times in order to prime the empty proto_tree with the "intersesting" fields from the dfilter_t. svn path=/trunk/; revision=4422
2001-12-13Plug a really bad memory leak. The GPtrArrays of field_info's thatGilbert Ramirez1-1/+2
are created for every tested field for every tested packet during a dfilter run were not being destroyed. svn path=/trunk/; revision=4393
2001-12-12From Motonori Shindo: add "*.pdb" to the ".cvsignore" files inGuy Harris1-0/+1
directories in which PDB files are generated and in which it wasn't already present. svn path=/trunk/; revision=4386
2001-12-12From Motonori Shindo:Guy Harris1-3/+4
fix a bogus batch mode inference rule of make, so that "vc60.pdb" files are created in the proper directory; delete ".pdb" files in a "nmake -f Makefile.nmake clean"; include the text2pcap and mergecap ".pdb" files in the Windows binary distribution. svn path=/trunk/; revision=4385
2001-11-02Add support for 64-bit signed integers in "int-64bit.[ch]", add anGuy Harris1-3/+7
FT_INT64 type, and make the Diameter dissector use it. Handle the 64-bit integer types in the display filter semantics checks. svn path=/trunk/; revision=4125
2001-10-29From Ronnie Sahlberg: FT_UINT64 support, code to handle 64-bit integersGuy Harris1-1/+2
without requiring compiler support for them, and updates to the Diameter, L2TP, NFS, and NLM dissectors to use it and to the ONC RPC dissector to allow ONC RPC subdissectors to use it. svn path=/trunk/; revision=4099
2001-10-26Fix some signed/unsigned comparison warnings. In the case of tvbuff.h,Gilbert Ramirez1-3/+1
there were 2 functions which accepted 'maxlength' == -1, but the function prototypes had maxlength as a guint --- fixed. svn path=/trunk/; revision=4087
2001-07-13From Joerg Mayer:Guy Harris1-2/+3
* gcc 3.0 warning fixes: - text2pcap.c: The number of characters to scan should probably not be 0 - wiretap/csids.c: using preincrement on a variable used on both sides of an assignment might be undefined by the C99(?) standard * turn on additional warnings for epan and wiretap too - epan/configure.in - wiretap/configure.in * Fix some warnings (missing includes, signed/unsigned, missing initializers) found by turning on the warnings - all other files :-) svn path=/trunk/; revision=3709
2001-06-22Support CIDR notation in IPv4 address filtering.Gilbert Ramirez2-6/+19
svn path=/trunk/; revision=3601
2001-03-23The Win32 build builds wiretap as a DLL and requires WinPcap 2.1.Gilbert Ramirez1-2/+3
svn path=/trunk/; revision=3163
2001-03-06Add some win32-specific targets in .cvsignore's.Gilbert Ramirez1-0/+2
Replace 'nmake' with $(MAKE) /$(MAKEFLAGS), from Mike Frisch. svn path=/trunk/; revision=3108
2001-03-05Move version to 0.8.16.Gilbert Ramirez1-2/+2
Fix build for splitting build dir from src dir. Note the use of updated GTK+ release for Win32 binaries. svn path=/trunk/; revision=3107
2001-03-02Enable slices of [i-j], where i is start offset and j is end offset,Gilbert Ramirez5-60/+104
inclusive. That is, [0-1] is a slice of 2 bytes. svn path=/trunk/; revision=3092
2001-02-27Move the location of cppmagic.h, since the lemon-flex include filesGilbert Ramirez2-16/+1
require it. It makes more sense to either put cppmagic with lemon, or in yet another common directory. I'll just put it with lemon. svn path=/trunk/; revision=3083
2001-02-27Add Ed Warnicke's drange code to the new dfilter system.Gilbert Ramirez15-280/+729
Not supported yet: [i-j] (offset-offset) Supported: [i] index [i:j] offset:length [:j] 0:offset [i:] offset:end [x,y] concatenation of slices svn path=/trunk/; revision=3080
2001-02-26Remove the Lemon stuff from EXTRA_DIST; the Lemon source is now inGuy Harris1-5/+1
"tools/lemon", and that directory's "Makefile.am" arranges to put the Lemon stuff into the distribution. svn path=/trunk/; revision=3077
2001-02-16Actually, this works better.Gilbert Ramirez2-5/+5
svn path=/trunk/; revision=3043
2001-02-16Use the proper way to denote that a single operationGilbert Ramirez2-3/+5
produces 2 files. (grammar.lemon --> grammar.c grammar.h) svn path=/trunk/; revision=3042
2001-02-15More prototype fun - make the Lemon parser allocate and free routinesGuy Harris1-3/+3
take fully-prototyped function arguments with types appropriate to "g_malloc()" and "g_free()", and change the calls to the functions pointed to by those arguments not pass the extra __FILE__ and __LINE__ arguments. svn path=/trunk/; revision=3039
2001-02-13In a display filter expression, make a field name refer to any of theGuy Harris1-7/+17
fields with that name. svn path=/trunk/; revision=3030
2001-02-12If there are multiple fields with the same name, list only one of themGuy Harris1-2/+7
in the output of "{ethereal,tethereal} -G", so that it appears only once in the documentation. Expand some comments to give more details. svn path=/trunk/; revision=3024
2001-02-11Remove unused variable and add copyright and RCS ID.Gilbert Ramirez1-2/+23
svn path=/trunk/; revision=3013
2001-02-02Add Makefile.nmake files for new subdirs.Gilbert Ramirez2-3/+51
Add them to EXTRA_DIST in corresponding Makefile.am's so that they get packaged with the distribution. svn path=/trunk/; revision=2979
2001-02-01Grumble, grumble. I forgot to add the license comment at the topGilbert Ramirez17-23/+344
of these files. svn path=/trunk/; revision=2968
2001-02-01Create a more modular type system for the FT_* types. Put themGilbert Ramirez24-0/+2914
into epan/ftypes. Re-write display filter routines using Lemon parser instead of yacc. Besides using a different tool, the new grammar is much simpler, while the display filter engine itself is more powerful and more easily extended. Add dftest executable, to test display filter "bytecode" generation. Add option to "configure" to build dftest or randpkt, both of which are not built by default. Implement Ed Warnicke's ideas about dranges in the new display filter and ftype code. Remove type FT_TEXT_ONLY in favor of FT_NONE, and have protocols registered as FT_PROTOCOL. Thus, FT_NONE is used only for simple labels in the proto tree, while FT_PROTOCOL is used for protocols. This was necessary for being able to make byte slices (ranges) out of protocols, like "frame[0:3]" Win32 Makefile.nmake's will be added tonight. svn path=/trunk/; revision=2967