aboutsummaryrefslogtreecommitdiffstats
path: root/ui
AgeCommit message (Collapse)AuthorFilesLines
2018-03-07spdx: more licenses converted.Dario Lombardo4-52/+4
Change-Id: I3861061ec261e63b23621799e020e811ed78a343 Reviewed-on: https://code.wireshark.org/review/26333 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07Qt: rework routine in module_preferences_scroll_area.Dario Lombardo1-2/+5
This removes a check that confuses clang and generates a false poritive. Change-Id: Ib28b88b40e16ad300ba6d3df8334bd752a4fa7f1 Reviewed-on: https://code.wireshark.org/review/26171 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-03-07Qt: Handle UAT editor dialogs explicitly.Michael Mann6-82/+181
QAbstractItemView assumes that editors are widgets, not windows. QAbstractItemView::edit calls QAbstractItemViewPrivate::openEditor, which simply calls show() and setFocus() on the editor widget. If that widget happens to be a native dialog, its event loop might not be processed. This is the case on macOS at least. Create widgets derived from QLineEdit that edit the value directly along with a button that can open the associated modal dialog. Install event filters so that we keep the correct tab behavior between fields of the UAT. Bug: 13958 Ping-Bug: 14031 Bug: 7761 Change-Id: Ie5f0a5cbde33bb9add8217029c2063a0bbfd804a Reviewed-on: https://code.wireshark.org/review/23015 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-03-07Plug another leak for Wiretap errors.Guy Harris1-8/+10
Clean up comments while we're at it. Change-Id: I7e218ba3f998804045e3d7fab08d85d09a293d69 Reviewed-on: https://code.wireshark.org/review/26320 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-07failure_message.c: fix a memory leak if err is not negativePascal Quantin1-5/+3
Bug: 14489 Change-Id: I958cfae824c50263913ba9df8128e34e9466cb67 Reviewed-on: https://code.wireshark.org/review/26294 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07NSIS, WiX: Handle the presence or absence of mmdbresolve.Gerald Combs1-9/+7
Only install mmdbresolve if MAXMINDDB_FOUND is true. Fixup the Qt about box and WiX GTK defines while we're here. Change-Id: I7ac3c21ddb4aebc1dae1c3d8cfd2bcafc4139d2e Reviewed-on: https://code.wireshark.org/review/26299 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06Transition from GeoIP Legacy to MaxMindDB.Gerald Combs4-134/+77
MaxMind is discontinuing its legacy databases in April in favor of GeoIP2, which use a newer database format (MaxMind DB). The reference C library (libmaxminddb) is available under the Apache 2.0 license which isn't quite compatible with ours. Add mmdbresolve, a utility that reads IPv4 and IPv6 addresses on stdin and prints resolved information on stdout. Place it under a liberal license (MIT) so that we can keep libmaxminddb at arm's length. Add epan/maxmind_db.[ch], which spawns mmdbresolve and communicates with it via stdio. Migrate the preferences and documentation to MaxMindDB. Change the IPv4 and IPv6 asnum fields to FT_UINT32s. Change the geographic coordinate fields to FT_DOUBLEs. Bug: 10658 Change-Id: I24aeed637bea1b41d173270bda413af230f4425f Reviewed-on: https://code.wireshark.org/review/26214 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-04coloring rules dialogue: remove unused signalMartin Kaiser1-2/+0
View / Coloring Rules... shows this warning 12:02:26.401 Main Warn QObject::connect: No such signal ColoringRulesModel::dragDropComplete() in ../ui/qt/coloring_rules_dialog.cpp:61 12:02:26.401 Main Warn QObject::connect: (receiver name: 'ColoringRulesDialog') Remove the unused signal. Change-Id: Id42c249ac9252269eb31e4971e62e927a28c88ed Reviewed-on: https://code.wireshark.org/review/26239 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2018-03-04[Automatic update for 2018-03-04]Gerald Combs7-36/+21
Update manuf, services enterprise numbers, translations, and other items. Change-Id: I95feebf818e68804d287e011f4c6ee2cd244b2f3 Reviewed-on: https://code.wireshark.org/review/26254 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-03Move what capture_info_close() does into its only caller.Guy Harris1-2/+5
Change-Id: If9539142100fb2079cbbe247d8975778b183ece8 Reviewed-on: https://code.wireshark.org/review/26235 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-03More indentation cleanups.Guy Harris1-13/+13
Change-Id: If24cf44a1ba9772d8fe2e026d19e6838cf8e0949 Reviewed-on: https://code.wireshark.org/review/26234 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-03Clean up indentation.Guy Harris1-2/+2
Change-Id: Id3d84d33590b12a91f15e7c2d8af350fb630b7b2 Reviewed-on: https://code.wireshark.org/review/26233 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-03Fix a warning message.Guy Harris1-1/+1
Change-Id: Ice2ed63bb3785323949c466a67b287fd4f80fd12 Reviewed-on: https://code.wireshark.org/review/26232 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-03Remove declaration of routine that no longer exists.Guy Harris1-3/+0
The routine was removed in Id302e88bed4da8b9b457049fb78b0bc7d7ffabe3. Change-Id: I1874be1cb666d42011cc9b4ab9360dc885d3622c Reviewed-on: https://code.wireshark.org/review/26231 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-02Remove the endpoint "Map" feature.Gerald Combs5-395/+0
Remove the endpoint map and its button from the Qt and GTK+ UIs. It depends on GeoIP Legacy for coordinate information and those databases are being deprecated in favor of MaxMind DB. We *could* upgrade the code to use mmdbresolve, but according to https://dev.maxmind.com/geoip/geoip2/geolite2/ they're also going to remove coordinate information from GeoLite2: "In addition, in 2019, latitude and longitude coordinates in the GeoLite2 databases will be removed.* Latitude and longitude coordinates will continue to be provided in GeoIP2 databases. Please check back for updates." Change-Id: I43e1593d282a0f1aae897b1f4724117d1496b21e Reviewed-on: https://code.wireshark.org/review/26229 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-02extcap: Make settings dialog modalRoland Knall1-0/+1
Otherwise dialogs could be opened multiple times Change-Id: I19f9c11395b5f5ba41c00ff78ab9794064562d29 Reviewed-on: https://code.wireshark.org/review/26221 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-03-01Windows: Remove cruft for unsupported versonsGraham Bloice2-12/+7
Remove all the existing LoadDLL\GetProcAddress combinations that allowed conditional Win32 API usage if supported on the running OS version. All the required functions are present in the versions we support. Change-Id: Ibc43e51cefcd1c7562d4e251784362509f224ed6 Reviewed-on: https://code.wireshark.org/review/26215 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2018-03-01Qt: Make we shut down cleanly when exiting early.Gerald Combs5-14/+25
Add an exit_application() routine that calls wsApp->quit() + exit() in the Qt UI and exit() in the GTK+ UI. Make sure we call it instead of exit() when needed. Bug: 14395 Change-Id: I171b5fd19ce4664db4a2ebb4b8c33e278dcec427 Reviewed-on: https://code.wireshark.org/review/26121 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-02-28Fix StringCchPrintf() calls.Guy Harris1-3/+4
One was missing an argument; supply the necessary string. The other was assuming that an LPARAM was 32 bits when that's not the case on 64-bit Windows - the underlying value is 32-bit, so we just cast to int. Change-Id: Ie2a38e27f2ea211628d2c751a7807bb9ed396c64 Reviewed-on: https://code.wireshark.org/review/26190 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-28rtspstat: use integer cast in g_hash_table.Dario Lombardo1-16/+13
Change-Id: I5ebdbe5a94ed377c120411c46daca3903036fe42 Reviewed-on: https://code.wireshark.org/review/26140 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-27Qt/USB: Allow USB src/dst addresses to be selected for columnsPeter Wu1-5/+17
Make "Prepare a Filter" from the Source and Destination columns work for USB source and destination address, this value must be quoted as well. Change-Id: Ib7a772050c204e716781cc27f9eddbdb7971e547 Reviewed-on: https://code.wireshark.org/review/26096 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-27Allow hexadecimal and octal numbers for tshark Decode AsPeter Wu1-11/+35
tshark(1) documents "-d ethertype==0x0800" which suggests that hexadecimal values must be accepted. While at it, be a bit more stricter about the selector match (previously "1-2 junk" was accepted too, reject trailing spaces now). Change-Id: I85fbd2f55eaef51902ddaf2e559ab08ad59a5af7 Reviewed-on: https://code.wireshark.org/review/26089 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-27Qt: accept hexadecimal input in Decode As dialogPeter Wu2-6/+6
The usb.product dissector table displays vendor+product values as hexadecimal, ensure that these are not parsed as zero. While at it, clarify the meaning of the model contents. Ideally the model should store numeric selectors as integers rather than strings, but that requires more work. Change-Id: I3bb17ad0d0a03c8813ded4ea6890dbc2aedd738d Reviewed-on: https://code.wireshark.org/review/26087 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-25[Automatic update for 2018-02-25]Gerald Combs6-130/+14
Update manuf, services enterprise numbers, translations, and other items. Change-Id: I543fa77cb9f26353fe3ea64f5e236d540d971a90 Reviewed-on: https://code.wireshark.org/review/26091 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-24Rename airpdcap to dot11decrypt.Gerald Combs3-42/+42
Our 802.11 decryption code isn't tied to any specific product. Change the file and API names to dot11decrypt. Change-Id: I14fd951be3ae9b656a4e1959067fc0bdcc681ee2 Reviewed-on: https://code.wireshark.org/review/26058 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-22Qt+Windows: Adjust our DBAR check logic.Gerald Combs1-1/+2
Don't bother fetching a file's version if its name doesn't match any of the DBAR DLL list entries. Otherwise we try to open a bunch of DLLs we don't care about. Change-Id: Icab11450839195c1259bb307ae88988f52917487 Reviewed-on: https://code.wireshark.org/review/25973 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-02-22Qt: Improve our capture filter completions.Gerald Combs1-18/+69
Use libpcap's pcap-filter.manmisc to create our capture filter completion list instead of scanner.l. Bug: 14430 Change-Id: I11f6eb5679dc93561dce62f28149e103ac9b4a2b Reviewed-on: https://code.wireshark.org/review/25971 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-02-21Squelch some cating-away-constness warnings.Guy Harris1-11/+11
Change-Id: I1ebe9b42957e0db5cc04f44e31f291cb40ba14e1 Reviewed-on: https://code.wireshark.org/review/25960 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Squelch some casting-away-constness warnings.Guy Harris5-9/+17
If we're constructing the string, assign the pointer to it to a non-const pointer variable, set the stat_tap_ui cli_string member to that variable, and then use the variable to free it when we're done. Don't cast away constness if we don't have to. Change-Id: If3b24dbf1c910e1e6eceb76f2f6a7ae3898315f9 Reviewed-on: https://code.wireshark.org/review/25952 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Don't cast away constness.Guy Harris1-1/+1
Change-Id: I04cb49a5fe52bc6de66575228b81db1288bd1959 Reviewed-on: https://code.wireshark.org/review/25948 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Don't cast away constness.Guy Harris1-1/+1
Change-Id: Ib69274a8bc6092129a7754c8d21aa2e6f160e242 Reviewed-on: https://code.wireshark.org/review/25942 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Constify an argument, remove no-longer-necessary removal of constness.Guy Harris3-3/+3
Change-Id: Ic0a70b28bfdb57c4c2ddf07cf071a85042672c9e Reviewed-on: https://code.wireshark.org/review/25941 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Constify some method arguments, and don't cast away constness.Guy Harris1-8/+8
Change-Id: I266a724ff672026b3fdf07ac2eb2260f37c04247 Reviewed-on: https://code.wireshark.org/review/25940 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Cast away constness at the point where it can't be avoided.Guy Harris1-2/+2
The only reason why we have to cast it away is that C doesn't have a good framework for creating collections of objects of arbitrary type (where type includes constness) and we're using a datatype (GHashTable) implemented and declared in C here. Do it in the g_hash_table_insert() call. Change-Id: Ibd7706255519a97b77e4e4a52fada43e050f2bf0 Reviewed-on: https://code.wireshark.org/review/25938 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Don't gratuitously cast away constness.Guy Harris1-1/+1
Change-Id: I235aacba37e6383d3b369ec0c9b39c9f37db5ff5 Reviewed-on: https://code.wireshark.org/review/25936 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Don't cast away constness.Guy Harris1-1/+1
Change-Id: I2b9534e8240e9b0daf4250575f0c17551ee920fd Reviewed-on: https://code.wireshark.org/review/25935 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Type casts without const lose constness.Guy Harris2-2/+2
Don't do const foo *x = (foo *)a_const_pointer; do const foo *x = (const foo *)a_const_pointer; Change-Id: Iee04f71e19fcbe8b8e9a099bad52c8f15577e3e8 Reviewed-on: https://code.wireshark.org/review/25934 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20Qt: Right justify custom columns with multiple fieldsStig Bjørlykke1-8/+22
Default right justify custom columns with multiple fields when all fields meet the right-justify criteria. Include double, float and relative time in the right-justify criteria. Change-Id: I438eab03e3575ca551cab1a547e4f8f00e4792b2 Reviewed-on: https://code.wireshark.org/review/25919 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-20Qt: Improve sorting of custom columns with multiple fieldsStig Bjørlykke1-11/+4
Use the already parsed col_custom_fields_ids to loop all fields in custom columns. Change-Id: I937e10e087feadc788591f2e3d49568611fda69b Reviewed-on: https://code.wireshark.org/review/25918 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-19Qt: Use QFrames as separators in the filter expression toolbar.Gerald Combs2-9/+11
Use QFrames instead of QActions as separators in the filter expression toolbar. This keeps them from showing up in the overflow menu. Change-Id: I60f6f0434fe5ba88fe1b4221e9e70640eed840bb Reviewed-on: https://code.wireshark.org/review/25860 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-19Get rid of more new_ prefixes for statistics functions and types.Guy Harris5-50/+50
There are no "old" versions of them that we're keeping around. Change-Id: I3c76a14d0ec1a06df39c547da37f4dea9987df4d Reviewed-on: https://code.wireshark.org/review/25892 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-18Fix some source headers, reformat SPDX license lines in comment block.Jaap Keuter14-14/+28
Change-Id: Ibae6a64a9915003435a3fb17763535a3844143be Reviewed-on: https://code.wireshark.org/review/25891 Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-18[Automatic update for 2018-02-18]Gerald Combs7-65/+223
Update manuf, services enterprise numbers, translations, and other items. Change-Id: I5b5b729c83aa7017454b7c7d8230415e1834587f Reviewed-on: https://code.wireshark.org/review/25862 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-17Don't gratuitously cast away constness.Guy Harris1-1/+1
Change-Id: I5d953ba2f89d8c65ae62012f32757acc14108f81 Reviewed-on: https://code.wireshark.org/review/25857 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17Qt: Another filter expression toolbar layout attempt.Gerald Combs1-5/+6
Try hiding and showing the filter expression toolbar in order to update its layout. This is a bit ham-fisted but seems to be the only way to get it to work properly after clearing and inserting buttons. Bug: 14121 Change-Id: Iea851c029c1586abfdb01c639914f6fe97ea29b3 Reviewed-on: https://code.wireshark.org/review/25840 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-02-17Qt: Replace the toolbar extension icon.Gerald Combs2-2/+18
The QToolBar extension button icon is ugly, particularly on HiDPI displays. Replace it with a RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK. Change-Id: I8822252ff5c328acd23aad345313e7cfafdffa47 Reviewed-on: https://code.wireshark.org/review/25821 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-02-17Qt: Add separators between filter expression buttons.Gerald Combs2-8/+24
I've noticed at SharkFest and other places that people sometimes put square brackets around their filter expression names so that it's easier to distinguish one button from another. Add separators between buttons so that this shouldn't be necessary. Change-Id: I3b1ca42f6417d2045781fc14d594faba4fd00fd5 Reviewed-on: https://code.wireshark.org/review/25820 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-02-17Don't have CLEAN_FILES variables for the "clean" source files.Guy Harris2-31/+23
Except for the one directory that (currently) has "not yet clean" files, epan/dissectors, we don't need a separate variable to keep track of the "clean" source files. In the cases where not all files were in CLEAN_FILES, put them into the variable used to enable -Werror or its equivalent. Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b Reviewed-on: https://code.wireshark.org/review/25830 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17Use -Werror except for explicitly listed dirty dissectors.Guy Harris1-1/+1
Use AM_CFLAGS for everything except for libdirtydissectors in epan/dissectors. Rename GENERATED_CFLAGS/GENERATED_CXXFLAGS to DIRTY_CFLAGS/DIRTY_CXXFLAGS, as it doesn't apply to all generated files. Change-Id: I702b53e185d6972c08d68ef31c05df7b03669daa Reviewed-on: https://code.wireshark.org/review/25829 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16Squelch redundant declaration warnings.Guy Harris3-16/+20
Have the text-to-pcap scanners define a routine that the main code calls, which both allocates and destroys the scanner. Don't declare the Lex-generated routines in a header file we create, declare that routine, instead. Change-Id: Icad6a83db1a0dea8ac390315af72383fc99f8513 Reviewed-on: https://code.wireshark.org/review/25822 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>