Commit graph

56256 commits

Author SHA1 Message Date
Michael Mann
6f8de873c7 Allow "cba" filter prefix for hf_ fields (missed a Profinet file the first time)
Change-Id: I3ff65a8f6307a9ee08e173c0b2658d96985e0c45
Reviewed-on: https://code.wireshark.org/review/5943
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-21 12:57:58 +00:00
Pascal Quantin
da220672b2 Qt: keep "Copy to clipboard" button active when closing the capture_file_properties_dialog
As the Capture File Properties window content is kept once the capture is closed, allow to copy it

Change-Id: I11466e102fcf75a31aaa22225861ad8bf27f89a8
Reviewed-on: https://code.wireshark.org/review/5942
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-21 09:48:49 +00:00
Peter Wu
fda12fb66d Fix Python 3 compatibility in LocatePythonModule
Regression introduced with cb345eb4bd.

Change-Id: I625432ac4572d2449cb6981a158e46c560a81f1a
Reviewed-on: https://code.wireshark.org/review/5883
Reviewed-by: Maarten Bezemer <maarten.bezemer@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-21 08:54:24 +00:00
Guy Harris
deb49cb662 Add comments, change structure member name.
"GSList *" implies a list; call the pointer in a struct
heur_dissector_list "dissectors", to indicate what it's a list *of*.

Change-Id: Idf5011e08d35d28934cd52f818b945db1cc7f37b
Reviewed-on: https://code.wireshark.org/review/5941
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-21 07:32:51 +00:00
Guy Harris
a138faf425 Clean up some error messages.
Correct one message, change another one from a g_assert() to a g_error()
with descriptive text.

Change-Id: I667beb08ac1677205a9323ab623ed0a9766bac79
Reviewed-on: https://code.wireshark.org/review/5940
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-21 07:26:42 +00:00
Bill Meier
806ebca6a5 packet-PROTOABBREV.c: Update re #includeusage
- packet.h should be first Wireshark #include
  after config.h and "system" includes.
- '#include <glib.h>' not needed.

Change-Id: Ibec076818f3f509aabb4d240e939ef719f3798d6
Reviewed-on: https://code.wireshark.org/review/5939
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 07:18:28 +00:00
Bill Meier
ce211a4d61 Cleanup use of #includes in a few recently committed dissectors.
Change-Id: Ie66d4c3f0c5d0037cac65ff39e4dedcedff462f1
Reviewed-on: https://code.wireshark.org/review/5938
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 06:48:22 +00:00
Bill Meier
b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Gerald Combs
14cff7b6e2 Qt: Don't clear the capture file properties.
Don't clear the contents of the capture file properties dialog when the
capture closes. Retaining the contents lets users compare the properties
for multiple files.

Change-Id: I6bf684e7bd996f22032ec3d0adcddc343bb17992
Reviewed-on: https://code.wireshark.org/review/5937
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-21 04:52:12 +00:00
Gerald Combs
35571f850f Qt: Fix accordion frame height calculation.
Change-Id: I32d2ea2ff34544e285b52e4e35e035306c33d3aa
Reviewed-on: https://code.wireshark.org/review/5935
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-21 04:52:04 +00:00
Guy Harris
2b006ad30e Have a heur_dissector_list_t be an opaque handle.
This allows dissector lists to be looked up by name, so they can be
shared by multiple dissectors.

(This means that there's no "udplite" heuristic dissector list, but
there shouldn't be one - protocols can run atop UDP or UDPLite equally
well, and they share a port namespace and uint dissector table, so they
should share a heuristic dissector table as well.)

Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7
Reviewed-on: https://code.wireshark.org/review/5936
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-21 04:14:24 +00:00
Pascal Quantin
81798009b9 Qt: fix a crash when closing a file while capture file properties window is open
refresh_button_ and copy_comment_button_ are not used neither initialized, get rid of them
Also clear text areas and disable buttons

Change-Id: I418d712313041dcf4f15aceee01497f01ae74918
Reviewed-on: https://code.wireshark.org/review/5927
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>
2014-12-21 04:13:40 +00:00
Pascal Quantin
86d1b54235 Qt: disable Capture File Properties toolbar icon by default
Otherwise it can be opened by clikcing on the icon just after launching Wireshark
Also update tooltip to match the exact dialog name

Change-Id: I5ce5e0c24f3dfb44c2303c78114102c5c03ccc88
Reviewed-on: https://code.wireshark.org/review/5930
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-21 04:12:08 +00:00
Michael Mann
cadf1a5fce Remove profinet_type from packet_info structure.
Profinet I/O and DCOM CBA had completely separate uses for the profinet_type member, so it's okay to separate them with different proto ids tracking the proto_data.

