Commit Graph

56405 Commits

Author SHA1 Message Date
Pascal Quantin 7d943e11a4 Add back "version.h" inclusion
It got removed by the automatic include cleaning scripts
Also add it to text2pcap.c as it is used to get the version when writing a pcapng file

Change-Id: I3d56985fa1d04bcb066fe015a588c24cf3cb7267
Reviewed-on: https://code.wireshark.org/review/6248
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-02 18:24:55 +00:00
Michael Mann b90f7846f4 Add sanity check to ensure integer types don't get set to BASE_NONE.
This is checked by Wireshark, but the script should catch it earlier in case Wireshark/TShark isn't run after the script is executed (a mistake I've made several times).

Change-Id: I1d113871b10fcae5a6d3e9036cc80d7b1ec1ae57
Reviewed-on: https://code.wireshark.org/review/6245
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02 17:38:18 +00:00
Graham Bloice e7d0cdc061 Fix lua tests on Windows
Convert TEST_DIR path to a Windows path, this is used in all the lua tests.
Fix a typo

Change-Id: I38808822c998ed1df007732b3701b6b13d6c886b
Reviewed-on: https://code.wireshark.org/review/6235
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-02 16:49:40 +00:00
Bill Meier a3c705af06 mux27010: Add a link to info about the mux27010 packet structure.
Change-Id: I46f8efc8c95bf4501a631ef3adc5291939ab1497
Reviewed-on: https://code.wireshark.org/review/6240
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02 16:28:16 +00:00
Evan Huus 887d198361 test: improve check for out-of-tree tests
Rather than running `cd` and letting it potentially fail, just use the `-d` flag
to test that `run` exists and is a directory. Avoids useless stderr output.

Change-Id: Iab8b63681db6256aa1a6fc389d2536acbd491aba
Reviewed-on: https://code.wireshark.org/review/6239
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-01-02 16:12:45 +00:00
Evan Huus 5cb96a0eb5 test: default WS_QT_BIN_PATH to WS_BIN_PATH
it used to be SOURCE_DIR, which is still the fallback for WS_BIN_PATH, but this
way if you specify a custom WS_BIN_PATH it gets picked up for both

Change-Id: If9198565fc7b7b3911550fd200adb0f918622540
Reviewed-on: https://code.wireshark.org/review/6238
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-01-02 16:08:20 +00:00
Evan Huus 1c7ffed576 ositp: fix some BASE_ errors from g7935ba9f5be
Change-Id: I71639f95f8efff9619e00dae45763ff863f0ca21
Reviewed-on: https://code.wireshark.org/review/6237
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-01-02 15:49:24 +00:00
Joerg Mayer 27fa202b5e Make it easier to run tests out of tree.
Change-Id: I4ed10339d3c543d9d199e5262b6e7bb8247544ac
Reviewed-on: https://code.wireshark.org/review/5148
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02 15:00:03 +00:00
Michael Mann 7935ba9f5b Eliminate proto_tree_add_text from packet-ositp.c
Change-Id: If97f1b17bf8dbd6bac708b7dfbef6df73fad0f30
Reviewed-on: https://code.wireshark.org/review/6218
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: Evan Huus <eapache@gmail.com>
2015-01-02 14:28:01 +00:00
Hadriel Kaplan 3cc6aee32a Lua: regex test suite fails with UTF-8 locale
Due to the change in change-id Ib43e16a9d98d08e5ddaff81fd3235f5b64d7b95b, the setlocale() call has been moved earlier in tshark's processing, such that Lua plugins load with the environment locale instead of C-locale. Since that matches Wireshark's behavior, it's good, but it causes the Lua regex test suite to fail. So the test suite needs to be fixed.

Bug: 10824
Change-Id: I3dcad15a9e247a1e42d2f708ccfb7272de2fe960
Reviewed-on: https://code.wireshark.org/review/6226
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-01-02 13:09:16 +00:00
Evan Huus 55c385e610 tvb: implement endianness-paramterized getters
e.g. tvb_get_guint16(tvb, offset, ENC_LITTLE_ENDIAN)

Change-Id: Iea02fd59b13678aca741d028fb1f66f334447498
Reviewed-on: https://code.wireshark.org/review/6191
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: Evan Huus <eapache@gmail.com>
2015-01-02 04:07:19 +00:00
Guy Harris 611cfd00c2 Always set decrypt_len when setting decrypt.
This may not always be necessary, but....

