Commit Graph

83084 Commits

Author SHA1 Message Date
Stig Bjørlykke 6343967eef Qt: Disable Import Hex Dump IPv6 check box when unused
Only enable the IPv6 option check box when adding a IP header.
Improve the tooltip text.
2021-12-27 18:38:35 +01:00
John Thacker 7dc79c9a2f text_import: Fix custom IPv6 address handling
Fix a case where one address but not the other was set to a nonzero
IPv6 address and direction was indiciated.
2021-12-27 10:28:44 -05: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 756cc28592 import_text: Save IP address settings 2021-12-27 14:35:01 +00:00
João Valverde 0d5bfd44a8 Use a wrapper function to call strptime()
Encapsulate the feature requirements for strptime() in a
portability wrapper.

Use _GNU_SOURCE to expose strptime. It should be enough on glibc
without the side-effect of selecting a particular SUS version,
which we don't need and might hide other definitions.
2021-12-27 14:07:32 +00: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
Pascal Quantin dcbd456e69 doc: fix a copy/paste error and a typo 2021-12-27 13:01:42 +00:00
João Valverde c11ceb08ed CMake: Fix timespec_get() detection on Windows
Replace some instances of check_function_exists() with
check_symbol_exists(). From the CMake documentation:

    - check_function_exists() can't detect functions that are inlined
    in headers or specified as a macro.
    - check_function_exists() can't detect anything in the 32-bit versions
    of the Win32 API, because of a mismatch in calling conventions.
    - check_function_exists() only verifies linking, it does not verify
    that the function is declared in system headers.

This fixes timespec_get() detection on Windows.
2021-12-27 12:16:05 +00:00
João Valverde c457c8a396 CMake: Remove duplicate definition in config.h 2021-12-27 11:29:48 +00:00
Joakim Karlsson 1339d30de3 pfcp: Update to 3GPP TS 29.244 V17.3.0 2021-12-27 10:56:17 +01:00
Gerald Combs b851a9fbc6 Docs: Remove unneeded markup in the Wireshark man page.
Remove empty list continuations and continuations around single lines of
text.
2021-12-27 08:25:52 +00:00
Gerald Combs 87eca12c38 Docs: Document our diagnostic output options.
Add docs/diagnostic-options.adoc, which is a snippet that documents our
various --log-* options. Include it in the dumpcap, rawshark, and tshark
man pages.

Make the ws_log_print_usage output more consistent.
2021-12-27 08:04:25 +00:00
John Thacker b1b1d24548 wsutil: Declare ws_inet_* with extern "C"
Specify C linkage for ws_inet_pton[4|6] in order to use them
from the GUI.
2021-12-27 01:02:02 -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
John Thacker 0dfc6414e0 text2pcap: Add Export PDU
Support Export PDU functionality from text2pcap. Related to #16724.
2021-12-26 14:07:37 -05:00
Gerald Combs a3df9fe13f [Automatic update for 2021-12-26]
Update manuf, services enterprise numbers, translations, and other items.

Asterix failed.
2021-12-26 18:40:31 +00:00
Gerald Combs 3600de75c1 Docbook: Make our prefaces self-contained. 2021-12-26 09:52:18 -08:00
Guy Harris b3215d99ca rfc7468: don't use for (;;) for tvb_find_line_end() loops.
If you're past the end of the tvbuff, tvb_find_line_end() will, when
reassembly is not being done, return a zero-length line without
advancing next_offset, so, unless you check for being past the end of
the tvbuff, you'll loop forever.

Fixes #17801.
2021-12-25 22:22:31 -08:00
John Thacker b9e299b1a3 text2pcap test: Add fractional seconds qualifier
text2pcap now has support for fractional sections using the field
descriptor %f and doesn't support the old method, so change the format
string in the test.  None of the existing tests depended on the
fractional seconds being correct.
2021-12-25 21:01:12 -05:00
John Thacker 9e7b5c9189 text2pcap: Use debug level
Pass the debug level parameter from text2pcap to text_import
so that it is used as it was before to print internal parsing
information.
2021-12-25 15:52:46 -05:00
Gerald Combs 38dbb8486f text import: Remove an unneeded cast.
Don't bother casting to a guint32. We check for large values further on.
2021-12-25 19:43:35 +00:00
John Thacker 5f3197e8be text2pcap: Update usage for new time format options 2021-12-25 13:26:04 -05:00
John Thacker 8cafcfa5a9 text2pcap: Support OFFSET_NONE 2021-12-25 09:19:07 -05:00
John Thacker f63571c3e8 text_import: Ignore offsets in no offset mode
If we're in the no offset mode and we parse an offset,
warn the user and ignore. At the very beginning of the file try
adding it to the preamble, maybe there's something unfortunate
like an all numeric time stamp format (ISO-8601 Basic).
2021-12-25 08:39:29 -05:00
Guy Harris 126971191a text2pcap: use ws_strtou8() to process the -i flag.
Based on Gerald's !5562.

Use ws_strtou8() rather than doing all the error checking ourselves.

