Commit Graph

26 Commits

Author SHA1 Message Date
Mike78 ef752689da Allow/Create an option to use "capture filter" labels defined in wireshark GUI from CLI
Move ui/filters.[ch] to filter_files.[ch] because dumpcap is using functionality.

Bug: 8091
Change-Id: I195c82fc023f97d6f331b8718c45a2d83d30faea
Reviewed-on: https://code.wireshark.org/review/5925
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-27 13:40:24 +00:00
Stig Bjørlykke 8fe68db944 Add COL_CUSTOM_PRIME_REGEX
Use this as a common regex to split multi-field custom columns.

Change-Id: I40f76743284c5981c95d2e47d6d1d2a7f357d2ea
Reviewed-on: https://code.wireshark.org/review/12753
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-20 20:26:20 +00:00
Gerald Combs c2b713c093 Qt: Add the capture and display filter dialog.
Use a single overloaded dialog, similar to the GTK+ UI.

Change-Id: If85db14a7101770f115bef725f5145e0010c518d
Reviewed-on: https://code.wireshark.org/review/8776
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-05 19:19:46 +00:00
Guy Harris cfcbb28671 Clean up ftype-conversion and dfilter error message string handling.
Have dfilter_compile() take an additional gchar ** argument, pointing to
a gchar * item that, on error, gets set to point to a g_malloc()ed error
string.  That removes one bit of global state from the display filter
parser, and doesn't impose a fixed limit on the error message strings.

Have fvalue_from_string() and fvalue_from_unparsed() take a gchar **
argument, pointer to a gchar * item, rather than an error-reporting
function, and set the gchar * item to point to a g_malloc()ed error
string on an error.

Allow either gchar ** argument to be null; if the argument is null, no
error message is allocated or provided.

Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c
Reviewed-on: https://code.wireshark.org/review/6608
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 10:22:59 +00:00
Martin Mathieson 43f09e67b4 Remove unneeded includes from ui folder
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a
Reviewed-on: https://code.wireshark.org/review/6128
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-01 23:11:10 +00:00
Stig Bjørlykke b4e90bdc8e Fix filter test for multifield custom column
This adds support for "field||field" without spaces.

Change-Id: Ia738d6642d12a188d1629bbdd9701cc8f8bb7a68
Reviewed-on: https://code.wireshark.org/review/5922
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-20 20:46:21 +00:00
Michal Labedzki 7b2ae71235 Fix filter valid/invalid test for multifield custom type
Check for "or" or "||" (also ignore whitespaces)
and check both arguments of this operator to be
fieldname (character check), then check whole filter is valid
for dfilter compiler.

Change-Id: I412b5dc1fca16fcd2b640aa74af81167300fd11e
Reviewed-on: https://code.wireshark.org/review/5848
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-20 17:59:25 +00:00
Guy Harris c1d2b29d01 Move filters.[ch] to libui.
Change-Id: I32f04016498dfe8f54b0480f30a84ffe5ef7868f
Reviewed-on: https://code.wireshark.org/review/2727
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 21:47:58 +00:00
Balint Reczey 09b86bdb0c GTK3: Fix changing filter expression's bg color based on validity
Bug: 8598
Change-Id: Id5a52c05cab25df9e228b1b4d2caf07335c1f4c8
Reviewed-on: https://code.wireshark.org/review/2614
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-24 22:01:22 +00:00
Balint Reczey 00be1d31ce Migrate GTK icon handling to GTK 3.10 API
GtkStockItem usage is deprecated with all the GTK_STOCK_.* stock ids.
We keep a stock id based approach but without relying on GTK's
GtkStockItem system.

We create our own internal stock ids for {icon, label} tuples and keep
the original GTK stock id #define-s and values to preserve backward
compatibility.

Change-Id: Ia0b35a5903f079e92c8026e3df21bbf0be2d06b0
Reviewed-on: https://code.wireshark.org/review/302
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-11 05:38:01 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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-03-04 14:27:33 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
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>
2014-02-25 20:46:49 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Michael Mann 277aed869e Make colors used by colorize_filter_te_as_* as preferences. Bug 5413 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5413)
svn path=/trunk/; revision=50203
2013-06-28 03:03:36 +00:00
Jörg Mayer e13a0996ee Revert 49166: It breaks compilation:
[ 82%] Building C object ui/gtk/CMakeFiles/gtkui.dir/filter_dlg.c.o
/home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c: In function ‘color_filter_te’:
/home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:1258:5: error: enum conversion when passing argument 2 of ‘gtk_widget_modify_bg’ is invalid in C++ [-Werror=c++-compat]
     gtk_widget_modify_bg(w, GTK_STATE_FLAG_NORMAL, &bg);
     ^
