Commit Graph

74 Commits

Author SHA1 Message Date
Michael Mann ee208c8dcc Add support for RELATIVE-OID ASN.1 type. Bug 9192 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9192)
From Ed Beroset.

svn path=/trunk/; revision=52393
2013-10-06 02:31:10 +00:00
Jakub Zawadzki c6669a3c63 dfilter: report warning if OR and AND logic operands are mixed without parentheses.
svn path=/trunk/; revision=51247
2013-08-10 17:49:28 +00:00
Jakub Zawadzki 9cfac1227d Replace hfinfo pointer to same_name_prev, with same_name_prev_id.
svn path=/trunk/; revision=51175
2013-08-06 20:53:47 +00:00
Jakub Zawadzki d6f249633a dfilter: move convertion to byte to seperate function
svn path=/trunk/; revision=50964
2013-07-28 08:41:26 +00:00
Michael Mann a87f47c02c Make many items filterable for Vines dissectors.
Add support for FT_VINES type.

svn path=/trunk/; revision=50962
2013-07-28 00:07:49 +00:00
Jakub Zawadzki 73aa1e7807 Support drange for functions
last think from bug #8979
+ fix semcheck.c:875: warning: signed and unsigned type in conditional expression

svn path=/trunk/; revision=50951
2013-07-27 19:14:34 +00:00
Jakub Zawadzki 1f4d76a6ca Some more work related to bug #8979 and previous commit
- Make http.location[0:4] == lower(http.location) behave the same as lower(http.location) == http.location[0:4]
- fix compiler errors + comments

svn path=/trunk/; revision=50950
2013-07-27 18:55:05 +00:00
Jakub Zawadzki da170f1d04 Fix bug #8979: Comparing function call and a range in the filter crashes Wireshark
store whole node, don't assume it's always STTYPE_FIELD

svn path=/trunk/; revision=50949
2013-07-27 17:17:15 +00:00
Evan Huus 5ede3bcde0 Follow-up to r50935: add support for 64-bit value strings in more places that
need it, I think this is all of them.

svn path=/trunk/; revision=50941
2013-07-26 23:51:00 +00:00
Anders Broman 7ad305365f type drange -> drange_t
explicit casts.

svn path=/trunk/; revision=48083
2013-03-05 06:16:45 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Guy Harris 835111692f From Richard Stearn: support for AX.25, including support for
LINKTYPE_AX25.

svn path=/trunk/; revision=44211
2012-08-02 16:54:43 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jakub Zawadzki 6fff7c61f0 display filter: restore comparision of fields.
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-04 14:45:50 +00:00
Anders Broman d1c1455882 Fix warnings
svn path=/trunk/; revision=43046
2012-06-03 20:59:41 +00:00
Anders Broman 345b48d1ea Try to squelch warnings
svn path=/trunk/; revision=43019
2012-06-03 09:26:15 +00:00
Jakub Zawadzki 8fca2eb7e5 Add missing consts.
svn path=/trunk/; revision=42004
2012-04-10 10:20:20 +00:00
Anders Broman 7f96d94b7c From Gilbert Ramirez: When filtering on a single-byte byte-array-slice, using a normal hex string would be nice
svn path=/trunk/; revision=41232
2012-02-29 05:58:45 +00:00
Stig Bjørlykke 46c3fe0547 Prefer previous error message if not having hfinfo->strings,
because this may give more interesting information.

svn path=/trunk/; revision=39658
2011-10-28 20:13:56 +00:00
Gerald Combs 49b92440de More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versions
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove
tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and
reassemble_cleanup() since they were only used for older GLib versions
which didn't support GSlices. Assume we always support the "matches"
operator.

svn path=/trunk/; revision=37978
2011-07-11 20:32:19 +00:00
Guy Harris 053c583fda Add some additional routine variants that handle string encodings, and
make FT_STRING and FT_UINT_STRING handle string encodings.

Get rid of FT_EBCDIC in favor of FT_STRING with ENC_EBCDIC.

Add some URLs for DRDA.

Clean up some stuff in TN3270 and TN5250, including using ENC_ values
for proto_tree_add_item().

svn path=/trunk/; revision=37909
2011-07-05 23:59:23 +00:00
Alexis La Goutte 7d317e553b Add FT_EUI64 Field Type
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector 
* Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name
* Update Documentation (README.dev)
* Add new function in libwireshark.def
* Support of encoding for tvb_eui64_to_str
* Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector

svn path=/trunk/; revision=37015
2011-05-08 10:23:53 +00:00
Bill Meier 2891d9084d From Yaniv Kaul: some 'set but not used' compilation fixes;
From me:
 Use consistent indentation in the source file.

svn path=/trunk/; revision=36887
2011-04-27 04:24:44 +00:00
Bill Meier ede51600c7 Don't assign to a variable if the value won't be used: Coverity 817-821.
svn path=/trunk/; revision=36446
2011-04-04 15:31:33 +00:00
Jeff Morriss 262997e2f4 From Johannes Lange via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5606 :
In semcheck.c the display filter string of an expression is checked against the
header_field_info.display value BASE_CUSTOM. But the value of BASE_CUSTOM is
applied as bitmask while the actual type is an enum (BASE_CUSTOM = 6).

