aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
AgeCommit message (Collapse)AuthorFilesLines
2018-10-08Qt: Add clear all button to Decode AsStig Bjørlykke5-0/+46
Add a clear all button to easily remove all existing entries. Change-Id: I76e7ee2b7b85a9b4e5f9f5a788a89f38f70ee8ce Reviewed-on: https://code.wireshark.org/review/30052 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-08Qt: Remove unused pathLabelStig Bjørlykke2-40/+2
Change-Id: Id1c40f231f49f75210af43fa2a5cfbe3937d9ca1 Reviewed-on: https://code.wireshark.org/review/30055 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-08Bring back arg_list_utf_16to8(), but have it just do UTF-16-to-UTF-8 mapping.Guy Harris1-7/+4
Call it from wmain() in the command-line tools, passing it the input argument count and vector, and call it from main() in Wireshark, after getting a UTF-16 argument vector from passing the result of GetCommandLineW() to CommandLineToArgvW(). Change-Id: I0e51703c0a6c92f7892d196e700ab437bd702514 Reviewed-on: https://code.wireshark.org/review/30063 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-07Qt: Clean up indentationStig Bjørlykke3-12/+9
Change-Id: Idbae503b44c207d71431159a3eaf762e1dc79977 Reviewed-on: https://code.wireshark.org/review/30056 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-07Qt: Fix Coloring Rules apply as filter button sizeStig Bjørlykke1-1/+1
Change-Id: I3847f10b8b337b6df4f86b920dcf11b73b35b869 Reviewed-on: https://code.wireshark.org/review/30054 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-07Use wsetargv.obj, and wmain() rather than main(), on Windows.Guy Harris1-7/+29
Doing so for command-line programs means that the argument list doesn't ever get converted to the local code page; converting to the local code page can mangle file names that *can't* be converted to the local code page. Furthermore, code that uses setargv.obj rather than wsetargv.obj has issues in some versions of Windows 10; see bug 15151. That means that converting the argument list to UTF-8 is a bit simpler - we don't need to call GetCommandLineW() or CommandLineToArgvW(), we just loop over the UTF-16LE argument strings in argv[]. While we're at it, note in Wireshark's main() why we discard argv on Windows (Qt does the same "convert-to-the-local-code-page" stuff); that means we *do* need to call GetCommandLineW() and CommandLineToArgvW() in main() (i.e., we duplicate what Qt's WinMain() does, but converting to UTF-8 rather than to the local code page). Change-Id: I35b57c1b658fb3e9b0c685097afe324e9fe98649 Ping-Bug: 15151 Reviewed-on: https://code.wireshark.org/review/30051 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-07[Automatic update for 2018-10-07]Gerald Combs7-24/+157
Update manuf, services enterprise numbers, translations, and other items. Change-Id: I2d18df70f52949eda05f0b490870fd133866e6cd Reviewed-on: https://code.wireshark.org/review/30046 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-10-07Qt: Add copy from another profile for IO GraphsStig Bjørlykke3-0/+68
Add a new button to the IO Graphs dialog to copy entries from another profile. Add a clear all button to easily remove all existing entries before copying. Change-Id: I66cb27163663e5f2223d0dd3f8566f0fbebb553c Reviewed-on: https://code.wireshark.org/review/30043 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-07Qt: Use ActionRole for the "copy from profile" buttonStig Bjørlykke2-2/+2
The correct role for the newly introduced copy from profile button is ActionRole because it "causes changes to the elements within the dialog". Change-Id: I8613d00c0fdb33f2873e999aea9a54ea1f49dffb Reviewed-on: https://code.wireshark.org/review/30044 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-06Qt: Call createIOGraph() when duplicating an existing IO GraphStig Bjørlykke1-3/+2
Call createIOGraph() when adding a new graph by duplicating an existing to actually create the new graph. This is a regression from g5b3e3ee5. Change-Id: If1d8e4386a44dc4867d75fbad2d9ebb2e4b22307 Reviewed-on: https://code.wireshark.org/review/30034 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-05Qt: Add copy from another profile in UAT dialogsStig Bjørlykke7-5/+36
Add a new button to UAT dialogs to copy entries from another profile. Change-Id: I641ba764d8738f738466529d74d4a21ff13075a0 Reviewed-on: https://code.wireshark.org/review/30028 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-05Qt: Add copy from another profile for colorfiltersStig Bjørlykke6-4/+183
Add a new button to the Coloring Rules dialog to copy entries from another profile, or system defaults. The "copy from profile" button will also be used for other dialogs. Add a clear all button to easily remove all existing entries before importing or copying from another profile. Change-Id: Ia1e66444731018372b4354164c5a722fd73d403b Reviewed-on: https://code.wireshark.org/review/30008 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-05Qt: add an hint to no interfaces label.Dario Lombardo1-2/+2
Change-Id: Ifae80b5e3d56ddbea93164ff778196358976360d Reviewed-on: https://code.wireshark.org/review/30030 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-04Qt: show more infos about why interfaces are not loaded.Dario Lombardo3-2/+11
Change-Id: Ie5a28587f711282fd5d83b5513b42594c73ca514 Reviewed-on: https://code.wireshark.org/review/29996 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-03Qt: Show global profiles in ItalicStig Bjørlykke1-0/+5
The Configuration Profiles dialog shows global profiles in Italic. Align the profiles popup menu to also do this. Change-Id: Ifc22f1bb905cd407682adbdc5e4cbee4c42cb961 Reviewed-on: https://code.wireshark.org/review/29989 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-10-03Qt/ByteViewTab: document potential pitfallPeter Wu1-0/+2
If ByteViewTab is related to a use-after-free crash, then the issue is probably related to the backing buffer becoming invalid. Document this. Change-Id: I7f7c8daaf86b42f00b7886de54507d425e5312f6 Reviewed-on: https://code.wireshark.org/review/29924 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-01Qt: Update UAT clear button enablingStig Bjørlykke2-5/+16
Check for enabling the clear button when loading a UatDialog. Also move setting enabled property to false for deleteToolButton, copyToolButton, moveUpToolButton, moveDownToolButton and clearToolButton to uat_dialog.ui. Change-Id: I1ff3ed9906eb541e929297b34abcce2bee4a062c Reviewed-on: https://code.wireshark.org/review/29953 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-01Qt: Set enabled properties in Filter DialogStig Bjørlykke1-0/+6
Default set enabled property to false for deleteToolButton and copyToolButton because no item is selected. Change-Id: I99bfb572abb9bc38cbf49c6b1fabdeefac4f8d90 Reviewed-on: https://code.wireshark.org/review/29951 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-01Qt: Set enabled properties in Coloring Rules DialogStig Bjørlykke1-0/+6
Default set enabled property to false for deleteToolButton and copyToolButton because no item is selected. Change-Id: I6ead2fa17cf1fd5bc165526fb76d104af6d5234d Reviewed-on: https://code.wireshark.org/review/29949 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-30Qt/FrameInformation: read packet record in private bufferPeter Wu2-12/+9
To prevent potential interference with other users of the capture file, read data in a private buffer instead of reusing the one from capFile. Change-Id: I6d689440e0cc13ef522e874fd8e5795a97a6aca7 Reviewed-on: https://code.wireshark.org/review/29922 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-30Qt/PacketList: read packet record in private bufferPeter Wu1-4/+13
To prevent potential interference with other users of the capture file, read data in a private buffer instead of reusing the one from capFile. An accidental (?) change in commit v2.9.0rc0-2001-g123bcb0362 resulted in "cf_read_record" reallocating the capture_file->buf buffer. That issue combined with the current behavior would result in a crash when ignoring a packet followed by two times opening a context menu: ==32187==ERROR: AddressSanitizer: heap-use-after-free on address 0x7fda91642800 at pc 0x55a98f3faaa7 bp 0x7fffa2807860 sp 0x7fffa2807858 READ of size 1 at 0x7fda91642800 thread T0 #0 0x55a98f3faaa6 in QByteArray::operator[](int) const /usr/include/qt/QtCore/qbytearray.h:476:47 #1 0x55a9901006eb in ByteViewText::drawLine(QPainter*, int, int) ui/qt/widgets/byte_view_text.cpp:370:35 #2 0x55a9900fd109 in ByteViewText::paintEvent(QPaintEvent*) ui/qt/widgets/byte_view_text.cpp:217:9 ... #50 0x55a98e9fd32a in PacketList::contextMenuEvent(QContextMenuEvent*) ui/qt/packet_list.cpp:614:15 ... 0x7fda91642800 is located 0 bytes inside of 3038371-byte region [0x7fda91642800,0x7fda919284a3) freed by thread T0 here: #0 0x55a98e65fd99 in __interceptor_realloc (run/wireshark+0x1019d99) #1 0x7fdac6e1bb88 in g_realloc /build/src/glib/glib/gmem.c:164 #2 0x7fdaac12c908 in wtap_read_packet_bytes wiretap/wtap.c:1368:2 #3 0x7fdaabf01e5a in libpcap_read_packet wiretap/libpcap.c:789:7 #4 0x7fdaabef887d in libpcap_seek_read wiretap/libpcap.c:690:7 #5 0x7fdaac12d5f5 in wtap_seek_read wiretap/wtap.c:1431:7 #6 0x55a98e6c8611 in cf_read_record_r file.c:1566:8 #7 0x55a98e6c88c5 in cf_read_record file.c:1576:10 #8 0x55a98ea0b725 in PacketList::getFilterFromRowAndColumn() ui/qt/packet_list.cpp:1041:14 #9 0x55a98e94e4a1 in MainWindow::setMenusForSelectedPacket() ui/qt/main_window_slots.cpp:1175:39 previously allocated by thread T0 here: #0 0x55a98e65fd99 in __interceptor_realloc (run/wireshark+0x1019d99) #1 0x7fdac6e1bb88 in g_realloc /build/src/glib/glib/gmem.c:164 #2 0x7fdaac12c908 in wtap_read_packet_bytes wiretap/wtap.c:1368:2 #3 0x7fdaabf01e5a in libpcap_read_packet wiretap/libpcap.c:789:7 #4 0x7fdaabef887d in libpcap_seek_read wiretap/libpcap.c:690:7 #5 0x7fdaac12d5f5 in wtap_seek_read wiretap/wtap.c:1431:7 #6 0x55a98e6c8611 in cf_read_record_r file.c:1566:8 #7 0x55a98e6c88c5 in cf_read_record file.c:1576:10 #8 0x55a98e6e0bde in cf_select_packet file.c:3777:8 #9 0x55a98e9ea2ff in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:420:9 This should be fixed now by I4f1264a406a28c79491dcd77c552193bf3cdf62d, but let's avoid the shared buffer. It's not exactly a hot code path anyway. Change-Id: I548d7293a822601f4eb882672477540f066a066b Reviewed-on: https://code.wireshark.org/review/29921 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-30[Automatic update for 2018-09-30]Gerald Combs7-253/+177
Update manuf, services enterprise numbers, translations, and other items. Change-Id: Ic15ad719f659fe7365c9e652af18507a5d050e6b Reviewed-on: https://code.wireshark.org/review/29932 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-30Fix comment.Guy Harris1-1/+1
Change-Id: I0517424a19d31a6df50c843689e97600f0bb5a0e Reviewed-on: https://code.wireshark.org/review/29931 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29Clean up the epan_dissect_t in the normal code path.Guy Harris1-0/+2
We initialized it, but only cleaned it up in an error code path, not in the regular code path. That could leak memory. Change-Id: Ic6689163ca58990fa5091b23e7ab2e0292eed76c Reviewed-on: https://code.wireshark.org/review/29930 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29Clean up the epan_dissect_t in the normal code path.Guy Harris1-0/+2
We initialized it, but only cleaned it up in an error code path, not in the regular code path. That could leak memory. Change-Id: Icb5aa5b1a2df8919d8a4e54d88a5d865320bd279 Reviewed-on: https://code.wireshark.org/review/29929 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29Qt/FrameInformation: do not use file-scoped memory for temporary dataPeter Wu1-9/+5
Let QByteArray own the memory instead of wmem to allow memory to be released earlier. Change-Id: Ibf6d1a56120d30daea76924b8006480854dcfbd3 Reviewed-on: https://code.wireshark.org/review/29923 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-09-29Qt: Show "unknown colorfilters" warning when opening the dialogStig Bjørlykke1-11/+11
Show the warning about unknown colorfilters being disabled when opening the "Coloring Rules..." dialog to make the user aware of this before starting editing the rules. The user may have corrected the filter and enabled it while having the dialog open, and then this warning would be misleading. Change-Id: Ic7f10495e5561bc2fea413c89cf9ebd187c8f113 Reviewed-on: https://code.wireshark.org/review/29909 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-29Get rid of some no-longer-supported GUI preferences.Guy Harris2-2/+0
Make them obsolete preferences; if they had any use, it was with the now-removed GTK+ UI. Change-Id: I2b514148c8066c5c79cb402493f47a21d3679819 Reviewed-on: https://code.wireshark.org/review/29912 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29Get rid of the printing preferences.Guy Harris1-5/+0
They're no longer used by any of the printing code; mark them as obsolete. Change-Id: Iceaf14f48f1bd35757a9a158a5348f6202b90fc7 Reviewed-on: https://code.wireshark.org/review/29911 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-26prefs: Remove trailing dot from UI textStig Bjørlykke1-1/+1
Change-Id: I6eaef762a523260dce2a380257111721ddf48811 Reviewed-on: https://code.wireshark.org/review/29865 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-26prefs: add the option not to load interfaces on startup.Dario Lombardo4-2/+18
Change-Id: I2ade0647a8c32b76aebd60117b4317cd005aff91 Reviewed-on: https://code.wireshark.org/review/29854 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-26Qt: don't load the interfaces list if a capture file is used.Dario Lombardo1-1/+2
Bug: 15126 Change-Id: I4c190879541db94637ad88ffe99f10479caa4a43 Reviewed-on: https://code.wireshark.org/review/29549 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-25Qt: Create directories if they should be openedRoland Knall1-2/+15
In the about dialog, create directories within the folders tab if the user wants them to open and they do not exist yet Change-Id: Ia95692dabef92392714c329c868abc78e3bcec6e Reviewed-on: https://code.wireshark.org/review/29782 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-09-24Qt: Don't append a empty custom window titleStig Bjørlykke1-4/+8
The recently introduced %F in custom window title is empty when no capture file is loaded. Check for this to avoid having a trailing UTF8_EM_DASH or "[]" in the title. Change-Id: I5fb0832a2898501cb128bd52b22a4dc5f3ad4f4e Reviewed-on: https://code.wireshark.org/review/29800 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-23[Automatic update for 2018-09-23]Gerald Combs7-2090/+2687
Update manuf, services enterprise numbers, translations, and other items. Change-Id: I8a70ff9590e5adb3d0bdcd504b3f2886a314548c Reviewed-on: https://code.wireshark.org/review/29790 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-13Start renaming SSL to TLS.Gerald Combs9-27/+27
Rename the "ssl" protocol to "tls" and add an "ssl" alias. Prefer "TLS" over "SSL" in user interface text and in the documentation. Fix the test_tls_master_secret test while we're here. Bug: 14922 Change-Id: Iab6ba2c7c4c0f8f6dd0f6d5d90fac5e9486612f8 Reviewed-on: https://code.wireshark.org/review/29649 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-11Qt: Replace $HOME with ~ in window title %F variableStig Bjørlykke1-15/+30
Replace $HOME with ~ in window title %F variable. Optimize code to check if variable is used before doing replacement. Change-Id: I95ef8505e50379d98fdb1661e09394d1ded7ecca Reviewed-on: https://code.wireshark.org/review/29597 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-10Qt: Add some window title variablesStig Bjørlykke1-2/+22
Add some new variables to be used in custom window title. %F = file path of the capture file %S = a conditional separator (" - ") that only shows when surrounded by variables with values or static text Change-Id: I20a60a3018cc86236f4991030eadb7f51681cc32 Reviewed-on: https://code.wireshark.org/review/29534 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-10prefs,ui: properly migrate old filter expressionsPeter Wu2-16/+5
When legacy filter expressions preferences are present, be sure to (1) save the dfilter_buttons file when updating the preferences file and (2) save the preferences file after updating the dfilter_buttons file. Without doing (1), the old buttons will be lost. Without (2), restarting Wireshark will result in duplicate buttons. Only write the files if the user actually made other changes to avoid breaking profiles by just opening Wireshark. Bug: 15114 Bug: 15121 Change-Id: I5b9417c34146c4450526781a20308c9c98fb44a1 Reviewed-on: https://code.wireshark.org/review/29488 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-10Qt: Restore column visibility when loading packetsStig Bjørlykke1-6/+8
Always restore column visibility when loading packets to avoid some situations where the column hidden state was incorrect. This fixes the following scenario: - Apply a column and hide it using the column popup menu - Apply another column and remove it using the column popup menu - Close and reopen the capture file - Observe the hidden column is shown, but with wrong width Change-Id: I00531907b2383c6605a2d62e8243092906037d0c Reviewed-on: https://code.wireshark.org/review/29516 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-09epan: Add argument to epan_init() to disable pluginsJoão Valverde1-1/+1
Change-Id: I8dc76e6bf8c4d5a3081cbdc1d47b88e857415d29 Reviewed-on: https://code.wireshark.org/review/29498 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-09-07Qt: Add null check for finfo and hfinfoMartin Boye Petersen2-3/+4
Adding the null check fixes a bug that made wireshark crash when right clicking a subtree which doesn't have any preferences and if none of the parents had one either. The problem was introduced in commit 589413d8772f1450be9bd4a2550cb99a95f71299 Change-Id: Ia5bbae0a58298f3e9d912e44f33589da1cbfacc9 Reviewed-on: https://code.wireshark.org/review/29455 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-05epan: Guard g_base64_decode_inplace() against zero length stringStig Bjørlykke1-2/+4
The g_base64_decode_inplace() does not handle zero length string so add a guard for this before calling. Bug: 15113 Change-Id: I89fa17dd62af238f4282835c317e5c8be6e0c8a1 Reviewed-on: https://code.wireshark.org/review/29428 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-03epan: Use g_base64_decode_inplace()Stig Bjørlykke1-3/+3
Replace ws_base64_decode_inplace() with g_base64_decode_inplace() or g_base64_decode(), which was introduced in glib 2.12. The only observed difference is a need for zero-terminate the buffer after decoding. Change-Id: Ia102d0d8e9bec575ffeddf448191a3f6de9fb1ed Reviewed-on: https://code.wireshark.org/review/29382 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-02prefs: Remove prefs.gui_use_pref_saveStig Bjørlykke7-43/+17
This setting was only used in GTK. Change-Id: If184c61e4e081992e517f480b4faf129b81508c1 Reviewed-on: https://code.wireshark.org/review/29388 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-02Qt: Avoid crash for ByteViewTab with 0 bytesStig Bjørlykke1-1/+3
A ByteViewTab with 0 bytes is not useful, but may happen. The crash could be reproduced with the following Lua code: local t = ByteArray.new():tvb() Change-Id: I256fd7fc2b91aa3c1161c46558c647308a3d564b Reviewed-on: https://code.wireshark.org/review/29383 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-01Qt: Improve fetching preferences from the packet list.Stig Bjørlykke1-0/+1
The Lua fake item will not give preferences for the last protocol in the packet, so avoid this. The Lua fake item is always added when having a Lua post-dissector, even if the post-dissector does not add any elements to the tree. Change-Id: I43427bf522a32feebd44f192888e73b5607e6fff Reviewed-on: https://code.wireshark.org/review/29377 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-08-31Qt: Improve fetching preferences from a tree item.Stig Bjørlykke1-1/+7
The special-case "text only" header field will not give preferences for the selected protocol, so we have to traverse the parents to get a usable node. Change-Id: I647f275839db337dedaeb67664402af1fe9f21c1 Reviewed-on: https://code.wireshark.org/review/29363 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-31Add support for protocol aliases. Switch BOOTP to DHCP.Gerald Combs1-1/+1
Add support for aliasing one protocol name to another and for filtering using aliased fields. Mark aliased fields as deprecated. Rename the BOOTP dissector to DHCP and alias "bootp" to "dhcp". This lets you use both "dhcp.type" and "bootp.type" as display filter fields without having to duplicate all 500+ DHCP/BOOTP fields. To do: - Add checks to proto.c:check_valid_filter_name_or_fail? - Transition SSL to TLS. - Rename packet-bootp.c to packet-dhcp.c? Change-Id: I29977859995e8347d80b8e83f1618db441b10279 Ping-Bug: 14922 Reviewed-on: https://code.wireshark.org/review/29327 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>
2018-08-29epan: Remove unnecessary all protocols registration callbackJoão Valverde2-3/+1
We are exporting a registration function from libwireshark just to have it passed back as a callback. Seems unnecessary. Change-Id: I7621005c9be11691d319102326824c5e3520a6f3 Reviewed-on: https://code.wireshark.org/review/29328 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>