Change-Id: I7b9c01b8d4f74d51fe9f9ef2f957479dff0a7157
Reviewed-on: https://code.wireshark.org/review/5852
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-12-21 01:57:51 +00:00
Luke Mewburn
d7fd00de9f MIPv6: simplify fixed point degrees conversion
* Simplify the conversion of degrees from 24 bit fixed point to a float.
  Avoids strict-aliasing warning by gcc 4.4.
* Add reference to RFC 6757.
* Correct spelling of 'convert' in degrees_convert_fixed_to_float().

Change-Id: Icb680d009fdd960e8668fa3020060799d6a74c2f
Reviewed-on: https://code.wireshark.org/review/5913
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-21 01:56:56 +00:00
Guy Harris
210aaf11ba Use "" rather than <> for includes; that might fix ABI check failures.
Change-Id: I80e291031e4e8e347422e4a1e636d2ce40efc5c2
Reviewed-on: https://code.wireshark.org/review/5931
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 23:01:53 +00:00
Gerald Combs
ac69a6d1fa Qt: Use an accordion frame in the welcome screen.
Place the recent files list in an accordion frame so that showing and
hiding is more visually smooth.

Change-Id: Ifdc534a33aa9f93949c9f919cfe0765fbfcde750
Reviewed-on: https://code.wireshark.org/review/5924
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-20 22:18:09 +00:00
Gerald Combs
d11e94b9dc Remove debugging code.
Change-Id: If3a64a6914ae8ce2521c85766df6f733a13ca7e1
Reviewed-on: https://code.wireshark.org/review/5926
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-20 22:18:01 +00:00
Stig Bjørlykke
b4e90bdc8e Fix filter test for multifield custom column
This adds support for "field||field" without spaces.

Change-Id: Ia738d6642d12a188d1629bbdd9701cc8f8bb7a68
Reviewed-on: https://code.wireshark.org/review/5922
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-20 20:46:21 +00:00
Gerald Combs
8b24471e62 Qt: Revert back to an all-in-one main window.
Switch back to having everything on the main window similar to GTK+.
It's more cluttered but this way but you don't have to navigate the task
selector to get to the recent files and help links.

Retain the "Capture", "Open", and "Learn" imperative text. Move "Open"
to the top as suggested by Michal.

Change-Id: Iaf7d93f9caf686b5cbeb640e5e5f95ecb46f7f2d
Reviewed-on: https://code.wireshark.org/review/5896
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-20 19:49:41 +00:00
Alexis La Goutte
2b621e2209 802.11: VHT NDP announcement frame is no correctly decode when there is FCS
The FCS at the end of the frame is decoded as additional STA info fields which does not seem correct.

Issue reported by Sudheer
Bug:10786
Change-Id: Idffaa41cd7c79ad4c9937e7f32aa2444c1b9033f
Reviewed-on: https://code.wireshark.org/review/5849
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-20 19:37:09 +00:00
Pascal Quantin
851909d2c8 FCoIB / Infiniband SDP: prevent a crash when 'enable manual settings' is set without filling address field
Bug: 10796
Change-Id: Ifdb7804ec5e1146b08f00e54647d802a69d52113
Reviewed-on: https://code.wireshark.org/review/5914
Tested-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: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-20 18:35:45 +00:00
Martin Kaiser
326e4964e5 no need for if (tree)
Change-Id: I0749f8e10d6f8d97b85da6bb52b0ab336ba06c38
Reviewed-on: https://code.wireshark.org/review/5919
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-12-20 18:04:13 +00:00
Martin Kaiser
7d1824868c hide the hf_msmms_data item, not the NULL item
Change-Id: If92c9bc281f44de8f3b1de71005240755748403a
Reviewed-on: https://code.wireshark.org/review/5918
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-12-20 18:03:57 +00:00
Michal Labedzki
7b2ae71235 Fix filter valid/invalid test for multifield custom type
Check for "or" or "||" (also ignore whitespaces)
and check both arguments of this operator to be
fieldname (character check), then check whole filter is valid
for dfilter compiler.

Change-Id: I412b5dc1fca16fcd2b640aa74af81167300fd11e
Reviewed-on: https://code.wireshark.org/review/5848
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-20 17:59:25 +00:00
Guy Harris
abd90c32bb Fix handling of 3-component OS version numbers.
Get rid of doubled square brackets (what were those for?), and match
dots in the version number with "\.", so we only match dots.

This fixes the handling of version numbers such as 10.10.1.

(A 2-component version number doesn't match, but that's OK - the sed
command doesn't use -n, so that just means it's unchanged by the
command.)

