Commit Graph

5957 Commits

Author SHA1 Message Date
Peter Wu 5c4458345c Change maxmind_db_lookup_ipv4 to look more like maxmind_db_lookup_ipv6
Both functions accept an address in network byte order, but
maxmind_db_lookup_ipv4 does not accept a pointer. Add an indirection and
remove unnecessary memcpy calls. This removes some confusion for me.

Change-Id: I291c54c8c55bc8048ca011b84918c8a5d3ed1398
Reviewed-on: https://code.wireshark.org/review/31951
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:13:37 +00:00
Gerald Combs 55db3d523d [Automatic update for 2019-02-10]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I3ac8fcfec83e5d35ee07e07cd0d1d04a17cc2ac5
Reviewed-on: https://code.wireshark.org/review/31954
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-10 08:28:46 +00:00
Uli Heilmeier 061ebbda56 Fixing some implicit coversations (-Wshorten-64-to-32)
Fixing some "implicit conversion loses integer precision" warnings
reported by clang with -Wshorten-64-to-32 option

Change-Id: Icd641d5f4fd8ff129f03f1b9e1da0fc86329f096
Reviewed-on: https://code.wireshark.org/review/31901
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-08 12:12:18 +00:00
Michał Łabędzki b54c9b62e8 Qt: move packet list cache from record to model
Change-Id: Idf6a10374382c8521eb205c801a72af329e5d0d2
Reviewed-on: https://code.wireshark.org/review/31528
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-07 07:48:36 +00:00
Peter Wu 78827c8752 Accept protocol aliases in Decode As (-d tcp.port==4433,ssl)
Change-Id: Idb2e4f9964cf0b5c1237a0d4b5e0954adfd5e6b6
Reviewed-on: https://code.wireshark.org/review/31895
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-05 22:40:01 +00:00
Gerald Combs cdfc56b340 Qt: Add missing main menu mnemonics.
The GTK+ main menu had quite a few keyboard mnemonics which were missing
in the Qt UI, most notably File → Open, File → Close, and File → Quit.
Update ui/qt/main_window.ui from a list generated by running

`grep -E 'NULL, +".*_.*"' ui/gtk/main_menubar.c`

in a current master-2.6 checkout.

BTW, the proper terminology to use here is unclear. Most places use
"mnemonics":

GTK+: Access keys
https://developer.gnome.org/hig/stable/keyboard-input.html.en

Qt: Mnemonics or accelerator keys
http://doc.qt.io/qt-5/qkeysequence.html
http://doc.qt.io/qt-5/accelerators.html

Wikipedia: Mnemonics
https://en.wikipedia.org/wiki/Keyboard_shortcut

Windows: Menu access keys or mnemonics
https://docs.microsoft.com/en-us/windows/desktop/menurc/about-menus

Bug: 15475
Change-Id: Ibacbe066d4acfcea91125a980977d1610e3c0908
Reviewed-on: https://code.wireshark.org/review/31871
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-04 21:10:02 +00:00
Gerald Combs def7a8bdf4 [Automatic update for 2019-02-03]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ied5443aa5e45bb0d2b59ad33f1aa0195fafb70f3
Reviewed-on: https://code.wireshark.org/review/31859
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-03 08:31:45 +00:00
Vasil Velichkov 768a746ede wireshark: Free the if_stat_cache_t when dumpcap is not forked
Fixes ASAN test failures for test_wireshark_capture_from_stdin and
test_wireshark_capture_from_fifo tests.

Change-Id: I196fe2a299761f95e07b3091b934a566403e3e3f
Reviewed-on: https://code.wireshark.org/review/31844
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-31 22:56:20 +00:00
Peter Wu 9feb7fb522 Fix build without GnuTLS
The RSA Keys API and GUI are only functional when GnuTLS support is
available. Be sure to hide the functions in the header and hide the
preferences panel when GnuTLS support is missing.

