aboutsummaryrefslogtreecommitdiffstats
path: root/ui
AgeCommit message (Collapse)AuthorFilesLines
2017-05-02Qt: Fix build without extcapStig Bjørlykke1-0/+2
Change-Id: Ibfcdb719408c0172ae78bf3b2761ff551ff6313c Reviewed-on: https://code.wireshark.org/review/21461 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-05-02Qt: Interface Toolbar improvementsStig Bjørlykke5-52/+151
- Select one of the capturing interfaces when start capture - Only send user changed control values when start capture - Don't show hidden interfaces - Allow a toolbar with no interfaces - Renamed button role "reset" to "restore" - Improved control number validation - Updated documentation Change-Id: Icc8d04043c95c1f3ef8d7cdc3b251be4471cba0a Reviewed-on: https://code.wireshark.org/review/21445 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-30[Automatic update for 2017-04-30]Gerald Combs7-3745/+3976
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: I491517d8801f9b5d3d3084102ed35b418460e4b6 Reviewed-on: https://code.wireshark.org/review/21427 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-26Qt: Remove semicolon behind Q_UNUSED macroStig Bjørlykke1-1/+1
Change-Id: Ief5f7bca5d110df8958307b58fc11bf740787dfd Reviewed-on: https://code.wireshark.org/review/21349 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26Qt: Remove semicolon behind Q_UNUSED macro, part 2Stig Bjørlykke1-2/+2
Change-Id: Id27a93c9a76b554bb2e98199d08d3d9604550889 Reviewed-on: https://code.wireshark.org/review/21348 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26Qt: Remove semicolon behind Q_UNUSED macroStig Bjørlykke5-12/+12
Change-Id: I75ff975216da23447b94bc513671ac269c52b7dc Reviewed-on: https://code.wireshark.org/review/21342 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26Qt: Don't use _U_ for unused parameters in C++Stig Bjørlykke3-5/+4
Change-Id: If7acab5f438bb20b053fdcfef86b2f06765b5321 Reviewed-on: https://code.wireshark.org/review/21341 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26Fix no-extcap build.Guy Harris1-0/+2
Change-Id: I9f01264bf5f0c28a4d871f6d983e9efed1c23259 Reviewed-on: https://code.wireshark.org/review/21347 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-25Qt: fix compilation without pcap.Dario Lombardo2-0/+5
Change-Id: Ia0fe79157f21fd0b1c0e5195c902ae07c55ca253 Reviewed-on: https://code.wireshark.org/review/21343 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-25Qt: Make text in SimpleDialog selectable by mouseStig Bjørlykke1-0/+1
This makes it easier to copy error messages. Change-Id: I39284d9b2d716336c6fc4b211e5346abcebf0aee Reviewed-on: https://code.wireshark.org/review/21326 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-25Qt: Add interface toolbar supportStig Bjørlykke20-7/+1890
An extcap utility can provide configuration for controls to use in a GUI interface toolbar. This controls are bidirectional and can be used to control the extcap utility while capturing. This is useful in scenarios where configuration can be done based on findings in the capture process, setting temporary values or give other inputs without restarting current capture. Todo: - Add support for Windows Change-Id: Ie15fa67f92eb27d8b73df6bb36f66b9a7d81932d Reviewed-on: https://code.wireshark.org/review/19982 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-24Move UI-only stuff out of libwireshark.Guy Harris7-3/+502
Packet ranges are used only in the UI; move the packet range stuff into libui. Don't pass a print_args_t structure to libwireshark packet-printing routines, just pass the few parameters they need. Move the declaration of print_args_t into file.h. Change-Id: Icff5991eea7d7d56f33b4716105895263d275bcf Reviewed-on: https://code.wireshark.org/review/21308 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-23[Automatic update for 2017-04-23]Gerald Combs7-245/+245
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: If8e6efa61c4c2808c51c585b0c61fd76a321c3fd Reviewed-on: https://code.wireshark.org/review/21298 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-20Use cfile_write_failure_message() in the randpkt code.Guy Harris1-10/+18
Change-Id: I32ef7ff85f854782e5dd02c3e7f12436a120bc13 Reviewed-on: https://code.wireshark.org/review/21259 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20Take the error message generation out of the merge_files routines.Guy Harris2-35/+53
Have them just return the information needed for the caller to produce an error message, and have the callers use the new cfile_ routines for reporting errors. This requires that the "write failure alert box" routine take the *input* file name as an argument, so that, on a merge, if the problem is that a record from a given input file can't be written out to the type of output file we're generating, the input file name can be given, along with the record number in that file. Change-Id: If5a5e00539e7e652008a523dec92c0b359a48e71 Reviewed-on: https://code.wireshark.org/review/21257 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20cf_open() pops up a dialog box on errors; its callers shouldn't do so.Guy Harris2-11/+11
Change-Id: I1c65854b5bde1c64d70cb17a13080829f0faa27b Reviewed-on: https://code.wireshark.org/review/21253 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20Have separate routines for open-for-reading and open-for-writing errors.Guy Harris7-166/+239
Expand comments while we're at it. Change-Id: I6dcc791eab1c9e323a9572f3d54720d223bdd64b Reviewed-on: https://code.wireshark.org/review/21252 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20Make the command-line and alert-box failure messages more similar.Guy Harris3-23/+40
Change-Id: I94af221a0ce8b6b3ff8e0e1b94d5379351ac0962 Reviewed-on: https://code.wireshark.org/review/21251 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20Qt: show relative time for the IO Graph in an appropriate unitPeter Wu2-18/+127
The GTK+ UI performs automatic formatting of the units (us, ms, s) based on the magnitude of the value (for MIN/MAX/SUM calculations). Internally the numbers are stored as integers (microseconds). The Qt UI did not have this formatting feature yet and would therefore display the values as-is (in microseconds). This patch rescales the Y value and appends an appropriate label (s, ms or us). With multiple graphs, rescaling is disabled completely for simplicity (GTK+ would still try to find an appropriate unit prefix if there are multiple time graphs). Bug: 12828 Change-Id: I26ed68fc3497e06ac283a618fee8b673b1b0cf71 Reviewed-on: https://code.wireshark.org/review/21062 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-20Qt: Prevent moving other columns on drag and dropPeter Wu1-1/+35
This workaround prevents moving around other columns during drag and drop and also transfers the sorting order to the new position. Bug: 13183 Ping-Bug: 13540 Change-Id: I4609c63557bf3abf06ba417ac1b40cac22a82abc Reviewed-on: https://code.wireshark.org/review/21022 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-20memory leak: Qt code doesn't pass 'parent' argument to some Qt class ↵Max Dmitrichenko2-2/+2
constructors found with valgrind Change-Id: I2d73bd50a6f0e13b1817c8a518189c0e56558f72 Reviewed-on: https://code.wireshark.org/review/21227 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-20Fix a comment.Guy Harris1-1/+1
Change-Id: Ic99602ec405533dcf436463ee26bf312f9dd78f1 Reviewed-on: https://code.wireshark.org/review/21240 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20Add common routines for command-line libwiretap error reporting.Guy Harris4-0/+528
These are similar to the routines added to ui/alert_box.c for dialog-box libwiretap error reporting. This centralizes the knowledge about what to say for various libwiretap errors, removing some duplicate code, and giving more details in some programs. Change-Id: I737405c4edaa0e6c27840f78a8c587a8b3ee120b Reviewed-on: https://code.wireshark.org/review/21234 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-19Have a common "capture file write failure alert box" routine.Guy Harris2-7/+101
Take the code from save_record() to pop up an alert box and put it into libui, with the name cfile_write_failure_alert_box(). While we're at it, clean up some variable names and comments. Change-Id: If56e649e5afe50e7a20b39720ec96e8fe2983b24 Reviewed-on: https://code.wireshark.org/review/21233 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-19Have a common "capture file close alert box" routine.Guy Harris2-1/+72
Take the code from cf_read() to pop up an alert box and put it into libui, with the name cfile_read_failure_alert_box(). Use it in a couple of places where we pop up such an error dialog. While we're at it, get rid of the "err" argument to rescan_file(); nobody uses what it returns. Change-Id: Iba7099b95de24309359d94eb96f606020e2ff2c3 Reviewed-on: https://code.wireshark.org/review/21232 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-19remove unnecessary guint64 cast in IO graphXiaochuan Sun1-8/+8
Change-Id: I35d666a5a9fb5813706c312334f1552703c9475c Reviewed-on: https://code.wireshark.org/review/21214 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18Fix a comment.Guy Harris1-6/+1
Change-Id: I3a18e3fab9fa785e828df843b1b4b899beba1f19 Reviewed-on: https://code.wireshark.org/review/21206 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18Fix a comment.Guy Harris1-6/+1
Change-Id: I2ed361efdaa6dcf632f054634dc473d518df4cc8 Reviewed-on: https://code.wireshark.org/review/21204 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18Have a common "capture file close alert box" routine.Guy Harris5-5/+105
Take cf_close_failure_alert_box() and put it into libui, with the name cfile_close_failure_alert_box(). Use it not only in file.c but also in ui/export_pdu_ui_utils.c, ui/gtk/file_import_dlg.c, and ui/qt/import_text_dialog.cpp where the error we get back isn't necessarily an errno. Have ui/gtk/file_import_dlg.c and ui/qt/import_text_dialog.cpp also use cfile_open_failure_alert_box() on open errors. Change-Id: I987f339a23ea58609390306a319923e7f92d5c07 Reviewed-on: https://code.wireshark.org/review/21203 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18CMake: Sort entriesStig Bjørlykke2-4/+4
Put additional_toolbar in sorted position. Change-Id: I483bca72265a5932f54ccf882c6659e94be5d95b Reviewed-on: https://code.wireshark.org/review/21183 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-18Qt: AdditionalToolbars is a menuStig Bjørlykke3-10/+10
Rename actionViewAdditionalToolbars to menuAdditionalToolbars because this is a menu, not an action. Change-Id: I85e45c065f415ffa008792f04127d81283e54b7e Reviewed-on: https://code.wireshark.org/review/21181 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-18Have a commont "capture file open alert box" routine.Guy Harris3-4/+170
Take cf_open_failure_alert_box() and put it into libui, with the name cfile_open_failure_alert_box(). Use it not only in file.c but also in ui/export_pdu_ui_utils.c, where the error we get back isn't necessarily an errno. Change-Id: Ia053f3e403ba464d446bd9530778d5ed302796d2 Reviewed-on: https://code.wireshark.org/review/21174 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17Qt: Provide both file save and open preferencesAhmad Fatoum6-17/+48
This is a breaking change. prefs_register_filename_preference hasn't been differentiating between files to be saved and ones to be opened. On GTK, a neutral dialog is used, so no problems there. On Qt, a save dialog has been always used, even in dissectors that were reading configuration files without modification. prefs_register_filename_preference now takes an argument to indicate whether UI could be a save dialog with a warning on overwriting a file, or whether it's a general purpose open file dialog. Qt now does this. Previously no warning was shown on overwriting a file, so it may be used for opening files too without irritating the user. This has been changed, as non-destructive reads should now use the open dialog. Dissectors were changed accordingly. Change-Id: I9087fefa5ee7ca58de0775d4fe2c0fdcfa3a3018 Reviewed-on: https://code.wireshark.org/review/21086 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-17Check for localtime() failing.Guy Harris1-2/+12
It "shouldn't happen", but at least this squelches a Coverity complaint, CID 1398224. Change-Id: I9555f71a50574e9386a3c96d52143d838f7f121f Reviewed-on: https://code.wireshark.org/review/21160 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17Clean up documentation and help messages for protocol enabling/disabling.Guy Harris1-0/+2
List all of --enable-protocol, --disable-protocol, --enable-heuristic, and --disable-heuristic in the SYNOPSIS section of the man pages. Undent after the list of taps for the -z option, so the following options are at the same indentation as other options. List --enable-protocol in the DESCRIPTION, above --disable-protocol. Include --enable-protocol in the help message. Change-Id: I680a54430789f3543b2d539fbded22b0b57f7f76 Reviewed-on: https://code.wireshark.org/review/21159 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-16[Automatic update for 2017-04-16]Gerald Combs7-176/+60
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: I8165b1b2db0f81049a88dd17163a4367f04f83cc Reviewed-on: https://code.wireshark.org/review/21142 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-12Rename routines to clarify what they do.Guy Harris8-10/+10
XXX_prime_with_YYY makes it a bit clearer than does XXX_prime_YYY that we're not priming YYY, we're priming XXX *using* YYY. Change-Id: I1686b8b5469bc0f0bd6db8551fb6301776a1b133 Reviewed-on: https://code.wireshark.org/review/21031 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12Add an API to let a postdissector specify fields whose values it needs.Guy Harris2-0/+22
Currently, this is only used to determine whether a protocol tree needs to be built on the first pass or not - if there are postdissectors that need fields, it does - but eventually we should be able to use it to prime the dissection to deliver those fields in cases where we don't need the *entire* protocol tree (rather than using a hack such as cooking up a fake tap with a fake filter to do that). Update MATE and TRANSUM to use it. Clean up code to check whether we need a protocol tree, and add comments before that code indicating, in each case, what the criteria are. The array of postdissectors includes a length, so we don't need to separately keep track of the number of postdissectors. Clean up indentation while we're at it. Change-Id: I71d4025848206d144bc54cc82941089a50e80ab7 Reviewed-on: https://code.wireshark.org/review/21029 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-11Qt: mark bool and enum prefs as changed when modified via the menuPeter Wu1-0/+2
When preferences are modified, these must be marked to ensure that the "prefs_changed" callback for Lua dissectors is invoked. Bug: 13536 Change-Id: Ib93b2920ebefbc1532d3c6cd097f802a45ec6f35 Reviewed-on: https://code.wireshark.org/review/21016 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-09Pull all the "load settings" calls into a epan_load_settings() routine.Guy Harris2-22/+4
That way, nothing using libwireshark needs to know what settings need to be loaded, they just call epan_load_settings(). Change-Id: I9390e259e286fc4f5acaeaac2767e4c3c4b656af Reviewed-on: https://code.wireshark.org/review/20983 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Pull the error reporting into {read,save}_filter_list.Guy Harris8-176/+70
Change-Id: I4d9582661f2f1728d400eeb2a1b1dea98f32ce7f Reviewed-on: https://code.wireshark.org/review/20982 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09[Automatic update for 2017-04-09]Gerald Combs7-883/+882
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: I147cbfa4c9cca70ad581d2e3c149473afd243086 Reviewed-on: https://code.wireshark.org/review/20978 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-09We use libui with dumpcap, which is built PIE, so libui should be, too.Guy Harris1-0/+8
Change-Id: Ic469517dc414e1eb62b27b6d2b0b0a7837790bf9 Reviewed-on: https://code.wireshark.org/review/20975 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Move the filter file reading code to libui.Guy Harris11-7/+786
It doesn't belong in libwireshark, as it doesn't affect dissection, but it *does* belong in libui, as it's helper code for the UIs. Change-Id: I8a5e0640a299a08e9ec1917dd253197438ebfdbc Reviewed-on: https://code.wireshark.org/review/20974 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Pull the error-reporting code for preference files into read_prefs().Guy Harris2-64/+2
No need to duplicate it in N different programs. Update comments while we're at it. Change-Id: I3096cbe5448a19363eff6303bdd54e522dae9336 Reviewed-on: https://code.wireshark.org/review/20973 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Have vwarning_alert_box() pop up a warning, not an error.Guy Harris1-1/+1
Change-Id: I993133931af222c94f4a8814583fef97e49542ca Reviewed-on: https://code.wireshark.org/review/20972 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Pull the code to save enabled/disabled lists into libwireshark.Guy Harris4-78/+5
It's identical in the GTK+ and Qt UIs, and it should just be done in libwireshark. Rename some routines to just speak of enabled_and_disabled_lists, so we don't have to say enabled_and_disabled_protos_and_heuristic_dissectors or something such as that. Clean up indentation. Change-Id: Ief2e612d9e1b60d8d0123b6bd3409dce5faf6495 Reviewed-on: https://code.wireshark.org/review/20970 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08Clean up handling of enabled/disabled protocols/heuristic dissectors.Guy Harris17-149/+144
Add a "report a warning message" routine to the "report_err" code in libwsutil, and rename files and routines appropriately, as they don't only handle errors any more. Have a routine read_enabled_and_disabled_protos() that reads all the files that enable or disable protocols or heuristic dissectors, enables and disables them based on the contents of those files, and reports errors itself (as warnings) using the new "report a warning message" routine. Fix that error reporting to report separately on the disabled protocols, enabled protocols, and heuristic dissectors files. Have a routine to set up the enabled and disabled protocols and heuristic dissectors from the command-line arguments, so it's done the same way in all programs. If we try to enable or disable an unknown heuristic dissector via a command-line argument, report an error. Update a bunch of comments. Update the name of disabled_protos_cleanup(), as it cleans up information for disabled *and* enabled protocols and for heuristic dissectors. Support the command-line flags to enable and disable protocols and heuristic dissectors in tfshark. Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df Reviewed-on: https://code.wireshark.org/review/20966 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-07Qt: Remember exact position of selected item in treePeter Wu1-3/+45
When switching between packets, the first field at a level would be selected. This is annoying if you have similarly structured trees (like TLVs or text labels). Combined with something like bug 13533, this causes erratic jumping. Fix this by incorporating the level position in the path. Change-Id: I998853ce899fffc69dd4932902508141325c35a4 Ping-Bug: 13533 Reviewed-on: https://code.wireshark.org/review/20799 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris31-55/+55
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>