Commit Graph

46 Commits

Author SHA1 Message Date
Ahmad Fatoum be69761c78 Fix requesting hardware timestamps without -k
The interface_options struct passed to dumpcap is populated
differently when running Wireshark with and without -k.

Previously, only with -k was there a valid pointer in
interface_opts.timestamp_type

Fixes: aca55a2 ("Add hardware timestamping support")
Signed-off-by: Ahmad Fatoum <ahmad.fatoum@siemens.com>
Change-Id: Ic7ecc5a1190c28197d6a7271f1b353f74d43ca61
Reviewed-on: https://code.wireshark.org/review/23160
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>
2017-08-22 12:18:12 +00:00
Dario Lombardo bc9bf64f8d Qt: fix compilation without pcap.
Change-Id: Ib8d21d63730ea6e18032b89ba0042ee7521645a8
Reviewed-on: https://code.wireshark.org/review/23078
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-15 14:44:11 +00:00
Roland Knall 02e80019f2 Qt: Create models directory
Following the move for widgets and utils directory, moving models
and delegates to the utils directory. Guidelines for this directory are:

 - Implementation of a model
 - Implementation of a delegate
 - Utility class for data storage used by a model

Note: additionally all includes affected by this move have been changed
to absolute path includes, instead of relative ones.

Change-Id: I3bb868af7d3570437682b722a0cd46c906628570
Reviewed-on: https://code.wireshark.org/review/22790
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26 12:22:04 +00:00
Roland Knall ddfc1d37cc Qt: Move utils to separate utils directory
Following the move for widgets directory, moving utils
to the utils directory. Guidelines for this directory are:

 - Generic use but not a widget
 - Utility functionality used by many classes
 
 Note: additionally all includes affected by this move have been changed
 to absolute path includes, instead of relative ones.

Change-Id: I019ae4b6e6f6d06a5745a63ed195edbd36fb936b
Reviewed-on: https://code.wireshark.org/review/22602
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26 10:11:55 +00:00
Peter Wu 6bc0ba8451 Qt: fix alloc-dealloc-mismatch while adding named pipe
ManageInterfacesDialog::on_addPipe_clicked uses g_new0 to create an
"interface_t" instance, but InterfaceTreeCacheModel uses qDeleteAll
which results in ASAN reporting "alloc-dealloc-mismatch (malloc vs
operator delete)".

To fix this, remove the dynamic allocation and make
InterfaceTreeCacheModel store the instance internally.

Change-Id: I9426dfc88d0a54a889bbbc9cf336c0a6af76920e
Reviewed-on: https://code.wireshark.org/review/22410
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-27 21:16:10 +00:00
Guy Harris 357cfd3b03 A bunch of "{Mac} OS X" -> "macOS" changes.
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X
10.0", for example.  It was "Mac OS X" until 10.8 (although 10.7 was
sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS
X" from 10.8 to 10.11.

Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3
Reviewed-on: https://code.wireshark.org/review/20933
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-05 19:16:22 +00:00
Joerg Mayer 57d15713db Prevent crash/assert on access to "uninitialized" device.if_info.name.
While this is one possible way to fix it, it probably is not the "right"
way to do it. I just don't know which one would be right. I regard
several options to be cleaner:
- Remove if_info from interface_t altogether and add the required fields
  to interface_t directly.
- Never use device.if_info.name but always use device.name (same with
  friendly_name)