Change-Id: Ib409839dbee0574c516568a1f43793f8b407f611
Reviewed-on: https://code.wireshark.org/review/6232
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-02 03:55:06 +00:00
Stephen Fisher a621bb7dde Revert "Bring pkg.m4 in from pkgconfig version 0.28 so we can use the PKG_PROG_PKG_CONFIG macro to try searching for pkg-config even when it isn't installed. Without this (and without pkg-config installed) the configure script is broken. With it, it gives a mes"
This reverts commit f94eb27862.

Change-Id: I1a74fa221bdb3d72e88a46ced64e0d434a8fe552
Reviewed-on: https://code.wireshark.org/review/6231
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2015-01-02 03:49:52 +00:00
Guy Harris 854157883b When deccoding base-64, the result is the length of the *decoded* result.
That way, for example, format_text() calls on the decoded result don't
go past the end of the decoded result.

Fix some more indentation while we're at it.

Bug: 10823
Change-Id: Ia7b7b1d9fb06af5df945f19a375bf5bef3277018
Reviewed-on: https://code.wireshark.org/review/6221
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-02 01:53:57 +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
Michael Mann 06a1f4670e Have hf variables outputted in the order they were found in the file.
Previously they were "randomly sorted" in the hash table.  The hf "array" is outputted in the order found, so have the hf variable declaration match.

Change-Id: I4b078a6328ba7c2781f07bb41d701412fc74ba22
Reviewed-on: https://code.wireshark.org/review/6219
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02 01:37:56 +00:00
Bill Meier 454fd6e9eb Add "Editor modelines"; Adjust whitespace as needed.
Change-Id: Ic5a5acb0f36d3aa144edbfb1ae71097b18426db4
Reviewed-on: https://code.wireshark.org/review/6216
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02 00:49:09 +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
Guy Harris f384fa07f9 Fix tpyo.
Change-Id: I5b190ee35086664ed053d376def4e21ab9ad9236
Reviewed-on: https://code.wireshark.org/review/6213
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 23:35:22 +00:00
Guy Harris 2ce7dfe14f More indentation cleanups.
Change-Id: I6d21bda89f8032d302620e21ac393dc345165ac7
Reviewed-on: https://code.wireshark.org/review/6212
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 23:28:35 +00:00
Guy Harris 6c24c7e3a8 Clean up indentation.
Change-Id: I5aa6cafc6249b3a820b1bbf2eddc2ec1fdc88685
Reviewed-on: https://code.wireshark.org/review/6211
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 23:15:23 +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
Hadriel Kaplan 445ddc8336 Lua: FieldInfo '==' check isn't really equality
The FieldInfo metamethod for equality (letting you use the '==' operator)
doesn't check for equality, but rather if the left-hand side is within
the right-hand side. It should be equality instead. Also, all of the
FieldInfo operate overloads should push a boolean even if they're false
result.

Bug: 10820
Change-Id: Ibddaab29713f26d22ddb4d5804b9edb15e93fd79
Reviewed-on: https://code.wireshark.org/review/6186
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-01 22:24:38 +00:00
Bill Meier 6d6ba642b9 .gitignore: Add '*.nativecodeanalysis.xml'
Change-Id: I54133af8626125b51e4263d3c77358752bdcf339
Reviewed-on: https://code.wireshark.org/review/6209
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-01 20:05:29 +00:00
Guy Harris 7ed0cd7ba7 wireshark-qt.cpp belongs in, err, umm, the Qt Wireshark - not the GTK+ one.
Change-Id: I101be1967f45bcb56d72784a456e394ca7e51323
Reviewed-on: https://code.wireshark.org/review/6208
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 18:28:44 +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
Pascal Quantin 1663c2afe7 Welcome in 2015
Change-Id: Ib581b9383b211ea8dbcea1cadf98a2b8c3548ab5
Reviewed-on: https://code.wireshark.org/review/6204
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-01 13:21:26 +00:00
Guy Harris e8e38b439f wireshark-qt.cpp is only a Qt Wireshark source file.
It's not a GTK+ Wireshark source file, so don't include it in
wireshark-gtk.

Change-Id: I0affa1fab1a29e10e1cf446e49182c9c4f218b87
Reviewed-on: https://code.wireshark.org/review/6203
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 12:36:38 +00:00
Guy Harris 6ef4cbd142 Include "file.h" to get read_keytab_file() declared.
Change-Id: I7e9ea47019f259a56a8652d0e003e23a3e1d1366
Reviewed-on: https://code.wireshark.org/review/6202
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 12:17:02 +00:00
Guy Harris 219d37e2d1 Let routines from the Kerberos dissector be called from C++.
Wrap its declarations in the usual "extern "C"" stuff.

