Commit Graph

40 Commits

Author SHA1 Message Date
John Thacker 0011bb6a4c Qt: Allow omitting secondary data sources when printing
Add a checkbox to the packet format group box to allow the
hexdump to only have the main frame instead of secondary data
sources as well, so that Print and Export Packet Dissections can
be used for input to text2pcap.
2022-02-10 23:28:53 -05:00
Moshe Kaplan 69d54d6f8e Corrects repeated words throughout the code.
Repeated words were found with:
egrep "(\b[a-zA-Z]+) +\1\b" . -Ir
and then manually reviewed.
Non-displayed strings (e.g., in comments)
were also corrected, to ease future review.
2021-12-22 11:01:11 +00:00
Moshe Kaplan 3953ddcf57 Add UI header files to Doxygen
Add @file markers for UI
header files so that Doxygen will
generate documentation for them.
2021-11-30 08:01:36 -05:00
Roland Knall 7fcac9c955 Qt: Fix export of dissection
Exporting dissected bytes did not consider the
selection of packets on Windows, if multiple
packets had been selected

Bug: 16516
Change-Id: I9d914fe1fed22f842d73caea397a3f37ffc0d523
Reviewed-on: https://code.wireshark.org/review/36958
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-04-27 16:00:03 +00:00
Gerald Combs 50713161c3 Win32: Remove win32_save_as_statstree.
win32_save_as_statstree was GTK+-only.

Change-Id: Ief029cd1a702b0c17d9602bee8a2d75ee4c3c393
Reviewed-on: https://code.wireshark.org/review/35384
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-10 01:05:43 +00:00
Gerald Combs dc19356be2 Win32: Fixup our file dialog titles.
Add a "title" argument to each of the Win32 file dialog routines, and
pass in one constructed using wsApp->windowTitleString.

Change-Id: I5ff862bd28cd16093d99ae1559ecbaca907350da
Reviewed-on: https://code.wireshark.org/review/35383
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-10 01:04:47 +00:00
Gerald Combs 7c883dd771 Win32: Factor out win32_check_save_as_with_comments.
Stop using win32_check_save_as_with_comments and just use the
Qt equivalent on Windows. It started out as a static funtion in
file_dlg_win32.c and using the native Windows event loop may have been
required for GTK+, but neither of those apply now.

Change-Id: I66d7f1c6346df65b0fadb3aa9cba823c0e457703
Reviewed-on: https://code.wireshark.org/review/35382
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-10 00:59:00 +00:00
Guy Harris a1372f6d01 Use an enum for compression types in various interfaces.
This:

1) means that we don't have to flag the compression argument with a
comment to indicate what it means (FALSE doesn't obviously say "not
compressed", WTAP_UNCOMPRESSED does);

2) leaves space in the interfaces in question for additional compression
types.

(No, this is not part 1 of an implementation of additional compression
types, it's just an API cleanup.  Implementing additional compression
types involves significant work in libwiretap, as well as UI changes to
replace "compress the file" checkboxes with something to indicate *how*
to compress the file, or to always use some other form of compression).

Change-Id: I1d23dc720be10158e6b34f97baa247ba8a537abf
Reviewed-on: https://code.wireshark.org/review/30660
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-16 09:20:36 +00:00
Peter Wu b0582230f3 UI: Remove Win32 file dialog stuff specific to GTK
Remove "Export SSL Session Keys", "Import/Export Color Filters" and
"Export Raw Bytes" dialogs. These were only used by GTK+ as Qt has its
own implementation.

Change-Id: I0520a0f6e35d0f8a55c58e77f89c5229393c2b23
Reviewed-on: https://code.wireshark.org/review/30559
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-10 07:42:44 +00:00
Gerald Combs f8092f96b3 Qt: Move wireshark-qt.cpp back to ui/qt/main.cpp.
The Qt UI's main module started out as ui/qt/main.cpp but was moved to
the top-level directory in order to appease Autotools. We don't need to
do that any more, so move it back.

Change-Id: Ic5bc0ed5b754e36cc2b9e682f2ca097781233dfd
Reviewed-on: https://code.wireshark.org/review/28090
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-06-08 03:50:22 +00:00
Gerald Combs 23e1cde5e7 Windows: Make sure native dialogs handle HiDPI.
Enable per-monitor v2 DPI awareness before displaying native file
dialogs so that they will render correctly on HiDPI displays.
Add some notes about DPI awareness in our manifest and in
wireshark-qt.cpp.

Remove win32_get_ofnsize while we're here.

Change-Id: Ic553fdeea0c05020c3a7ff06f648692cb814b3eb
Reviewed-on: https://code.wireshark.org/review/27435
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-09 20:02:34 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
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-08 14:57:36 +00:00
Gerald Combs 62fc862bc6 Squelch an rc warning.
Don't include glib if RC_INVOKED is defined so that the Microsoft Windows
Resource Compiler doesn't generate the following complaint:

\path\to\glib/gatomic.h(87): warning RC4011: identifier truncated to '__GCC_HAVE_SYNC_COMPARE_AND_SWA'

