Commit Graph

171 Commits

Author SHA1 Message Date
Guy Harris cd93af0ed1 Oops, we also need to worry about pcap_get_tstamp_precision().
Change-Id: I60a1f671ba313c59ca1999ab703ee11370608758
Reviewed-on: https://code.wireshark.org/review/5123
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-05 02:09:14 +00:00
Guy Harris 6f3fc0ee7e Get rid of unused variable.
Leftover crud before I notied that RTLD_NEXT would do what I want.

Change-Id: I5e510e74c65b211e6cc6c300e760869abb399dc8
Reviewed-on: https://code.wireshark.org/review/5121
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-05 01:54:06 +00:00
Guy Harris 78492d9dd2 Cope with newer Xcode not having the 10.6 SDK.
The latest Xcode, as of today, has only 10.9 and 10.10 SDKs, which means
that, if we build Wireshark and request a deployment minimum release of
10.6, we'll be building against an SDK in which libpcap has routines
that aren't available in 10.6 and that doesn't use weak linking for
them, so the resulting binary won't actually work on 10.6.

Use the run-time loader to find those routines (currently, only
pcap_set_tstamp_precision()) and call them only if we find them.

On other UN*Xes, we still assume that we'll be running only on the
release against which we were built and newer releases.

Change-Id: Iab20d86fe3be4b299cfb6e25c1f95dc6e1581661
Reviewed-on: https://code.wireshark.org/review/5120
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-05 01:50:00 +00:00
Mikael Kanstrup 27e4ac85e8 Add support for split wiphy dump to Wireless Toolbar
To populate the Wireless Toolbar menu the NL80211_CMD_GET_WIPHY
command is used. Some network interfaces must use split wiphy dump
feature for this command to function properly. One such example is the
D-Link DWA-160 USB adapter that does not show up when used without.

Make use of split wiphy dump feature whenever kernel supports it
to populate the list of monitor interfaces for the Wireless Toolbar.

Bug: 10564
Change-Id: Idc28e92f91a2488fa48eeb282a0ef1e2bd40a5f0
Reviewed-on: https://code.wireshark.org/review/4611
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-18 14:26:00 +00:00
Guy Harris 0db468e300 gchar is not guaranteed to be signed; use gint8.
C does not guarantee that char is signed (that's why there's a keyword
"signed").  Use gint8, to indicate that it's not a character, it's an
8-bit signed integer.

Change-Id: Id632df23352840cbc86a4d88f4c7dade95ab7837
Reviewed-on: https://code.wireshark.org/review/4736
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-16 18:44:30 +00:00
Mikael Kanstrup 74c4358740 Split ws80211_get_phys callback handler
Split up the ws80211_get_phys parser callback handler function into
separate functions for each attribute parsed. This is done in
preparation for supporting split wiphy dump feature where the function
logics will need modications.

Change-Id: Ic0b497fc628f0e7453cd62eb8199f17f9a308a7f
Reviewed-on: https://code.wireshark.org/review/4610
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>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-13 19:19:56 +00:00
Gerald Combs efea8ce1c6 CMake: Conditional build fixes and updates.
HAVE_PORTAUDIO_H didn't work for Stig. Use PORTAUDIO_FOUND instead,
which is the correct name to use according to the
FIND_PACKAGE_HANDLE_STANDARD_ARGS documentation. Use xxx_FOUND in a
couple of other places.

Conditionally build caputils/airpcap_loader.c.

Change-Id: I6a134192902229a446dccf43bfb7bbfe2a55d1e2
Reviewed-on: https://code.wireshark.org/review/4291
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-09-28 18:22:48 +00:00
Evan Huus 1cbd9c7955 Fix compilation in weird cases
Change-Id: I6c52ea9954a4c96f525e6d064dbf3fc2c71bea68
Reviewed-on: https://code.wireshark.org/review/4136
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-16 21:24:02 +00:00
Bill Meier a379ac74d2 Fix spelling: cant-->can't, wont-->won't, etc
Change-Id: Ia6c3e7a25615bf8e052c3bacf096d76df775c9c2
Reviewed-on: https://code.wireshark.org/review/4126
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-16 15:31:58 +00:00
Gerald Combs 5ee328e90b Increase the error buffer size for rpcap.
If the rpcap port is unreachable pcap_findalldevs_ex can write more
than PCAP_ERRBUF_SIZE bytes to errbuf. E.g. if we try to capture from
Google's all-eights public DNS server we get:

----
Can't get list of interfaces: Is the server properly installed on 8.8.8.8?
connect() failed: A connection attempt failed because the connected
party did not properly respond after a period of time, or established
connection failed because connected host has failed to respond.  (code 1
----

Set the buffer to PCAP_ERRBUF_SIZE*4 bytes. Hopefully that's large enough.

Change-Id: I19f34cda16050c1ba8b9d7d6ed2d8e77b945a2af
Ping-Bug: 3554
Ping-Bug: 6922
Ping-Bug: 7021
Reviewed-on: https://code.wireshark.org/review/3880
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-27 22:11:58 +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
Guy Harris 435e7c6106 Move the AirPcap stuff into caputils.
Change-Id: I64b45dad36a3ec491aeb9de3439b4fe19b46f9d8
Reviewed-on: https://code.wireshark.org/review/3308
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-01 00:30:03 +00:00
Guy Harris f6ce0cdacd Get rid of NO_INTERFACES_FOUND - it's not an error.
It just means "pcap didn't give me any interfaces, and didn't report an
error".  Hopefully, in the future, there will be pcap APIs that
distinguish between the (admittedly unlikely, these days) case of "there
really *are* no interfaces on which *anybody* can capture" and "you
don't have sufficient permission to capture", and we can report the
latter as an error.  (Given that pcap supports more than just "regular
interfaces", though, there are cases where you don't have permission to
capture on those but you have permission to capture raw USB traffic, for
example, so perhaps what's really needed is per-interface indications of
permissions.)

Change-Id: I7b8abb0829e8502f5259c95e8af31655f79d36a1
Reviewed-on: https://code.wireshark.org/review/3169
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-22 23:53:49 +00:00
Роман Донченко 696cb6c17b Use forward slashes in paths to runlex.sh
This gets rid of "MS-DOS style path detected" warnings from Cygwin.

Change-Id: Id10429669704aa371dbf56a9398947c8002260ad
Reviewed-on: https://code.wireshark.org/review/3024
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Wireshark Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-20 13:15:59 +00:00
Guy Harris 0e0d01d045 Allow the interface monitor routines to be called from C++.
Change-Id: I2ae60c1b015a432f5df36bd623f1a4c69b02bef1
Reviewed-on: https://code.wireshark.org/review/3081
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 02:28:39 +00:00
Guy Harris fae3615ce0 Move the monitor-for-interface-list-changes stuff to the caputils library.
Change-Id: Ie0d4504688602c2aa8e9788643b079930ca7d305
Reviewed-on: https://code.wireshark.org/review/3076
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 01:27:21 +00:00
Irene Ruengeler c7b45d0a7d GTK Remote Capturing
Move the GTK files necessary for managing the recnet remote host from capture_dlg.c to recent.c in order to use them in QT, too.

Change-Id: I3f3fd31ce928162de08c6db7309ef2a9b1e97760
Reviewed-on: https://code.wireshark.org/review/2955
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:29:46 +00:00
Guy Harris 09511c2f62 Build libcaputils PIE, so it can be linked with dumpcap when it's built PIE.
Change-Id: Ic1a64252e913f668676a3d8b69c10cc4789156b3
Reviewed-on: https://code.wireshark.org/review/2854
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 17:23:01 +00:00
Guy Harris d3a7176ab7 Reflect the rename of get_XXX_pcap_version() to get_XXX_caplibs_version().
Change-Id: I55108e39d9d5a3fc5e1e3e0ec0040c08c92cc576
Reviewed-on: https://code.wireshark.org/review/2844
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 08:06:38 +00:00
Guy Harris 3fb1124200 capture_ifinfo.h moved to caputils.
Change-Id: Id313fa6d0510ece7d13c6ffe941374ba0873e574
Reviewed-on: https://code.wireshark.org/review/2842
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 07:44:42 +00:00
Guy Harris 9e6487f247 Move utility routines for capturing into a libcaputils static library.
Some of those routines are used only in dumpcap; others are used in
TShark and Wireshark as well.

Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7
Reviewed-on: https://code.wireshark.org/review/2841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 07:25:26 +00:00