Change-Id: I3046133de732c80410592272d1f7b961a64d9289
Reviewed-on: https://code.wireshark.org/review/5915
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 17:47:50 +00:00
Gerald Combs
9ba9cd83a4 Qt: Add a CaptureFile class.
Wrap the capture_file struct in a QObject which translates cf_cb_* and
capture_cb_* events into signals. Move the global cfile to
capture_file.cpp.

Don't use a void pointer for the capture file struct.

Change-Id: Ic5d5efb4bb1db64aa0247245890e5669b1da723a
Reviewed-on: https://code.wireshark.org/review/5885
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-20 17:39:29 +00:00
Gerald Combs
2bb8255e29 Consolidate RTP stream structs.
Consolidate the three different RTP stream structs in ui/rtp_stream.h,
ui/gtk/rtp_player.c, and ui/voip_calls.c into one. Make the member names
a bit more consistent. Document what each GList contains. Use nstime_t
for timestamps since that's what we get from the frame data. Use g_new0
to initialize our structs.

Change-Id: I2b3f8f2051394a6a98a5c7bc49c117f07161d031
Reviewed-on: https://code.wireshark.org/review/5843
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-20 16:49:05 +00:00
Guy Harris
79b5bb418b Fix typo.
One position off on the keyboard and everything falls apart.

Change-Id: I00909ca3344642d3eeaae0d8563403b56cc62f79
Reviewed-on: https://code.wireshark.org/review/5912
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 08:58:04 +00:00
Guy Harris
a61f6e4745 When checking for floorl(), include math.h.
It's not being found with MSVC, but is apparently present; perhaps
math.h does something magic, e.g. defining it as a macro, so try using
check_symbol_exists with "math.h".

Change-Id: Idaecac641fb0b87d399807d8bf1fcb74e7251a4e
Reviewed-on: https://code.wireshark.org/review/5911
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 08:23:53 +00:00
Guy Harris
4b8639f049 Add a check for floorl().
Also, we don't use NEED_STRPTIME_H, we use HAVE_STRPTIME.

Change-Id: I330e8ce408c05b74c50f3369691283e35e68505c
Reviewed-on: https://code.wireshark.org/review/5910
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 05:19:04 +00:00
Guy Harris
4d3c7b50de Don't bother with __builtin_floorl().
At least as I read the GCC documentation, if GCC supports a builtin
floorl() at all, it will always treat floorl() and
__builtin_floorl() the same (it's reserved in C90 and defined in C99, so
nobody should ever write C code assuming floorl() won't be treated in
that afshion).

In addition, the GCC 3.3.6 manual says nothing about __builtin_floorl(),
so it probably won't help to use it.  If it appears to help, there's
probably something else going on.

Also, GCC appears not to like "#ifdef (__GNUC__)", as the parentheses
mean it's testing an expression, not a macro name.

Change-Id: Ib88b52c366d7f3b1637bb408fb18d04b67c27e4b
Reviewed-on: https://code.wireshark.org/review/5909
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 05:09:52 +00:00
Guy Harris
caf4cc6399 Use AC_SEARCH_LIBS() for math functions.
Use it to check whether we need -lm for various math functions -
including floorl().  Let it handle adding -lm, rather than having that
in the various _LDADD macros.

Change-Id: Ic5d24ec35e060306351f4981c92e26879e597d81
Reviewed-on: https://code.wireshark.org/review/5908
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 04:45:48 +00:00
Guy Harris
1a051afee3 Include <math.h> to declare floor().
Change-Id: I39de31c3e38b83aaec76396048e6960f609bc63e
Reviewed-on: https://code.wireshark.org/review/5907
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 04:24:05 +00:00
Guy Harris
07fb8cf54a Remove trailing white space.
Change-Id: I0777945a5234cf380e2f3bc2461cc638c316f499
Reviewed-on: https://code.wireshark.org/review/5906
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 04:11:43 +00:00
Guy Harris
b445b3da44 Rename wsutil/floor.[ch] to wsutil/floorl.[ch].
That better indicates what they do - they don't supply floor(), as
that's a standard math.h feature dating back before C89, they supply
floorl().

Change-Id: Ib1278c51cdfc57680c28c51de87eafb2cb50c8eb
Reviewed-on: https://code.wireshark.org/review/5905
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 03:44:34 +00:00
Guy Harris
b925c350d9 We assume all versions of MSVC have floorl().
If not, we'll have to play some games in config.nmake.

Change-Id: I1dbc5d4ef41ede0e596dbe40b4e139e0f6c39dba
Reviewed-on: https://code.wireshark.org/review/5904
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 03:37:34 +00:00
Guy Harris
1088629503 If we don't have GCC, fall back on using floor().
Add the closing brace for the function body while we're at it.

