Commit graph

57400 commits

Author SHA1 Message Date
Guy Harris
08bee7d71b Clean up display of raw hex latitude/longitude values.
1) It's only 40 bits long, so show only 10 hex digits.

2) If you're putting "0x" before the number, blank-padding on the left
   looks weird; use zero-padding.

3) Fix unbalanced parentheses.

Change-Id: I76aedb1fb82f699ee08102b97b0d72e09d8c5917
Reviewed-on: https://code.wireshark.org/review/7320
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22 20:05:14 +00:00
Guy Harris
066ae91137 Put back address family field.
Change-Id: I89d60f78a0c834663c426f5ec50c6033ba9f99e1
Reviewed-on: https://code.wireshark.org/review/7318
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22 19:55:27 +00:00
Guy Harris
99ff8baed6 Use file extensions even more as a heuristic.
If a file type has a list of "typical" extensions, and a file has an
extension that is *not* one of those extensions, the file is unlikely to
be of that type.

For files that have extensions, after we try the heuristics that have a
list of "typical" extensions that includes the file's extension, try the
heuristics that have no such list, and after that try the heuristics
that have such a list but where the list *doesn't* include the file's
extension.

This fixes, for example, some cases where non-PacketLogger files were
getting identified as PacketLogger files.

Change-Id: I2d8c3b983ed6ccd692beb888668f77eb9b5f437b
Reviewed-on: https://code.wireshark.org/review/7315
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22 19:25:07 +00:00
Gerald Combs
73508e8cbd [Automatic manuf, services and enterprise-numbers update for 2015-02-22]
Change-Id: Ida0ae626be0753c05435f3828d5137863309ebf1
Reviewed-on: https://code.wireshark.org/review/7309
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-22 16:05:35 +00:00
Guy Harris
d1865e000e Make FT_{U}INT{40,48,56,64} handle BASE_CUSTOM.
Finish the job of handling integral values > 32 bits similarly to who we
handle values 32 bits or less.

In cases that "should not happen", and where we might *not* be executing
in the context of a dissector (filling in the field label can be done
lazily, being deferred to "print" time, and that doesn't happen in the
context of a dissector), use g_assert_not_reached() rather than
DISSECTOR_ASSERT_NOT_REACHED() - the latter throws an assertion that's
not caught if we're not doing dissection, so we crash anyway.

Bug: 10983
Change-Id: Ia81a0a4925394f99aa35193a333f3e9659a9b93d
Reviewed-on: https://code.wireshark.org/review/7307
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22 08:56:43 +00:00
Guy Harris
1157aa8fd1 Set 64-bit signed values with proto_tree_set_int64().
As in "don't set it with proto_tree_set_uint64(), signed vs. unsigned
matters".

Change-Id: I23ef3d172fa40c0867dfb6a078ce292bd5282170
Reviewed-on: https://code.wireshark.org/review/7306
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22 07:26:41 +00:00
Guy Harris
2196378bcb Fetch values appropriately according to the value's type.
This fixes some crashes.

Change-Id: I47583777486486114675ba98cb58971adb8b1b10
Reviewed-on: https://code.wireshark.org/review/7305
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22 03:45:54 +00:00
Michael Mann
8d5da72ff9 Add tvb_address_with_resolution_to_str.
Convert dissectors to using the API where appropriate.

Change-Id: I059582f73a75635d4a0338d02d4c4b212162480b
Reviewed-on: https://code.wireshark.org/review/7296
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-22 02:53:48 +00:00
Guy Harris
ddafa7e381 Update Debian symbols list.
Change-Id: Iaf5d8022f2005ac32133896c74f45246a2310684
Reviewed-on: https://code.wireshark.org/review/7303
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 22:54:07 +00:00
Guy Harris
bfb4327291 Remove tvb_ from the names of wsutil mempbrk routines.
Routines that don't take a tvbuff as an argument shouldn't have tvb_ in
the name.

Change-Id: I3550256551e30b3f329cbbfca71ef27c727d29c0
Reviewed-on: https://code.wireshark.org/review/7302
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 20:39:25 +00:00
Guy Harris
f3a68f00a1 Rename the slower-but-portable mempbrk to ws_mempbrk_portable_exec().
That parallels ws_mempbrk_sse42_exec().

Change-Id: I1662badc6d1efab5bdd827f29bbad3712464ec43
Reviewed-on: https://code.wireshark.org/review/7301
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 20:18:02 +00:00
Guy Harris
e35aa1ff48 Move declarations of internal ws_mempbrk routines to a separate header.
Put the internal routines, which are only to be used by the
implementation of the mempbrk functions, to a separate header file, so
that they're not exported even in the standard header file.

