aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/extcap_gtk.c
AgeCommit message (Collapse)AuthorFilesLines
2018-04-15Gtk: Remove source codeRoland Knall1-960/+0
Removing all gtk source code, except for main.? which will remain for the official removal during SFUS18 Change-Id: I4273baf207df1eaaa4b94623cfd10bf74b1fc4a4 Reviewed-on: https://code.wireshark.org/review/26937 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-10-15Remove superfluous null-checks before strdup/freeAhmad Fatoum1-4/+2
NULL checks were removed for following free functions: - g_free "If mem is NULL it simply returns" https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free - g_slist_free(_full)? "NULL is considered to be the empty list" https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html - g_strfreev "If str_array is NULL, this function simply returns." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev - g_slice_free "If mem is NULL, this macro does nothing." https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free - g_match_info_free "not NULL... otherwise does nothing" https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free - dfilter_free defined in Wireshark code. Returns early when passed NULL epan/dfilter/dfilter.c They were also removed around calls to g_strdup where applicable: - g_strdup "If str is NULL it returns NULL." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04 Reviewed-on: https://code.wireshark.org/review/23406 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-12-22Gtk: add initializers.Dario Lombardo1-4/+7
As per coverity multiple CIDs. Change-Id: I30b5a5e45de2fc9b3c563c56151bd33483c754cd Reviewed-on: https://code.wireshark.org/review/19379 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2016-12-20Gtk: don't use GTimeZone/GDateTimeDario Lombardo1-5/+5
Use struct tm instead. Change-Id: I678797b93062305849875b33867faa52379c3dcb Reviewed-on: https://code.wireshark.org/review/19356 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-09extcap: add new option type (timestamp).Dario Lombardo1-1/+33
Bug: 12787 Change-Id: I941833c55fb607c8af2ef832082af58d7b94e965 Reviewed-on: https://code.wireshark.org/review/18721 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-26Cleanup some checkAPI warnings that were missed in previous patches.Michael Mann1-1/+1
Some search/replace of printf, g_warning and GTK APIs were changed to use a ws_ prefix Change-Id: I9beb763a975530a4006d1afbcad079a7d8d4ebf9 Reviewed-on: https://code.wireshark.org/review/16704 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-07-24Pacify GTK checkAPIs.pl warnings.Michael Mann1-0/+1
Add "Wireshark" macros to old-gtk-compat.h for GTK APIs that have been deprecated. The macros are setup by version number to limit their proliferation (not that I suspect much development will really be done there since GTK is deprecated). Just want to make buildbots happy for the time being. Change-Id: I095f850065166a0bc2e2456fb2e886ab64fdd97d Reviewed-on: https://code.wireshark.org/review/16635 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-18extcap: add masked to options.Dario Lombardo1-0/+5
This allows an option to be masked (like a password), by using the argument-type password. Change-Id: I2eae1be2e6672bff28ba5f749d7a3f687ebd4631 Reviewed-on: https://code.wireshark.org/review/13385 Reviewed-by: Dario Lombardo <lomato@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2015-05-05extcap: Implement QT extcap optionsRoland Knall1-4/+0
Implementing a button in the interface list, to bring up the extcap options dialog, as well as a dialog, which will be generated depending on the selected extcap options. Change-Id: I1733dc6a8c1a121089a9c353aff10bc4a53e86de Reviewed-on: https://code.wireshark.org/review/8224 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-01Remove unneeded includes from ui folderMartin Mathieson1-3/+0
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a Reviewed-on: https://code.wireshark.org/review/6128 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-10-13extcap: Remove single-space argument for boolflagsRoland Knall1-3/+3
Boolflags will be added with a NULL argument to the list and therefore the original fix will work. Note: extcap_get_complex_as_string will convert any NULL value into a single character argument (' '). Therefore any argument type, where NULL is a special value should be handled seperately here. For now, the only datatype will be BOOLFLAG Change-Id: Icfc9b573214e05ea713a3b70ea37953d470dafae Reviewed-on: https://code.wireshark.org/review/4649 Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Tomasz Moń <desowin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-13extcap (GTK): Fix Dead Store (Dead assignement/Dead increment) warning found ↵Alexis La Goutte1-1/+0
by Clang Change-Id: Ifdba972e3a12e01ac80bc920a2100bd7aa0f733c Reviewed-on: https://code.wireshark.org/review/4622 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-12Fix handling of extcap boolflags which defaults to true.Tomasz Moń1-3/+8
Example: arg {number=0}{call=--test}{type=boolflag}{default=true} Before this change --test was never added to argument list (no matter if user left it selected or explicitly deselected it). After this change --test will be added to argument list unless user explicitly deselects it. Change-Id: Ia5bc11f900b03e630aba882ef918dcb7f0b79291 Reviewed-on: https://code.wireshark.org/review/4618 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-08Fix extcap boolean flag handling.Tomasz Moń1-3/+17
Change-Id: I4c6b32805d4138ef0912fbf1b129a5e97776ab9c Reviewed-on: https://code.wireshark.org/review/4535 Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-06Convert "4 space tabs" to spaces; Adjust editor modelines.Bill Meier1-744/+744
Change-Id: I8d61d959c79e6aa9875c58680c54a331d18079cc Reviewed-on: https://code.wireshark.org/review/4504 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06Modify multicheck to accept parent parameter.Tomasz Moń1-38/+144
This makes it possible for multicheck to become a tree-like structure. Example: arg {number=4}{call=--devices}{display=Devices}{tooltip=Device selector}{type=multicheck} value {arg=4}{value=dev1}{display=Parent Device}{enabled=t}{default=t} value {arg=4}{value=dev2}{display=Child Device}{parent=dev1}{enabled=t} value {arg=4}{value=dev3}{display=Another Parent Device}{enabled=t} value {arg=4}{value=dev4}{display=Non-clickable Child Device}{parent=dev3} value {arg=4}{value=dev5}{display=Non-clickable Child of Child}{parent=dev4} Change-Id: I59dd7208ca0ec90cccfc49ae049559cdc6c69a4b Reviewed-on: https://code.wireshark.org/review/4192 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-08-31Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-3/+1
Change-Id: I0593b659dcd28929cf51a8b1147392f070574c9e Reviewed-on: https://code.wireshark.org/review/3934 Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-21Float constants end with "f"; assign float constants to gfloats.Guy Harris1-1/+1
This squelches some compiler warnings about assigning double values to floats (no, there's no precision in 0 to lose, but the compiler warns anyway). Change-Id: Ia49618cb8582c5afcdc5bdc5334fe20724b85eda Reviewed-on: https://code.wireshark.org/review/3762 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-21Extcap Capture InterfaceRoland Knall1-0/+806
Extcap is a plugin interface, which allows for the usage of external capture interfaces via pipes using a predefined configuration language which results in a graphical gui. This implementation seeks for a generic implementation, which results in a seamless integration with the current system, and does add all external interfaces as simple interfaces. Windows Note: Due to limitations with GTK and Windows, a gspawn-winXX-helper.exe, respective gspawn-winXX-helper-console.exe is needed, which is part of any GTK windows installation. The default installation directory from the build is an extcap subdirectory underneath the run directory. The folder used by extcap may be viewed in the folders tab of the about dialog. The default installation directory for extcap plugins with a pre-build or installer version of wireshark is the extcap subdirectory underneath the main wireshark directory. For more information see: http://youtu.be/Nn84T506SwU bug #9009 Also take a look in doc/extcap_example.py for a Python-example and in extcap.pod for the arguments grammer. Todo: - Integrate with Qt - currently no GUI is generated, but the interfaces are still usable Change-Id: I4f1239b2f1ebd8b2969f73af137915f5be1ce50f Signed-off-by: Mike Ryan <mikeryan+wireshark@lacklustre.net> Signed-off-by: Mike Kershaw <dragorn@kismetwireless.net> Signed-off-by: Roland Knall <rknall@gmail.com> Reviewed-on: https://code.wireshark.org/review/359 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>