- Initialize both fields the same (same with friendly_name)
- Also not nice: device is optically a struct, not a pointer. So into the
  function, when we create a new struct (that's where the error "is made"),
  the same name continues to be used.

Not improving my confidence into my solution:
- I haven't bee able to figure out why the automated Windows builds don't
  crash/assert.

Last but not least: The two qt/gtk functions should probably have their common
core extracted into a common function.

Change-Id: I1b36d1765d1a1ec975927cb5785a1540ba4952f5
Ping-Bug: 13448
Reviewed-on: https://code.wireshark.org/review/20721
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-29 20:12:58 +00:00
Joerg Mayer ceeb757cd3 Remove the last HAVE_PCAP_REMOTE inside HAVE_PCAP_REMOTE for this file.
Change-Id: I8710c235ae5377c2064097b1d7163c4cb3544fd8
Reviewed-on: https://code.wireshark.org/review/20697
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-24 13:11:46 +00:00
Joerg Mayer 383ba15d02 Clean up updateRemoteInterfaceList a bit more.
Add an #if-0'ed add_interface_to_remote_list because it is present in its
gtk pendant insert_new_rows in capture_dlg.c

Change-Id: I90e8f9eaafd3d3ca31140ec8bcd6a2eeb7c849ca
Reviewed-on: https://code.wireshark.org/review/20688
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-23 23:30:19 +00:00
Joerg Mayer cbea4c02c4 Split interface update code into its own routine
Change-Id: I568a0785978227924cc6c3b7e9f86f39fa777411
Reviewed-on: https://code.wireshark.org/review/20687
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-23 18:53:47 +00:00
Joerg Mayer 2e76b58840 Fix warning turning error:
/home/jmayer/work/wireshark/git/ui/qt/manage_interfaces_dialog.cpp:273:33: error: variable ‘link_type_name’ set but not used [-Werror=unused-but-set-variable]
By commenting out all lines using this variable for now.

Change-Id: I8f074b24f86ee2063fc545cabd99d446b31a06ec
Reviewed-on: https://code.wireshark.org/review/20616
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-19 12:04:35 +00:00
Roland Knall 6500a660c2 ManageInterfacesDialog: New handling of pipes
This moves the handling of pipes to the new InterfaceTreeModel as well.
It also includes a new PathChooserDelegate and cache handling for adding
data to an interface list without putting it into storage

Change-Id: Id255a81161b4da517e26127abe8ea7f5eb36d55a
Reviewed-on: https://code.wireshark.org/review/18497
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-27 23:54:04 +00:00
Hessam Jalali 10c46fc308 Qt: declare one_em to fix compile error when HAVE_PCAP_REMOTE is defined
Occured on Windows(10) x64 build.

Change-Id: I04d88bec1660dae20f459d2e03c88864c9366dc3
Reviewed-on: https://code.wireshark.org/review/18315
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-19 11:33:22 +00:00
Roland Knall 864f750be5 ManageInterfacesDialog: Implement View/Data Model
Implement the same interface view/data model as used for
the interface_tree selection in this dialog, to encapsulate
all access to global_capture_devices from the dialog.

Change-Id: I0e568fe236d077befa2a79765638db8bb3ed1a3f
Reviewed-on: https://code.wireshark.org/review/18062
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-19 07:43:45 +00:00
Roland Knall 99097dd3c6 Interface List: Change display to view/model
This changes the underlying model of the main interface tree.
Because of that, we can resort to a view/model approach, enlisting
the global interfaces list as only data source.

The interface list works identical to the old list, but allows
for filtering of the displayed interfaces by type. Only types, which
are present and whose interfaces are not hidden, are being displayed
for selection.

Change-Id: If8475b227daa026dc0ad3d25bc7fe050d5bf2ac3
Reviewed-on: https://code.wireshark.org/review/17940
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-01 13:18:51 +00:00
Dario Lombardo 5cc5ba625f Qt: add initializers (CID 1233100).
Change-Id: I99e0d6bd10cc0faddb8a503ec877b3d03b927f4e
Reviewed-on: https://code.wireshark.org/review/16293
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-05 12:16:10 +00:00
Michael Mann 57ef06e242 *_stdup_printf -> strdup for "single string only" formatting.
Done for performance improvements.

This could probably be done in checkAPIs.pl, but this was just
a quick manual check with grepping.

Change-Id: I91ff102cb528bb00fa2f65489de53890e7e46f2d
Reviewed-on: https://code.wireshark.org/review/15751
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: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-06-06 06:03:58 +00:00
AndersBroman fa0a330e37 Remove not needed initialisation breaking MSVC 15 nmake build.
Change-Id: Ia486209a8eef5bf02b5b3f6d793698c4cc802dc9
Reviewed-on: https://code.wireshark.org/review/14699
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-30 12:21:50 +00:00
Stig Bjørlykke 1a716800e3 Qt: Add dialog geometry restore
Add GeometryStateDialog class to handle load and save dialog geometry.
The QDialog class name will be used as window name.  For shared
classes the UAT name or the statistics title or abbr will be used.

Change-Id: I5a019598307fb3861518f41e733de834788184d8
Reviewed-on: https://code.wireshark.org/review/14139
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-28 18:25:50 +00:00
Pascal Quantin 03f9912772 Qt: add OS interface description to 'Manage Local Interfaces' window
In case the user did not provide a custom name for the interface, display the
OS description in the 'Comment' column as how it is done in GTK UI.

Bug: 12156
Change-Id: If9da58980169df3eaf25f74e7b81676cbc4f6ebd
Reviewed-on: https://code.wireshark.org/review/14095
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-23 18:01:42 +00:00
Pascal Quantin a795a3033a Qt: only "Comment" column should be editable in Local Interfaces management tab
Bug: 12146
Change-Id: Ife481b7c0b201a54749e212416571aa3dcaf7542
Reviewed-on: https://code.wireshark.org/review/14017
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>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-20 14:26:46 +00:00
Mikael Kanstrup 3120d1f801 Fix memory leaks in all_ifaces when interface list changes
Valgrind report leaks of several allocations like these:
590 bytes in 50 blocks are possibly lost in loss record 29,818 of 31,670
   at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0xCB9C8A7: __vasprintf_chk (vasprintf_chk.c:82)
   by 0xA3D8DCA: g_vasprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
   by 0xA3B846C: g_strdup_vprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
   by 0xA3B850B: g_strdup_printf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
   by 0x6F4B51: scan_local_interfaces (iface_lists.c:254)
   by 0x6EF3D8: iface_mon_handler2 (iface_monitor.c:113)
   by 0xBE56F1D: ??? (in /lib/libnl-3.so.200.3.0)
   by 0xBA16F19: ??? (in /usr/lib/libnl-route-3.so.200.3.0)
   by 0xBE54E5E: nl_cache_parse (in /lib/libnl-3.so.200.3.0)
   by 0xBE585CA: nl_msg_parse (in /lib/libnl-3.so.200.3.0)
   by 0x6EF372: iface_mon_handler (iface_monitor.c:123)

When the list of network interfaces is updated allocations done
for global_capture_opts.all_ifaces elements leak memory. Fixed by
introducing a helper function to be used for removing an interface_t
element from all_ifaces array. While at it also fixed misc leaks when
updating individual allocated records of all_ifaces elements.

Change-Id: I035e6936a44edeef2ebe4780931c14cde99e93a4
Reviewed-on: https://code.wireshark.org/review/12209
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-12-11 10:38:32 +00:00
Stig Bjørlykke 631172f2f4 Qt: Use uniform interface display name
Use common function to generate the interface display name, both
when scanning for interfaces (scan_local_interfaces()) and when
changing Comment in the Manage Interfaces dialog.

Change-Id: I3260208856563aaf387ce397d4ae61bddcc89b4f
Reviewed-on: https://code.wireshark.org/review/12362
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-02 09:57:35 +00:00
Gerald Combs d9e530bc17 Use address functions instead of ADDRESS macros in ui.
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case
equivalents in the ui directory.

Change-Id: I10e95e66c8da5b880133452ebc484c53046e87ba
Reviewed-on: https://code.wireshark.org/review/11199
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22 11:46:12 +00:00
João Valverde c00420efa2 Move utf8_entities.h to wsutil
Change-Id: I6298b3de5f0a1cb988014ff16082eaf8c2a3c3c0
Reviewed-on: https://code.wireshark.org/review/10786
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>
2015-10-05 14:34:53 +00:00
Stig Bjørlykke b0a8fa59f8 Initialize extcap for pipes
Change-Id: Ia731f281ee9af171c759d7f6f7c614c350cbb4e7
Reviewed-on: https://code.wireshark.org/review/10178
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: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-22 11:55:21 +00:00
Gerald Combs d8d3c52f1e Use an ellipsis character instead of three dots.
The OS X Human Interface Guidelines at

https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/TerminologyWording.html#//apple_ref/doc/uid/20000957-CH15-SW3

says:

"Be sure to create the ellipsis character using the key combination
 Option-; (Option-semicolon). This ensures that an assistive app can
 provide the correct interpretation of the character to a disabled user.
 If you use three period characters to simulate an ellipsis, many
 assistive apps will be unable to make sense of them. Also, three period
 characters and an ellipsis don't look the same because the periods are
 spaced differently than the points of an ellipsis."

The Windows desktop applications guidelines has a section on ellipses:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn742478.aspx

but doesn't specify the a single glyph vs three dots.

The GNOME HIG at

https://developer.gnome.org/hig/stable/typography.html.en

says "Take Advantage of Unicode" then specifically says to use U+2026
HORIZONTAL ELLIPSIS.

Remove the ellipsis from "Find Next" and "Find Previous". Neither
requires user interaction.

Change-Id: I0e6c28bb8b3a84b242731e2ca96f1a6f6f42c303
Reviewed-on: https://code.wireshark.org/review/9833
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-07-31 18:55:06 +00:00
Pascal Quantin 6452caa3b3 Fix retrieval of data link type supported by remote interfaces with authentication
Make use of -A parameter when querying data link types supported by a given interface with dumpcap.
Ensure to pass the authentication parameters configured for a remote interface when calling capture_get_if_capabilities()

Bug: 11366
Change-Id: I4efea615084a82108e4a12a64e8c46817f30a5c6
Reviewed-on: https://code.wireshark.org/review/9690
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>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-22 07:10:10 +00:00
Joerg Mayer 51a37b666a Continuing to remove Q_UNUSED
Change-Id: I54bc4a1b7d39abd1bb88ee361b0de5fcbca1efe8
Reviewed-on: https://code.wireshark.org/review/9546
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-07-07 21:50:17 +00:00
Martin Kaiser 534d1d5eae Qt: use <> for including the generated ui_*.h files
this should make Visual Studio pick up the generated include files
from the build directory instead of the source directory (which may
contain lefovers from an in-tree build)

Change-Id: Ie3de4cdd85a2865e203118a42ab10f443372f03b
Reviewed-on: https://code.wireshark.org/review/9129
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 17:11:19 +00:00
Guy Harris 8327921a32 Fix another capture_dev_user_pmode_find() call.
Missed by the previous commit.

Change-Id: I0882e2cf7a734f93e59dbfd1aab564a2fd65d316
Reviewed-on: https://code.wireshark.org/review/7917
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-04 21:43:53 +00:00
Guy Harris 083f6b6e6d Have a #define for whether the capture buffer size can be set.
It can be set if either 1) this is Windows (where we're assumed to be
using WinPcap, which includes calls to set the buffer size) or 2) we
have pcap_create() (in which case we also have pcap_set_buffer_size(),
at least in a normal libpcap release).

