Commit Graph

2612 Commits

Author SHA1 Message Date
Dirk Ziegelmeier dc5cb69409 Profinet plugin: Decode more r/w indexes 2022-02-11 20:16:07 +00:00
Dirk Ziegelmeier a17037de4b Profinet plugin: Update several enums
According to PN AL Protocol, Oct 2020
Indices, user structure identifier, channel error type, ext channel error types
2022-02-11 20:16:07 +00:00
Martin Mathieson 1f22c7e04c Trivial: change some formatting in hf item definitions 2022-02-04 11:56:24 +00:00
Martin Mathieson 3466798ed0 More mask/field-length fixes 2022-02-03 22:13:43 +00:00
John Thacker e0a11d0607 PROFINET: Fix incorrect API call, assertion
Fix two calls of proto_tree_add_item() when proto_tree_add_uint()
was meant. Passing the actual value of a field instead of an encoding
into proto_tree_add_item() has unexpected results. Fix #17909.

(The whole area of this dissector would probably be cleaner with
more calls to add_item(), but this is a smaller change consistent
with the rest.)
2022-01-29 23:39:20 -05:00
Martin Mathieson 19ec126687 check_typed_item_calls.py - Find all (but 3) items from calls. 2022-01-29 15:54:19 +00:00
Dirk Ziegelmeier de0fde6e46 Profinet Plugin: Improve dissecting PDPortDataReal block 2022-01-20 05:07:08 +00:00
Dirk Ziegelmeier 74255a072f Profinet plugin: Dissect Neighbors block 2022-01-20 05:07:07 +00:00
Dirk Ziegelmeier c1a2cbcf05 Profinet Plugin: Dissect OwnPort block 2022-01-20 05:07:07 +00:00
Dirk Ziegelmeier 74d522d8d3 Profinet Plugin: Decode PDPortDataRealExtended block 2022-01-20 05:07:07 +00:00
Dirk Ziegelmeier bb34f30d56 Profinet Plugin: Cleanup diagnosis data decoding 2022-01-20 05:07:07 +00:00
Dirk Ziegelmeier 5b666b874a Profinet Plugin: Add 10BASET1L and APL MAU Type 2022-01-20 05:07:07 +00:00
Dirk Ziegelmeier 6100e284cf Profinet Plugin: Update Block Type List
According to PN AL Protocol d24MU2 Oct 2020
2022-01-20 05:07:07 +00:00
Dirk Ziegelmeier 7efd80327d Profinet Plugin: Decode ControlBlockPlug 2022-01-20 05:07:07 +00:00
Dirk Ziegelmeier 239d9de7ad Profinet plugin: Correctly name ModuleDiffBlock bits 2022-01-20 05:07:07 +00:00
Dirk Ziegelmeier 6db8b0e4cc Profinet plugin: Decode QualifiedChannelDiagnosis 2022-01-20 05:07:07 +00:00
Moshe Kaplan 67f05835ca Fix more repeated words throughout
Fixes more repeated words seen throughout
the code base.
2021-12-31 22:50:40 +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
João Valverde 4448b6494e Add a ws_posix_compat.h header
Currently used to define ssize_t on platforms that lack it.

Fix some Windows build errors caused by moving the definition into a
separate header.

Fix some narrowing warnings on Windows x64 from changing the definition
of ssize_t from long int to int64_t.

The casts in dumpcap are ugly but necessary. The whole code needs
to be rewritten for portability, or the warnings disabled.
2021-12-21 01:30:06 +00:00
João Valverde 0ccd69e530 Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
2021-12-19 21:21:58 +00:00
João Valverde fe5248717f Replace g_snprintf() with snprintf()
Use macros from inttypes.h with format strings.
2021-12-19 20:06:13 +00:00
cacamille3 03224385b8 Added Invalid value to BrowseDirection enum 2021-12-06 05:39:29 +00:00
João Valverde 60e305d1e1 dfilter: Convert grammar.lemon to 4-space indentation
Add global EditorConfig settings for lemon files.

Add exceptions for the two grammar files that use tab indentation.
2021-12-02 15:48:40 +00:00
John Thacker ca71d1624c gryphon: Create pkt_info if it doesn't exist
Try to retrieve the per packet info data first, and create it if
it doesn't exist, rather than assuming it is there on the second
pass. Prevents segfaults in cases with strange TCP sequence issues
(that still show up as bugs in the TCP dissector.) Fix #17737.
2021-11-21 09:23:07 -05:00
João Valverde b30a2112e8 regex: Prefer C99/POSIX types
Replace 'gssize' with 'ssize_t'.

Add a CMake configure check for ssize_t.

