Commit Graph

2976 Commits

Author SHA1 Message Date
Alexis La Goutte ac52f0e6bf SCTP (Graph Dialog Qt): fix Copy-paster error (CID 1158585)
Change-Id: I8939dbc8339284f9a1e515aff533d67ddbb6d469
Reviewed-on: https://code.wireshark.org/review/6274
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-01-04 18:40:46 +00:00
Peter Wu ff01bc6c4e gtk: fix crash when moving columns
When the columns are moved, the packet list is redrawn from the
columns-changed signal handler. Apparently GTK does not like that the
parent contains got destroyed.

Call packet_list_recreate outside the callback to workaround this issue.
Since the signal handler is blocked, it can never be called twice (and
there will always be at most one packet_list_recreate_delayed
scheduled).

Bug: 10795
Change-Id: Ia97d330c8bef747809fa09a8709a19cb03c7e00a
Reviewed-on: https://code.wireshark.org/review/5881
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-04 16:46:52 +00:00
Michael Mann 553da37446 Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field type.
These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter.  FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter.

Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type.

Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values.

Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9
Reviewed-on: https://code.wireshark.org/review/6098
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04 16:32:03 +00:00
Graham Bloice aad1a81b99 Fix out-of-tree build includes of config.h
If a file in the same directory as config.h, e.g. wireshark-qt.cpp
has a #include "config.h", or another header it includes also has
a #include "config.h", then an out-of-tree build, e.g. CMake will
pick up any in-tree config.h and odd things may happen.  The correct
form is #include <config.h> which will pick up the out-of-tree
version.

To find this, introduce a deliberate error and then make an out-of-tree
build, noting where it fails and fix that file.  If that file includes
other files that still cause the build to fail, set the compiler
to emit the pre-processed version so you can locate the include with
the next errant "config.h".  Repeat ad nauseum.

Possibly all includes of "config.h" should be changed to <config.h>

Revert "CMake: Clobber the top-level config.h before we build."

This reverts commit 1f3849ce61.

Ping-Bug: 10301
Change-Id: Ie567e7cc696fd48f3e730fc27032c5d2a7d8f341
Reviewed-on: https://code.wireshark.org/review/6285
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-04 00:26:13 +00:00
Guy Harris 938485436e Use g_strdup_printf(), rather than a fixed-length buffer, for the app name.
Add some missing g_free()s while we're at it.

Change-Id: Id38acc21d3c0b337e5d05baaf5ebbcd63699ff50
Reviewed-on: https://code.wireshark.org/review/6287
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-03 22:35:27 +00:00
Pascal Quantin 4d3acd9af8 tshark: dump port number when generating SCTP, TCP or UDP conversations
Change-Id: Ie3cda43a4cfca06482f2cee09f33230d1535b77d
Reviewed-on: https://code.wireshark.org/review/6265
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-03 20:18:03 +00:00
Pascal Quantin e133ba947e tshark: dump port number when generating SCTP endpoints statistics
Change-Id: I72b557f0d12ba7a8c13288399a97ef1634121f79
Reviewed-on: https://code.wireshark.org/review/6266
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-03 18:15:25 +00:00
Bill Meier 5c529c95c5 Add '*.nativecodeanalysis.xml' to 'clean' targets
Change-Id: I90dbf0b31fc737150a01533763a7869b34c68cb6
Reviewed-on: https://code.wireshark.org/review/6220
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02 01:45:16 +00:00
Martin Mathieson 887cce4a5f Restore another include to try to fix solaris build
Change-Id: I5b8dc27943297aae88c652be98d982f75ed9a3ee
Reviewed-on: https://code.wireshark.org/review/6215
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-02 00:30:47 +00:00
Martin Mathieson 1c14f5b9fa Restore inclusion of gui_utils.h to pixmap_save.c
Change-Id: Ied83d36d8f56f8dc1550ff5ae68bc2b61ea6f1b6
Reviewed-on: https://code.wireshark.org/review/6214
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-02 00:18:49 +00:00
Michael Mann 860cb393d8 tshark: Add endpoints statistics
"stat name" has been official changed to "endpoints" for all dissectors, rather than a mixture of "host"/"endpoints" based on dissector.