Have a common routine to call when an IP "next protocol" value is set;
it does all the necessary work, and could also check for colliding
settings, such as combining "-i 99" with "-s", "-S", "-u", or "-T", or
combining "-u" with "-T", or....
2021-12-24 23:52:47 -08:00
Guy Harris 37d90b7c04 text2pcap: have a Boolean flag indicating whether -i was specified.
That avoids worrying about finding an appropriate out-of-range value to
indicate whether -i was specified or not.
2021-12-24 23:05:52 -08:00
John Thacker 857d518c17 text_import: Use time format directly
Also use g_strcmp0 for setting the ISO format.
2021-12-25 03:35:24 +00:00
John Thacker 54c4c7b0a6 text_import: Another explicit cast for unsigned long and clang 2021-12-24 21:54:40 -05:00
John Thacker a369a2172a text2pcap: Explicit case to keep clang happy 2021-12-24 20:56:43 -05:00
John Thacker 0d68a1364f text2pcap: Use common failure messages, exit codes
Use the common exit codes and failure messages.
2021-12-24 17:01:35 -05:00
John Thacker 96c299c6b8 text_import: Reduce globals
A bunch of the globals are simply copied from the input parameter
text_import_info_t, just use them directly.

Move the count for packets read and written into the info type,
so that callers like text2pcap can access them as results.
2021-12-24 08:20:27 -05:00
Odysseus Yang 6d1be225c6 MBIM: dissect the commands of MBIM extended version 4.0
MBIM_CID_MS_DEVICE_CAPS_V2
MBIM_CID_MS_REGISTRATION_PARAMS
MBIM_CID_PACKET_SERVICE
MBIM_CID_MS_NETWORK_PARAMS
MBIM_CID_MS_UE_POLICY
MBIM_CID_CONNECT
MBIM_CID_MS_PROVISIONED_CONTEXT_V2
MBIM_CID_SUBSCRIBER_READY_STATUS
2021-12-24 09:00:57 +00:00
John Thacker 0867374044 text2pcap: Call text_import
Have text2pcap call text_import to do the work.
Related to #16724.
2021-12-23 20:41:52 -05:00
John Thacker 48574e3a58 text_import: Report errors and warnings
Don't exit in the middle with unexpected values. Report a failure
and return a failed exit status when something goes really wrong.
Use warnings when appropriate, like when a time code value couldn't
be parsed.
2021-12-23 19:26:45 -05:00
Gerald Combs 4605ad2ed7 CMake: Clean up the Qt CMakeLists.txt
Sort each of our file lists and remove a duplicate item. Make our
indentaion consistent.
2021-12-23 10:32:55 -08:00
John Thacker bc9cfa6340 text_import: Allow ISO8601 format times
Includes allowing the string "ISO" in the format string text box
in the GUI, so this works in "Import from Hex Dump" as well as
being for the text2pcap transition. Part of #16724.
2021-12-23 11:42:51 -05:00
John Thacker bc4b27bbe2 text_import: Report failure to write
Use report_message and report wtap_dump failures. Pass in
the output filename and keep track of the frame numbers for
the message parameters.

Report failure to initialize the lex scanner in text_import
instead of in the GUI, so that it would be reported from text2pcap,
and because text_import might have other failure cases that are
not the scanner.

The regex parser returns a positive number of packets processed
on success; save that number in text_import, and return zero on
success to our callers.
2021-12-23 15:49:04 +00:00
Jaap Keuter f151e1b0c2 Refactor VARINT handling 2021-12-23 14:27:30 +00:00
John Thacker 54e9c99041 text2pcap: Finish setting up error handling
Finish up all the setup for the common command line error
handling and for the report message handling when this eventually
calls ui/text_import
2021-12-23 00:09:54 -05:00
Gerald Combs 20ebe853d1 Qt: Make utils more independent.
Use qApp instead of wsApp in ColorUtils and StockIcon.
2021-12-22 19:00:13 -08:00
John Thacker 8d421de42c text_import: port ASCII identification from text2pcap
This is the special check for canonical hex+ASCII textdump
files that looks for the edge case where the beginning of the
ASCII column has strings that can be mistaken by the parser for
additional hex bytes. Not implemented in the GUI yet. Preparing
for text2pcap switchover. Related to #16724.
2021-12-22 20:08:29 -05:00
Gerald Combs dea3d5e5fc CMake: Update our WiX search paths. 2021-12-22 13:07:51 -08:00
Gerald Combs a11f105e44 GitLab CI: Simplify our Windows paths.
CMake's FindPerl module and our FindNSIS and FindWiX modules can find
perl, makensis, and the various WiX utilities in their default locations
so we don't need to prepopulate our PATH.

Update FindWiX to look for version 3.11.
2021-12-22 20:33:29 +00:00
John Thacker 50d66b6346 text_import: gracefully handle hexdump without trailing LF
Adjust the grammar to recognize two trailing hexadecimal characters
without a LF as a byte as well. Ported from text2pcap and commit
22cf80d30d which explains why this
is safe. More work for #16724.
2021-12-22 20:15:11 +00:00
Jaap Keuter 1b5acc8d57 Replace ENC_VARIANT_MASK by ENC_VARINT_MASK 2021-12-22 20:14:31 +00:00
John Thacker 334d24ec5b text_import: Fix IPv6 payload length 2021-12-22 19:40:13 +00:00
Roman Volkov 3b59cb018c mpeg-descriptor: Add support for official DVB 8K HEVC streams 2021-12-22 19:35:18 +00:00
João Valverde d8b7d1f821 dfilter: Add aliases "any_eq" and "all_ne" 2021-12-22 14:32:32 +00:00
João Valverde 8b23dd3a3c dfilter: Add an "all equal" operator
To complete the set of equality operators add an "all equal"
operator that matches a frame if all fields match the condition.

The symbol chosen for "all_eq" is "===".
2021-12-22 14:32:32 +00: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