aboutsummaryrefslogtreecommitdiffstats
path: root/extcap.h
AgeCommit message (Collapse)AuthorFilesLines
2023-10-25plugins: Allow multiple types in descriptionJoão Valverde1-1/+5
Allow plugins to declare their type, for the purpose of inserting a description in the UI. The type consist of one or more bit ORed flags. This fixes the 'stats_tree' plugin description in the UI. The plugin is not a dissector type plugin, as was being displayed before. Now it correctly shows "tap listener" plugin.
2023-08-26Don't pretend to return an error string from append_extcap_interface_list().Guy Harris1-2/+1
append_extcap_interface_list() does not return an error string; remove the error string argument from it.
2023-02-06extcap: Fix of handling default valuesj.novak@netsystem.cz1-5/+10
2022-08-13capture: Stop extcaps before dumpcapTomasz Moń1-2/+3
Send SIGTERM on UNIX systems to all extcap processes when user requests capture stop. Wait up to 30 seconds for extcaps to finish. If extcaps do not finish in time, send SIGKILL to remaining extcaps. Do not call TerminateProcess() on Windows in the same place where UNIX SIGTERM is sent. Instead schedule extcap termination timeout to happen as soon as control returns back to the event loop. There is no universally agreed replacement for SIGTERM on Windows, so just keep things simple (forcefully terminate like always) until we have agreed on something.
2022-08-12extcap: Do not drain stderr on process exitTomasz Moń1-0/+8
Extcap child watch callback assumed that the stderr pipe is broken. However the stdout and stderr pipes are not necessarily broken if the child process spawned new processes that inherited standard handles. Do not drain stderr in busy loop to prevent UI freeze. Stop capture session only when all extcap watches are removed. Remove stdout and stderr watches on capture stop timer (30 seconds) expiration, even if the pipes are not broken. Do not rely only on 0 bytes read to cease reading stdout and stderr. Stop reading if the status is anything else than G_IO_STATUS_NORMAL (especially it can be G_IO_STATUS_EOF).
2022-08-10extcap: Close capture session after extcap finishesTomasz Moń1-6/+8
Wait up to 30 seconds for extcap process to finish after closing pipes. The wait is achieved in non-blocking fashion, i.e. the UI is completely responsive during the wait. Only actions related to capture process like capture control, file open, save, export are inactive during the wait. On Windows extcap child watch callback gets called immediately as the process is forcefully terminated. Prior to this change the extcap was forcefully terminated on Windows anyway. The wait is possible on UNIX systems if extcap does handle SIGPIPE and SIGTERM signals. The defaults handlers for SIGPIPE and SIGTERM simply terminate the process so for large number of extcaps there is no change. If extcap does not finish within 30 seconds, it is forcefully terminated using SIGKILL signal.
2021-11-30extcap: Add header files to DoxygenMoshe Kaplan1-1/+2
Add @file markers for extcap headers so that Doxygen will generate documentation for them.
2021-09-20Fix config.h include orderJoão Valverde1-1/+0
The header "config.h" needs to be the first header included in the source file, no exceptions.
2020-07-24extcap(.h): fix empty paragraph passed to '@return' command [-Wdocumentation]Alexis La Goutte1-1/+0
Change-Id: Icadc5fdf9a1e1eaed50e0199a9610c3dd84497e1 Reviewed-on: https://code.wireshark.org/review/37947 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-07extcap: Lazily load our interface list.Gerald Combs1-16/+100
Add extcap_ensure_all_interfaces_loaded, which calls extcap_load_interface_list if our interface list is empty. Call it in each of our public functions that require a valid interface list. Clean up the extcap API documentation and note which routines initialize the interface list. In tshark, don't unconditionally call extcap_register_preferences and instead rely on lazy loading. Change-Id: I8493ae5f4d703b0fd767246557d17723bcf207c6 Ping-Bug: 15295 Reviewed-on: https://code.wireshark.org/review/37750 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-06-10extcap: Do not use global pipe handle on WindowsTomasz Moń1-3/+0
Make extcap_create_pipe() static. Change-Id: I06a0af2dcf9fb4a51b4f7ba6ee7c57e7a52c5e97 Reviewed-on: https://code.wireshark.org/review/33250 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-03-26Print extcap plugins with "tshark -G plugins".Guy Harris1-4/+10
This makes it match the "Plugins" tab of the "About" dialog. While we're at it, use the same code to enumerate extcap plugins in that dialog. Change-Id: I50f402a7ab5d83d46baab070d145558ed8f688f4 Reviewed-on: https://code.wireshark.org/review/32589 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-22extcap: discover interfaces in a parallelPeter Wu1-4/+0
Split interface discovery in three stages: discover available programs (extcap_get_extcap_paths), obtain outputs for each (extcap_run_all) and processing of the output (process_new_extcap). The second step is most expensive, do it in parallel in multiple threads. extcap_foreach used to call extcap_if_exists, but as "cb_info.ifname" is always NULL for interface discovery, it would always pass. Remove this check and all other unused functions. This saves 100ms startup time on Linux with 7 extcap tools. Change-Id: I511e491d3b23c0a7f2fe2447842e87a9bd75adbe Ping-Bug: 15295 Reviewed-on: https://code.wireshark.org/review/30766 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-07extcap: Always use byte mode in pipesStig Bjørlykke1-1/+1
The original PipeMode parameter to CreateNamedPipe() was wrong but when running gave a correct value. The changes in g00373a1f tried to fix this parameter but this gave incorrect values. Bug: 14532 Change-Id: Ia1e8e9ba54abfcc3bd0856fd715b7c69ee54ccfe Reviewed-on: https://code.wireshark.org/review/26786 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-04-05extcap: Reload values on requestRoland Knall1-1/+12
Allow certaing elements to be reloaded upon request. The way this works is, certain elements can be configured to be reloadable. By doing so, the extcap is asked once more just for the values list of this item, together with all already set options, and reloads the available options depending on the response. Only supported for selector. Radio and Multiselect will need additional patches, also moving those parts outside of extcap_argument.cpp might make sense before hand. Change-Id: I2e9e3d109b334bf878835a7cc9354f468bc22dee Reviewed-on: https://code.wireshark.org/review/26223 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-05extcap: Tell utilities the wireshark versionRoland Knall1-0/+1
Add an optional argument to extcap-version, which tells the utilities the wireshark version and therefore allows them to handle different versions differently. If no version is provided, the utility has to assume it is dealing with a Wireshark 2.x version (default behavior). Change-Id: I51658300f28f503ca8050d204b73749f1a54df16 Reviewed-on: https://code.wireshark.org/review/26752 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-09Start using SPDX license identifiers.Gerald Combs1-13/+1
A while back Graham pointed out the SPDX project (spdx.org), which is working on standardizing license specifications: https://www.wireshark.org/lists/wireshark-dev/201509/msg00119.html Appendix V of the specification describes a short identifier (SPDX-License-Identifier) that you can use in place of boilerplate in your source files: https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b Start the conversion process with our top-level C and C++ files. Change-Id: Iba1d835776714deb6285e2181e8ca17f95221878 Reviewed-on: https://code.wireshark.org/review/24302 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Balint Reczey <balint@balintreczey.hu> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-31extcap: fix parameters save in preferences filePascal Quantin1-3/+0
Since g583150198b, extcap_arg structures holds a pointer to the current preference value. So let's not update its value outside of the prefs API otherwise the call to prefs_set_string_value() with pref_current done afterwards will never notify the change and the updated value will not be written in the preference file. Moreover update ExtcapArgument::resetValue() method to have an empty string instead of a NULL pointer. Otherwise prefs_set_string_value() will not notify the change and save the restored default value in the preference file either. Change-Id: Ie70e79d471c75e25705c7654e420a7706ebc4032 Reviewed-on: https://code.wireshark.org/review/23308 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-28extcap: Interface Toolbar support on WindowsHåkon Øye Amundsen1-4/+4
Add support for extcap control pipes on Windows. Improved read loop in InterfaceToolbarReader. Delay opening control pipes until extcap has opened the fifo pipe. Make extcap_example.py work on Windows. Bug: 13833 Change-Id: I4b47d25452637759b8a3be53be48eee5365bc0e4 Reviewed-on: https://code.wireshark.org/review/23211 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-23extcap: Create unique pipe names for each interfaceStig Bjørlykke1-7/+3
On Windows the pipe names does not get random characters appended. Add the interface name and pipe type to make it unique. This partly fixes the issue with capturing from multiple extcap interfaces on Windows. Ping-Bug: 13653 Ping-Bug: 13833 Change-Id: I4290b37cf789bf77608993682a803aca29513d28 Reviewed-on: https://code.wireshark.org/review/23158 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-30Qt: Add support to verify extcap capture filterMichael Mann1-0/+16
Bug: 11668 Change-Id: Ib218d87c1905e53ffdab4e3dd6f93ba2c3d07c8b Reviewed-on: https://code.wireshark.org/review/21770 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-04-25Qt: Add interface toolbar supportStig Bjørlykke1-1/+6
An extcap utility can provide configuration for controls to use in a GUI interface toolbar. This controls are bidirectional and can be used to control the extcap utility while capturing. This is useful in scenarios where configuration can be done based on findings in the capture process, setting temporary values or give other inputs without restarting current capture. Todo: - Add support for Windows Change-Id: Ie15fa67f92eb27d8b73df6bb36f66b9a7d81932d Reviewed-on: https://code.wireshark.org/review/19982 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-03-04extcap: Minor improvementsRoland Knall1-0/+7
Add method for searching for tools by ifname and minor improvements in the interface callback to save time and space Change-Id: I0073c96fbee846cc5ff6304823fa14564ff36c22 Reviewed-on: https://code.wireshark.org/review/20376 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-02-22extcap: Reduce number of scans and storageRoland Knall1-2/+8
Reduce the number of storage arrays and the number of necessary loads. Also include cleaner methods for reloading the interfaces and cleanly reload if asked by the overall system Change-Id: I529465ec2593d40c955c6cdeaf3a85e3021c0596 Reviewed-on: https://code.wireshark.org/review/20230 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-01-04Include extcap binaries in the count of things to point out during startup.Guy Harris1-0/+4
The GTK+ version, at least, crashes if there are more "doing XXX..." items put up than the calculated count, so, now that we're putting up items for extcap binaries, we need to count the extcap binaries. Clean up some stuff we found doing this (indentation, a _U_ on something that's used). Change-Id: I1f88042b64ce4b9ae352de37689677c694e3770b Reviewed-on: https://code.wireshark.org/review/19549 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-12Remove unnecessary extcap_cleanup() declaration.Guy Harris1-4/+0
That wasn't sufficient to avoid #ifdeffing calls to extcap_cleanup(), as this header wasn't even being included if HAVE_EXTCAP wasn't defined, hence change I18c855e13281013a6277c1f38eeac92e74d52b34 was necessary. It's probably best that this not be included if HAVE_EXTCAP isn't defined, so as to catch *other* references to functions etc. that aren't available without extcap. Change-Id: I5c4ad331b6df93bbbcd28ad3b9815e4cd226039a Reviewed-on: https://code.wireshark.org/review/17666 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-12extcap: Fix misc memory leaks triggered by network interface changesMikael Kanstrup1-0/+9
Valgrind reports plenty of misc memory leaks in extcap after the network interface list has changed or is refreshed. Errors can be seen by starting Wireshark with Valgrind's memcheck tool and bringing a network interface up and down a few times with: ifconfig eth0 up ifconfig eth0 down Change-Id: I90f53847071854b7d02facb39b7a380732de79b4 Reviewed-on: https://code.wireshark.org/review/17606 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-09-11extcap: fix use-after-free for preferencesPeter Wu1-0/+4
In commit v2.3.0rc0-117-g485bc45 (backported to v2.2.0rc0-44-g66721ca), extcap_prefs_dynamic_vals and extcap_cleanup were added in an attempt to address dangling pointers. Unfortunately it is not sufficient: - A pointer to the preference value is stored in extcap_arg and passed to the prefs API, but this extcap_arg structure can become invalid which result in use-after-free whenever the preference is accessed. - On exit, a use-after-free occurs in prefs_cleanup when the preference value is being checked. As the preference subsystem actually manages the memory for the string value and consumers should only provide a pointer where the value can be stored, convert the char* field in extcap to char**. This has as additional benefit that values are not limited to 256 bytes anymore. extcap_cleanup is moved after epan_cleanup to ensure that prefs_cleanup does not operate on dangling pointers. Crash is reproducible under ASAN with: tshark -i randpkt Ping-Bug: 12183 Change-Id: Ibf1ba1102a5633aa085dc278a12ffc05a4f4a34b Reviewed-on: https://code.wireshark.org/review/17631 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-09-07extcap: Add tool-specified helppageRoland Knall1-0/+4
Allow the tool to provide a link to a helppage, displayed by clicking on help in the configuration dialog. The URL will be opened using an URL based service, therefore local as well as remote URLs are possible. Change-Id: I58b30244e97919d5cf6892faf96536ddc30fb5a7 Reviewed-on: https://code.wireshark.org/review/17549 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-07-30extcap: Use stderr to print error messageRoland Knall1-3/+1
This patch reads out the stderr messages from an extcap utility and displays it to an user. It was tested on Qt but not on GTK, but should work their as well. On Mac OS/X and Windows the child_watch does not behave as it was intended. Therefore in extcap_cleanup, the callbacks are called manually, if and only if, they have not been called already. The reason why it displays two error messages is, that by the time the first one is being displayed, glib has not returned from the spawned process on Linux yet. So there is no way to add the stderr correctly, and putting a handler to stderr into interface_opts will lead to memory errors, cause then the code tries to access memory outside of its protection. Bug: 11892 Change-Id: I2db60dd480fed3e01428b91a705057e4f088bd15 Reviewed-on: https://code.wireshark.org/review/12954 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-29extcap: Restore functionality for optionsRoland Knall1-4/+15
Allow stored options to be restored to their default values. This adds a global cleanup method for extcap and globally defined preference values, which fixes the parameter problem with windows Change-Id: I48e0cf846ef81f4732d652c6a2ad0020db5df08e Reviewed-on: https://code.wireshark.org/review/13741 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-03-21Fix building without extcap enabledJoão Valverde1-4/+0
Using cmake -DENABLE_EXTCAP=no or ./configure --without-extcap. Some documentation fixes too. Change-Id: Iebf9c843d67e10a32de1a62904de8f88b872ec99 Reviewed-on: https://code.wireshark.org/review/14522 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-27Replace extcap_interface_list() with append_extcap_interface_list().Guy Harris1-2/+2
Pull the "rebuild the list of extcap interfaces and, optionally, return a list of if_infos for them" into a separate extcap_reload_interface_list() routine, call it in the cases where we don't want the if_infos list, and have append_extcap_interface_list() call it, asking it for the if_infos list, and then append the interfaces to that list. Change-Id: I07478ab133859484b3e0916144971639f961224b Reviewed-on: https://code.wireshark.org/review/14189 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-27Put the extcap interfaces at the *end* of the interface list.Guy Harris1-3/+3
The list should start with the native local interfaces, as returned by pcap, so that we default to the interface pcap gives first, rather than to whatever extcap interface happens to be at the beginning. This also means that, if we're only calling extcap_interface_list() to regenerate our internal data structures, we don't bother allocating - and leaking! - a list of if_info structures. Change-Id: Ida651b5b081883f118a300b9f57403f2dc5c4363 Ping-Bug: 12183 Reviewed-on: https://code.wireshark.org/review/14187 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-11extcap: Convert settings to preference friendly key namesMikael Kanstrup1-0/+3
Preferences are only allowed to contain lowercase ASCII letters, numbers, underscores or dot characters. Create a utility function to convert an extcap setting to its equivalent preference key and use it wherever conversion from setting to preference key is needed. Bug: 12064 Change-Id: I39bbac7de5f0f905bd41c54257fa997a3b32442d Reviewed-on: https://code.wireshark.org/review/13687 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>
2016-02-01extcap: Add Save functionality to options dialogRoland Knall1-0/+4
This patch creates the functionality of saving all parameters for extcap devices in the general preference section. For now, multiselect and fileselect do not save their values but patches for this will be provided in the future Also, all preferences are stored as strings to make handling easier. This might change in the future, but for the first version it will stick. Restore to Defaults is not implemented as of yet, and will be in a future version, once the preference storing is finalized Bug: 11666 Change-Id: I178346405146d2e43f4f3481c05c92c0b3595af5 Reviewed-on: https://code.wireshark.org/review/13451 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-28extcap: Cleanup complex types and add save optionRoland Knall1-0/+4
Cleanup handling of complex data types and use only glib defined datatypes while handling argument values. Add a save parameter, which (additionally) can set, that a parameter is not saved in a configuration file. Passwords are by default not saved, which may be overwritten using this parameter Change-Id: I67eff0f3286170f082d532e806a39511c40df647 Reviewed-on: https://code.wireshark.org/review/13573 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-15extcap: Add list of extcaps to about dialogRoland Knall1-0/+10
Adds the list of available extcaps to the plugin list in the About dialog of Wireshark (Qt only). To do this, and additional sentence is provided in the extcap arguments list, which allows for additional information to be passed (as of right now, just version and display is used) Additionally, cleans up the code when using g_free. Bug: 11683 Change-Id: I04a958e2b73c9a707ab1cb4f2fc8345833a854a9 Reviewed-on: https://code.wireshark.org/review/13224 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-12extcap: Sort extcap interfaces alphabeticallyRoland Knall1-1/+1
The interface list is not sorted at all, leading to a very chaotic list. This sorts it alphabetically, as well as correct a type in extcap_init_interfaces. Bug: 11998 Change-Id: Ib5381a1761e8f07f9ba7996b3e6276da063b3932 Reviewed-on: https://code.wireshark.org/review/13220 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-05extcap: Add regular expression validation supportRoland Knall1-1/+1
Regular expressions follow the Qt Regex syntax, which is formulated after the Perl Regex syntax. A more detailed overview of the possible rules can be found at: http://doc.qt.io/qt-4.8/qregexp.html If a required option is present, even the double-click on the interface will first start the options dialog (Qt only) Required fields are marked bold and put first in the dialog. Additionally if validation failes (which it will if a required field is kept empty, but also if a non-required textfield is violating the defined regex), the label of the field is marked with red. Change-Id: If04a1146d0dfa778332ab2a39122c7a6ee1e93d2 Reviewed-on: https://code.wireshark.org/review/12914 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-05extcap: Provide capture filter to extcap binaryStig Bjørlykke1-0/+1
Added the option --extcap-capture-filter to extcap to send the capture filter from the main screen to the extcap binary. Change-Id: I75f0d7dbec810551225377f9221053298488cdd5 Reviewed-on: https://code.wireshark.org/review/11423 Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-05-05extcap: Implement QT extcap optionsRoland Knall1-0/+11
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-04-13dumpcap: fix opening of pipes on Windows broken since gbed29afPascal Quantin1-0/+3
Previous code was assuming that all local pipes were of extcap type. Let's explicitly check for extcap prefix now. Bug: 10803 Change-Id: If955e77a9ee2af11b553740269964c40273d5177 Reviewed-on: https://code.wireshark.org/review/8013 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-06Convert "4 space tabs" to spaces; Adjust editor modelines.Bill Meier1-10/+10
Change-Id: I8d61d959c79e6aa9875c58680c54a331d18079cc Reviewed-on: https://code.wireshark.org/review/4504 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-24Modify includes of config.h so that out-of-tree builds, i.e. CMakeGraham Bloice1-1/+1
don't pick up the in-tree copy. Change-Id: I7ec473876cdba1a025c52362d7f6adc62d24ce71 Reviewed-on: https://code.wireshark.org/review/3798 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-08-21Extcap Capture InterfaceRoland Knall1-0/+90
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>