Change-Id: I92c39b138de3e4f9da1b102210b39d50728e2fd6
Reviewed-on: https://code.wireshark.org/review/7300
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 20:14:24 +00:00
Guy Harris
f12d231024 More wrapping of constants with G_GUINT64_CONSTANT().
Change-Id: I11771b08cc4e57692c42dd3fc8976fe390b3025d
Reviewed-on: https://code.wireshark.org/review/7299
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 20:08:06 +00:00
Guy Harris
f868da29d8 Update Debian symbols file.
Change-Id: Ide84741afffbd7c8c6dac44cf456291e2609af9d
Reviewed-on: https://code.wireshark.org/review/7298
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 19:43:48 +00:00
Guy Harris
0808fc02a5 64-bit constants need to be wrapped in G_G{U}INT64_CONSTANT().
Otherwise, they don't get the right suffix to tell the compiler that
they're 64-bit even on ILP32 platforms.

Change-Id: I5c52a999d21707602e0a4174a142d1d1036242be
Reviewed-on: https://code.wireshark.org/review/7297
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 19:41:21 +00:00
Guy Harris
1694e81abe The shortening to 32 bits is intentional, so add a cast.
The cast reassures the compiler that we do, in fact, know what we're
doing, so it doesn't issue a warning.

Change-Id: Ie3bc4e1c955f9c5cad5506e26fc72e12f7a8f854
Reviewed-on: https://code.wireshark.org/review/7295
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21 19:35:43 +00:00
Michal Labedzki
ffeadb721f Bluetooth/GUI: ATT: Use alphabetical order in makefile
Change-Id: Ia34dd6b783a1c8214956166b07ffb1537f04aa1d
Reviewed-on: https://code.wireshark.org/review/7291
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:29:24 +00:00
Michal Labedzki
b8388c6a21 Ftypes: Double: Minor fixes
Fix comments typos and use safe equivalent of sprintf.

Change-Id: Icc9d69532dc35e8a58a78c0eacdb42214b679069
Reviewed-on: https://code.wireshark.org/review/7290
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:29:05 +00:00
Michal Labedzki
9ad00fdcb8 Qt: Fix for QT < 4.8
QApplication::queryKeyboardModifiers() was introduced in 4.8.
Try to be compatibile with my old Qt 4.7.2.

Change-Id: Ie4abdd397cf2f10bb50132b09fed198d30425ee7
Reviewed-on: https://code.wireshark.org/review/7289
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:20:16 +00:00
Michal Labedzki
8e43698b52 Set phdr encap for pcap file
Change-Id: Id600b395d6fd2711c9b392a60454e5bd9a3eb465
Reviewed-on: https://code.wireshark.org/review/7288
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:19:51 +00:00
Michal Labedzki
2d1d83a595 Use correct mem scope for source address in Text Logcat
Change-Id: I94594e5c7ad8a398dd86ee3fe496077196f81fb9
Reviewed-on: https://code.wireshark.org/review/7287
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:19:28 +00:00
Michal Labedzki
c093797b12 Fix GTK-shark
Looks like a copy/paste issue.
ERROR: wireshark/color_filters.c💯color_filters_add_tmp: assertion failed: (strlen(prefs.gui_colorized_fg)==69)

Change-Id: I7b8309cfc178fd834951078a098bbce986639ed2
Reviewed-on: https://code.wireshark.org/review/7286
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:19:05 +00:00
JC Wren
e2bcee6ac4 Make FT_{U}INT64 behave more like FT_{U}INT32, add support for FT_{U}INT{40,48,56}
Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19
Reviewed-on: https://code.wireshark.org/review/5813
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-21 16:57:52 +00:00
Michael Mann
13531d36fb Convert dissectors to use address_with_resolution_to_str instead of two separate calls for address string and name resolution.
Change-Id: I7c8cfbcf201b3b73afe731302572646ce7833d64
Reviewed-on: https://code.wireshark.org/review/7284
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-02-21 15:33:56 +00:00
Peter Wu
c1b672cf23 checkAPIs: match packet-*.[ch], independent of locale
In perl, the \w character group seems to match '-' depending on the
locale. On Linux (with the C or en_US.UTF-8 locale), packet-ssl-utils.c
does not match.

This patch makes the regex match anything except for the path separator.

Change-Id: I27543072295af5f2bd5ea8ab36e5d913bebf7d85
Reviewed-on: https://code.wireshark.org/review/7266
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-21 13:19:38 +00:00
Gerald Combs
5012cf84e6 Call pre_init_prefs each time our profile changes.
Manually back out gafa96c3 so that we can set our preferences to their
default values each time we switch profiles.