Use that rather than testing "defined(_WIN32) ||
defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's
being tested.

Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12
Reviewed-on: https://code.wireshark.org/review/7816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 03:22:33 +00:00
Guy Harris a1ea3ce81c Fix another call to capture_dev_user_snaplen_find().
Change-Id: I20064f782b7ad8ebffc70322a877d88501d6ef60
Reviewed-on: https://code.wireshark.org/review/7749
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 01:16:55 +00:00
Guy Harris 1fdfee69d6 Patch some memory leaks.
capture_dev_user_descr_find() and capture_dev_user_cfilter_find() return
g_malloc()ated strings; we don't need to g_strdup() them to get a
g_malloc()ated string, and we *do* need to free them if we aren't going
to use them any more.

Document that while we're at it, and give more details for the functions
returning integer user-specified interface parameters as well.

Change-Id: Icf98a48992b1c4168ead54bdc4cc2847da89d665
Reviewed-on: https://code.wireshark.org/review/7745
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:28:40 +00:00
Gerald Combs c34ded4ae2 Qt/C++: Change a bunch of includes to forward declarations.
In theory this this should reduce compilation times. On my particular
system it makes no difference but hopefully it will elsewhere.

Change-Id: I570177d3ca4eec691c82d46b4dbbce74092aac1d
Reviewed-on: https://code.wireshark.org/review/7060
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-10 19:59:43 +00:00
Michael Mann 55de46f317 Replace ep_address_to_str with address_to_str.
Change-Id: I4f1078b20f41800f72a751612703ad0d4c2ae87b
Reviewed-on: https://code.wireshark.org/review/6323
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-06 07:38:18 +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
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 75727dca26 Qt (manage interface): fix warning: comma at end of enumerator list [-Wpedantic]
Change-Id: I728a50e47fd0d8eea77bc1cdebe2a155184ea953
Reviewed-on: https://code.wireshark.org/review/4456
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-04 16:17:19 +00:00
Gerald Combs a71f6807b8 Qt: Rework the "Manage Interfaces" dialog.
Convert QTableWidget to QTreeWidget.

