Commit Graph

168 Commits

Author SHA1 Message Date
Guy Harris 32e785f813 The official #define for 32-bit and 64-bit Windows is _WIN32.
It's _WIN32, with a leading underscore, not WIN32.  See, for example:

    https://sourceforge.net/p/predef/wiki/OperatingSystems/

and

    https://msdn.microsoft.com/en-us/library/b0084kay.aspx

*Some* environments may also define WIN32, but we shouldn't depend on
that.

Replace all-caps "WIN32" referring to Windows in comments and other text
with "Windows" or "Win32".  (The two are pretty much equivalent, these
days; nobody much cares about Win16, not that we ever ran on it, and
64-bit Windows is just a 64-bitified Win32.)

Change-Id: Id327bcd4b1e9baa4f27055eff08c2d9e594d6f70
Reviewed-on: https://code.wireshark.org/review/10367
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-02 22:59:10 +00:00
Roland Knall 5727ebe689 extcap: Implement QT extcap options
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-05-05 09:35:10 +00:00
Alexis La Goutte 32bbe0af23 Extcap: fix logically dead code (CID 1232344)
Change-Id: Ia6c178a9a5ec413004107f63c8dcaa38c19690b9
Reviewed-on: https://code.wireshark.org/review/8096
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-04-16 22:40:02 +00:00
Gerald Combs 40ce324f4d Set the extcap working directory on Windows.
On Windows, prepend the main program directory to %Path% when spawning
extcap processes. This lets us place androiddump in extcap while allowing
it to locate its DLLs.

Change-Id: I406c47ce71323266d5f14fb596931398464e452d
Reviewed-on: https://code.wireshark.org/review/8057
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-15 20:26:13 +00:00
Pascal Quantin 2e8d8e12cd dumpcap: fix opening of pipes on Windows broken since gbed29af
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>
2015-04-13 17:43:40 +00:00
Pascal Quantin 606fa969ba Extcap: fix USBPcap capture broken by g8204578
g8204578 was not the right way to do things: if_type is used to identify an extcap interface

Change-Id: Iead6c5e63f6874012c27ed7c1bf7152a5891ad65
Reviewed-on: https://code.wireshark.org/review/7849
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-29 17:48:28 +00:00
Pascal Quantin 8204578251 Extcap: display a USB icon when adding a USBPcap interface
Change-Id: Ibe78b115eb6e7e737a5dc9c8a7937b82d8cf76a8
Reviewed-on: https://code.wireshark.org/review/7830
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-27 16:56:41 +00:00
Evan Huus 8fb74b4a68 extcap: remove use of g_list_free_full
It requires a newer glib than we support

Change-Id: Id8f14d4188a9ba55e0a5196bb877e2fe6a0c8d3f
Reviewed-on: https://code.wireshark.org/review/4652
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-13 16:09:47 +00:00
Tomasz Moń eed22acbcf Fix double free.
This double free involves damaging GHashTable internals (key and value).

Change-Id: I17c8a473b96ab28e611ccf79ddd2b3da56512184
Reviewed-on: https://code.wireshark.org/review/4629
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Tomasz Moń <desowin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-12 20:22:53 +00:00
Tomasz Moń fc2f31810a Fix handling of extcap boolflags which defaults to true.
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-12 19:54:57 +00:00
Tomasz Moń 5c0a3beee2 Remove redundant and erroneous debug log message.
Change-Id: I91d6131b3b4b7ef670f0d188ebd6da3947c49bdc
Reviewed-on: https://code.wireshark.org/review/4548
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-08 18:11:37 +00:00
Bill Meier 5051ae1cbe Convert "4 space tabs" to spaces; Adjust editor modelines.
Change-Id: I8d61d959c79e6aa9875c58680c54a331d18079cc
Reviewed-on: https://code.wireshark.org/review/4504
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 18:29:40 +00:00
Tomasz Moń 20795925ff Update capture_opts in extcap_cleanup().
This fixes redundant extcap_pid handle close that could occur in
capture_opts_del_iface() which resulted in unhandled exception on
Windows.

Change-Id: I06b680fcb65cd6fd854a25fb1b01248dce3251a1
Reviewed-on: https://code.wireshark.org/review/4447
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-04 11:17:01 +00:00
Tomasz Moń 06926aed88 Wait for extcap to connect to pipe on Windows.
This prevents dumpcap from failing with timeout exceeded error message
with some extcaps (especially those that display UAC screen) by making
sure that extcap connects to pipe before dumpcap is even started.

Change-Id: I549da9217c7f4ae89509330ca4fa613a119a9523
Reviewed-on: https://code.wireshark.org/review/4428
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-04 11:12:08 +00:00
Tomasz Moń a6988b451f Fix memory leak and heap corruption on Windows.
LPSECURITY_ATTRIBUTES is type definition for pointer to SECURITY_ATTRIBUTES
structure.

Change-Id: I94a835bfd8f7eb76c808fac8286ca3f2db9b19c3
Reviewed-on: https://code.wireshark.org/review/4449
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-03 20:29:12 +00:00
Pascal Quantin e28f490426 Extcap: restore compatibility with GLib 2.16.0
While we are at it, fix what seem to be a memory leak in extcaps_init_initerfaces()

Change-Id: I1bb9a1b44d16f986eedd192b15cce84c5881a917
Reviewed-on: https://code.wireshark.org/review/3820
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-08-26 14:57:09 +00:00
Graham Bloice 97546165fa Modify includes of config.h so that out-of-tree builds, i.e. CMake
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-24 08:04:08 +00:00
Roland Knall bed29af46d Extcap Capture Interface
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>
2014-08-21 03:34:02 +00:00