Zero the prefs struct at startup.

Change-Id: Ic28db44cd0c4cdf640e977d7277f7357db10ebe8
Reviewed-on: https://code.wireshark.org/review/7282
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-02-21 02:57:46 +00:00
Gerald Combs
ae9cc88c00 Qt: Fix unsaved changes behavior.
Check the return value of testCaptureFileClose in
MainWindow::openCaptureFile and add testCaptureFileClose to
MainWindow::closeEvent. Some of the file opening and closing behavior
still needs to be cleaned up but this should at least keep the user from
losing unsaved data.

Bug: 10944
Change-Id: I7d7b563a6b72f48b41a5a3aff2837655557869ff
Reviewed-on: https://code.wireshark.org/review/7283
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-02-21 02:06:54 +00:00
Gerald Combs
ead79e6aa1 Clear the filter expression list in prefs.c.
Move filter_expression_nuke from ui/gtk to epan and rename it to
filter_expression_free. Call it in prefs_reset along with the other
preference reset routines.

This keeps the Qt filter toolbar from filling up with duplicate
expressions when the profile changes.

Change-Id: I9fae9a7b48944079ea342a126979d9e79af0d22b
Reviewed-on: https://code.wireshark.org/review/7281
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-02-20 23:16:54 +00:00
Gerald Combs
422ad100aa Qt: Apply the main window geometry directly.
As of g2c00d66 we create the main window after we've read the recent
settings. This means that we can get rid of the property animation
workaround in MainWindow::loadWindowGeometry.

Change-Id: I028061c5bdab9261f9394a1840bcdcb752a4f0c8
Reviewed-on: https://code.wireshark.org/review/7278
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 18:34:09 +00:00
Peter Wu
1a10f5f2b4 ui/gtk: fix control combos such as ctrl-a, ctrl-c
Ignore any Ctrl combinations to allow pasting to work. Regression
introduced in "gtk: fix crash on Broadway GDK backend".

Change-Id: I3d53db2d224cb604b52081002ff923c8684a8d0a
Reviewed-on: https://code.wireshark.org/review/7276
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Tested-by: Balint Reczey <balint@balintreczey.hu>
2015-02-20 17:04:41 +00:00
AndersBroman
bccb7f73c7 [Diameter] It's MCC first in 3GPP AVP 909 RAI
Change-Id: If4dd0d64d5a8d313ae9e62d2fcce3606ef8eb4f4
Reviewed-on: https://code.wireshark.org/review/7274
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-20 14:06:07 +00:00
Pascal Quantin
9fe9505b46 addr_resolv.c: fix a stack buffer overflow detected by ASAN
Issue reported by Alexis

Change-Id: I0ef19625b6844fbc2996b75d51e86f949e358c8d
Reviewed-on: https://code.wireshark.org/review/7273
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-20 11:50:14 +00:00
Pascal Quantin
a99cc2fd0b address_types.c: fix a "conditional jump or move depends on uninitialised value" error found by Valgrind
Change-Id: Ic752bb6aa1ba56e113895fcbed52f417ac0128f7
Reviewed-on: https://code.wireshark.org/review/7272
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-20 11:37:52 +00:00
Alexis La Goutte
c84b0225a7 MQTT: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I730b752680c85777a074a6b2bb4aef0c9f4d3ff5
Reviewed-on: https://code.wireshark.org/review/7265
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-20 07:45:02 +00:00
Alexis La Goutte
56356b89fc MCPE: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I7053c3c9e42cb4246ae504d31213bf95917a34f2
Reviewed-on: https://code.wireshark.org/review/7264
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-20 07:43:28 +00:00
Alexis La Goutte
f89edfd2df addr_resolv: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I559151afab48892c51b702d008c1583570bd8754
Reviewed-on: https://code.wireshark.org/review/7262
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-20 07:40:47 +00:00
Gerald Combs
95382c3afb Suppress a bunch of cast-qual warnings.
Squelch

    warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]

similar to g630f54f.

Change strtod to g_ascii_strtod to squelch a checkAPIs error.

Change-Id: Ib2d26ef89f08827a5adc07e35eaf876cd7b8d14e
Reviewed-on: https://code.wireshark.org/review/7269
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 04:04:15 +00:00
Guy Harris
9423a13b2d Just have init_progfile_dir() take a void pointer.
dladdr() takes a void * as a code pointer; have init_progfile_dir() do
so, and do the casting in the calls.  We don't care about the signature
of the function whose address we're passing, we just want to pass a
pointer to *something* in the main program.