In file included from /usr/include/gtk-3.0/gtk/gtkaction.h:38:0,
                 from /usr/include/gtk-3.0/gtk/gtkactiongroup.h:38,
                 from /usr/include/gtk-3.0/gtk/gtkapplication.h:29,
                 from /usr/include/gtk-3.0/gtk/gtkwindow.h:35,
                 from /usr/include/gtk-3.0/gtk/gtkdialog.h:35,
                 from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:33,
                 from /home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:29:
/usr/include/gtk-3.0/gtk/gtkwidget.h:813:13: note: expected ‘GtkStateType’ but argument is of type ‘int’
 void        gtk_widget_modify_bg          (GtkWidget            *widget,
             ^
/home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:1258:5: error: passing argument 3 of ‘gtk_widget_modify_bg’ from incompatible pointer type [-Werror]
     gtk_widget_modify_bg(w, GTK_STATE_FLAG_NORMAL, &bg);
     ^
In file included from /usr/include/gtk-3.0/gtk/gtkaction.h:38:0,
                 from /usr/include/gtk-3.0/gtk/gtkactiongroup.h:38,
                 from /usr/include/gtk-3.0/gtk/gtkapplication.h:29,
                 from /usr/include/gtk-3.0/gtk/gtkwindow.h:35,
                 from /usr/include/gtk-3.0/gtk/gtkdialog.h:35,
                 from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:33,
                 from /home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:29:
/usr/include/gtk-3.0/gtk/gtkwidget.h:813:13: note: expected ‘const struct GdkColor *’ but argument is of type ‘struct GdkRGBA *’
 void        gtk_widget_modify_bg          (GtkWidget            *widget,
             ^
cc1: all warnings being treated as errors
make[2]: *** [ui/gtk/CMakeFiles/gtkui.dir/filter_dlg.c.o] Error 1


Also note that
https://developer.gnome.org/gtk3/3.6/GtkWidget.html#gtk-widget-modify-bg
states:
gtk_widget_modify_bg has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead

Of course we are not the only ones who have problems with that replacement:
http://gtk.10911.n7.nabble.com/button-background-color-in-gtk3-td14268.html
which ends with a sort of ugly solution without the deprecated function.



svn path=/trunk/; revision=49169
2013-05-05 09:07:09 +00:00
Balint Reczey b0a2f8e76e Really change display filter combo box's background color using GTK3
svn path=/trunk/; revision=49166
2013-05-05 05:25:35 +00:00
Anders Broman deefa09237 Use explicit casts.
svn path=/trunk/; revision=48217
2013-03-09 17:33:15 +00:00
Irene Rüngeler 2dc365db46 Another solution to fix bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8183.
Now both windows are modal.

svn path=/trunk/; revision=47018
2013-01-10 12:44:52 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +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
Jakub Zawadzki 98c2390515 Fix some clang warnings: implicit conversion from enumeration type 'GtkStateType' to different enumeration type 'GtkStateFlags' [-Werror,-Wconversion]
GTK_STATE_NORMAL and GTK_STATE_FLAG_NORMAL are both 0.

svn path=/trunk/; revision=43854
2012-07-20 11:10:29 +00:00
Anders Broman 1d164df472 gtk_container_add() -> gtk_box_pack_start().
svn path=/trunk/; revision=43829
2012-07-19 15:02:07 +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
Anders Broman 03e3fdd79c Replace gtk_vbox_new() and gtk_hbox_new() with ws_gtk_box_new().
svn path=/trunk/; revision=42176
2012-04-21 16:40:14 +00:00
Guy Harris d7b2aad043 Move some headers for UI stuff, and the alert_box.c UI-specific file, to
the ui directory.  (Perhaps some other files that would be used by all
flavors of Wireshark, for any GUI toolkit or for someting such as
ncurses, and not for any command-line tool such as TShark, should be
moved there as well.)

Shuffle some #includes to put the "ui/XXX.h" includes together.

svn path=/trunk/; revision=40529
2012-01-16 01:07:52 +00:00
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00