Change-Id: If34bcb5165b493948e784ba038ab202803a59843
Reviewed-on: https://code.wireshark.org/review/6154
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-02 00:02:18 +00:00
Michael Mann 07c9492b8d Remove pkt_comment member from packet_info structure.
Change-Id: Ifd3d201a09944e3fc36188f891ea8a584886101d
Reviewed-on: https://code.wireshark.org/review/5884
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-02 00:00:57 +00:00
Martin Mathieson 43f09e67b4 Remove unneeded includes from ui folder
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a
Reviewed-on: https://code.wireshark.org/review/6128
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-01 23:11:10 +00:00
Guy Harris 5981dab95b Declare read_keytab_file() in epan/dissectors/packet-kerberos.h.
Don't throw its declaration in file.h, as it's not defined in file.c.
Instead, include it in epan/dissectors/packet-kerberos.h and include
that wherever read_keytab_file() is called.

Yes, that means you also have to include <epan/asn1.h> and, therefore,
you have to include <epan/packet.h>.  Yes, that should be cleaned up,
perhaps by splitting the Kerberos support code into "stuff that handles
encryption keys without any reference to dissection" and "stuff that
does dissection-related work".

Change-Id: Ide5c31e6d85e6011d57202f728dbc656e36138ef
Reviewed-on: https://code.wireshark.org/review/6210
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 23:05:57 +00:00
Pascal Quantin 72f035d094 Qt: fix crash when opening Preferences window on Windows
Do not use delete on g_allocated memory

Change-Id: I84e0adc65c45520916adb9b2f6d46ca3f144486e
Reviewed-on: https://code.wireshark.org/review/6207
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-01 17:52:36 +00:00
Guy Harris 8bf7078f79 Move ui/qt/main.cpp to wireshark-qt.cpp, and get rid of the dummy.cpp hack.
Change-Id: Ib4684264363593372b3bf078cf17cae1a1cb10d6
Reviewed-on: https://code.wireshark.org/review/6199
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 10:46:00 +00:00
Guy Harris a53b67ceb7 Don't include header files that we don't appear to need.
Some don't appear to be necessary at all, as ui/qt/main.cpp doesn't do
very much (most of the work is done in various class implementations,
including WiresharkApplication), and a few only appear to be necessary
on Windows.

Change-Id: Ic9eae65e77e2425144f7fe4885fc865fcf6ab1ff
Reviewed-on: https://code.wireshark.org/review/6196
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 00:10:26 +00:00
Gerald Combs 91e4330394 Qt: Convert more dialog titles.
Change-Id: I9c3e3471a92b7af9347a541bece3d9405d37dce0
Reviewed-on: https://code.wireshark.org/review/6193
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-31 22:48:17 +00:00
Pascal Quantin c15b749946 Qt: fix 'Limit to display filter' functionality in Conversations/Endpoints windows
Change-Id: Ib57df32fbbe820b1105b11200b112d56a112e2a9
Reviewed-on: https://code.wireshark.org/review/6180
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-31 20:10:28 +00:00
Pascal Quantin a1732dc7a6 GTK: fix 'Limit to display filter' functionality in Conversations/Endpoints windows
Change-Id: I1efb7717c9eb4638fbff292e2953accc3e945ee6
Reviewed-on: https://code.wireshark.org/review/6178
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-31 15:49:29 +00:00
Guy Harris 37efc4ae77 We do stuff with signals only on UN*Xes.
Change-Id: I1b1a304143cf4e4a14107d1d55057cef24552a70
Reviewed-on: https://code.wireshark.org/review/6160
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 10:23:51 +00:00
Guy Harris 8f75a2ec70 And, again, no more version_info.c.
Change-Id: I0500383aa6c553e995c60fad850553c0ce5a66d9
Reviewed-on: https://code.wireshark.org/review/6159
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 08:50:41 +00:00
Guy Harris 27be466c9b Do the full string in get_{compiled,runtime}_version_info().
Have them start the string with "Compiled" or "Running on", and return
the string when done.

Change-Id: Ic4d290c963621fa0385dc5aab766fd4ad31d3810
Reviewed-on: https://code.wireshark.org/review/6155
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 06:29:11 +00:00
Guy Harris c1f30471ca Move the version_info.c stuff to wsutil/ws_version_info.c.
Change-Id: I3a5c7e219974bfb924819b43b4d445eaf00e5bde
Reviewed-on: https://code.wireshark.org/review/6153
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 03:41:02 +00:00
Gerald Combs 3b57861909 Qt: More WiresharkDialog conversions.
Convert the Follow Stream and Export Objects dialogs.

Change-Id: I8a4dda634f2f0475a24cf09601f76fb52069fe50
Reviewed-on: https://code.wireshark.org/review/6126
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-30 20:44:02 +00:00
Gerald Combs 8629aa26ec Qt: Continue using the new window title format.
Update several dialog titles to "Wireshark · <subtile...>".