Change-Id: I6637aee2842de4e7041b66ff4428f617478efcb4
Reviewed-on: https://code.wireshark.org/review/25670
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-07 22:12:32 +00:00
Jakub Zawadzki 2cee4f432f Try to fix win32 build, add ui/packet_range.h include.
add ui/packet_range.h include to try to fix win32 build, compilation log:

         export_sslkeys.c
    99>C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\ui/win32/file_dlg_win32.h(73): error C2143: syntax error: missing ')' before '*' (compiling source file C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\ui\gtk\export_sslkeys.c) [C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\cmbuild\ui\gtk\gtkui.vcxproj]
    99>C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\ui/win32/file_dlg_win32.h(73): error C2081: 'packet_range_t': name in formal parameter list illegal (compiling source file C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\ui\gtk\export_sslkeys.c) [C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\cmbuild\ui\gtk\gtkui.vcxproj]
    99>C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\ui/win32/file_dlg_win32.h(73): error C2143: syntax error: missing '{' before '*' (compiling source file C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\ui\gtk\export_sslkeys.c) [C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\cmbuild\ui\gtk\gtkui.vcxproj]
    99>C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\ui/win32/file_dlg_win32.h(73): error C2059: syntax error: ')' (compiling source file C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\ui\gtk\export_sslkeys.c) [C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\cmbuild\ui\gtk\gtkui.vcxproj]

Change-Id: I58c77fdcbe3fe2e738601c4ef97596c7774704ec
Reviewed-on: https://code.wireshark.org/review/24743
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-12-08 19:04:49 +00:00
Gerald Combs 18b240d7d2 Normalize ui/win32 indentation and switch to SPDX.
Switch ui/win32/console_win32.[ch] to 4-space indentation to match the
other files in that directory. Remove ui/.editorconfig. SPDX-abbreviate
the license blurb in all files in that directory.

Change-Id: I68aa5a3ae7ae184ea8d27d9dba06b968ac3d2472
Reviewed-on: https://code.wireshark.org/review/24636
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-29 03:36:30 +00:00
Gerald Combs 559bb375c1 Remove name resolution from the file dialogs.
A single name resolution checkbox was added to the file dialog way back
in 2000 in g0f7cf64. At that time it was needed because resolution was
synchronous and could drastically affect your load time. Since then
we've added asynchronous name resolution and more recently made it
mandatory (ge005bc8). We've also added more name resolution checkboxes
and other controls.

Remove the name resolution checkboxes. You can just as easily change
resolution options before or after opening a file and they take up
valuable real estate.

Combine the size and packets in the Qt and Win32 dialogs and
pretty-print the size. Combine the start and elapsed times in the Qt,
Win32, and GTK+ dialogs. This lets us shrink the custom areas of the
file dialogs even further. Make the default file type combo item more
descriptive.

Change-Id: Id770adc0f284a4c7f08ee5a7db84f8435f4bf907
Reviewed-on: https://code.wireshark.org/review/17597
Tested-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-09-09 21:43:01 +00:00
Michal Labedzki 6a4049535a win32: Implement format type selector in open file dialog
Change-Id: Idef1829fcc2b7b08783e5288bb6486ce19c4779b
Reviewed-on: https://code.wireshark.org/review/405
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-04 18:31:48 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Alexis La Goutte c00a12652f Fix warning found by doxygen
svn path=/trunk/; revision=54130
2013-12-15 19:07:26 +00:00
Michael Mann 60d6b05e23 Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452)
From Deon van der Westhuysen

- Bug fix: object leak in stats_tree after a tap reset (for example apply statistics preferences with a stats_tree window open)
- Bug fix: correct sample code in README.stats_tree
- Add: slash in plug-in name now creates submenu as docs describe (was a bug?)
- Add: menu separator before the stat_tree registered plug-ins
- Add: stats_tree can now calculate averages for nodes; automatically calculated for range nodes. Add section in README.stats_tree describing averages.
- Add: stats_tree can now calculate burst rate of each node (like rate but with a shorter, sliding time window)
- Add: sorting for stats_tree plug-ins. Can sort on node name, count, average, min, max values and burst rate.
- Add: preferences for stats_tree system (default sort column, burst calc params)
- Add: stats_tree window copy to clipboard and export and plain text, csv and XML.
- Added sample of new functionality in $srcdir/plugins/stats_tree/pinfo_stats_tree.c
- Moved all stats_tree sample plug-ins to "IP Statistics" submenu.

svn path=/trunk/; revision=53657
2013-11-29 22:47:59 +00:00
Gerald Combs 259768dc1a Remove GTK+ and global cfile dependencies from file_dlg_win32.c.
Move the declaration of set_last_open_dir() to ui/util.h. It still
has separate GTK+ and Qt implemenations. We might want to move it to
ui/util.c at some point. Remove a lot of unnecessary GTK+ includes.
Remove most of the references to the global cfile while we're at it.