Change-Id: I9372620a97b0eb53c2bb3c0c41a238b4408f3709
Reviewed-on: https://code.wireshark.org/review/7270
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-20 00:24:08 +00:00
Gerald Combs
ec6ec49941 Qt: Fix automatic update status in welcome screen.
Wait until the application has been initialized before checking
prefs.gui_update_enabled.

Change-Id: I6e52ba26064b6c5b882992c30c76b65d4a618848
Reviewed-on: https://code.wireshark.org/review/7268
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 00:16:39 +00:00
Gerald Combs
0d3b51a28a Remove quotes from an Nmake macro.
Change-Id: Ibe6a544af49c39c12ce13264fb010ccdc54d471b
Reviewed-on: https://code.wireshark.org/review/7267
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-19 23:06:35 +00:00
Gerald Combs
999bbc9b70 Qt: Add more version and packaging information to the main window.
Add a "flavor" (for lack of a better word) banner, which can be set at
build time via WIRESHARK_VERSION_FLAVOR / VERSION_FLAVOR. Set it to
"Development Build" by default. This effectively migrates the
"DEVELOPMENT VERSION" logo image text from the GTK+ UI.

Add full release and automatic update information at the bottom.

Remove the short version from the welcome banner (top left).

To do:

- Add back support for gui_version_placement.

- Move the version and repository branch to the flavor label?

- Add update links as appropriate to the bottom.

- Clean up layout and spacing.

Change-Id: I28af33e6c2beb855f803a2dfedef49f3e8389057
Reviewed-on: https://code.wireshark.org/review/7071
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-19 22:09:34 +00:00
Guy Harris
c200f1e90b Rename packet-nbns.c to packet-nbt.c to reflect that it's not just NBNS.
packet-nbt.c handles all of NetBIOS-over-TCP, not just the name service;
the file name is historical.

Change-Id: I333d331fd9453cea8d1d7595b4fd2650f0a92e98
Reviewed-on: https://code.wireshark.org/review/7259
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-19 21:29:43 +00:00
Ebben Aries
a6c44c2402 [bmp] Adding dissector for BGP Monitoring Protocol
* Support per draft-ietf-grow-bmp-07

Change-Id: Iadb833157e7832077429c048e28e9814da29e2c6
Reviewed-on: https://code.wireshark.org/review/7192
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-19 18:36:53 +00:00
Alexis La Goutte
20e2c38b74 libnl: disable pedantic warning of libnl lib
Part 2...

Change-Id: I47b74c81ee7b7cd8296ce9da5a60ad6aecef8c78
Reviewed-on: https://code.wireshark.org/review/7239
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>
2015-02-19 16:15:53 +00:00
Alexis La Goutte
5c60289753 Qt Wireshark - Once a live capture is stopped the title bar persists in reporting "Capturing from interface name"
With Qt Wireshark the title bar persists in reporting "Capturing from <interface name>" even though capturing has stopped.

With GTK Wireshark once a live capture is stopped the title bar is updated to report the interface name(s) used for the unsaved capture file.

Issue reported by Jim Young

Bug:10948
Change-Id: Ia6099f63f82b6610ade5c81af0cf257236f076ec
Reviewed-on: https://code.wireshark.org/review/7050
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 15:17:20 +00:00
Roland Knall
2bc71d3138 openSAFETY: Merge both CT values
Both values mean the same thing and should be found using
 the same hf_field, as this eases debugging scenarios.

Change-Id: I23f675e22623b5e66354708319a41dcf34143e30
Reviewed-on: https://code.wireshark.org/review/7257
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-19 15:11:41 +00:00
Osman Sakalla
b43fecb988 patch for PMIPv6 MAG GPS coordinates
Change-Id: I25bbd67775e19c2a0199507538b7dcfe5ce28bf6
Reviewed-on: https://code.wireshark.org/review/7256
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 14:48:52 +00:00
Dario Lombardo
9fba8c8862 Bugfix in nbns dissector.
Change-Id: I5375a1ae2e48fe0c7ff6e3dde24b8d7b02b1f27f
Reviewed-on: https://code.wireshark.org/review/7251
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 14:26:16 +00:00
Dario Lombardo
d330cf717d Documentation fix (reported by Richard Sharpe).
Change-Id: Ie4979c1be0e325178e3c662e0b2c5bbfc58456d9
Reviewed-on: https://code.wireshark.org/review/7252
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 14:24:28 +00:00
AndersBroman
ca68a7adc3 Add some casts to satisfy the various compilers.
Change-Id: I7687fc0b433774fe447757af00bdaa2fc44ac59d
Reviewed-on: https://code.wireshark.org/review/7254
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 14:23:03 +00:00