Change-Id: I73170fdc0885972dce531b553ff8601cceea182e
Reviewed-on: https://code.wireshark.org/review/5902
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 03:00:21 +00:00
Guy Harris
b736896490 Handle floorl() the same way we handle other not-on-all-platforms functions.
Use AC_CHECK_FUNC() for it, define FLOORL_LO to floorl.lo if we *don't*
have it, add FLOORL_LO to the list of items conditionally built in
libwsutil, and include "wsutil/floor.h" only if HAVE_FLOORL is *not*
defined, as that means it's *not* supplied by the platform and thus
*not* declared in <math.h>.

Also, use the standard export stuff in wsutil/floor.h.

Change-Id: Ic24aa69f65f2d15450d8b84b0c2b0c58f38edebe
Reviewed-on: https://code.wireshark.org/review/5901
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 02:54:04 +00:00
Stephen Fisher
201a7e7d68 Change more variables from si_code to mtp3_si_code to avoid conflicts
with a #define in a NetBSD header file.

Change-Id: I2136db207cb4707571920b373708fcb63505131c
Reviewed-on: https://code.wireshark.org/review/5900
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-20 02:30:17 +00:00
Guy Harris
556f9a5b2b Include floor.c and floor.h in the source tarball.
Change-Id: Iabc0403643a05eaa7dbd525a94bc720d100d54d5
Reviewed-on: https://code.wireshark.org/review/5899
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 02:02:30 +00:00
Guy Harris
2f44afef80 Use ENCTYPE_NULL in the krb5_crypto_init() call.
That appears to be a name supplied both by MIT and Heimdal Kerberos.
Using it makes it a bit clearer what the code is doing, and might avoid
type clash warnings if it's the right type (e.g., if it's a member of an
enum, as it is in Heimdal, and the corresponding argument to
krb5_crypto_init() is of the same type, the types will match).

Change-Id: I81b79223f789b8d1ec47180b7636ac1d83e03681
Reviewed-on: https://code.wireshark.org/review/5898
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 01:57:03 +00:00
Stephen Fisher
2376953909 Another missing change
Change-Id: Icaaaeda75f411ecc7cf3027440c8af2b85021be3
Reviewed-on: https://code.wireshark.org/review/5897
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-20 00:45:37 +00:00
Stephen Fisher
71fc2f8a7a Another missing change, to include floor.h
Change-Id: Ice962bb9d62ab99f225228bf1e78850947eea625
Reviewed-on: https://code.wireshark.org/review/5895
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-20 00:28:11 +00:00
Guy Harris
df1f919b94 Don't use g_slist_free_full().
It's only in GLib 2.28 or later, but we don't require 2.28.

Instead, have col_custom_field_ids_free() do what g_slist_free_full() does -
and more.

Change-Id: I15768cfd2d26c847470b02ea6c51830dabcaa7ee
Reviewed-on: https://code.wireshark.org/review/5894
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 00:21:27 +00:00
Stephen Fisher
dba361be1a Add a missing line related to previous two commits
(I messed up my local git repo using git branches and stash/stash pops,
sorry for all of the extra commits for one change)

Change-Id: Ib031ae7d57ba9ea4b19fe13121643799e7563046
Reviewed-on: https://code.wireshark.org/review/5893
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-19 23:22:02 +00:00
Stephen Fisher
aa0a04054c Add missing files from last commit
Change-Id: I4a6dd1b60893d19b91f5bc0f85be9ee99cd3eb5e
Reviewed-on: https://code.wireshark.org/review/5892
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-19 23:12:34 +00:00
Stephen Fisher
47dc4e77cc Revert "Provide a floorl() function (which is currently only able to call GCC's __builtin_floorl() function) for systems which don't provide one." because I left off the new wsutil/floor.[ch] files
This reverts commit e2586ec36d.

Change-Id: Ie38b7f32b2d21e3beba5173eec22ca12b7f5da91
Reviewed-on: https://code.wireshark.org/review/5891
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-19 23:12:09 +00:00
Stephen Fisher
e2586ec36d Provide a floorl() function (which is currently only able to call GCC's
__builtin_floorl() function) for systems which don't provide one.

Change-Id: Ie0140ff195f0eae525c7bd70c7c3e23039fde569
Reviewed-on: https://code.wireshark.org/review/5889
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-19 22:56:18 +00:00
Guy Harris
e7d2c8dad5 Get rid of some accidentally-checked-in debugging stuff.
Change-Id: Iea54df783cdff2424d23ecfba8f219dae42d0c83
Reviewed-on: https://code.wireshark.org/review/5888
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-19 22:08:21 +00:00