Change-Id: I64645e913500ecd55a008e1609b46385dafe7de9
Reviewed-on: https://code.wireshark.org/review/6127
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-30 16:37:34 +00:00
Gerald Combs 4556498f33 Qt: Convert more dialogs to WiresharkDialog.
Make the Sequence, IO Graph, Statistics Tree, and VoIP Calls dialogs
subclasses of WiresharkDialog.

Remove "Stats Tree" from Statistics Tree dialog titles. Don't complain
if the user opens more than one instance of the dialog.

Use the applicationName property in WiresharkApplication instead of a
separate variable.

Add a preexisting item to the IO Graph bug list (hovering when the file
is closed clears the graph).

Change-Id: I8411a25305d00b16e0d4a82fa50a9bad5c85b239
Reviewed-on: https://code.wireshark.org/review/6125
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-30 03:34:03 +00:00
Pascal Quantin 0d414e5d7f Add ability to follow UDP stream by index
-z "follow,udp" tshark cli command now supports a stream index
It is now possible to select the UDP stream displayed in Qt GUI (like for TCP)

Change-Id: Ia367f36ea4f60db0fddb997a7e0903c09e172f2d
Reviewed-on: https://code.wireshark.org/review/6083
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-29 22:17:47 +00:00
Alexis La Goutte ea080724ba Wireshark Dialog (Qt): Add Modelines info
Change-Id: I6689f5a95c6dc051d660198fd58ae96967f3468f
Reviewed-on: https://code.wireshark.org/review/6116
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-29 16:36:40 +00:00
Alexis La Goutte 90ba1668b3 capture_file.h (Qt): missing ]
Change-Id: Ibc512f03913d77a6c4f0cdbcf5141efbd94b22f0
Reviewed-on: https://code.wireshark.org/review/6115
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-29 16:35:36 +00:00
Gerald Combs e8ec11fb7e Qt: Add a WiresharkDialog convenience class.
Add WiresharkDialog, a common base class for dialogs centered around
capture files. Make it a parent of Capture File Properties, Traffic
Table, Conversations, and Endpoints.

Rename CaptureFile::read_only_ to file_closed_. Add methods to
WiresharkApplication for generating consistent window titles.

Change-Id: Idc771556d8192e60f85dddc08fc4757698dee257
Reviewed-on: https://code.wireshark.org/review/6097
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-29 01:42:13 +00:00
Michael Mann 71c02b20eb Create FT_FCWWN field type.
Also, convert the "string" hf_ entries that used tvb_fcwwn_to_str as a string to use proto_tree_add_item with FT_FCWWN type.

Change-Id: I4ca77870499fd8239584a70874998b5d194a7167
Reviewed-on: https://code.wireshark.org/review/6036
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-28 20:05:29 +00:00
Pascal Quantin 8965e90a25 Qt Follow window: keep data representation when switching between streams
Change-Id: I1c7092d33d841e80ce110224f3bd617cb112be61
Reviewed-on: https://code.wireshark.org/review/6091
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-28 18:17:43 +00:00
Michael Mann 1d598bbff7 Replace ip6_to_str and ip6_guint8_to_str with address_to_str and tvb_ip_to_str.
Change-Id: I1d258923a7a63539ec8456d3e306bca5016a1e4b
Reviewed-on: https://code.wireshark.org/review/6060
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-28 14:09:27 +00:00
Guy Harris 9fce4dd4cb If we can't open the GeoIP database, close and unlink the map file.
We can't write out the full map file, and we return an error, so just
get rid of the file.

Fixes Coverity CID 1256521.

Change-Id: Ieee078f760c035d65b2fce199ea472ba915be9c6
Reviewed-on: https://code.wireshark.org/review/6090
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-28 10:28:56 +00:00
Dario Lombardo 63ebe918d9 Removed duplicated #include lines
Change-Id: I9cafa3cd5c74121168777d8c656e7e94e89efd3c
Reviewed-on: https://code.wireshark.org/review/6065
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-28 00:02:39 +00:00
Pascal Quantin eff91ed57f Fix building of color conversation filter
Right now eth filter (the last one tried) is always applied

Change-Id: Ibe5d3c30033bd2d385bd1e68b20388114673cb5c
Reviewed-on: https://code.wireshark.org/review/6064
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-26 22:43:35 +00:00
Guy Harris c2c9a09880 Use getopt_long() for the first pass through the argument list.
That way:

	1) we don't have to worry about the system getopt() and our
	   getopt_long(), on platforms that have getopt() but not
	   getopt_long() (Solaris prior to Solaris 10, HP-UX, AIX), not
	   working well together;

	2) if necessary, we can handle long options in the first pass.