Change-Id: I0a52ab142c4d45b8186780ea9b1645542dcc6305
Fixes: v2.9.1rc0-585-gec8f506c4b ("Qt: add initial RSA Keys preference frame")
Reviewed-on: https://code.wireshark.org/review/31837
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-31 13:14:22 +00:00
Stig Bjørlykke 66c548fdb7 Qt: Restore column width and visibility when switching profiles
In some cases the column width and/or hidden setting is not correctly applied
when switching between profiles having different hidden settings.

Unhiding the column before applying width and hidden setting fixes this issue.

Bug: 15466
Change-Id: I09e3451612ba6dd0510b19f7f4d84d281b0188b5
Reviewed-on: https://code.wireshark.org/review/31812
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-01-31 10:15:56 +00:00
Peter Wu fec117b99a Qt: Add support for RSA private key file selection
Update release notes now that this GUI is mostly functional.

Change-Id: I118fbbe879e366643084f0e7ac3e437a29f21d5f
Reviewed-on: https://code.wireshark.org/review/31797
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:34:14 +00:00
Peter Wu f3c869d3eb Qt: implement addition of a new pkcs11 token in the RSA Keys dialog
Load the list of key URIs, strip known keys, ask for a PIN, add valid
results to the list. Apply this list on pressing OK in the preferences
dialog or revert the changes on pressing Cancel.

