aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/manage_interfaces_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-02-02Qt: use SPDX identifiers.Dario Lombardo1-14/+1
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3 Reviewed-on: https://code.wireshark.org/review/25563 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29Populate Remote Interfaces with data from recent fileMichael Mann1-0/+55
Remote Interfaces have been saved in the recent_common file however they were never populated by the GUI. Bug: 8557 Change-Id: Ib68a75ce02f5b5e2c115b72d58c3e781a5122f9f Reviewed-on: https://code.wireshark.org/review/25039 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-15Rename ui_util.h -> ws_ui_util.hPeter Wu1-1/+1
In preparation for possibly using AUTOUIC in CMake which treats "ui_*.h" files specially, rename ui_util.h. No other changes. Change-Id: Id026572c000b713ff0e9388dc7fff8d81d4df73e Reviewed-on: https://code.wireshark.org/review/23916 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-05qt: Fix leaked dialogsMikael Kanstrup1-0/+1
Some dialogs are allocated on heap but not freed when the dialog boxes are closed. This means one dialog instance is leaked each time opened/closed. Also dialogs being subclasses of GeometryStateDialog means they might lack a parent reference and are not automatically freed on application shutdown either. Fix these leaks by letting the dialogs automatically destroy themselves on close (via WA_DeleteOnClose). Capture filter, display filter and capture interfaces dialogs are also leaked on application shutdown. These dialogs are protected by a NULL check that at least prevent multiple instances. Though none of them are freed on application shutdown. Fix leaks by freeing when main window is destroyed. Bug: 14071 Change-Id: I8c5c5a75ad3c89abb5996941875ba5d616a22d9c Reviewed-on: https://code.wireshark.org/review/23747 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>
2017-08-28Fix leak when removing interfaces from manage interfaces dialogMikael Kanstrup1-0/+1
When removing interfaces from the manage interfaces dialog the interface elements where not freed properly causing leaks. Free the interface element when removed from the array. Ping-Bug: 13864 Change-Id: I6beb222a5475278cfc6cb454a7c8b2c86f636f38 Reviewed-on: https://code.wireshark.org/review/23203 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-28iface_lists: Access all_ifaces member by referenceMikael Kanstrup1-32/+28
Change access of all_ifaces elements from by val to by reference. With this change unnecessary copying of the whole struct is avoided but even more important is that elements no longer have to be removed and inserted whenever data is updated. This change aims to make it more clear that all_ifaces elements shall never be removed from the array without freeing resources via the capture_opts_free_interface_t function. NOTE: Code for GTK UI not updated Ping-Bug: 13864 Change-Id: I36742cb1d5c8daa136c9d3732a044a7c8e5c7fe7 Reviewed-on: https://code.wireshark.org/review/23201 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-22Fix requesting hardware timestamps without -kAhmad Fatoum1-0/+2
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-15Qt: fix compilation without pcap.Dario Lombardo1-4/+5
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-07-26Qt: Create models directoryRoland Knall1-3/+3
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-26Qt: Move utils to separate utils directoryRoland Knall1-2/+2
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-06-27Qt: fix alloc-dealloc-mismatch while adding named pipePeter Wu1-15/+16
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-04-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris1-1/+1
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-03-29Prevent crash/assert on access to "uninitialized" device.if_info.name.Joerg Mayer1-0/+1
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-24Remove the last HAVE_PCAP_REMOTE inside HAVE_PCAP_REMOTE for this file.Joerg Mayer1-3/+1
Change-Id: I8710c235ae5377c2064097b1d7163c4cb3544fd8 Reviewed-on: https://code.wireshark.org/review/20697 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-23Clean up updateRemoteInterfaceList a bit more.Joerg Mayer1-9/+8
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-23Split interface update code into its own routineJoerg Mayer1-1/+6
Change-Id: I568a0785978227924cc6c3b7e9f86f39fa777411 Reviewed-on: https://code.wireshark.org/review/20687 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-19Fix warning turning error:Joerg Mayer1-3/+4
/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>
2016-10-27ManageInterfacesDialog: New handling of pipesRoland Knall1-200/+49
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-19Qt: declare one_em to fix compile error when HAVE_PCAP_REMOTE is definedHessam Jalali1-0/+1
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-19ManageInterfacesDialog: Implement View/Data ModelRoland Knall1-173/+20
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-01Interface List: Change display to view/modelRoland Knall1-0/+3
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-07-05Qt: add initializers (CID 1233100).Dario Lombardo1-1/+1
Change-Id: I99e0d6bd10cc0faddb8a503ec877b3d03b927f4e Reviewed-on: https://code.wireshark.org/review/16293 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-06*_stdup_printf -> strdup for "single string only" formatting.Michael Mann1-1/+1
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-03-30Remove not needed initialisation breaking MSVC 15 nmake build.AndersBroman1-1/+0
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-02-28Qt: Add dialog geometry restoreStig Bjørlykke1-1/+2
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-23Qt: add OS interface description to 'Manage Local Interfaces' windowPascal Quantin1-1/+3
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-20Qt: only "Comment" column should be editable in Local Interfaces management tabPascal Quantin1-1/+10
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>
2015-12-11Fix memory leaks in all_ifaces when interface list changesMikael Kanstrup1-0/+3
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-02Qt: Use uniform interface display nameStig Bjørlykke1-8/+1
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-10-22Use address functions instead of ADDRESS macros in ui.Gerald Combs1-2/+2
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-05Move utf8_entities.h to wsutilJoão Valverde1-1/+1
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-08-22Initialize extcap for pipesStig Bjørlykke1-0/+4
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-07-31Use an ellipsis character instead of three dots.Gerald Combs1-1/+2
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-22Fix retrieval of data link type supported by remote interfaces with ↵Pascal Quantin1-2/+10
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-07Continuing to remove Q_UNUSEDJoerg Mayer1-14/+5
Change-Id: I54bc4a1b7d39abd1bb88ee361b0de5fcbca1efe8 Reviewed-on: https://code.wireshark.org/review/9546 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-06-25Qt: use <> for including the generated ui_*.h filesMartin Kaiser1-1/+1
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-04-04Fix another capture_dev_user_pmode_find() call.Guy Harris1-1/+1
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-03-25Have a #define for whether the capture buffer size can be set.Guy Harris1-2/+2
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-19Fix another call to capture_dev_user_snaplen_find().Guy Harris1-2/+3
Change-Id: I20064f782b7ad8ebffc70322a877d88501d6ef60 Reviewed-on: https://code.wireshark.org/review/7749 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19Patch some memory leaks.Guy Harris1-0/+1
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-02-10Qt/C++: Change a bunch of includes to forward declarations.Gerald Combs1-0/+2
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-01-06Replace ep_address_to_str with address_to_str.Michael Mann1-2/+6
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>
2014-12-28Replace ip6_to_str and ip6_guint8_to_str with address_to_str and tvb_ip_to_str.Michael Mann1-1/+2
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-26Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.Michael Mann1-1/+3
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71 Reviewed-on: https://code.wireshark.org/review/5934 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-04Qt (manage interface): fix warning: comma at end of enumerator list [-Wpedantic]Alexis La Goutte1-2/+2
Change-Id: I728a50e47fd0d8eea77bc1cdebe2a155184ea953 Reviewed-on: https://code.wireshark.org/review/4456 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-29Qt: Rework the "Manage Interfaces" dialog.Gerald Combs1-237/+343
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-11Fix modeline (use Wireshark standard with C comment and no C++ comment)Alexis La Goutte1-12/+13
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-08Use a QTreeWidget instead of QTableWidget.Gerald Combs1-2/+6
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-05 device.remote_opts.sampling_method and device.remote_opts.sampling_paramAndersBroman1-0/+2
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-05Windows: Manage remote interfacesIrene Ruengeler1-2/+303
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>