Commit Graph

2686 Commits

Author SHA1 Message Date
Jirka Novak 1e53e49a54 ciscodump: Added support for IOS XE and ASA
Changes:
- The tool now recognizes which software is running on a device - IOS, IOS XE
  or ASA. Based on it, it uses correct sequence of commands to setup
  capture, read captured packets and clear the capture.
- The tool reads packets on the fly so you don't have to wait till
  --remote-count of packets is reached.
- The tool reads timestamps from capture on the device for IOS and ASA (on
  IOS-XE, there is no timestamp in dump).
- Except Windows platform the tool handles early stop of capture on the device
  and clear of capture buffer on the device (it finish the capture).
- There are special interface names to allow the tool to generate
  specific capture types.
- Documentation updated.

Closes #17672.
2022-07-22 15:55:28 +00:00
Gerald Combs a113fd5c7b wslua: Remove unneeded empty lines from our markup. 2022-07-21 15:36:35 -07:00
Roland Knall 5991a75d78 ReleasNotes: Add minimum version requirements
Adding an explanation on minimum required versions to the release
notes, as well as bumping c-ares to version 1.14.0

The previous minimum (1.5.0) has been released in 2008. The new
version has been choosen to correlate with those distros, that
also provide a minimum version of Qt5 higher than 5.9, as 5.9
is no longer supported in the main branch
2022-07-21 12:37:17 +00:00
Gerald Combs fbadb8c785 wslua: Capitalize words in our markup.
Capitalize words in our markup instead of depending on make-wsluarm.pl.
Add a single space after "Mode:".
2022-07-20 14:52:40 -07:00
Ferry Huberts 0a42b0976b Locamation Interface Module dissector for IM1
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2022-07-20 06:25:51 +00:00
Roland Knall 7935734d61 ReleaseNotes: add maxminddb improvement
Add note about the improvement for maxminddb

[skip ci]
2022-07-16 15:38:59 +00:00
João Valverde 7bea636cd4 WSUG: Add display filter arithmetic operators 2022-07-15 00:11:38 +01:00
João Valverde 97ce9845c3 WSUG: Fix a heading level 2022-07-14 23:36:39 +01:00
João Valverde d5ec420bb5 WSUG: Add a note about the changes to "!=" 2022-07-14 23:29:08 +01:00
João Valverde 4c975b770e dfilter: Improve compatibility of integer types
Before:

$ dftest '_ws.ftypes.int64 == _ws.ftypes.int8'
Filter: _ws.ftypes.int64 == _ws.ftypes.int8
dftest: _ws.ftypes.int64 and _ws.ftypes.int8 are not of compatible types.
	_ws.ftypes.int64 == _ws.ftypes.int8
	                    ^~~~~~~~~~~~~~~

After:

$ dftest '_ws.ftypes.int64 == _ws.ftypes.int8'
Filter: _ws.ftypes.int64 == _ws.ftypes.int8

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(_ws.ftypes.int64 <FT_INT64>)
   1 FIELD(_ws.ftypes.int8 <FT_INT8>)

Instructions:
00000 READ_TREE		_ws.ftypes.int64 <FT_INT64> -> reg#0
00001 IF_FALSE_GOTO	5
00002 READ_TREE		_ws.ftypes.int8 <FT_INT8> -> reg#1
00003 IF_FALSE_GOTO	5
00004 ANY_EQ		reg#0 === reg#1
00005 RETURN
2022-07-14 20:12:30 +00:00
Uli Heilmeier 51bf87a641 WSUG: Fix typo 2022-07-13 16:45:00 +00:00
Moshe Kaplan 87ca8c227a tools: Port make-version.pl to Python 2022-07-11 14:44:23 +00:00
Gerald Combs 75efbb1ac4 Rename Logwolf to Logray
Switch to the name "Logray" for the log analyzer. Rays are biological
cousins of sharks and more people like the name "Logray" in a completely
unscientific survey here. Apologies for any inconvenience this might
cause.
2022-07-06 15:04:25 +00:00
João Valverde a877f2d5f3 dfilter: Allow existence check for slices
Allow checking if a slice exists. The result is true if the
slice has length greater than zero.

The len() function is implemented as a DFVM instruction instead.
The semantics are the same.
2022-07-04 22:45:14 +00:00
Gerald Combs ff36056573 [Automatic update for 2022-07-03]
Update manuf, services enterprise numbers, translations, and other items.
2022-07-04 21:30:14 +00:00
João Valverde b10db887ce dfilter: Remove unparsed syntax type and RHS literal bias
This removes unparsed name resolution during the semantic
check because it feels like a hack to work around limitations
in the language syntax, that should be solved at the lexical
level instead.

We were interpreting unparsed differently on the LHS and RHS.
Now an unparsed value is always a field if it matches a
registered field name (this matches the implementation in 3.6
and before).

This requires tightening a bit the allowed filter names for
protocols to avoid some common and potentially weird conflicting
cases.

Incidentally this extends set grammar to accept all entities.
That is experimental and may be reverted in the future.
2022-07-02 11:18:20 +01:00
Roland Knall 799a033080 ReleaseNotes: Correct some spellings and wordings
Fixes #18161

[skip ci]
2022-06-29 10:19:20 +02:00
Gerald Combs 7c96053f3b Version: 3.7.1 → 3.7.2
[skip ci]
2022-06-27 12:10:57 -07:00
Gerald Combs 5ee0b97c96 Build: 3.7.1
[skip ci]
2022-06-27 10:05:04 -07:00
João Valverde aaff0d21ae dfilter: Add layer support for references
This adds support for using the layers filter
with field references.

Before:
    $ dftest 'ip.src != ${ip.src#2}'
    dftest: invalid character in macro name