It looks like the GTK+ version has a separate set of apply/save buttons
for each tab which *only* operates on that tab. This can result unexpected
behavior which throws away changes if the user updates more than one
tab. Use a single "OK" button that applies all of our changes instead.

Reorder the tabs. Put Local Interfaces first and select it by default.
Always show Remote Interfaces. Disable it on platforms that don't have
PCAP_REMOTE.

Automatically start editing when we add a new pipe. Don't immediately
update pipe interface settings. Wait until we hit "OK" instead.

Rename NewFileDelegate to PathChooserDelegate. Note that we might want
to move it use it elsewhere in the application.

Try switching the user-facing terminology from "Hide" to the more
positive "Show".

Tell the user that we don't save pipe or remote interface settings.

Add a help URL for the "Manage Interfaces" dialog box.

Use the GLib and Qt string functions and classes to split and join
comma-separated preferences. This makes sure capture_dev_user_descr_find
doesn't skip over the first interface. It also keeps the Qt code from
adding a leading comma to our capture preferences.

Add a note about strings to README.qt. Summary: Use QStrings.

For another day:

- If we *do* save remote settings we need to store credentials securely,
  e.g. with CryptProtectData.

- Get rid of the remote settings dialogs. Their controls should fit in the
  remote settings tab.

- Add an extcap tab.

