Commit Graph

44 Commits

Author SHA1 Message Date
Guy Harris 7321183716 Put the HAVE_REMOTE hack into wsutil/wspcap.h, and include that file.
Have a header file that defines HAVE_REMOTE if HAVE_PCAP_REMOTE is
defined, and then includes pcap.h.  Replace all other includes of
pcap.h, and the definition of HAVE_REMOTE, with includes of that file.
Check for anything other than wspcap.h including pcap.h in checkAPIs.pl.

Change-Id: I3cbee8208944ad6f006f568b3fe3134e10b2a883
Reviewed-on: https://code.wireshark.org/review/21605
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 19:58:15 +00:00
Guy Harris 79eab8ca07 Force HAVE_REMOTE to be defined when including pcap.h with remote support.
WinPcap made the mistake of having stuff in its public header fines
depend on a configuration #define, HAVE_REMOTE; this means that we need
to forcibly define it when building with remote capture support.

The tip of the libpcap master branch does not have that botch; hopefully
future versions of libpcap-for-Windows will be based on that libpcap and
thus lack that botch as well.

Defining HAVE_REMOTE in config.h is not the right fix, as it makes it
look like a *Wireshark* configuration option that code in Wireshark
should test, rather than a *WinPcap* configuration option that the
pcap.h that ships with the WinPcap SDK should have been changed, as part
of the build process, to correctly define or not, so that users of
WinPcap don't have to define it themselves.

Change-Id: I62d1eca6d3c900d0dcc9fbc011db77f595a86313
Reviewed-on: https://code.wireshark.org/review/21593
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 10:57:22 +00:00
Gerald Combs d84577fe1a Yell at the user less.
Our user-facing messages should have a helpful (or at the very least
neutral) tone. In English, exclamation points are neither. Replace a
bunch of them with periods.

Change-Id: I29c3b2f84c25e06aae5b559860224559053a0378
Reviewed-on: https://code.wireshark.org/review/20189
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-20 16:53:17 +00:00
AndersBroman 9421af309b Try to fix: warning C6244: Local declaration of 'airpcap_if_list' hides
previous declaration.

Change-Id: Id0c3b74ac52c427d9c1efdf749dc410bc5bb450f
Reviewed-on: https://code.wireshark.org/review/9460
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02 15:28:03 +00:00
Guy Harris c3335fb287 Don't include <wsutil/frequency-utils.h> if it's not needed.
Change-Id: I7c958a31681defb5297428fdb77aa43462b2d160
Reviewed-on: https://code.wireshark.org/review/8953
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-06-16 19:04:21 +00:00
Gerald Combs ece4b01f21 Add the wireless toolbar.
Add the wireless toolbar to the Qt UI.

Start adding AirPcap support to ui/80211_utils. Add FCS validation
routines to ws80211_utils.

Move a bunch of AirPcap routines that require epan from caputils to
ui/gtk. They were required for driver key management, which we'll
leave to the AirPcap Control Panel in the Qt UI.

Move frequency-utils to wsutil.

Change-Id: I44446758046621d183f5c2ba9f6526bf01e084f1
Reviewed-on: https://code.wireshark.org/review/8910
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-16 03:45:54 +00:00
Guy Harris e601e01ffd Remove some apparently-unnecessary includes of emem.h.
Also update a comment to no longer speak of ep_ allocation, and add an
include of <glib.h> to ui/profile.c, which was formerly relying on the
include of emem.h to drag it in.

Change-Id: I08926699ee96cf66672836b6ee3bbb405b507ce8
Reviewed-on: https://code.wireshark.org/review/6633
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 19:47:20 +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
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
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
Evan Huus cba2efe285 Remove an unused variable, structure and #define caught by cppcheck.
Also fixes a small memory leak.