Switch to using getopt_long() for the *second* pass for the GTK+ version
of Wireshark.

Use the documented mechanism for resetting the argument parser for the
glibc version of getopt_long(); use the mostly-undocumented-but-at-least-
they-documented-optreset mechanism for the *BSD version.

(We should look into doing only one pass, saving away arguments that
can't fully be processed in the first pass for further processing after
initializing libwireshark.)

Change-Id: Ide5069f1c7c66a5d04acc712551eb201080ce02f
Reviewed-on: https://code.wireshark.org/review/6063
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-26 22:39:46 +00:00
Pascal Quantin 2c6d2bb1e5 UDP: fix 'Follow Stream' button from conversations tab
Add stream index to conversation table

Change-Id: Id63b2cc0000d89297c8638b9a89315096fc5458b
Reviewed-on: https://code.wireshark.org/review/6062
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-26 22:37:33 +00:00
Michael Mann 3d3f97320b Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71
Reviewed-on: https://code.wireshark.org/review/5934
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-26 21:17:10 +00:00
Alexis La Goutte 9c7c72d5f2 VoIP Calls: Missing break in switch (CID 1155515)
Change-Id: Ie62cd2901c791490fe6685f560815e09b921d03b
Reviewed-on: https://code.wireshark.org/review/6001
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-25 21:11:22 +00:00
Guy Harris e08eba9b9e Only include <wsutil/os_version_info.h> if we need it.
Change-Id: Idee0e7205969ac2e7b33c4748a1463a0bfffe0a6
Reviewed-on: https://code.wireshark.org/review/6051
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-25 21:03:45 +00:00
Guy Harris 20503c7047 Check for getopt_long(), not getopt().
We support three types of platforms:

	1) UN*Xes that have both getopt() and getopt_long();

	2) UN*Xes that have getopt() but not getopt_long();

	3) Windows, which has neither.

Checking for getopt_long() lets us distinguish between 1) and 2) and
build getopt_long() for them.

Change-Id: Iaf0f142f9bebaa2eed2128d544ec9786711def45
Reviewed-on: https://code.wireshark.org/review/6045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-25 01:11:10 +00:00
Alexis La Goutte bfa9ddfa6c Qt (pref.gui_layout_type): Missing break in switch (CID 1159202 & 1159203)
Change-Id: I28af99cff5db310ef10258e3054afa7337df1e60
Reviewed-on: https://code.wireshark.org/review/5996
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-24 17:03:11 +00:00
Alexis La Goutte 4876016bda Qt (KeyPressEvent): Missing break in switch (CID 1159205, 1159206, 1159208, 1159209)
Change-Id: I40b7c7eefb269570e6a1c5c9ec310fa97840d42d
Reviewed-on: https://code.wireshark.org/review/5995
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-24 17:02:05 +00:00
Stephen Fisher 2d8ec49ffa Move twelve show_version() functions from the varoius programs and
Wireshark UI files into a single one in wsutil.

Change-Id: I0a64f0cc8106bd681bd185289c36272c4c43baad
Reviewed-on: https://code.wireshark.org/review/6026
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-24 16:51:45 +00:00
Alexis La Goutte 91cc34343f Qt (emitAppSignal): Missing break in switch (CID 1159204)
Change-Id: Ia2ba40a4fc284dbf3da8e27edf336a4e27cdb4e3
Reviewed-on: https://code.wireshark.org/review/6000
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23 13:55:50 +00:00
Gerald Combs 5cdad9fe42 Qt: Add methods to CaptureFile and WiresharkApplication.
Add isValid, fileTitle, and retapPackets methods to CaptureFile. Add
application name and title separator convenience methods to
WiresharkApplication.

Convert traffic tables, conversations, and endpoints to use CaptureFile
directly and to let the user know when the capture file is closed. Set
the file dialog titles while we're here.

Change-Id: I990392786d3833e1e0b3638aa2d34a5ada39fa13
Reviewed-on: https://code.wireshark.org/review/5957
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-22 18:12:31 +00:00
Alexis La Goutte 5248c0df21 Fix unknown command tag name [-Wdocumentation-unknown-command]
Change-Id: I6c2564a86e13d9321001856ba1f51681a9f20976
Reviewed-on: https://code.wireshark.org/review/5979
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-22 15:24:28 +00:00
Gerald Combs 8076f29fdb Qt: Fix status bar signal.
Change-Id: Ie935269f6cbe9495b95bcc24b45198fbd284fb35
Reviewed-on: https://code.wireshark.org/review/5963
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-22 00:42:15 +00:00