Commit Graph

30 Commits

Author SHA1 Message Date
John Thacker f85f077b54 text_import: Allow fake IP headers with Raw IP encapsulation
In text2pcap and Import from Hex Dump, allow fake IP headers with
the appropriate versions when the Raw IP, Raw IPv4, and Raw IPv6
encapsulations are specified. In such cases, do not add a dummy
Ethernet header.

Continue to reject other encapsulations besides these, Ethernet,
and Wireshark Upper PDU when appropriate. Add some checks for the
encapsulation type in text_import as well, instead of just assuming
that the callers handle it correctly.
2022-01-11 08:46:44 -05:00
John Thacker d047c75cd0 import_text+Qt: Don't add impossible dummy headers to wrong encaps
Move the list of encapsulation buttons to a QButtonGroup, which makes
it easy to tell which one of them is activated.

Use that to fix an issue where dummy headers impermissible for an
encapsulation type could be added if the radio button was selected
before switching the encapsulation type. (Only for encapsulations
that allow at least one type, i.e. Ethernet or Wireshark Upper PDU.)
2022-01-11 01:04:21 +00:00
John Thacker b296db31a4 import_text: Allow setting interface name from GUI
Add the ability to set the interface name from the GUI
"Import from Hex Dump" just as with text2pcap. The last
feature for #16724 from the GUI side.
2021-12-30 14:10:04 -05:00
John Thacker 15fa09e5e3 import_text: Move IPv6 header control, use QComboBox
In "Import from Hex Dump", change the control that determines
IPv4 versus IPv6 to a QComboBox, and move it into the grid of
options, in the IP option section.
2021-12-29 15:06:33 +00:00
John Thacker a42723359e import text: add IPv6 option, custom IPv6 addresses
Add the option to use IPv6 instead of IPv4 for dummy headers,
including custom source and destination address, to the
"Import from Hex Dump" GUI box. Related to #16724
2021-12-27 10:06:02 -05:00
John Thacker b83cefd2fe import text: Custom IPv4 source and destination address from GUI
Add the ability to set custome IPv4 source and destination addresses
to the "Import from Hex Dump" GUI menu. Part of #16724.
2021-12-27 08:32:34 -05:00
John Thacker 23355cddf6 import_text: Add ASCII identification checkbox
Add a checkbox for the extra detection for ASCII in a hex+ASCII
hexdump even when the text looks like hexbytes to Import from Hex
Dump. Save and restore it from the settings. Work towards #16724.
2021-12-26 19:13:25 -05: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
Stig Bjørlykke 36977acfbf Qt: Store Import Hex Dump settings
Store all user specified values from the "Import from Hex Dump"
dialog in a profile import_hexdump.json file.

Set default ExportPDU dissector to "data".
Fixed a minor typo in a help text.
2021-09-18 18:20:57 +00:00
Paul Weiß 8c1b29a597 Regex based textfile import
Modularized the parser backend slightly to have the needed hooks
Modified the timestamp format slightly to enable arbitrary postion for
second fractions
Added a regex based seeking parser for textfiles as frontend alternative
to text_import_scanner.l
Regex is using the GLib implementation
Supported frame-data formats are bin, hex, oct and base64
Regex based importing UI
Fixed Meory-leak in ImportTextDialog::exec()
A new tab was added to the text_import ui to accomodate the new fields
Hints are available and styled accordingly
2021-03-26 06:44:25 +00:00
Gerald Combs d3f17ee08a Remove modelines in ui/qt.
Remove the editor modeline blocks from most of the source files in ui/qt
by running

    perl -i -p0e 's{ \n+ /[ *\n]+ editor \s+ modelines .* shiftwidth= .* \*/ \s+ } {\n}gsix' $( ag -g '\.(cpp|h)' )

then cleaning up the remaining files by hand.

This *shouldn't* affect anyone since

- All of the source files in ui/qt use 4 space indentation, which
  matches the default in our top-level .editorconfig

- The one notable editor that's likely to be used on these files and
  *doesn't* support EditorConfig (Qt Creator) defaults to 4 space
  indentation.