Fix missing "config.h" includes.
2021-11-15 02:41:59 +00:00
Gerald Combs 87b84b7813 Lua is a proper name. Fix its capitalization. 2021-11-11 01:08:51 +00:00
João Valverde 1acae21bcd Windows: Fix warnings using flex
Fix some warnings complaining of macro redefinitions with stdint.h.
Include stdint.h via wireshark.h everywhere so it stays fixed.
2021-10-22 06:41:44 +00:00
Martin Mathieson a5df18e51e Fix some spelling errors 2021-10-11 04:44:49 +00:00
Martin Mathieson d8b28f8040 Fix some field mask widths. 2021-10-07 21:33:49 +00:00
Evan Huus 07f5472aa7 to_str: scope tvb_ip_to_str 2021-10-07 10:25:12 -04:00
Martin Mathieson b240d5baa0 Ethercat: try to fix EEPROM Ctrl/Status bitmask fields
Fixes remaining errors detected by

./tools/check_typed_item_calls.py --mask
2021-10-06 04:53:50 +00:00
Evan Huus e578c6caee to_str: pull scope arg up into tvb_ether_to_str
There are a bunch of near-identical macros here, but I'm gonna change
one at a time or else the builder times out at the number of files
changed in one merge.
2021-10-04 17:10:17 +00:00
Evan Huus 3cdada3e7b guids: wmem-scope lookups
Avoids the use of the global unprotected packet memory pool and lets the
compiler enforce scoping.
2021-09-28 15:07:55 -04:00
Roland Knall 0c7d82d8b7 USBDump: Fix Memleak with error info
The memory block the error was written to was uninitialized
2021-09-24 06:57:28 +00:00
Martin Mathieson fee630dbdc Fix the lengths of some masks. 2021-09-22 09:38:09 +01:00
Martin Mathieson 543ea3968c ethercat: Fix some too-wide mask widths.
N.B. Some other issues spotted have been reported in
https://gitlab.com/wireshark/wireshark/~/issues/17605
2021-09-21 11:04:31 +01:00
João Valverde 5f79503d67 Fix config.h include order
The header "config.h" needs to be the first header included in the
source file, no exceptions.
2021-09-20 20:16:52 +01:00
Evan Huus cdfab0d6e9 tvbuff: convert helper methods to pinfo->pool
A few of them just needed scratch memory, so allocate and free it
manually after doing any exception-raising checks.

A few others were returning memory, and needed conversion to accept a
wmem scope argument.
2021-09-01 03:54:52 +00:00
Guy Harris 3cb6403a4c wiretap: always allocate a block for a record.
Without that, you could add a comment to a record in a file format the
reading code for which doesn't allocate blocks, but the comment doesn't
get saved, as there's no block in which to save the comment option.

This simplifies some code paths, as we're either using the record's
modified block or we're using the block as read from the file, there's
no third possibility.

If we attempt to read a record, and we get an error, and a block was
allocated for the record, unreference it, so the individual file readers
don't have to worry about it.
2021-08-29 19:12:13 -07:00
Martin Mathieson 70e26d691e Some spelling fixes. 2021-08-27 22:21:40 +00:00
Vahap Emin Agaogullari c8d29e9f15 PROFINET: DCP Option dissection updated
DCP Frames with Reserved Option dissection changed
short time ago. There isn't a predefined suboption
for Reserved option in the standard. But in this
implementation it dissected like control suboption.
This is not true and creates malformed frames in some
dcp pcaps. This implementation is reverted.
Wireshark will dissect undefined bytes as paddings
just like before.
2021-08-26 05:28:35 +00:00
Guy Harris 1ab3711132 gryphon: explain in detail why we can't import tfs strings from libwireshark. 2021-08-25 17:29:59 -07:00
Evan Huus 9311982664 plugins: convert to pinfo->pool
Convert all plugin dissectors from wmem_packet_scope to pinfo->pool.
2021-08-25 14:30:47 +00:00
Guy Harris a70c120a04 gryphon: get rid of unused variables.
Found by cppcheck.
2021-08-25 08:57:47 +00:00
Martin Mathieson c0faa8f1da Some more dissector spellings. 2021-08-08 22:21:38 +01:00
ZhaoHao 272ed7a05a trailing whitespace 2021-08-06 06:53:38 +00:00
ZhaoHao 389e19f593 trail whitespace 2021-08-06 06:53:38 +00:00
ZhaoHao 7c27bce458 format the code 2021-08-06 06:53:38 +00:00
ZhaoHao eadcd5f080 add profidrive 2021-08-06 06:53:38 +00:00
João Valverde 7b845e7194 wsutil: rename bytestring_to_str() -> bytes_to_str_punct() 2021-07-29 17:23:05 +00:00