aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter/dfvm.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25Remove trailing whitespaceBill Meier1-1/+1
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2013-11-10Move struct _ftype_t + callback typedefs + free macro to ftypes-int.hJakub Zawadzki1-0/+2
svn path=/trunk/; revision=53223
2013-03-19From beroset:Anders Broman1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48424
2013-03-05type drange -> drange_tAnders Broman1-1/+1
explicit casts. svn path=/trunk/; revision=48083
2012-11-06When comparing fvalue_t we don't modify them, make arguments const.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=45948
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45016
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-11From Evan Huus: Unnecessary branch in dfvm.cBill Meier1-5/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7354 svn path=/trunk/; revision=43192
2012-06-02Try to squelch warningsAnders Broman1-7/+7
svn path=/trunk/; revision=43002
2012-02-29From Gilbert Ramirez: When filtering on a single-byte byte-array-slice, ↵Anders Broman1-10/+49
using a normal hex string would be nice svn path=/trunk/; revision=41232
2010-01-19Use more unique names for certain enum constants.Bill Meier1-4/+4
(enum constant names are part of the global name space). (Fixes at least one gcc -Wshadow warning). svn path=/trunk/; revision=31572
2009-10-18Neither num_registers nor max_registers in a dfilter_t are everGuy Harris1-1/+1
negative; make them unsigned. svn path=/trunk/; revision=30612
2009-01-21Fix some indentationJaap Keuter1-23/+23
svn path=/trunk/; revision=27282
2008-06-23Rename some variables to avoid shadowing warnings.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=25544
2007-11-28From Didier Gautheron: Bug #2042: Move constants initialisation at compile time.Bill Meier1-5/+57
svn path=/trunk/; revision=23659
2007-11-28Fropm Anders: Broman: Fix for bug #2041Bill Meier1-8/+3
svn path=/trunk/; revision=23655
2007-04-10From Sake Blok:Richard van der Hoff1-1/+1
wireshark SHOULD be able to filter on multiple hf's with the same field-name, BUT there is a little bug in the code. I have pinpointed it to the following in epan/dfilter/dfvm.c: ... It actually loops through all the hf's with the same name, but only checks against the original (first) hf. svn path=/trunk/; revision=21372
2006-12-22hmmRonnie Sahlberg1-0/+1
best to revert this for a while. revert all changes from previous patch. svn path=/trunk/; revision=20195
2006-12-22change some slab allocated memory into ep/emem allocated structures instead.Ronnie Sahlberg1-1/+0
this primarily removes code and simplifies (==eliminates) the need to track the data that is allocated and should potentially be slightly faster than a slab allocator. however these functions are called A LOT so there might be a performance hit when using emem with full debugging canary values and all the bells and whistles activated. this change also makes any future attempt to parallellize dissection of frames easier if we just make the ep allocator allocate from a threads specific ep pool. (something we would have to do anyway to make ep allocations multithreaded) this works in all my tests so far but needs more test coverage. svn path=/trunk/; revision=20194
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-05-02Add infrastructure for display filter functions.Gilbert Ramirez1-1/+31
Add upper() and lower() display filter functions for string fields. svn path=/trunk/; revision=18071
2005-10-31Dump the range when printing an MK_RANGE operator.Guy Harris1-2/+36
svn path=/trunk/; revision=16370
2005-10-31When printing the code for a display filter:Guy Harris1-15/+19
print register numbers as unsigned (they're guint32); when printing a PUT_FVALUE instruction, show the value as well as the type of the value. That requires that a bunch of types get to_repr methods; add them for PCRE (FTREPR_DFILTER-only - show the regular expression as text), tvbuffs (FTREPR_DFILTER_only - show the data as a hex string), integral types, string types other than FT_STRING, and FT_IPv6. That means we can use fvalue_to_string_repr() for FT_IPXNET and FT_IPv6 in proto_construct_dfilter_string(), and that we don't need to handle integer and floating types specially in MATE. Fix some problems with the PCRE execution code for tvbuff types. svn path=/trunk/; revision=16369
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
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-02-27First attempt at "bitwise AND" display filter operator.Olivier Biot1-1/+11
Document how a display operator can be added. svn path=/trunk/; revision=10250
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-06From Olivier BiotGilbert Ramirez1-1/+6
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-08-27Add a "contains" operator for byte-strings, strings, and tvbuffs (protocols).Gilbert Ramirez1-1/+6
The search uses a naive approach; more work is required to add a Boyer-Moore Search algorithm. svn path=/trunk/; revision=8280
2002-10-16Make the dfilter code support multiple header_field_info's withGilbert Ramirez1-19/+42
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-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-4/+4
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2002-05-09Merge the work in Novell_NCP_branch into the mainline code.Gilbert Ramirez1-3/+2
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-08Make some variables and functions static.Gilbert Ramirez1-19/+18
svn path=/trunk/; revision=5129
2001-12-18Provide for per-protocol-tree data in the proto_tree code.Gilbert Ramirez1-2/+4
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-02-27Add Ed Warnicke's drange code to the new dfilter system.Gilbert Ramirez1-14/+9
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-01Grumble, grumble. I forgot to add the license comment at the topGilbert Ramirez1-0/+23
of these files. svn path=/trunk/; revision=2968
2001-02-01Create a more modular type system for the FT_* types. Put themGilbert Ramirez1-0/+395
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