2021-03-08 18:11:32 +00:00
Dario Lombardo e655b9acf9 import: add export_pdu dummy header feature.
When importing a file from hex dump, this change adds a way to
add a custom dummy header. It's an export_pdu header which uses
one single tag: the protocol name. This allows to call directly
a dissector without more dummy headers.

Example: it can be used to call the DNS dissector without fake
eth/ip/udp headers.

Change-Id: I12fd6d09a131acd9bd1f0d7c4c8aefcd0d718b26
Reviewed-on: https://code.wireshark.org/review/30403
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-31 13:17:10 +00:00
Stig Bjørlykke 14720ace06 Fix comment end after SPDX identifier
Move */ to a separate line below the SPDX identifier.

Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f
Reviewed-on: https://code.wireshark.org/review/27211
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 06:56:37 +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
Dario Lombardo e52172c775 Qt: use SPDX identifiers.
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3
Reviewed-on: https://code.wireshark.org/review/25563
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:39:36 +00:00
Roland Knall ee699eb720 Qt: Move all utility widgets to widgets subdirectory
Move all utility widgets to the widgets subdirectory and
add separate source_group for their files

Correct some alphabetization in ui/qt/CMakeLists.txt noticed
during compare.

Change-Id: I2d664edc2b32f126438fb673ea53a5ae94cd43d1
Reviewed-on: https://code.wireshark.org/review/22531
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-11 21:30:29 +00:00
Stig Bjørlykke d72b29c1cb Qt: Add import from hex dump without offsets
Added support for importing from hex dump without offsets.
This will create one packet with all hex values found in the file.

Change-Id: I0414441721078befeb59aa6a87b9412646cfcf5c
Reviewed-on: https://code.wireshark.org/review/15743
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-12 21:31:11 +00:00
Pascal Quantin f06bbe37c1 Qt: validate format string before calling strftime()
According to https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx
an invalid string will trigger invalid parameter handler

Also check the validity of each field before activating import button

Bug: 11873
Change-Id: I9fc1c6e061a02354690871410f0e2cf2e0dd86a7
Reviewed-on: https://code.wireshark.org/review/12537
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-12 23:49:50 +00:00
Graham Bloice 2fde6ffc8f Fix out of tree builds
Stop out of tree builds picking up the in-tree version and config.h

Change-Id: Icadc46cab66db72af2d475eac31b28d0ca10df90
Reviewed-on: https://code.wireshark.org/review/8204
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-25 10:42:59 +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
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Gerald Combs f1ceee4a2c Add support for Qt5 (tested with 5.1.1).
svn path=/trunk/; revision=51580
2013-08-29 22:15:40 +00:00
Irene Rüngeler b34e4d5fee Add checkbox for the direction indication to the "Import from Hex Dump" dialog.
svn path=/trunk/; revision=48745
2013-04-05 06:43:38 +00:00
Gerald Combs 874c87610b Fix some C++ abuses that Guy found via LLVM.
svn path=/trunk/; revision=46408
2012-12-05 19:04:59 +00:00
Gerald Combs 09945d2ac9 Set SVN properties.
svn path=/trunk/; revision=45849
2012-10-31 15:40:55 +00:00
Gerald Combs 445148ac0e Add a PacketRangeGroupBox widget. Use it to implement "Export Selected
Packets". Not yet tested on Windows. "Ignore Packet" hasn't been
implemented so we can't test that either.

Create a SyntaxLineEdit widget from the QLineEdit code in
DisplayFilterEdit. Use it in the file import and export dialogs and the
PacketRangeGroupBox widget. This lets us provide instant feedback
instead of popping up an error dialog.

Expand the Tango color list based on
http://emilis.info/other/extended_tango .

Rearrange QtShark.pro to (hopefully) work better with Qt Creator.

svn path=/trunk/; revision=45405
2012-10-08 20:01:59 +00:00
Alexis La Goutte 2af09e863e Add modelines info for qtshark import file
svn path=/trunk/; revision=45136
2012-09-25 19:29:04 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Gerald Combs f6f174ffec Make the help button do something.
svn path=/trunk/; revision=44960
2012-09-18 00:17:04 +00:00
Gerald Combs 3069f22bd1 Add a text import dialog. Use libui.
svn path=/trunk/; revision=44956
2012-09-17 23:40:53 +00:00