svn path=/trunk/; revision=48903
2013-04-17 19:52:20 +00:00
Alexis La Goutte f9dce307d8 Fix the following GTK-CRITICAL error Gtk-CRITICAL **: gtk_list_store_get_path: assertion `iter->stamp == GTK_LIST_STORE (tree_model)->stamp' failed
Problem come from no item in list (and impossible to select the first item...)

svn path=/trunk/; revision=48901
2013-04-17 19:38:50 +00:00
Evan Huus c4a36c513f Redissect extra packet windows in all cases (that I know of) where we
redissect normal packet list.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8482

svn path=/trunk/; revision=48528
2013-03-24 16:47:38 +00:00
Alexis La Goutte 05a24bedbc Fix "Decryption Key Warning " Dialog broken in revision 47005
svn path=/trunk/; revision=48486
2013-03-22 17:37:25 +00:00
Alexis La Goutte 8bf9de273f Fix "Advanced Wireless Settings" Dialog broken in revision 47003
svn path=/trunk/; revision=48485
2013-03-22 17:31:32 +00:00
Alexis La Goutte d5e14301ba After Revision 46500 ( Make "Edit Interfaces Dialog" modal )
The "Advanced Wireless / Remote Capture Settings" is not on the top of Dialog

Make "Advanced Wireless / Remote Capture Settings " Dialog modal too

svn path=/trunk/; revision=48482
2013-03-22 17:31:15 +00:00
Alexis La Goutte 02d80d23fd Make Dialog about "Decryption Key (List / Add / Edit)" Modal
svn path=/trunk/; revision=48481
2013-03-22 17:31:06 +00:00
Alexis La Goutte 11d6a3f393 On Windows (Tested with XP and 7), the Add(New)/Edit Decryption Key Dialog is not always in top (regarding Decryption Key Management Dialog)
svn path=/trunk/; revision=48480
2013-03-22 17:30:55 +00:00
Bill Meier 8112ecc321 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP'
 didn't compile and needed a few additional patches.


svn path=/trunk/; revision=48447
2013-03-21 02:29:09 +00:00
Michael Mann 3a48e7e1e2 Bugfix Decryption Key Management dialog, bug 8446 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8446)
Needed to convert use of old IEEE802.11 preference strings to UAT.  Since UAT is self-contained within its own file, the entire preference file doesn't need to be rewritten/saved when UAT values are changed.

svn path=/trunk/; revision=48308
2013-03-15 01:31:53 +00:00
Alexis La Goutte 8b76610965 Display "Select Decryption Mode" in Decryption Key Management (Broken by revision 47005)
svn path=/trunk/; revision=48059
2013-03-04 17:15:58 +00:00
Alexis La Goutte 4ee92ef970 Fix indent (Tabs => Spaces)
svn path=/trunk/; revision=48058
2013-03-04 17:15:48 +00:00
Gerald Combs b0d958c4ed Don't yell at the user quite so much. Remove exclamation points from
some error messages and rephrase some others.

svn path=/trunk/; revision=47787
2013-02-21 01:00:44 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than
something we've saved in the preferences file. Update
prefs_pref_to_str() to handle default, stashed, and current prefs.

Create ui/preference_utils.[ch] and move some common routines there. Use
prefs_pref_type_name() in the GTK+ preferences dialog.

Make the "OK" button in the Qt preferences dialog work. We simply write
the prefs and redissect on "OK" and do nothing on "Cancel". This is
intentionally different from the Apply/OK/Cancel behavior in the GTK+
version.

Add a general "emitAppSignal" method to wsApp and use it for packet
dissection and preference changes.

Suggest that we might want to create a WsString class to make conversion
between QStrings, gchar *s, and GStrings easier.

svn path=/trunk/; revision=47139
2013-01-18 00:50:14 +00:00
Anders Broman 0a8073c567 Follow up on 47003
Use ws_gtk_grid...() instead of gtk_table...(); in more places.

svn path=/trunk/; revision=47005
2013-01-09 21:35:18 +00:00
Anders Broman bf22d3ffd3 Use ws_gtk_grid...() instead of gtk_table...();
svn path=/trunk/; revision=47003
2013-01-09 19:10:47 +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
Anders Broman fcb6a34b07 Get rid of an GTK warning about illegal cast.
svn path=/trunk/; revision=45961
2012-11-07 16:42:48 +00:00
Anders Broman eba7e0dc1e Use GtkGrid if GTK version is >= 3.2
svn path=/trunk/; revision=45910
2012-11-04 17:39:07 +00:00
Anders Broman c28020cda0 Fix a typo
svn path=/trunk/; revision=45902
2012-11-04 17:06:22 +00:00
Anders Broman 5965384149 Use GtkGrid if GTK version is >= 3.2
svn path=/trunk/; revision=45901
2012-11-04 17:00:01 +00:00
Anders Broman d23097f96d Add the row with the tags first
svn path=/trunk/; revision=45899
2012-11-04 16:05:28 +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
Evan Huus 33ac445380 Remove a bunch of unused variables.
Protect a pointer dereference by moving it so it's guarded by the existing
null check.
Issues caught by cppcheck.

svn path=/trunk/; revision=44733
2012-09-01 23:13:03 +00:00
Anders Broman 1cd8b5b0cc Get rid of some GTK_CHECK_VERSION instances by using compabillity macros.
svn path=/trunk/; revision=44186
2012-08-01 13:41:40 +00:00
Anders Broman 1ae38887b6 From Evan Huus:
Grab-bag of unused variables.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7452

svn path=/trunk/; revision=43616
2012-07-09 01:49:02 +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 dbc4b09004 From Evan Huus Convert a bunch more GTK-2 calls to their cross-version ws_ equivalent
svn path=/trunk/; revision=43009
2012-06-02 23:53:04 +00:00
Alexis La Goutte 9380f962a2 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=42090
2012-04-16 07:59:48 +00:00
Jeff Morriss eb262d2cc2 As pointed out by Alexis: remove a bunch of set-but-unused variables.
svn path=/trunk/; revision=41839
2012-03-30 01:46:42 +00:00
Michael Tüxen 0949fc1364 Fix compilation.
svn path=/trunk/; revision=41815
2012-03-28 09:26:47 +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