- We need getter/setter functions for global_capture_opts.all_ifaces. We
  iterate over it *way* too much.

Change-Id: Ib7b61972f3ece4325e0230f725e7f2678acbb24b
Reviewed-on: https://code.wireshark.org/review/3873
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-08-29 00:24:02 +00:00
Alexis La Goutte aaeedcb108 Fix modeline (use Wireshark standard with C comment and no C++ comment)
Fix also some indent (tab->4spaces)

Change-Id: Ieef26591d405c6abe622f9fa26d2a7117af3c259
Reviewed-on: https://code.wireshark.org/review/3548
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-11 11:28:10 +00:00
Gerald Combs 4da7570809 Use a QTreeWidget instead of QTableWidget.
Even though Qt's widget naming suggests otherwise, a QTreeWidget is
usually a better choice for tables than QTableWidget. The former gives
you a nice, clean Plain Old Table while the latter gives you something
that looks and acts like a spreadsheet.

In this particular instance using QTreeWidget also gives us the option
of adding sub-items with detailed information. Do so for attached
addresses.

Allow sorting by traffic while we're here. Simplify the column hiding
logic. Make sure the sparkline delegate isn't editable.

Change-Id: Ia36ba2e12c1c0cb86ae5b2154e6afcf6549ae049
Reviewed-on: https://code.wireshark.org/review/3466
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-08 05:57:01 +00:00
AndersBroman 1de0203c5f device.remote_opts.sampling_method and device.remote_opts.sampling_param
only exists if we have HAVE_PCAP_SETSAMPLING.

Change-Id: I60b98fd0539d1a8f4fcdd3a079f39f8062a43844
Reviewed-on: https://code.wireshark.org/review/3429
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-05 11:59:55 +00:00
Irene Ruengeler f080b43933 Windows: Manage remote interfaces
Add remote interfaces to capture from a remote host.

Change-Id: I34e31d865304f3c6dd972ab9ab1c23829d564665
Reviewed-on: https://code.wireshark.org/review/3405
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-05 07:48:45 +00:00
Alexis La Goutte 68daa668e4 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I9946e55ee33ccbf57c6b268f725f5b1a537b61a9
Reviewed-on: https://code.wireshark.org/review/2897
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:31:20 +00:00
Irene Ruengeler f3c5f14bc4 Manage Interfaces
- Add dialog to manage interfaces
- Add and delete pipes
- Hide local interfaces

Change-Id: I08323c306c2ea736f99e57c28e2fe3170a0c2216
Reviewed-on: https://code.wireshark.org/review/2613
Tested-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-07-02 20:56:37 +00:00