aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter/gencode.c
AgeCommit message (Collapse)AuthorFilesLines
2015-09-11dfilter: Add membership operatorJeffrey Smith1-0/+79
Added a new relational test: 'x in {a b c}'. The only LHS entity supported at this time is a field. The generated DFVM operations are equivalent to an OR'ed series of =='s, but with the redundant existence tests removed. Change-Id: Iddc89b81cf7ad6319aef1a2a94f93314cb721a8a Reviewed-on: https://code.wireshark.org/review/10246 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09(Trivial) Fix printf-related 'Mismatch on sign' warningsBill Meier1-1/+1
Found by MSVC2013 Code Analysis Change-Id: I58063946dd558e98308c87b36eeac0ddbe1a6e79 Reviewed-on: https://code.wireshark.org/review/7045 Reviewed-by: Bill Meier <wmeier@newsguy.com>
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>
2013-08-06Replace hfinfo pointer to same_name_prev, with same_name_prev_id.Jakub Zawadzki1-4/+4
svn path=/trunk/; revision=51175
2013-07-27Fix bug #8979: Comparing function call and a range in the filter crashes ↵Jakub Zawadzki1-5/+7
Wireshark store whole node, don't assume it's always STTYPE_FIELD svn path=/trunk/; revision=50949
2013-03-05type drange -> drange_tAnders Broman1-2/+2
explicit casts. svn path=/trunk/; revision=48083
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-09-01Add modelines and make indentation consistent.Evan Huus1-128/+141
svn path=/trunk/; revision=44730
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-04display filter: restore comparision of fields.Jakub Zawadzki1-1/+1
like: udp.srcport == udp.dstport frame.cap_len != frame.len (probably you can use it for better ones) part of bug #7263 svn path=/trunk/; revision=43069
2012-06-03Try to squelch warningsAnders Broman1-10/+10
svn path=/trunk/; revision=43019
2011-04-04Don't assign to a variable if the value won't be used: Coverity 817-821.Bill Meier1-2/+2
svn path=/trunk/; revision=36446
2008-01-31If "!=" or "ne" are used in a display filter, warn the user that the resultsGerald Combs1-14/+14
may be unexpected. svn path=/trunk/; revision=24232
2007-11-28From Didier Gautheron: Bug #2042: Move constants initialisation at compile time.Bill Meier1-2/+46
svn path=/trunk/; revision=23659
2007-11-28From Didier Gautheron: Bug #2040: Fix up goto at compilation time in gencode.cBill Meier1-0/+41
svn path=/trunk/; revision=23658
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-05-02MSVC is picky about assignments in declarations.Anders Broman1-2/+2
svn path=/trunk/; revision=18074
2006-05-02Add infrastructure for display filter functions.Gilbert Ramirez1-42/+127
Add upper() and lower() display filter functions for string fields. svn path=/trunk/; revision=18071
2005-08-04Albert Chin:Jörg Mayer1-1/+0
Don't include epan/gdebug.h Now that epan/gdebug.h is unused: remove it svn path=/trunk/; revision=15209
2005-07-23Add includes to fix warnings of typeJörg Mayer1-0/+1
gencode.c:383: warning: no previous declaration for 'dfw_interesting_fields' svn path=/trunk/; revision=15012
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/+5
Document how a display operator can be added. svn path=/trunk/; revision=10250
2003-12-06From Olivier BiotGilbert Ramirez1-1/+5
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-08-27Add a "contains" operator for byte-strings, strings, and tvbuffs (protocols).Gilbert Ramirez1-1/+5
The search uses a naive approach; more work is required to add a Boyer-Moore Search algorithm. svn path=/trunk/; revision=8280
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
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 Ramirez1-29/+47
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-6/+6
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2002-03-02From Joerg Mayer: get rid of "-Wno-unused" flag in some configureGuy Harris1-2/+2
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-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-4/+3
"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
2001-12-18Provide for per-protocol-tree data in the proto_tree code.Gilbert Ramirez1-2/+48
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-02-27Add Ed Warnicke's drange code to the new dfilter system.Gilbert Ramirez1-6/+4
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-11Remove unused variable and add copyright and RCS ID.Gilbert Ramirez1-2/+23
svn path=/trunk/; revision=3013
2001-02-01Create a more modular type system for the FT_* types. Put themGilbert Ramirez1-0/+299
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