aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter
AgeCommit message (Collapse)AuthorFilesLines
2005-03-24The "new" routine for STTYPE_STRING and STTYPE_UNPARSED does aGuy Harris1-5/+6
"strdup()" on the argument, so we don't need to do that ourselves (and, in fact, as we're doing it ourselves but not freeing the result, we leak memory). svn path=/trunk/; revision=13892
2005-02-14Make the "maintainer-clean" rules get rid of some additional generatedGuy Harris1-0/+11
files. Do this with GENERATED_HEADER_FILES, GENERATED_C_FILES, and GENERATED_FILES macros in Makefile.common files, along the lines of what wiretap/Makefile.common has. Clean up "*~" files with "make clean" rather than only "make distclean" in some additional places. Add "maintainer-clean" rules to the Makefile.nmake files, paralelling the ones in the automake-generated Makefile.in files, using the GENERATED_FILES macros from Makefile.common files. In some cases, move the cleanup of files from "make distclean" to "make maintainer-clean", and in other cases, put in a comment indicating why we're not doing that (because some files that are distributed in the source tarballs, namely Flex output, were built with a UN*X Flex and won't compile on Windows, so we get rid of them with "make distclean" so you can clean up stuff that *has* to be re-generated for Windows). Clean up some *CLEANFILES definitions - get rid of ones that no longer apply as files were moved or that add to the definition a name that's already there. svn path=/trunk/; revision=13402
2004-07-18 .cvsignore is deadJörg Mayer1-16/+0
it has been replaced by svn proplist -v <dir/file> and svn propedit <dir/file> svn path=/trunk/; revision=11422
2004-07-18Add epan/dissectors/.cvsignoreJörg Mayer1-0/+2
Add tags and TAGS to all .cvsignore files svn path=/trunk/; revision=11419
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris26-132/+132
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-07-17G_MAXINT32, G_MININT32, and G_MAXUINT32 aren't defined by GLib 1.2[.x],Guy Harris1-0/+12
so we have to define them ourselves if they're not defined. svn path=/trunk/; revision=11384
2004-07-16I'm not sure "strtol()" and "strtoul()" are guaranteed to clear "errno"Guy Harris1-2/+23
on success, so we clear it before calling them. Assign the value of "strtol()" to a "long" and assign the value of "strtoul()" to an "unsigned long", as those are the return types for those functions - "gint32" and "guint32" might not be large enough for the return value on an LP64 platform. Check for errno being EINVAL, as that can happen if the number isn't valid. Before assigning the value returned by "strtol()" or "strtoul()" to the final destination, check whether it's in the right range for that destination. svn path=/trunk/; revision=11382
2004-06-26From Laurent Rabret: replace "lib" with "link /lib"; "lib" is just aGuy Harris1-2/+2
wrapper around "link /lib", and not all Microsoft C compiler distributions provide "lib". svn path=/trunk/; revision=11242
2004-06-16Note that the reason why there's parser state that stays around afterGuy Harris1-2/+4
the parse finishes (forcing us to feed the parser an end-of-input even after an error) is that we don't create a new parser object when we start a new parse and don't destroy it when the parse finishes. svn path=/trunk/; revision=11156
2004-06-15From Graeme Hewson:Guy Harris2-27/+40
Add a #define to enable parser tracing. Clean up parser state when finished parsing, even if we stopped parsing due to a syntax error, so that there's nothing left around to screw up the next parse. svn path=/trunk/; revision=11152
2004-06-15From Graeme Hewson: fix a debug message.Guy Harris1-2/+2
svn path=/trunk/; revision=11151
2004-06-03From Graeme Hewson:Guy Harris4-15/+13
Use gint32 instead of guint32 for node data. Fix up some other signed-vs-unsigned issues in the display filter parser and lexical analyzer. svn path=/trunk/; revision=11085
2004-06-03From Graeme Hewson:Guy Harris1-66/+96
Check slice lengths as well as offsets. Disallow negative/zero lengths. Range on RHS of display filter expression wasn't being checked in every case. svn path=/trunk/; revision=11083
2004-06-03From Graeme Hewson:Guy Harris1-7/+26
Use gint32 instead of guint32 and strtol() instead of strtoul() for signed integers. Pathological slice specifications could cause Flex default rule to be invoked, echoing characters to stdout. Example: frame[0foo]==1 svn path=/trunk/; revision=11082
2004-05-09From Lars Roland: add support for building a libethereal.dll with MSVC:Guy Harris1-3/+7
add a config.nmake option to control whether to build libethereal.dll or not; remove "./wiretap" from PATH to prevent problems due to wrongly-loaded files; build dissector.lib with MSVC; move "print.c" and "ps.c" to the dissector helpers, as "print.c" imports variables from packet-frame.c and packet-data.c, which are in libethereal; move "g711.c" out of the dissector helpers, as they're used only by Ethereal in a tap, not in Tethereal or in any dissector; add a .def file for libethereal; arrange to declare global variables exported from libethereal with "__declspec(dllimport)" when building programs that import those variables; update the NSIS installer. Make the "configure" script define ETH_VAR_IMPORT as "extern". svn path=/trunk/; revision=10834
2004-05-09From Graeme Hewson:Guy Harris1-2/+17
Error if protocol specified on RHS of display filter comparison. If user specified "fc", they probably intended a byte value rather than the fibre channel protocol; fix makes mistake clear. Fix assertion failure with range on LHS of display filter comparison and field on RHS. svn path=/trunk/; revision=10829
2004-05-08From Graeme Hewson: get rid of unnecessary check (it's necessary forGuy Harris1-7/+1
octal, as the maximum of 3 octal digits can be more than 0377, but not necessary for hex, as the maximum of 2 hex digits can't be more than 0xff). svn path=/trunk/; revision=10827
2004-05-08Add the valuable input from Gilbert Ramirez in reply to questions I had whenOlivier Biot1-1/+68
thinking at implemeting an "in" display filter operation. svn path=/trunk/; revision=10820
2004-05-06Get rid of epan/config.h.win32.Olivier Biot1-6/+6
Fix a missing ZLIB_CFLAGS in epan/Makefile.nmake. svn path=/trunk/; revision=10807
2004-04-30removed unused thingsUlf Lamping1-5/+1
svn path=/trunk/; revision=10740
2004-04-25Add support for flex 2.5.31.Gilbert Ramirez1-1/+2
svn path=/trunk/; revision=10684
2004-03-24Fix the CLEANFILES target so both static and shared libraries are cleaned.Olivier Biot1-1/+2
svn path=/trunk/; revision=10475
2004-03-13Make libethereal and libwiretap shared libs.Jörg Mayer1-7/+3
svn path=/trunk/; revision=10368
2004-02-27First attempt at "bitwise AND" display filter operator.Olivier Biot9-19/+73
Document how a display operator can be added. svn path=/trunk/; revision=10250
2004-02-22If the LHS is a STRING or UNPARSED string, and the RHS is a FIELD,Gilbert Ramirez1-5/+21
then make sure that the FIELD can participate in the relation that is expressed in the display filter. Note that tvbuff's *should* be able to participate in == comparisons, etc., but those functions need to be added to ftype-tvbuff.c first. svn path=/trunk/; revision=10175
2004-02-11Use -1 rather than 0 as the SCAN_FAILED return value from the lexicalGuy Harris3-9/+31
analyzer on errors, and check for SCAN_FAILED from the lexical analyzer and abort the parse if we see it; 0 means "end of input", and we want to distinguish errors from end-of-input, so that we can report errors as such. If we see end-of-input while parsing a double-quoted string, report the error (missing closing quote). Fix the URL for the "Start conditions" section of the Flex manual. svn path=/trunk/; revision=10044
2004-02-11Make an existence test of an arbitrary entity syntactically valid, butGuy Harris2-5/+45
check, in the semantics-checking phase, that we're testing a field, so that we can give a better message than, for example, "Unexpected end of filter string." for an existence test with a misspelled field name. svn path=/trunk/; revision=10043
2004-02-09Forgot *.laJörg Mayer1-4/+5
svn path=/trunk/; revision=10012
2004-02-09Ignore shared dll stuffJörg Mayer1-0/+2
svn path=/trunk/; revision=10011
2004-01-22epan don't need GTK_CFLAGS as GTK isn't used,Ulf Lamping1-2/+2
GLIB_CFLAGS are just enough svn path=/trunk/; revision=9779
2004-01-18Warning fix when compiling with -strict-prototypesJörg Mayer1-3/+3
../../epan/dfilter/drange.h:62: warning: function declaration isn't a prototype ../../epan/dfilter/drange.h:83: warning: function declaration isn't a prototype svn path=/trunk/; revision=9719
2004-01-07Don't assert that quoted_string be NULL; it can be non-NULL ifGilbert Ramirez1-2/+11
the previous dfilter failed to compile because a closing double-quote was not provided. Handle that case. svn path=/trunk/; revision=9585
2004-01-01Add support of contains and matches operators on slices.Olivier Biot1-6/+33
svn path=/trunk/; revision=9511
2003-12-21Add, for \xXX, the same sanity check (that 0xXX fits in a single byte)Guy Harris1-1/+7
that we have for \0OOO. svn path=/trunk/; revision=9396
2003-12-20removed some MSVC warnings (added type casts)Ulf Lamping1-3/+3
svn path=/trunk/; revision=9370
2003-12-19Print values for ANY_MATCHES and ANY_CONTAINS so that the dftestGilbert Ramirez1-1/+11
executable works properly. svn path=/trunk/; revision=9353
2003-12-10PCRE support requires $(PCRE_CFLAGS) in CFLAGS.Olivier Biot1-2/+2
svn path=/trunk/; revision=9237
2003-12-09Internal PCRE field type for efficient RE parsing in dfilters.Olivier Biot1-14/+58
svn path=/trunk/; revision=9224
2003-12-06From Olivier BiotGilbert Ramirez8-27/+50
New "matches" operater in display filter language. Uses PCRE. If a "matches" operator is found in a dfilter while libpcre has not been used to build the binary, then an exception is thrown after using dfilter_fail() to set an apporporiate error message. svn path=/trunk/; revision=9182
2003-12-02From Didier Gautheron: put an "fvalue_t" structure into a "field_info"Guy Harris1-2/+2
structure, rather than separately allocating "fvalue_t"s and having the "field_info" structure point to them - this appears to speed up protocol tree construction a bit. svn path=/trunk/; revision=9146
2003-11-25fvalue_free() is one of the most called functions.Ronnie Sahlberg1-2/+2
This function is also very small, so small that teh overhead for the actual function call and return is likely to be a significant part of its execution time. change it into a macro and make it thus slightly faster by eliminating the function call overhead. svn path=/trunk/; revision=9083
2003-10-27Allow + and , in unparsed strings, so that you can use + as a sign in aGuy Harris1-2/+2
number or exponent and so that floating-point numbers can use , as well as . as a decimal point. svn path=/trunk/; revision=8791
2003-10-10Give every Makefile.nmake file a "distclean" rule, and have "distclean"Guy Harris1-5/+5
recurse into subdirectories doing "nmake -f Makefile.nmake distclean". Have "nmake -f Makefile.nmake clean" not remove stuff that "make clean" doesn't remove (such as Flex/Bison output and config.h files) - and have "nmake -f Makefile.nmake distclean" remove stuff that "make distclean" removes, including "tethereal-tap-register.c" and "ethereal-tap-register.c". svn path=/trunk/; revision=8672
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