Change-Id: I353ab334bc08a69fdacaaab5672edf758b14766a
Reviewed-on: https://code.wireshark.org/review/6201
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 12:13:34 +00:00
Guy Harris 0a64b55971 Remove wireshark_cxx.
It may have been part of the "build Qt Wireshark as C++" hacks, and is
now causing build problems.

Change-Id: If471bf3dca01f1bc6e9b5b871d0de3159e4c8e1c
Reviewed-on: https://code.wireshark.org/review/6200
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 11:29: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 a4019a357b Rename a variable to avoid a compiler warning.
(Thanks, IBM and AT&T.)

Change-Id: Ifcffd4937f90ca466c01ebc4f3e3bd8555a9b078
Reviewed-on: https://code.wireshark.org/review/6198
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 05:03:45 +00:00
Graham Bloice 21697af636 Added DNP3 support for g13 and g43, output command events
Bug: 10347
Change-Id: Ic173f31d8cf3fd002454f4c22b85c19bae42d544
Reviewed-on: https://code.wireshark.org/review/6175
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: Anders Broman <a.broman58@gmail.com>
2015-01-01 04:38:34 +00:00
Michael Mann 889c566b9a Eliminate proto_tree_add_text from WiMax plugin.
Most of this was done with a custom perl script that picked out the field names from the XBIT macro and generated an hf_ and filter (that was humanly tweaked from there).

Change-Id: I563db9f8ea216efe37322b784ab0daf25c038d9e
Reviewed-on: https://code.wireshark.org/review/6149
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-01 04:34:44 +00:00
Guy Harris 114e7735b9 Call setlocale() before getting version information.
That way, the setlocale() call used to get the current locale will get
the right answer.

Change-Id: Ib43e16a9d98d08e5ddaff81fd3235f5b64d7b95b
Reviewed-on: https://code.wireshark.org/review/6197
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 00:47:17 +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
Guy Harris 9a7d4559ae Use setlocale() to get the current locale.
This:

	1) should work on Windows;

	2) reflects what the C environment is actually set up to use,
	   rather than what the environment variables for locale are
	   set up to use - C programs default to the C locale and only
	   pick up the setting from the environment variables etc. if
	   you explicitly request the system locale with a setlocale()
	   call.

Change-Id: Iee064237e70501a5450d4daa9ab849391f200efd
Reviewed-on: https://code.wireshark.org/review/6195
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 23:33:31 +00:00
Guy Harris 1bc2565bff Don't include signal.h unless we need it.
Change-Id: I3965e0951eee919720f780b5e52732fd18fd9786
Reviewed-on: https://code.wireshark.org/review/6194
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 22:54:01 +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
Guy Harris 0e57ff2ca1 We no longer do anything signal-related, so don't include <signal.h>.
Update a comment pertaining to that, while we're at it.

Change-Id: Ic0a3f8575f8e98ca6032ed3e06e3dd76055d65a1
Reviewed-on: https://code.wireshark.org/review/6192
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 22:47:37 +00:00
Guy Harris 23b1127daf Swallow get_glib_version_info() into get_compiled_version_info().
It's not that complicated, so we might as well just do it in line.

Change-Id: I10809db554e668a853d28e7dca48b2de0ed51ad3
Reviewed-on: https://code.wireshark.org/review/6190
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 21:43:29 +00:00
Guy Harris 93efc20115 "#else", not "#elif", for the last part of a chain of conditionals.
Also give more details, for future reference, on how to determine
whether the processor supports CPUID.

Change-Id: I01e7173e45b0079f02338e51248238c05302dbd2
Reviewed-on: https://code.wireshark.org/review/6189
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 21:26:10 +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
Guy Harris d5d2c0e651 ws_cpuid() returns a success/failure indication; make it gboolean.
Change-Id: I03403ce29c4ac343d56fc2cf33aa8da90a082cbb
Reviewed-on: https://code.wireshark.org/review/6185
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 19:51:59 +00:00
Guy Harris 35cf7c6b3c Distinguish between IA-32 and non-x86.
In case we make ws_cpuid() work on IA-32 processors, add a separate
"always returns no" version of ws_cpuid() for non-x86 processors.

Change-Id: Id6fbd3e5c7d4f04063bc9bcd8f1644cd617b297e
Reviewed-on: https://code.wireshark.org/review/6184
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31 19:46:33 +00:00