After:
    $ dftest 'ip.src != ${ip.src#2}'
    Filter: ip.src != ${ip.src#2}

    Syntax tree:
     0 TEST_ALL_NE:
       1 FIELD(ip.src <FT_IPv4>)
       1 REFERENCE(ip.src#[2:1] <FT_IPv4>)

    Instructions:
    00000 READ_TREE		ip.src <FT_IPv4> -> reg#0
    00001 IF_FALSE_GOTO	5
    00002 READ_REFERENCE_R	${ip.src <FT_IPv4>} #[2:1] -> reg#1
    00003 IF_FALSE_GOTO	5
    00004 ALL_NE		reg#0 != reg#1
    00005 RETURN

This requires adding another level of complexity to references.
When loading references we need to copy the 'proto_layer_num'
and add the logic to filter on that.

The "layer" sttype is removed and replace by a new
field sttype with support for a range. This is a nice
cleanup for the semantic check and general simplification.
The grammar is better too with this design.

Range sttype is renamed to slice for clarity.
2022-06-25 14:57:40 +01:00
João Valverde e9e6431d7b dfilter: Change boolean string representation
Use "True" or "TRUE" instead of "true" and remove case insensivity.
Same for false. This should serve to differentiate booleans a bit
more from protocol names, which should be using lower-case.
2022-06-25 13:02:34 +01:00
Chuck Craft ff4663931c wsdg: docbook\README.adoc - filename 2022-06-22 16:27:21 +00:00
Gerald Combs 3d52693eaa Qt+docs: Capitalize JSON.
JSON is an abbreviation and should be displayed in all caps.
https://www.json.org/json-en.html
2022-06-21 17:24:27 +00:00
João Valverde 354e0d7edf dfilter: Add support for unicode escape sequences
Add support for entering unicode codepoints as \uNNNN or \uNNNNNNNN
for strings and charconsts (following the C standard).
2022-06-21 16:54:16 +01:00
João Valverde 47348ae598 dfilter: Add support for literal strings with null bytes
Before:
    Filter: frame matches "abc\x00def"
    dftest: \x00 (NUL byte) cannot be used with a regular string.
    	frame matches "abc\x00def"
    	                  ^~~~
    Filter: _ws.ftypes.string == "a string with a \0 byte"
    dftest: \0 (NUL byte) cannot be used with a regular string.
    	_ws.ftypes.string == "a string with a \0 byte"
    	                                      ^~

After:
    Filter: frame matches "abc\x00def"

    Syntax tree:
     0 TEST_MATCHES:
       1 FIELD(frame)
       1 PCRE(abc\0def)

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_MATCHES	reg#0 matches abc\0def
    00003 RETURN

    Filter: _ws.ftypes.string == "a string with a \0 byte"

    Syntax tree:
     0 TEST_ANY_EQ:
       1 FIELD(_ws.ftypes.string)
       1 FVALUE("a string with a \0 byte" <FT_STRING>)

    Instructions:
    00000 READ_TREE		_ws.ftypes.string -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_EQ		reg#0 == "a string with a \0 byte" <FT_STRING>
    00003 RETURN

Fixes issue #16156.
2022-06-21 15:10:08 +00:00
Roland Knall 847795d381 Qt: Add stream number to conversations
Adding the stream id to UDP/TCP conversations and allowing
filtering on those values as well.

Fixes: #14184
2022-06-21 10:01:18 +02:00
Gerald Combs 058fe0dd09 [Automatic update for 2022-06-19]
Update manuf, services enterprise numbers, translations, and other items.
2022-06-19 16:40:16 +00:00
Roland Knall 2b4878d452 Qt: Hide columns for traffic tree
Allow columns to be hidden for the traffic tree dialogs
Conversations and Endpoints and store the information profile
specific
2022-06-19 16:39:35 +02:00
Gerald Combs efe8dc051c Prefs: Change the default UI layout to type "2".
Make the default UI layout "packet list on top, packet detail and bytes
side by side". This is more space efficient on modern displays and is
the first thing I change when using the default profile.
2022-06-18 12:36:18 +00:00
Roland Knall c5aa352ad4 docbook: Adapt releasenotes for openSafety and AT_NUMERIC
[skip ci]
2022-06-17 13:57:12 +02:00
Chuck Craft d008708552 editcap/mergecap: swap 'v'|'V' options to match other CLI utilities
Closes #18134
2022-06-16 02:13:50 +00:00
Gerald Combs 572e6b0c10 Docs: Add some protocols to the release notes. 2022-06-15 11:49:40 -07:00
Roland Knall 1272b62106 Docs: Update documentation for redesigned Traffic Tabs
Update the documentation to document the change of features
that happen during the redesign of the UI as well as fix some
wordings in the data model.
2022-06-14 21:33:26 +00:00
Chuck Craft 208cf56b75 ip: ip.flags field are 3 high bits not full byte
See https://ask.wireshark.org/question/27546/0x01-flag-on-last-of-fragmented-packets/
2022-06-14 20:28:17 +00:00
Roland Knall a4f25e5115 Qt: Redesign TrafficTree Dialogs UI
The new UI should better group functionality and as well as better
showing which taps are available and can be used.
2022-06-14 09:36:30 +00:00
Uli Heilmeier 9d17919f2a WSUG: Typo
Add a missing comma
2022-06-13 16:47:26 +00:00
Roland Knall 0cfe7a0d56 Qt: Better sorting for traffic dialogs
Allow the traffic columns to automatically sort on secondary columns if
applicable. e.g. the address and port column for TCP and UDP, or the
secondary address for conversations
2022-06-13 13:50:50 +02:00
Roland Knall bcb8558be2 Docs: Update release notes
Add note about the change for tap_packet_cb

[skip ci]
2022-06-10 21:05:47 +02:00
Gerald Combs d047a18e83 Docs: Update the release notes.
Rearrange and update a few items.

[skip ci]
2022-06-10 10:53:04 -07:00
Roland Knall cbed7f8013 docbook: Add Releasenotes for traffic column 2022-06-10 16:31:52 +02:00
Roland Knall 2cf938cfa8 tap: Adding flags for tap_packet
This allows flags to be passed by the registering listener
to the collection of information
2022-06-10 05:46:15 +00:00
Gerald Combs de1a4c3774 CMake: Update package target names.
Rename the rpm-package target to wireshark_rpm and the appimage target
to wireshark_appimage.
2022-06-08 17:56:21 +00:00
Jaap Keuter fe4210029a Qt: Reword menu item Seconds Since Beginning of Capture 2022-06-05 23:55:59 +00:00
Gerald Combs 2ac2b0670a Git+CMake: Add support for CMake presets.
CMake 3.19 added support for CMakePresets.json and
CMakeUserPresets.json, which let you prepopulate various configure,
build, and test options. Add CMakeUserPresets.json to .gitignore as
recommended by the documentation and add an example to the Developer's
Guide. CMake uses 2-space indentation; specify that for CMake*.json in
.editorconfig.
2022-06-05 13:04:07 -07:00
Roland Knall b06c1c451c Qt: Make TrafficTable detachable
Allow the endpoint and conversation dialogs to have detachable
tabs. At the same time move the tree functionality to a subclass
to better be able to handle the context menu when detached.

Right now, still a lot of tree stuff is in the tabwidget, but
could be moved to the tree for the future
2022-06-04 21:28:05 +02:00
Roland Knall 9edf06383a Qt: Move most Contextmenu stuff to TrafficTree
Create a new class, which handles the context menu stuff for
the traffic data, as well as remove unnecessary signals used
by the sub-dialogs.
2022-06-04 15:57:02 +02:00
Gerald Combs 056fd8a1e3 NSIS: Update some target and filenames.
Rename the following build targets, similar to the recent macOS target
name changes:

nsis_package_prep to wireshark_nsis_prep
nsis_package to wireshark_nsis

Rename some NSIS files to reflect that they're specific to Wireshark.
Update the documentation and CI configurations.
2022-06-02 16:33:31 -07:00
Gerald Combs a930a78686 Docs: We no longer require Bison / YACC.
f21cd2e23f Removed our last Bison / YACC file. Update the Developer's
Guide to match.
2022-06-02 13:24:48 -07:00
Gerald Combs 370c58f913 macOS: Add Logwolf packaging targets.
Rename the following build targets:

app_bundle to wireshark_app_bundle
dmg_package_prep to wireshark_dmg_prep
dmg_package to wireshark_dmg

Add logwolf_app_bundle, logwolf_dmg_prep, and logwolf_dmg targets and
packaging assets. Update the documentation.

We need to add a set of Logwolf version variables to CMake and
make-version.pl. Add a static logwolf-version attribute to
attributes.adoc in the mean time.
2022-05-26 20:29:20 +00:00
João Valverde 8ff24c2b6e Lua: Add lrexlib-pcre2 Lua regex bindings
Add the de facto standard Lua regex API to Wireshark. Upstream
code is copied verbatim and the module opened in the "rex" table.
This is just a user convenience and developer quality of life improvement
over the GRegex Lua API because it has always been possible to
load lrexlib-pcre2 as a Lua module from Wireshark.
2022-05-26 10:09:13 +00:00
João Valverde e6da2cd8de Lua: Remove on-life-support GRegex bindings
This code has been unmaintained and does not pass the lrexlib test
suite. GRegex itself has been obsolescent for some time, although GNOME
has recently restarted trying to move it to PCRE2.

Remove it in preparation for a move to lrexlib-pcre2.
2022-05-26 10:09:13 +00:00
Gerald Combs e5fc7c1d83 Tools: Switch to a new Windows development library repository.
Download our third party libraries and drivers from dev-libs.wireshark.org
in win-setup.ps1. Automatically check our state based on our library
filenames and hashes instead of a manually updated tag.
2022-05-24 16:53:49 +00:00
João Valverde 66506483bf Minor release notes clean up
Add a new item about field references and reorganize the
list roughly by relevance.
2022-05-24 01:35:23 +01:00
João Valverde 51de43cfd2 dfilter: Fix protocol slices with negative indexes
Field infos have a length property that was not stored with the
field value so when using a negative index the end was computed
from the captured length of the frame tvbuff, leading to incorrect
results. The documentation in wireshark-filter(5) describes how
this was supposed to work but as far as I can tell it never worked
properly.

We now store the length and use that (when it is different from -1)
to locate the end of the protocol data in the tvbuff. An extra wrinkle
is that sometimes the length is set after the field value is created.
This is the most common case as the majority of protocols have a
variable length and dissection generally proceeds with a TVB subset from
the current layer (with offset zero) through all remaining layers to the
end of the captured length. For that reason we must use an expedient to allow
changing the protocol length of an existing protocol fvalue, whenever
proto_item_set_len() is called.

Fixes #17772.
2022-05-23 23:04:07 +01:00
Gerald Combs b4376b4533 Git+docs: Ignore and document CMakeListsCustom.txt. 2022-05-23 20:19:15 +00:00
Gerald Combs cc6a749fda Docs: Document packaging/debian.
The debian directory was moved to packaging/debian in 79da670bd1. Update
the documentation to match. Ping #18097.
2022-05-17 09:16:48 -07:00
Gerald Combs f238dec118 GitLab CI: Switch the Windows packages to Qt 6.2.3.
Qt 6.2.4 has a serious display enumeration bug on Windows (QTBUG-101203).
Switch to 6.2.3.

Fixes #18091.
2022-05-16 09:44:02 -07:00
Gerald Combs d5f99ef126 [Automatic update for 2022-05-15]
Update manuf, services enterprise numbers, translations, and other items.
2022-05-15 16:59:34 +00:00
Gerald Combs a42f8ea7f4 Docs: Add a section on automatic updates to the User's Guide.
Move in the update text from the Windows section and add a description
of our update channels.
Ping #17728.
2022-05-12 11:18:54 -07:00
John Thacker 2e5a78dc64 text2pcap: Switch default file format to pcapng
For the upcoming 4.0 release, switch the default file format for
text2pcap to pcapng from pcap, to match other tools and the GUI
behavior. Update the documentation and release notes appropriately.

Deprecate the old -n flag; since pcapng is the default this has no
effect. Changing the output capture file format is supported with
the -F option, consistent with the other command line tools.

Related to #18009.
2022-05-12 16:20:40 +00:00
João Valverde b602911b31 dfilter: Add support for universal quantifiers
Adds the keywords "any" and "all" to implement the quantification
to any existing relational operator.

Filter: all tcp.port in {100, 2000..3000}

Syntax tree:
 0 ALL TEST_IN:
   1 FIELD(tcp.port)
   1 SET(#2):
     2 FVALUE(100 <FT_UINT16>)
     2 FVALUE(2000 <FT_UINT16>) .. FVALUE(3000 <FT_UINT16>)

Instructions:
00000 READ_TREE		tcp.port -> reg#0
00001 IF_FALSE_GOTO	5
00002 ALL_EQ		reg#0 === 100 <FT_UINT16>
00003 IF_TRUE_GOTO	5
00004 ALL_IN_RANGE	reg#0 in { 2000 <FT_UINT16> .. 3000 <FT_UINT16> }
00005 RETURN
2022-05-12 14:26:54 +01:00
Gerald Combs 565670c1c8 Version: 3.7.0 → 3.7.1
[skip ci]
2022-05-11 13:12:42 -07:00
Gerald Combs 0bde1e795a Build: 3.7.0
[skip ci]
2022-05-11 10:24:58 -07:00
John Thacker 81c67b3e05 packaging: Provide workaround for rpm-package from source tarball
Users might want to download a source tarball and build an RPM
package from it.

Have git-export-release.sh use git-archive's 'export-subst' feature
so that it can detect whether it is being run from a git repository
versus run from source extracted from a tarball produced by git-archive.

In the latter case, produce a helpful console message telling the
user to copy the downloaded tarball into the binary directory so
that the rpm-package target can succeed. Also update the Developer's
Guide to suggest this as well.

We could try to create our own archive using tar, but there are
several possible gotchas, such as in-source builds, excluding a build
directory that is a subdirectory of the source dir, excluding unknown
different build directories from previous builds, dealing with different
options in different versions of tar, etc. This is good enough for
the common case, and anyone who wants something more complicated can
hopefully create their own tarball.

Fix #15167
2022-05-06 00:13:28 +00:00
Odysseus Yang 36e834b6b7 ETW: Extract IP packets from Windows event trace
With this change, Wireshark will be enhanced to display IP packets from an event trace logfile
or an event trace live session.
2022-05-05 13:35:47 +00:00
João Valverde 4f3f507eee dfilter: Add syntax to match specific layers in the protocol stack
Add support to display filters for matching a specific layer within a frame.
Layers are counted sequentially up the protocol stack. Each protocol
(dissector) that appears in the stack is one layer.

LINK-LAYER#1 <-> IP#1 <-> TCP#1 <-> IP#2 <-> TCP#2 <-> etc.

The syntax allows for negative indexes and ranges with the usual semantics
for slices (but note that counting starts at one):

    tcp.port#[2-4] == 1024

Matches layers 2 to 4 inclusive.

Fixes #3791.
2022-04-26 16:50:59 +00:00
Gerald Combs c3d9f11b8b Docs: Remove "win32" references from the guides.
Ping #17779.
2022-04-24 23:39:58 +00:00
Chuck Craft bd02037042 wsdg: main_window .cpp filename changes
Update link to Gnome Human Interface Guide
2022-04-24 07:10:07 +00:00
Roland Knall 1278af07c3 Qt: Improve UIX for sparklines
Sparklines should display to the user, which interfaces are active
and ready for capture. Additionally it should be easy to find active
interfaces, without filtering first.

This change reorders the interface list, in order to sort active
interfaces on top, as well as hide information if no packet has been
received on that interface, to ensure that the user can find active
interfaces faster, making it easier to capture on systems where
the interfaces have very generic names.

The interface context menu has been amended to allow interfaces to be
hidden/unhidden from the main interface list as well
2022-04-21 15:41:12 +00:00
Gerald Combs b491d28c42 GitLab CI+release notes: Remove 32-bit Windows.
Note that we no longer ship 32-bit Windows packages in the release
notes.

Remove our 32-bit Windows and CentOS 7 jobs.
2022-04-20 19:26:13 +00:00
Jack Kaplan 05d33b9690 WSUG: removed extra "or".
Removed extra or to improve grammatical correctness.
2022-04-19 11:16:51 +00:00
Gerald Combs 69b9c480fd Revert "wsutil: Use a separate "extlog" directory for Logwolf extcaps."
This reverts commit 54553de59d.

As noted in !6694, it would probably make more sense to handle this a
different way.
2022-04-18 16:46:20 -07:00
João Valverde fab32ea0cb dfilter: Allow arithmetic expressions as function arguments
This allows writing moderately complex expressions, for example
a float epsilon test (#16483):

Filter: {abs(_ws.ftypes.double - 1) / max(abs(_ws.ftypes.double), abs(1))} < 0.01

Syntax tree:
 0 TEST_LT:
   1 OP_DIVIDE:
     2 FUNCTION(abs#1):
       3 OP_SUBTRACT:
         4 FIELD(_ws.ftypes.double)
         4 FVALUE(1 <FT_DOUBLE>)
     2 FUNCTION(max#2):
       3 FUNCTION(abs#1):
         4 FIELD(_ws.ftypes.double)
       3 FUNCTION(abs#1):
         4 FVALUE(1 <FT_DOUBLE>)
   1 FVALUE(0.01 <FT_DOUBLE>)

Instructions:
00000 READ_TREE		_ws.ftypes.double -> reg#1
00001 IF_FALSE_GOTO	3
00002 SUBRACT		reg#1 - 1 <FT_DOUBLE> -> reg#2
00003 STACK_PUSH	reg#2
00004 CALL_FUNCTION	abs(reg#2) -> reg#0
00005 STACK_POP	1
00006 IF_FALSE_GOTO	24
00007 READ_TREE		_ws.ftypes.double -> reg#1
00008 IF_FALSE_GOTO	9
00009 STACK_PUSH	reg#1
00010 CALL_FUNCTION	abs(reg#1) -> reg#4
00011 STACK_POP	1
00012 IF_FALSE_GOTO	13
00013 STACK_PUSH	reg#4
00014 STACK_PUSH	1 <FT_DOUBLE>
00015 CALL_FUNCTION	abs(1 <FT_DOUBLE>) -> reg#5
00016 STACK_POP	1
00017 IF_FALSE_GOTO	18
00018 STACK_PUSH	reg#5
00019 CALL_FUNCTION	max(reg#5, reg#4) -> reg#3
00020 STACK_POP	2
00021 IF_FALSE_GOTO	24
00022 DIVIDE		reg#0 / reg#3 -> reg#6
00023 ANY_LT		reg#6 < 0.01 <FT_DOUBLE>
00024 RETURN

We now use a stack to pass arguments to the function. The
stack is implemented as a list of lists (list of registers).
Arguments may still be non-existent to functions (this is
a feature). Functions must check for nil arguments (NULL lists)
and handle that case.

It's somewhat complicated to allow literal values and test compatibility
for different types, both because of lack of type information with
unparsed/literal and also because it is an underdeveloped area in the
code. In my limited testing it was good enough and useful, further
enhancements are left for future work.
2022-04-18 17:10:31 +01:00
João Valverde eb2a9889c3 dfilter: Add abs() function
Add an absolute value function for ftypes.
2022-04-18 17:09:00 +01:00
João Valverde cef02cc3a0 dfilter: Add max()/min() tests and documentation 2022-04-14 13:07:41 +00:00
Moshe Kaplan 1e352c3e7b manpage: Fix grammar errors and improve phrasing
Quickly review of fixing common grammatical errors in
the man pages.
2022-04-13 03:39:56 +00:00
John Thacker 7a3c2252f5 hierarchy stats: Only increment the total packet count once per frame
The same hierarchy of protocols can appear multiple times in a frame,
for example if there are multiple PDUs for a protocol that begin in
that frame. Keep track of the last frame where we incremented our
stat node and use that to only increment it once per frame.

Add a "total number of PDUs with this hierarchy" statistic and
display it as a new final column in the GUI. Update the User Guide.

In the purpose of doing this, get rid of temporary variables and
increment the ph_stats_t members directly, since we pass that
into our functions already, and thus have access to the current
packet count.

Fix #17553. Fix #18034. Fix #12565.
2022-04-12 13:38:33 +00:00
Gerald Combs 1c9538624f [Automatic update for 2022-04-10]
Update manuf, services enterprise numbers, translations, and other items.
2022-04-10 19:23:47 +00:00
João Valverde fb9a176587 dfilter: Allow grouping arithmetical expressions with { }
This removes the limitation of having only two terms in an
arithmetic expression and allows setting the precedence using
curly braces (like any basic calculator).

Our grammar currently does not allow grouping arithmetic expressions
using parenthesis, because boolean expressions and arithmetic
expressions are different and parenthesis are used with the former.
2022-04-08 23:12:04 +01:00
Chuck Craft b52437ba28 WSUG/tshark: protocol summary and output with "-e" 2022-04-08 19:40:43 +00:00
Gerald Combs 54553de59d wsutil: Use a separate "extlog" directory for Logwolf extcaps.
If we're running in the Logwolf configuration namespace, look for
extcaps in a directory named "extlog". This paves the way for adding
log-specific capture utilities.
2022-04-07 21:41:36 +00:00
João Valverde cc5726b63f dfilter: Remove leading colon special meaning
Instead of saying a leading colon will make any token a literal
value, say it is part of the syntax of bytes arrays. This is
useful to write bytes without a separator, and other potentially
ambiguous formats.

The restriction in meaning to bytes and simple numeric values
should make the rules for handling a leading colon (specifically
ommiting it or not) saner without much loss of functionality.
2022-04-07 00:16:07 +01:00
Gerald Combs a212b86222 Docbook: Update the Logwolf quick start.
Fix some spelling errors and paths.
2022-04-04 20:43:59 +00:00
João Valverde 34ad6bb478 dfilter: Make logical AND higher precedence than logical OR
In most, if not all, programming languages logical AND has
higher precedence than logical OR. Apply the principle of
least surprise and do the same for Wireshark display
filters.

Before: ip and tcp or udp => ip and (tcp or udp)

    Filter: ip and tcp or udp

    Instructions:
    00000 CHECK_EXISTS	ip
    00001 IF_FALSE_GOTO	5
    00002 CHECK_EXISTS	tcp
    00003 IF_TRUE_GOTO	5
    00004 CHECK_EXISTS	udp
    00005 RETURN

After: ip and tcp or udp => (ip and tcp) or udp

    Filter: ip and tcp or udp

    Instructions:
    00000 CHECK_EXISTS	ip
    00001 IF_FALSE_GOTO	4
    00002 CHECK_EXISTS	tcp
    00003 IF_TRUE_GOTO	5
    00004 CHECK_EXISTS	udp
    00005 RETURN
2022-04-04 19:51:38 +00:00
Gerald Combs 5c769757ff Docbook: Add a Logwolf quick start. 2022-04-04 09:39:27 -07:00
João Valverde 15cc673c8e Fix release notes 2022-03-31 23:56:33 +01:00
João Valverde 2a9cb588aa dfilter: Add binary arithmetic (add/subtract)
Add support for display filter binary addition and subtraction.

The grammar is intentionally kept simple for now. The use case
is to add a constant to a protocol field, or (maybe) add two
fields in an expression.

We use signed arithmetic with unsigned numbers, checking for
overflow and casting where necessary to do the conversion.
We could legitimately opt to use traditional modular arithmetic
instead (like C) and if it turns out that that is more useful for
some reason we may want to in the future.

Fixes #15504.
2022-03-31 11:27:34 +01:00
João Valverde 3c2c6b175f Minor release notes cleanup. 2022-03-30 13:59:45 +00:00
Chuck Craft 4476db5798 zigbee/isis-clv/wsdg: depreciate -> deprecate
zigbee per Document 07-5356-19
Unchanged: packet-cfm.c per ITU standard
packet-opa-mad.c - unable to confirm status
2022-03-28 18:20:24 +00:00
Gerald Combs 2724806e50 Docbook: Update the code signing parts of the User's Guide.
We recently updated our Windows certificate. Update the User's Guide to
match.
2022-03-23 18:49:37 -07:00
Ryan Doyle 78656fe00f Redis RESP: REdis Serialization Protocol v2 dissector
This adds support for RESP v2.
2022-03-23 13:30:10 +00:00
Chuck Craft 8c2fdcb80b wsug: add Packet Diagram documentation
Release (uncomment) text added in 9b074122
Add popup menu text
Add screen shots and pngcrush per 9ed7568f
Update View menu screenshot to include Packet Diagram
2022-03-23 01:09:23 +00:00
Gerald Combs 829fb032e4 CMake: Add support for WIRESHARK_QT6_PREFIX_PATH.
If USE_qt6 is enabled, set CMAKE_PREFIX_PATH to WIRESHARK_QT6_PREFIX_PATH
if it's defined. This lets you more easily switch between Qt 5 and
6 builds. Note that we have experimental support for Qt 6 in the
Developer's Guide.
2022-03-22 22:01:33 +00:00
João Valverde 16729be2c1 dfilter: Add bitwise masking of bits
Add support for masking of bits. Before the bitwise operator
could only test bits, it did not support clearing bits.

This allows testing if any combination of bits are set/unset
more naturally with a single test. Previously this was only
possible by combining several bitwise predicates.

Bitwise is implemented as a test node, even though it is not.
Maybe the test node should be renamed to something else.

Fixes #17246.
2022-03-22 12:58:04 +00:00
easonweii 304dae33d6 doc: Corrected an error in the Wireshark test guide
Corrected the description of Wireshark Tests section in Wireshark Developer's Guide.
2022-03-14 18:23:16 +00:00
Gerald Combs 24420ceb47 [Automatic update for 2022-03-13]
Update manuf, services enterprise numbers, translations, and other items.
2022-03-13 16:46:10 +00:00
Moshe Kaplan 9b49cbff29 WSUG: Fix numerous grammar issues 2022-03-13 14:40:54 +00:00
Moshe Kaplan 2579599287 WSUG: Clarify Packet Details context menu
Clarify phrasing for the Packet Details context menu.
2022-03-12 21:39:20 +00:00
João Valverde 7ea63a134e WSUG: Add a sub-chapter about new display filter syntax
Explain how the optional explicit syntax works and in which
cases it might be useful.
2022-03-09 12:36:52 +00:00
João Valverde 8983dda8f2 dfilter: Deprecate "~=" (any_ne)
The representation "~= has been superseded by "!==" with the same
meaning, making it superfluous and somewhat confusing. Deprecate
"~=" and recommend "!==" instead.
2022-03-09 11:28:39 +00:00
Gerald Combs e482b375f2 Rename the "image" directory to "resources".
The "image" directory contains resource compiler assets and other
application resources, so name it "resources."
2022-03-09 02:07:51 +00:00
Moshe Kaplan 9fe01522e1 WSUG: Fix numerous grammar issues
* Add missing commas and hyphens
* Remove extra apostrophes
* Use consistent spelling for some
* English words like gray/grey
and behavior/behaviour
* Remove that "Control" is "Strg" in German.
* Correct usage of a vs an
* Minor rephrasing in a few locations
2022-03-09 01:47:34 +00:00
Gerald Combs 1677e0a8f9 Packaging: Ship macOS dSYMs in their own .dmg.
Create a Wireshark.dSYM bundle for our debugging symbols. Create a
separate .dmg for the dSYM bundle, similar to what we do for Windows.
`dwarfdump --uuid run/Wireshark.dSYM` returns what app

This reduces the size of the application bundle and .dmg quite a bit
(sizes measured with `du -sm`):

51	Wireshark 3.7.0 Intel 64.dmg
81	Wireshark dSYM 3.7.0 Intel 64.dmg
182	Wireshark.app
262	Wireshark.dSYM
2022-03-05 14:32:53 -08:00
João Valverde bd48f947b0 dfilter: Require a field-like value on the LHS
Comparisons require a field-like value on one of the sides,
or both. Change this to require on the LHS or both. There is
realy no reason that I can see to allow the relation to commute,
and it allows removing a lot of unnecessary code and extra tests.
2022-03-05 11:10:54 +00:00
João Valverde 6d520addd1 dfilter: Add special syntax for literals and names
The syntax for protocols and some literals like numbers
and bytes/addresses can be  ambiguous. Some protocols can
be parsed as a literal, for example the protocol "fc"
(Fibre Channel) can be parsed as 0xFC.

If a numeric protocol is registered that will also take
precedence over any literal, according to the current
rules, thereby breaking numerical comparisons to that
number. The same for an hypothetical protocol named "true",
etc.

To allow the user to disambiguate this meaning introduce
new syntax.

Any value prefixed with ':' or enclosed in <,> will be treated
as a literal value only. The value :fc or <fc> will always
mean 0xFC, under any context. Never a protocol whose filter
name is "fc".

Likewise any value prefixed with a dot will always be parsed
as an identifier (protocol or protocol field) in the language.
Never any literal value parsed from the token "fc".

This allows the user to be explicit about the meaning,
and between the two explicit methods plus the ambiguous one
it doesn't completely break any one meaning.

The difference can be seen in the following two programs:

    Filter: frame == fc

    Constants:

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF-FALSE-GOTO	5
    00002 READ_TREE		fc -> reg#1
    00003 IF-FALSE-GOTO	5
    00004 ANY_EQ		reg#0 == reg#1
    00005 RETURN

    --------

    Filter: frame == :fc

    Constants:
    00000 PUT_FVALUE	fc <FT_PROTOCOL> -> reg#1

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF-FALSE-GOTO	3
    00002 ANY_EQ		reg#0 == reg#1
    00003 RETURN

The filter "frame == fc" is the same as "filter == .fc",
according to the current heuristic, except the first form
will try to parse it as a literal if the name does not
correspond to any registered protocol.

By treating a leading dot as a name in the language we
necessarily disallow writing floats with a leading dot. We
will also disallow writing with an ending dot when using
unparsed values. This is a backward incompatibility but has
the happy side effect of making the expression {1...2}
unambiguous.

This could either mean "1 .. .2" or "1. .. 2". If we require
a leading and ending digit then the meaning is clear:
    1.0..0.2 -> 1.0 .. 0.2

Fixes #17731.
2022-03-05 11:10:54 +00:00
Huang Qiangxiong 0d0c1ceead Protobuf: Support to display JSON mapping for Protobuf message
Add option display_json_mapping, that make a new JSON view of
this protobuf message displayed.

close #17797
2022-03-03 14:47:32 +00:00
Huang Qiangxiong c3dea0b98e GRPC: Add support for gRPC-Web
Supporting both application/grpc-web and application/grpc-web-text.
Add test case for grpc-web(-text).

close #17939
2022-03-01 10:19:47 +00:00
John Thacker 939972800e Strip Headers: Add separate menu dialog, tshark help
Add a separate menu for Strip Headers (similar to Export PDU, but exporting
to an encapsulation other than WIRESHARK_UPPER_PDU everything for
that encapsulation). Add to the usage output of tshark for the "-U"
option which encapsulation a export tap will produce.
2022-02-25 20:29:16 -05:00
John Thacker cbf76ea22f Export PDU: Allow native encapsulations / strip headers
Allow export PDU taps to be registered with a wiretap encapsulation
instead of always using WTAP_ENCAP_WIRESHARK_UPPER_PDU. This allows
creating normal capture files that aren't tied to wireshark without
having to do a "editcap -C -L -T", as well as creating files in
formats other than pcapng and pcap with tshark.

Provide a couple sample implementations in Ethernet (WTAP_ENCAP_ETHERNET)
and IP (v4 and v6, WTAP_ENCAP_RAW_IP) that are the most common use cases.
(I can imagine a few others; WTAP_ENCAP_MPEG_2_TS could probably be
useful, for example.) Fixes #15141
2022-02-25 20:29:16 -05:00
João Valverde ef31431aeb dfilter: Add a true/false boolean representation
Minor code cleanup.
2022-02-23 23:37:47 +00:00
João Valverde 9cc3e7e1bb dfilter: Add support for binary literal constants
Example: 0b1001, 0B111000, etc.
2022-02-23 22:27:59 +00:00
John Thacker 1d84a092cf doc: Update text2pcap and Import from Hexdump doc
Update the text2pcap man page and the Import from Hexdump WSUG
page to clarify how to use it, for grammar, and to remove a few
things that are no longer relevant. (E.g., it's no longer the case that
files without an EOL don't work.)
Fix #15563, #15564.
2022-02-23 02:58:31 +00:00
Chuck Craft f07ff72f90 WSDG/WSUG: add missing asciidoc admonition icons
Closes #17474
2022-02-14 18:24:17 +00:00
Gerald Combs 79da670bd1 Packaging+GitLab CI: Move debian to the packaging directory.
We keep our various packaging assets in the "packaging" directory. Move
the Debian assets there. dpkg-buildpackage doesn't seem appear to have a
"debian directory path" option, but symlinking worked in my test
container.
2022-02-13 13:21:58 -08:00
Gerald Combs 4e3b2ec007 [Automatic update for 2022-02-13]
Update manuf, services enterprise numbers, translations, and other items.
2022-02-13 16:39:57 +00:00
Gerald Combs e1dbf36519 Docs: Add new protocols to the release notes. 2022-02-09 11:28:07 -08:00
Uli Heilmeier ad356d2672 WSUG: Fix TCP keep alive description
Fix description which flags are not set.
2022-02-03 20:38:05 +00:00
Gerald Combs 3abd163127 Docs: Start migrating the Developer's Guide to Visual Studio 2022. 2022-02-03 03:05:03 +00:00
Gerald Combs bbed034329 [Automatic update for 2022-01-30]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-30 18:14:08 +00:00
Will Aftring 6a99dacf54 Add Microsoft Cluster Route Control Protocol (MSRCP) 2022-01-27 21:15:49 +00:00
Gerald Combs fad709a582 Docs: Use modern Asciidoctor section IDs.
Change our legacy block anchors to section IDs as described at

https://docs.asciidoctor.org/asciidoc/latest/sections/custom-ids/
2022-01-17 18:56:26 +00:00
Gerald Combs 019f8aa26e Docbook: Fix some section ID / anchor markup.
Finish renaming ChSetupWin32 to ChSetupWindows. Make ChSetupWin32 a
proper secondary ID as described at

https://docs.asciidoctor.org/asciidoc/latest/sections/custom-ids/

Remove some obsolete IDs.
2022-01-16 18:19:53 +00:00
Gerald Combs 496a23a56a [Automatic update for 2022-01-16]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-16 16:40:05 +00:00
John Thacker d2fd2eeb31 text2pcap: encap types option (instead of link type)
Add an option to text2pcap to specify the encapsulation type
via wiretap encapsulation type short names instead of pcap
link layer types, similar to editcap.

Update the documentation to reflect this.
2022-01-16 04:27:03 +00:00
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
Gerald Combs e71ab6dde5 [Automatic update for 2022-01-09]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-09 16:38:45 +00:00
Gerald Combs bf7f6c19d5 WSDG: Update some winget notes.
Start tracking winget package support in comments in the Windows quick
setup section.
2022-01-09 10:17:26 +00:00
Guy Harris 06bc298fbd FAQ: point to the User's Guide section of the Npcap guide.
(Yes, the top-level page calls it the "User's Guide", but it has a
section called the "User's Guide", as well as an "Introduction" and
sections about development with Npcap and about the Npcap internals.)
2022-01-06 17:15:32 -08:00
Gerald Combs c65f0a5a15 Update our Npcap URLs.
The official Npcap web site is now https://npcap.com/. Update our URLs
to match. Fixes #17838.
2022-01-06 16:12:30 -08:00
j.novak@netsystem.cz e1a8f0119e Extcap prefs: Editor remembers empty values 2022-01-06 03:48:27 +00:00
Gerald Combs 74a9d3bb67 Docs: Fix release notes markup.
AsciiDoc headings need to start at the beginning of the line. Bump the
next version.
2022-01-04 20:34:13 +00:00
Gerald Combs fc2217aa39 WSDG: Add a warning about private forks.
It's not obvious that making a GitLab fork private will disassociate it
from the upstream repository, and it seems to have tripped up a couple
of people. Add a warning to the "Creating Merge Requests" section.
2022-01-04 06:41:05 +00:00
John Thacker 21465962fd text2pcap: Use common capture type flag
Support all possible file formats that wiretap writes, using the
same "-F" flag that other CLI tools like editcap, mergecap, and tshark
support. Default is still pcap for now; a future commit will switch
to pcapng and remove the "-n" option, to match other CLI tools.
2022-01-03 16:42:15 +00:00
João Valverde 119473eab3 CMake: Use more consistent naming for options
Having some options use DISABLE_ and others ENABLE_ is inconsistent
and difficult to remember. Use ENABLE_ instead consistently.

Frame-larger-than remains an exception.
2022-01-03 15:55:06 +00:00
Gerald Combs 17e4032e81 [Automatic update for 2022-01-02]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-02 16:39:07 +00:00
Gerald Combs 3cae0847fb Docs: Remove some Buildbot references. 2022-01-01 08:40:41 +00:00
João Valverde 019bb06268 Docs: Add some content about different equality operators
Add information about the different kind of comparisons with
multiple fields to the wireshark-filter man page.

Add some minimal information to the user guide. It would be
nice to have a section dedicated to this with some examples.
2021-12-31 15:33:32 +00:00
João Valverde e724a4baf6 dfilter: Use ISO8601 as the default time format
Change from a default custom time representation to ISO8601.
All the existing formats are still supported for backward-
compatibility.

Before:

  Filter: frame.time == "2011-07-04 12:34:56"

  Constants:
  00000 PUT_FVALUE	"Jul  4, 2011 12:34:56.000000000" <FT_ABSOLUTE_TIME> -> reg#1
  (...)

After:

  Filter: frame.time == "2011-07-04 12:34:56"

  Constants:
  00000 PUT_FVALUE	"2011-07-04 12:34:56+0100" <FT_ABSOLUTE_TIME> -> reg#1
  (...)
2021-12-31 15:01:41 +00:00
João Valverde 0047ca961f dfilter: Add support for entering time in UTC
Add the option to enter a filter with an absolute time
value in UTC. Otherwise the value is interpreted in
local time.

The syntax used is an "UTC" suffix, for example:

    frame.time == "Dec 31, 2002 13:55:31.3 UTC"

This also changes the behavior of "Apply Selected as filter".
Fields using a local time display type will use local time
and fields using UTC display type will be applied using UTC.

Fixes #13268.
2021-12-30 17:53:09 +00:00
j.novak@netsystem.cz 6c9cb8f3fa Prefs/Extcap: Added support for password which is never stored on the disk 2021-12-30 16:03:15 +00:00
John Thacker 021c25e22c text2pcap: Use standard log debug level
Remove the '-d' option from text2pcap, and move the two levels
of debug messages in text2pcap and text_import to either
LOG_LEVEL_DEBUG or LOG_LEVEL_NOISY as appropriate.
2021-12-30 01:17:06 +00:00
Gerald Combs 044c3a594b GitLab CI: Stop building 32-bit Windows Installer (.msi) packages.
The 32-bit Windows Installer / WiX / .msi packages make up a tiny
percentage of our downloads, and they take a non-trivial amount of time
to create. Stop building them. Ping #17779.
2021-12-29 18:19:11 +00:00
Chuck Craft 9a9a754378 Qt: byteview mouse hover highlights not selects 2021-12-28 20:39:11 +00: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
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
Gerald Combs b1d7775579 Fix some wiki file attachment URLs.
Wiki file attachment URLs changed when we migrated to GitLab. Update
the references in our code base to match.
2021-12-21 04:47:56 +00:00
Chuck Craft 392745c56f wsdg: chapter_libraries refresh - update URL; typos 2021-12-20 07:55:46 +00:00