svn path=/trunk/; revision=52542
2013-10-11 17:20:50 +00:00
Chris Maynard 909d2eb309 Allow for column headers not to be printed in order to make it possible to export packets as plain text in a format that could then have a chance of being imported again (assuming other factors such as packet bytes were printed, etc.) in order to recover the original pcap file.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1636

svn path=/trunk/; revision=50036
2013-06-19 15:22:56 +00:00
Evan Huus 63ef04ec84 Fix a whole bunch of doxygen warnings, mostly typos or renamed parameters.
svn path=/trunk/; revision=49053
2013-04-26 18:28:21 +00:00
Gerald Combs 419f851e34 Fix Windows compilation problems from r45513. #ifdef out some non-Windows
code.  Get rid of a few uses of the global cfile.

svn path=/trunk/; revision=45514
2012-10-13 00:18:46 +00:00
Gerald Combs 18b10390da Move a couple of enums to the common UI directory. Remove an unused
definition.

svn path=/trunk/; revision=45440
2012-10-09 23:51:30 +00:00
Gerald Combs bdd98d63cd Fix compilation on Windows. Add back and fix function definitions,
fix doxygen d ocumentation, other fixes.

svn path=/trunk/; revision=45298
2012-10-03 19:45:05 +00:00
Gerald Combs bcd2cea774 Unify the GTK+ and Win32 versions of "Export Specified Packets". Add a
shared "file_add_extension" routine. We no longer support _MSC_VER <
1400 so get rid of some clutter. Add a gzip checkbox to the Win32 export
packets dialog. Windows code hasn't yet been tested (and is likely
broken). I'll fix it shortly.

svn path=/trunk/; revision=45296
2012-10-03 19:24:14 +00:00
Gerald Combs e9d4c115b5 Fix compilation on Windows.
svn path=/trunk/; revision=45106
2012-09-24 17:44:11 +00:00
Gerald Combs 25eab1c383 Unify some of the GTK+ and Win32 "Save As" code and behavior. This will
likely break compilation on Windows. I'll take care of it shortly.

svn path=/trunk/; revision=45105
2012-09-24 17:04:50 +00:00
Gerald Combs 3e05236eff Add gzip support to the Win32 "Save As" dialog. Don't crash in the Win32
merge dialog if we cancel. Adjust the size and location of the controls
in the Win32 open and merge file templates.

svn path=/trunk/; revision=45014
2012-09-19 23:06:39 +00:00
Gerald Combs f764eabb67 Combine some of the the Windows and non-Windows merge code and make it
behave the same on each platform. This might break the non-Windows builds.
I'll test & fix any problems shortly.

svn path=/trunk/; revision=44859
2012-09-10 21:27:49 +00:00
Gerald Combs b0a562b82d Remove the filename from the Win32 file dialog preview. It's already
shown in two places and there's no reason to show it in a third.

Use CommDlg_OpenSave_GetFilePath instead of CommDlg_OpenSave_GetSpec so
that previews work properly for folders.

svn path=/trunk/; revision=43877
2012-07-21 01:14:08 +00:00
Gerald Combs 281e18d636 Move most of file_open_cmd to gtk_open_file. Make gtk_open_file
and win32_open_file behave similarly. _snwprintf is "banned". Use
StringCchPrintf instead. Tested on Windows. I'll test on OS X shortly.

svn path=/trunk/; revision=43756
2012-07-16 20:46:13 +00:00
Gerald Combs bdea70585d Use win32_open_file in qtshark on Windows.
svn path=/trunk/; revision=43677
2012-07-12 00:04:53 +00:00
Anders Broman 0696f30690 From Michael Mann:
GUI use external name resolver proliferation

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7380

svn path=/trunk/; revision=43615
2012-07-09 01:36:54 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris 16f582176b In the Windows capture file "Save As" dialog code, do the same sort of
checks for the inability to save comments that we do for UN*X.  This
should fix bug 7222, although the UI isn't currently as nice, as the
dialog boxes are Windows dialog boxes and we don't set the button labels
to reflect the actual choices being offered to the user.  (We may be
able to do that by using template resources to construct the message
boxes.)

svn path=/trunk/; revision=43444
2012-06-23 08:18:14 +00:00
Guy Harris 6014035703 Use GTK+'s GtkMessageDialog for the questions we ask in the process of
saving files, and run it modal (which we're already doing with the
GtkFileChooserDialog); this means less callback-based state machine
stuff, simplifying the code paths a bit.

If we're saving a file before closing it, don't bother reloading it
after saving it.

svn path=/trunk/; revision=42855
2012-05-25 21:25:55 +00:00
Guy Harris 07835ce129 Do the "Save As always saves the entire capture, Export Specified
Packets saves specified packets" stuff for Windows.

svn path=/trunk/; revision=42794
2012-05-22 22:39:30 +00:00
Guy Harris 0db1b9ae17 Make the win32 directory a subdirectory of the ui directory.
svn path=/trunk/; revision=40531
2012-01-16 01:26:46 +00:00