Change-Id: Id48cd9b876b4d272eb6dbdadf8a0859190cc0ce8
Reviewed-on: https://code.wireshark.org/review/31796
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:34:08 +00:00
Peter Wu ec8f506c4b Qt: add initial RSA Keys preference frame
The RSA Keys frame is intended to configure RSA keys (both key files and
PKCS #11 tokens). Add a new "RSA Keys" item to the preferences menu.
Implement addition and removal of PKCS #11 libraries and add an initial
version that displays configured RSA keys.

The "Add new token…" button will be implemented later.

Change-Id: Ie5b9eb403afc7bebeb7be8bd53d4d4b30842204c
Reviewed-on: https://code.wireshark.org/review/31795
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:34:01 +00:00
Peter Wu f66cb9f7ef Qt: move method to apply/undo UAT changes to UatModel
UatModel could be constructed with a name instead of an epan_uat type.
To allow those users to save/revert the uat, make sure to expose a
method that does not require access to the underlying epan_uat type.

Change-Id: I1d1a5811c1025bd9c2a2ea1722f460e6ac33b9aa
Reviewed-on: https://code.wireshark.org/review/31793
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:33:46 +00:00
Stig Bjørlykke 58ffb7c306 Qt: Fix memory leak of QMenu.
Set the push button as parent to the save menu so it will be deleted
when that parent is destroyed.

Change-Id: Ic396dcf25092c90cd305a010be3d551d8ad8397c
Reviewed-on: https://code.wireshark.org/review/31802
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-29 21:56:34 +00:00
Gerald Combs a1ee099ffa [Automatic update for 2019-01-27]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I2a887e9f0d6aa73fee4046a77271a55be48b1864
Reviewed-on: https://code.wireshark.org/review/31759
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-27 08:30:32 +00:00
Peter Wu 31aba351e2 wiretap: fix memleaks with wtap_rec::opt_comment
The memory ownership of wtap_rec::opt_comment was not clear. Users of
wtap were leaking memory (editcap.c). wtap readers were not sure about
freeing old comments (erf) or simply ignored memleaks (pcapng).

To fix this, ensure opt_comment is owned by wtap_rec and free it with
wtap_rec_cleanup. The erf issue was already addressed since
cf_get_packet_comment properly duplicates wth.opt_comment memory.

- wtap file formats (readers):
  - Should allocate memory for new comments.
  - Should free a comment from an earlier read before writing a new one.
- Users of wth:
  - Can only assume that opt_comment remains valid until the next read.
  - Can assume that wtap_dump does not modify the comment.
  - For random access (wtap_seek_read): should call wtap_rec_cleanup
    to free the comment.

The test_tshark_z_expert_comment and test_text2pcap_sip_pcapng tests now
pass when built with ASAN.

This change was created by carefully looking at all users opt
"opt_comment" and cf_get_packet_comment. Thanks to Vasil Velichkov for
an initial patch which helped validating this version.

Bug: 7515
Change-Id: If3152d1391e7e0d9860f04f3bc2ec41a1f6cc54b
Reviewed-on: https://code.wireshark.org/review/31713
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Vasil Velichkov <vvvelichkov@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-25 04:53:10 +00:00
Peter Wu 66345f008f Fix memory ownership when using cf_get_packet_comment
cf_get_packet_comment already has one code path that returns duplicated
memory. Be sure to document the requirement to free this memory and
adjust Qt to avoid memory leaks.

Be firm and assume that wth.opt_comment is owned by wth, so duplicate it
before returning it from cf_get_packet_comment.

Change-Id: I91f406296c9db5ea21b90fc2e108c37de4528527
Ping-Bug: 7515
Reviewed-on: https://code.wireshark.org/review/31712
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Vasil Velichkov <vvvelichkov@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-25 04:53:01 +00:00
Peter Wu 9d5ab21163 wiretap: fix leak of options_buf and document memory handling
Manually checked all callers of wtap_seek_read to ensure that
wtap_rec_cleanup is called. Added missing wtap_rec_cleanup to:
- Completion of sequential read: wtap_sequential_close
- Callers of wtap_seek_read:
  - users of cf_read_record_r:
    - PacketListRecord::dissect

This fixes one of the two ASAN memleak reports while running
test_tshark_z_expert_comment and test_text2pcap_sip_pcapng (the other is
about opt_comment which is still unfixed).

Vasil Velichkov also found this issue and came up with a similar fix.

Change-Id: I54a6aa70bfdb42a816d03ad4861d0ad821d0ef88
Reviewed-on: https://code.wireshark.org/review/31709
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-24 04:21:23 +00:00
Jaap Keuter 3c1342291f text import: cleanup type usage
The glib gboolean and integer types are used interchangably,
while a proper use is easily achievable.

Change-Id: I8943bb90c9f23c0e58c296ad3b45153d0364953c
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/31708
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-23 21:17:14 +00:00
Stig Bjørlykke a468623720 Qt: Include current word in filter completion list
Include the current word in the filter completion list to give the
user a more complete picture of what constitutes a valid single-token
protocol name.

Bug: 15431
Change-Id: I77cfc78f19623d9aefd4441a67ed3ae72068034e
Reviewed-on: https://code.wireshark.org/review/31654
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-22 04:27:06 +00:00
Jaap Keuter 020c90fd36 Text Import: update code comments and help texts
From the updates to text2pcap take the updates to the code comments and
apply them here as well. This also applies to the User Guide help texts.

Change-Id: I4e73fb1372ea0c1866c6d0fee7c14bc645fbe1b1
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/31636
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-21 21:03:49 +00:00
João Valverde a3991874eb CMake: Replace PACKAGELIST magic
This is more explicit and easier to read with slightly better locality
while using less code.

Also less awkward when the package doesn't fit the narrow package list
expectations.

The ws_find_package() macro doesn't include all the status messages. The
choice was to rely on standard find_package() and feature_summary() output
and be less verbose.

Avoid polluting the CLI build interface. Per target include paths and
macro definitions are preferred.

Because this patch intentionally removes the global CMAKE_*_FLAGS
and include_directories() usage in favor of target properties, some
untested build configurations may inadvertently break because of
missing ${PACKAGE}_INCLUDE_DIRS or ${PACKAGE}_DEFINITIONS. This
required a manual review of dependencies that might have been
incomplete.

${PACKAGE_VAR}_LINK_FLAGS seems to be unused.

Changing the CMake Qt code to use more modern CMake component syntax
is left as future work.

Change-Id: I3ed75252189a6e05a23ed6e619088f519cd7ed78
Reviewed-on: https://code.wireshark.org/review/31496
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-20 11:50:10 +00:00
Gerald Combs be103a4286 [Automatic update for 2019-01-20]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I18a5419a2953f5893aa76e2823c50d48e284b270
Reviewed-on: https://code.wireshark.org/review/31625
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-20 08:30:30 +00:00
Peter Wu 10ef540405 CMake: avoid including file modification time for RCC
Resources such as translations (autogenerated qm files) and SVG images
resulted in non-reproducible builds. Be sure to disable this to make the
resources reproducible on Qt < 5.8 or Qt >= 5.9 (excluding Qt 5.8.x).

With this change, the Wireshark build is reproducible invariant of the
build directory (but not the source directory).

Bug: 15163
Change-Id: I9240d2aa6e7298e1928c0f1d97ce83673320024d
Reviewed-on: https://code.wireshark.org/review/31593
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-18 15:46:37 +00:00
Roland Knall 5b7ea06e0a Qt: IO Graph correct color selection
The correct method of selection of colors is just using the
QColorDialog not a specialized object. Implementing it just
that way, to correct bug on Linux

Bug: 15399
Change-Id: I3c4785d352888ec34c34534667c3f7df182f9fd7
Reviewed-on: https://code.wireshark.org/review/31465
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-01-16 18:40:10 +00:00
Gerald Combs 7f3349183b [Automatic update for 2019-01-13]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ic7f6b5dd91ca6404909b941c0b4844cb17ef4820
Reviewed-on: https://code.wireshark.org/review/31522
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-13 08:32:04 +00:00
Peter Wu 4de0ea38cd CMake: change static qtui library into an object library
Save 800ms and avoids a synchronization point (improves build
parallelism) by directly adding object files to the wireshark binary.

Change-Id: I7d1484c65a26f3f6874474b61d38ba474aba8347
Reviewed-on: https://code.wireshark.org/review/31512
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-12 18:20:52 +00:00
Guy Harris fd93f5490c Clarify the name and description for a link-layer encapsulation type.
What we were calling the "name" is actually a description to show to
users; what were calling the "short name" is just the name to use on the
command line.

Rename some routines and structure members, and put the name first and
description second in the table.

Expand some descriptions to give more details (e.g., to be more than
just a capitalized version of the name).

Fix the CamelCase capitalization of InfiniBand.

Change-Id: I060b8bd86573880efd0fab044401b449469563eb
Reviewed-on: https://code.wireshark.org/review/31472
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-09 21:21:56 +00:00
Stig Bjørlykke d50bd39b85 Qt: Cleanup deletion of CopyFromProfileMenu
Set the push button as parent to the profile list menu so it will
be deleted when that parent is destroyed.

Change-Id: Ide4a234e039a3e27d9ee4732a3800906c80be173
Reviewed-on: https://code.wireshark.org/review/31446
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-09 04:23:35 +00:00
Stig Bjørlykke 546cb25256 Qt: Fix copy ASCII characters from ByteView
Only copy ASCII characters when doing "Copy Bytes as Hex + ASCII Dump"
from the ByteView. This is what we do in all other Hex Dumps.

Also change the parameter name to reflect this.

Change-Id: I63cc79ffa014fd9aa50c84d765ee168f0b1ea44a
Reviewed-on: https://code.wireshark.org/review/31442
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-08 16:21:41 +00:00
Stig Bjørlykke 95c72ece61 Qt: Pluralize "Export TLS Session Keys (%Ln key(s))"
Properly pluralize "Export TLS Session Keys (%Ln key(s))" in the
window caption.

Change-Id: Ida7d725a2b8daa356cb44aec4d4475151916a425
Reviewed-on: https://code.wireshark.org/review/31432
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-01-08 07:19:09 +00:00
Gerald Combs 3c372c7bac Qt: Add syntax line edit feedback symbols.
Draw a circle+backslash or a warning triangle in the far right of the
line edit entry for invalid and deprecated filters respectively. This
should provide an additional clue for color blind users.

Bug: 15326
Change-Id: I55a1e214834a340ccda3bfe8880bba12c5e274e9
Reviewed-on: https://code.wireshark.org/review/30936
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-08 04:48:26 +00:00
Stig Bjørlykke d45f0faf67 Qt: Clarify Remove action from the welcome page
Rename the Remove action in the welcome page to "Remove from list" to
indicate that the file is only removed from the list, not from disk.

Change-Id: I4a47c9852203596cc601bf254a4bcfc700ccd025
Reviewed-on: https://code.wireshark.org/review/31433
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-01-08 01:58:02 +00:00
Gerald Combs 2b7615e603 [Automatic update for 2019-01-06]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I0e282baebc0cda0e54e49eff60827eec02f6f797
Reviewed-on: https://code.wireshark.org/review/31402
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-06 08:26:31 +00:00
Stig Bjørlykke 393b22047b Qt: Add "Show in Finder/Folder" for plugins.
Add a menu item for "Show in Finder/Folder" for plugins in cases where
Wireshark loads plugins from other folders than is listed in "Folders".

Change-Id: I8cc42d9992d885f1ca37f5769d7292bed1584f4b
Reviewed-on: https://code.wireshark.org/review/31270
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-04 12:00:57 +00:00
Guy Harris 9979de35e6 Don't fall out of the loop on a write error.
Doing so means we'd close the FD, but we've already closed it.

Addresses Coverity CID 1442274.

Change-Id: I5aab1bd4b82e9ac0901bcdbc1ddb6b16eec30573
Reviewed-on: https://code.wireshark.org/review/31312
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-02 23:56:33 +00:00
Guy Harris 8059bad284 No need to report "some files could not be saved".
We've already reported the files that couldn't be saved; no need to tell
the user something they already know by that point.

Change-Id: I8251a46134342df6b40a6324aa76a5237fde7c93
Reviewed-on: https://code.wireshark.org/review/31298
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-01 23:12:17 +00:00
Guy Harris be55c4f976 Always report errors in eo_save_entry().
If a particular save failed, always let the user know.

Change-Id: I618e0ff82813cd4249ab7b1714f9a50e095a1ea8
Reviewed-on: https://code.wireshark.org/review/31296
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 22:08:59 +00:00
Guy Harris e12270a730 Limit the maximum *file* name length for exported objects.
Limiting the maximum *path* name length is bogus; if the user wants to
store the file in some directory deep under the root (UN*X) or the root
of the drive (Windows), that's their choice - don't prevent them from
saving in a directory with a path longer than some maximum or limit the
file name based on the length of the path leading up to it.

Limiting the maximum *file* name is presumably to cope with, for
example, HTTP objects with a URL that had a very long query component,
so it makes sense.

Change-Id: Idfc7de8124ee80bdd4950341ff2239834eb9f6f6
Reviewed-on: https://code.wireshark.org/review/31295
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 21:36:58 +00:00
Guy Harris bac10e5869 Get rid of local_eo_save_entry().
Have eo_save_entry() use the report_ routines to report errors, so they
pop up a dialog in Wireshark and print an error message in command-line
programs such as TShark.  Use it instead of local_eo_save_entry().

Change-Id: I689fd880ff2a31486372374560129ee9d9692b1e
Reviewed-on: https://code.wireshark.org/review/31294
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 20:15:25 +00:00
Stig Bjørlykke c25dbfa8a7 Qt: Pluralize "Copy Row(s)"
Properly pluralize "Copy Row(s)" entry in the popup menu.

Change-Id: Ifc4f9c69ab63d2d2594648db3115087ba51a941f
Reviewed-on: https://code.wireshark.org/review/31269
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-01-01 18:13:44 +00:00
Guy Harris 2d41b15495 Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed
tap's packet routine won't be called again, so they don't have to keep
track of whether they've failed themselves.

We make the return value from the packet routine an enum.

Don't have a separate type for the per-packet routine for "follow" taps;
they're expected to act like tap packet routines, so just use the type
for tap packet routines.

One tap packet routine returned -1; that's not a valid return value, and
wasn't one before this change (the return value was a boolean), so
presume the intent was "don't redraw".

Another tap routine's early return, without doing any work, returned
TRUE; this is presumably an error (no work done, no need to redraw), so
presumably it should be "don't redraw".

Clean up some white space while we're at it.

Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8
Reviewed-on: https://code.wireshark.org/review/31283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 05:03:42 +00:00
Guy Harris ba589a4e44 Move some command-line-oriented routines from wsutil to ui.
cmdarg_err() is for reporting errors for command-line programs and
command-line errors in GUI programs; it's not something for any of the
Wireshark libraries to use.

The various routines for parsing numerical command-line arguments are
not for general use, they're just for use when parsing arguments.

Change-Id: I100bd4a55ab8ee4497f41d9651b0c5670e6c1e7f
Reviewed-on: https://code.wireshark.org/review/31281
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 02:07:06 +00:00
Guy Harris a88d60509d Update the comment again.
The third URL works, but let's go https: for it.  The other two don't.

Line-wrap another part of the comment while we're at it.

Change-Id: I744770c859b317ace2a71e82f86e2419b6d7ef2b
Reviewed-on: https://code.wireshark.org/review/31276
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-31 07:50:11 +00:00
Guy Harris 67621a6ac2 Update a comment.
(Thanks for killing off a bunch of comment mechanisms, not saving the
old comments and placing them somewhere useful, and not even allowing
the Wayback Machine to archive at least some of those sites, Microsoft.)

Change-Id: Ie4258250a0176a56ee33be77604acf43c6886e0f
Reviewed-on: https://code.wireshark.org/review/31274
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-31 05:53:18 +00:00
Martin Kaiser 6b7c73580b Qt: traffic table: remove a tap listener only once
Class TrafficTableTreeWidget is used by the conversation and enpoint
dialogs, both of which are subclasses of WiresharkDialog.

Those dialogs use WiresharkDialog::registerTapListener() to register tap
listeners. When the dialog is closed, those listeners are removed by
WiresharkDialog::removeTapListeners().

TrafficTableTreeWidget's destructor tries to remove its tap listener a
2nd time after WiresharkDialog did its cleanup. This causes warnings

Warn remove_tap_listener(): no listener found with that tap data

Don't call remove_tap_listener() from TrafficTableTreeWidget's
destructor. The destructor is now empty and can be removed completely.

Change-Id: I3143fa1c5116203f4a0be791bd4c5f08135aefb0
Reviewed-on: https://code.wireshark.org/review/31259
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-12-30 17:37:20 +00:00
Gerald Combs 0f7812f5ef [Automatic update for 2018-12-30]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ic8eac1cb4b08b5d567ef5bd3a52062eca095458c
Reviewed-on: https://code.wireshark.org/review/31254
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-12-30 08:27:10 +00:00
Guy Harris aaf709da67 Use cmdarg_err() to report errors in CLI taps.
Change-Id: Ic6b35220e394f8c67848ed067e4bbddb980d5bc0
Reviewed-on: https://code.wireshark.org/review/31253
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
2018-12-30 02:58:05 +00:00
Guy Harris 1fe5921b7b Fix indentation.
Change-Id: I6cc3373d043e6a8203a5f70eb03f03bb6cd8a6d9
Reviewed-on: https://code.wireshark.org/review/31246
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-29 19:25:54 +00:00