aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-04-05Qt: remove ws_buffer_start_ptr calls from clang-scan.Dario Lombardo1-0/+3
They are false positives. Change-Id: I06b5c2d2f7f462143050ffd4a624f76a440d5d5a Reviewed-on: https://code.wireshark.org/review/26729 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-02-14Qt: fix crash in packet dialog on changing selectionPeter Wu1-1/+1
"((capture_file_t *)cap_file_)->edt" is documented in cfile.h to cover the currently selected packet (in the packet list). But in the packet dialog, the packet selection is irrelevant and the data from a different dissection tree must be used. Change-Id: Ieaea3cf862d47540e7f6b6c84c1a2fa6945a877b Fixes: v2.5.0rc0-1532-g56a130a152 ("ByteViewText: Remove epan dependancy") Bug: 14246 Reviewed-on: https://code.wireshark.org/review/25437 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-09Generalize wtap_pkthdr into a structure for packet and non-packet records.Guy Harris1-4/+3
Separate the stuff that any record could have from the stuff that only particular record types have; put the latter into a union, and put all that into a wtap_rec structure. Add some record-type checks as necessary. Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2 Reviewed-on: https://code.wireshark.org/review/25696 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-02Qt: add initializers in PacketDialog() (CID: 1427679).Dario Lombardo1-0/+8
Change-Id: Id2f16d849b85275308101f49a5ea22fbddf66f3b Reviewed-on: https://code.wireshark.org/review/25411 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-01-21Qt: Initialize a struct (found by Coverity)Gerald Combs1-0/+1
CID: 1427679 Change-Id: I2ed276f0da413b4853b7dc9ccde3530e655ad760 Reviewed-on: https://code.wireshark.org/review/25403 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-18Qt: return if cf_read_record() fails in PacketDialog (found by clang).Dario Lombardo1-1/+4
Change-Id: I5187b378db9bae092052ce50b337f266e08e4332 Reviewed-on: https://code.wireshark.org/review/25340 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-15Qt: Switch ProtoTree to a treeview+model.Gerald Combs1-14/+2
Add a ProtoTreeModel and use it in ProtoTree. This should make the UI more responsive when we have lots of items in the tree. Change-Id: Id26e6bcff84663867a8da17fd9ae86ff639b633f Reviewed-on: https://code.wireshark.org/review/24774 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>
2017-12-08Have the frame_tvbuff.c routines not use the global cfile.Guy Harris1-1/+1
Have the routines that create them take a pointer to a struct packet_provider_data, store that in the tvbuff data, and use it to get the wtap from which packets are being read. While we're at it, don't include globals.h in any header files, and include it in source files iff the source file actually uses cfile. Add whatever includes that requires. Change-Id: I9f1ee391f951dc427ff62c80f67aa4877a37c229 Reviewed-on: https://code.wireshark.org/review/24733 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-04Put the structure of a capture_file back in cfile.h.Guy Harris1-2/+0
The split isn't necessary now that epan no longer uses the capture_file structure. Change-Id: Ia232712a2fb5db511865805518e8d03509b2167f Reviewed-on: https://code.wireshark.org/review/24693 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-03Use cfile.h to define the capture_file type.Guy Harris1-0/+2
Have cfile-int.h declare the structure, and use it in files that directly access the structure. Have cfile.h just incompletely declare the structure and include it rather than explicitly declaring it in source files or other header files. Never directly refer to struct _capture_file except when typedeffing capture_file. Add #includes as necessary, now that cfile.h doesn't drag in a ton of Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556 Reviewed-on: https://code.wireshark.org/review/24686 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-11-12Qt: Rename packetSelection to frameSelectedRoland Knall1-1/+1
In order to consolidate the interfaces between certain parts of the UI, the signal emitted after a frame change has occured, has to include the number of the frame. This led to two signals for frame change, and therefore packetSelection is to be removed. Change-Id: I24e0e0890291d2243935b0c48387beb66904bfa3 Reviewed-on: https://code.wireshark.org/review/24377 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-08Qt: Further cleanup ByteViewRoland Knall1-39/+31
This further separates ByteView and the rest of the system. Using FieldInformation and DataPrinter, this is the final cleanup of the ByteViewTab Change-Id: If41521167527cf5664c2564cdd0d45fea0f3f612 Reviewed-on: https://code.wireshark.org/review/22783 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-10-31ByteViewText: Remove epan dependancyRoland Knall1-17/+33
Remove all dependancy for the byte_view_text from the epan system, and therefore cleanly separate data and display for further separation of dissection and view Change-Id: Id1ee91b93da4511afa95f24da4cbbf39cbb89b1f Reviewed-on: https://code.wireshark.org/review/24050 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2016-06-30Qt: Show the correct data in the packet dialog.Gerald Combs1-1/+2
Set our pointers and copy our data *after* we read our packet. Bug: 12556 Change-Id: I5b373f94ad5b2fa2e6563142200a80912e717a96 Reviewed-on: https://code.wireshark.org/review/16211 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-04-02Qt: Keep byte tab when reloading/closing capture filePeter Wu1-12/+0
Do not remove byte view on closing a capture file. For this to work, the tree items must also be remembered. Change-Id: Ice5cd1006b957e2d1331effc15c4c0a9de89916d Reviewed-on: https://code.wireshark.org/review/14715 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-02-28Qt: Add dialog geometry restoreStig Bjørlykke1-3/+1
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>
2015-11-27Fix display of bytes as EBCDICPascal Quantin1-1/+1
MSVC compiler does not support properly setting an enum being part of a bit field. For example the following code: pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC; changes pinfo->fd->flags.encoding from 0x0 to 0xfffffffe instead of 0x1 Let's put back an unsigned int definition (like it is in master-1.12 branch) and add explicit casts where required Bug: 11787 Change-Id: Idae0140fb6c172f1b3dbf10baefc8cfb00128f4c Reviewed-on: https://code.wireshark.org/review/12220 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>
2015-11-22Do not expand packets in packet dialog by defaultPeter Wu1-1/+0
Do not expand the packet tree in the packet dialog by default, it results in forgetting the previous collapse state and deviates from previous GTK+ behavior. It is just annoying to have all Frame, Ethernet, etc. trees expanded while you are just looking at application layer traffic. (The previous tree is restored when calling ProtoTree::fillProtocolTree which calls proto_tree_draw_node and then invokes setExpanded()). Bug: 11731 Change-Id: I48c7f28a1777874b1c23025335305493777bca1d Reviewed-on: https://code.wireshark.org/review/11998 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
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-10-02Qt: Initial RTP playback.Gerald Combs1-2/+1
Note the "initial". This is woefully incomplete. See the "to do" lists below and in the code. This differs a bit from the GTK+ version in that you specify one or more streams to be decoded. Instead of showing waveforms in individual widgets, add them all to a single QCustomPlot. This conserves screen real estate and lets us more easily take advantage of the QCP API. It also looks better IMHO. Change a bunch of checks for QtMultimediaWidgets to QtMultimedia. We probably won't use the widgets until we make 5.0 our minimum Qt version and plain old QtMultimedia lets us support Qt 4 more easily (in theory at least). Add resampling code from libspeex. I initially used this to resample each packet to match the preferred rate of our output device, but this resulted in poorer audio quality than expected. Leave it in and use to create visual samples for QCP and to match rates any time the rate changes. The latter is currently untested. Add some debugging macros. Note that both the RTP player and RTP analysis dialogs decode audio data using different code. Note that voip_calls_packet and voip_calls_init_tap appear to be dead code. To do: - Add silence frames where needed. - Implement the jitter buffer. - Implement the playback timing controls. - Tapping / scanning streams might be too slow. Change-Id: I20dd3b66d3df53c9b1f3501262dc01458849f6b4 Bug: 9007 Reviewed-on: https://code.wireshark.org/review/10458 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-24Remove unused signalStig Bjørlykke1-12/+0
Change-Id: Ic2d4057ee95849bc1b026663dae1430432ad9707 Reviewed-on: https://code.wireshark.org/review/10241 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-24Close packet dialogs when reload Lua plugins.Stig Bjørlykke1-0/+12
We could keep the dialogs with the current content if postponing proto_free_deregistered_fields() until all dialogs are closed. This would give a feature where the user is able to compare packets before and after a reload. Or we could add functions in PacketDialog to reload the packet details in all open dialogs. This would give a feature to always have a updated dialog for all interesting packets. Change-Id: I805352b65844eafafafc54cd61f08b4605416e64 Reviewed-on: https://code.wireshark.org/review/10201 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>
2015-08-01More packet detail context menu items.Gerald Combs1-3/+3
Add the wiki and field reference items to the packet detail context menu. Add the "Go To Linked Packet" item in the Go menu and packet detail context menu. Use "Linked Packet" instead of "Packet Reference" and "Corresponding Packet". Remove more pending item comments. Change-Id: I66c40f71738f0996690f4818a546520ea0747088 Reviewed-on: https://code.wireshark.org/review/9841 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-06-29Take all epan_column_info members that always get allocated to "number of ↵Michael Mann1-1/+1
columns" to share their own data structure. Change-Id: Ib982662db6cf68730a7d121eac60d9bc5ae67429 Reviewed-on: https://code.wireshark.org/review/9195 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
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-05-22Qt: Add a "[closed]" hint to the packet dialog.Gerald Combs1-1/+5
Try to make it more obvious that the file has closed. Ping-Bug: 11044 Change-Id: I76ae5724316c6fd9e7efdd817c39ac268b7d4dd0 Reviewed-on: https://code.wireshark.org/review/8593 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-02Don't create a packet dialog if we don't have a packet.Guy Harris1-11/+1
Move the "find the frame" stuff to openPacketDialog(), and don't even bother creating a new PacketDialog if we don't find the frame. This should squelch Coverity CID 1270934, by giving up quickly if fdata is null. Change-Id: I4605ba7e271a55724f02cafed4122f9dd9b1b6f7 Reviewed-on: https://code.wireshark.org/review/7467 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-13Qt: More #include → forward declarations.Gerald Combs1-0/+2
Change-Id: Ib6de71f801cd3053374b6c867370acd594dcd396 Reviewed-on: https://code.wireshark.org/review/7089 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13Qt: ElidedLabel doesn't support rich text / HTML.Gerald Combs1-5/+9
Change-Id: Ia5ca9784c60325c01ba5e6378997008f8ef1dd6e Reviewed-on: https://code.wireshark.org/review/7091 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-12Qt: Add the "new packet" window^Wdialog^Wwindow.Gerald Combs1-0/+163
Allow persistence across files. Preserve the use of "window" even though we're really a dialog. Update ByteViewTab and ProtoTree to support multiple instances. Remove the need for a cast in frame_data. Add more forward declarations. Change-Id: I50d3d9d1455b8ecc158a37218f9e41fe696d5ae2 Reviewed-on: https://code.wireshark.org/review/7086 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>