With this BASE_DEC, BASE_DEC_HEX and BASE_HEX_DEC are also matching and are not
accepted as filter expression.


Actually: BASE_DEC works but not BASE_HEX.  And the problem only shows up when
trying to match a field in one of these bases against a string (from a
value_string).

svn path=/trunk/; revision=35621
2011-01-22 15:15:51 +00:00
Jeff Morriss 39f6874d13 Fix a problem noticed in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5380#c2 :
Don't attempt to use a BASE_CUSTOM field's 'strings' field as a
value_string: it's not, it's a pointer to a function.

svn path=/trunk/; revision=35115
2010-12-03 22:59:16 +00:00
Bill Meier 15851701e8 Rework "extended value strings":
- Allow direct access when a range of values begins with a value other than 0;
- Provide value_string_ext_new() for creating extended value strings at runtime;
- Do access to value_string_ext members via a macro (all but value_string.c);
- Update documentation.

svn path=/trunk/; revision=34514
2010-10-14 17:50:35 +00:00
Anders Broman fab55e4772 From Jakub Zawadzki:
Itroduce value_string_ext for faster value matching in value_strings.

svn path=/trunk/; revision=32574
2010-04-27 10:32:34 +00:00
Bill Meier e0064797fb Use more unique names for certain enum constants.
(enum constant names are part of the global name space).
(Fixes at least one gcc -Wshadow warning).

svn path=/trunk/; revision=31572
2010-01-19 19:37:03 +00:00
Gerald Combs 7c0dc5d7e7 If we don't have PCRE and we do have GLib >= 2.14, use GRegexes for the
"matches" operator.

svn path=/trunk/; revision=31302
2009-12-18 01:15:08 +00:00
Tomas Kukosa ceab9dbbce Try to parse unparsed token in accordance with fieldtype of all fileds with the same name.
svn path=/trunk/; revision=30705
2009-10-26 09:06:45 +00:00
Bill Meier 174ce5633c From Kovarththanan Rajaratnam: Fixes for bug #3536
(plus some additional changes by me).

Handle BASE_RANGE_STRING display types properly

We always treat header field info strings as value_string's undiscriminated.
However, if the header field info display is marked as BASE_RANGE_STRING, we
need to treat them as range_string's. This wasn't properly handled in the
filter expression dialog and in the filter toolbar which would cause a crash
upon referencing any fields marked as BASE_RANGE_STRING.


svn path=/trunk/; revision=28931
2009-07-03 01:11:23 +00:00
Stig Bjørlykke 0b8eda99b8 Removed _U_ for an used argument.
svn path=/trunk/; revision=28572
2009-06-01 18:24:42 +00:00
Stig Bjørlykke bcf8cf90e1 From yami (bug 3361):
Try to resolve a crash issue when having a function on the RHS
of a filter test which does not return the same type as the LHS.

svn path=/trunk/; revision=28550
2009-05-31 19:46:31 +00:00
Anders Broman 63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Stephen Fisher 849e628334 Introduce a new field type called FT_EBCDIC. This field works the same as
FT_STRING, except that it converts the data from the packet from EBCDIC
to ASCII for display in Wireshark.


svn path=/trunk/; revision=23503
2007-11-19 21:27:01 +00:00
Luis Ontanon 869b908463 Make sure ENDTRY gets evaluated
svn path=/trunk/; revision=21455
2007-04-17 15:13:17 +00:00
Martin Mathieson 997e5415f9 Add separate union entries to fvalue.value for signed and unsigned
32-bit numbers.  Separate signed and unsigned accessors have been
added and used where appropriate.

Definitely not for 0.99.5.

svn path=/trunk/; revision=20472
2007-01-18 11:02:26 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Gilbert Ramirez e3899ed4a4 Add infrastructure for display filter functions.
Add upper() and lower() display filter functions for string fields.

svn path=/trunk/; revision=18071
2006-05-02 14:26:17 +00:00
Tomas Kukosa dcae7d303f new field type FT_OID for OBJECT IDENTIFIERs
svn path=/trunk/; revision=16652
2005-12-02 13:16:58 +00:00
Jörg Mayer cd0744efd1 Add includes to fix warnings of type
gencode.c:383: warning: no previous declaration for
                        'dfw_interesting_fields'

svn path=/trunk/; revision=15012
2005-07-23 06:51:57 +00:00
Tomas Kukosa bab34b522b new field type FT_GUID
svn path=/trunk/; revision=14845
2005-07-04 13:04:53 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
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-18 00:24:25 +00:00
Guy Harris 6ce3f952e0 From Graeme Hewson: fix a debug message.
svn path=/trunk/; revision=11151
2004-06-15 10:16:10 +00:00
Guy Harris 53cb6eeb54 From Graeme Hewson:
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-03 07:33:46 +00:00
Guy Harris af3885bcf1 From Graeme Hewson:
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-09 08:17:32 +00:00
Olivier Biot 1791f84919 First attempt at "bitwise AND" display filter operator.
Document how a display operator can be added.

svn path=/trunk/; revision=10250
2004-02-27 12:00:32 +00:00