Commit Graph

2826 Commits

Author SHA1 Message Date
Stig Bjørlykke 6afe57a1b8 Remove parentheses from return bool
Remove use of parentheses from return bool statements.
2024-04-01 15:18:09 +00:00
Gerald Combs 5a9393c646 Switch our boolean preferences to bool
With the aid of a script, convert our boolean preferences from gboolean
to bool.

Ping #19116
2024-03-31 16:09:23 +00:00
Olaf Westrik ab26d00454 PROFINET plugin: init PE service_modifier always
On some platform builds gcc warns about unitialized service_modifier.
2024-03-27 07:28:59 +01:00
Olaf Westrik 393197fdee PROFINET plugin: decode PEservice responses 2024-03-26 10:47:41 +00:00
Gerald Combs 2438e82c40 Clang-tidy: Enable recursion errors for dissectors and wiretap
Treat "misc-no-recursion" warnings as errors in epan/dissectors,
plugins, and wiretap.
2024-03-24 16:37:45 +00:00
Martin Mathieson b39cd257db Fix some spelling errors 2024-03-23 20:31:43 +00:00
Gerald Combs cd564f93e5 PNIO: Add a missing Clang-tidy suppression 2024-03-23 12:48:28 -07:00
Gerald Combs 6d4375846b Recursion updates for Gryphon, MATE, OpcUa, PNIO, and WiMAX ASN CP 2024-03-23 11:53:04 -07:00
John Thacker 13c8a2f887 Convert Wiretap to C99
This one is complicated because a gboolean is an int, but a bool
is not, in the way that a pointer to a bool (including in the
return of a function pointer) cannot be substituted for a pointer
to a gboolean. (They can convert a bool used internally to a gboolean
on return.)

Continue for that reason to have some functions return gboolean
when used with glib callback functions:
https://docs.gtk.org/glib/callback.HRFunc.html

Another small gotcha is that macros like UINT64_C are not necessarily
guaranteed to wrap the return in parentheses, which G_GUINT64_CONSTANT
and the like do.

In wtap.h, the file subtype "dump_open" function was typedef'd
as returning an int, but almost all users (except in wslua) returned
a gboolean. Switch it to a bool.

Make a note about why can_write_encap does not return a bool,
because it returns error codes on failure (for Lua) instead of
having the err as a separate parameter.

Update the usbdump wiretap plugin too.

A few places outside of wiretap use wiretap function pointers, such
as in the Lua interface, adding IP addresses to NRBs, merging, and
the frame dissector using wiretap functions. Switch those to bool.

Ping #19116
2024-03-20 20:48:19 +00:00
Uli Heilmeier 6d10f6144e Falco Bridge: Dissect JSON objects for cloudtrail fields
libcloudtrail 0.12 add some fields where the value is a JSON object.
As the keys for each API call are individual, not all fields can be
defined in the plugin. We now call the JSON dissector for these fields
to have a generic dissection.
2024-03-15 21:54:32 +00:00
Olaf Westrik 1cb540d1f7 PROFINET plugin: add dissector for PROFIenergy service request/response 2024-03-04 11:26:59 +00:00
Martin Mathieson e0300eaed8 Fix lots of spellings 2024-02-25 22:46:47 +00:00
John Thacker e911f8ec9d stats tree: Update plugins for new path separator
Update the pinfo stats tree plugin and the F5 trailer for
the new stats tree path separator

Follow up to 53638f9ccf
2024-02-21 00:23:47 +00:00
Gerald Combs 53638f9ccf Stats tree: Change our path separator
Change our menu path separator to "//" similar to our filter buttons.
Change the "name" configuration element to "path", since it's a menu
path. Add a separate "title" element. This lets us use names like "Foo
I/O".
2024-02-14 08:05:24 +00:00
Gerald Combs a018829a36 Falco bridge: Sort our Container I/O totals 2024-02-12 10:47:55 -08:00
Gerald Combs 0e5416efbe Falco bridge: Fix our default container name
Use "host" to match libsinsp.
2024-02-12 08:42:23 -08:00
Gerald Combs 920d2774bf stats_tree API updates
Add an opaque public type for stats_tree configurations. Get rid of
stats_tree_register_with_group and add stats_tree_set_group. Add
stats_tree_set_first_column_name. Convert some documentation to doxygen.
2024-02-12 12:53:48 +00:00
Gerald Combs 319101f544 Falco bridge: Make sure our strings are UTF-8 2024-02-09 17:46:40 -08:00
Gerald Combs 5e10272450 Falco bridge: Add container I/O stats 2024-02-09 13:59:46 -08:00
Gerald Combs 57a1be8873 Falco bridge: Skip some more syscall fields 2024-02-09 13:32:23 -08:00
Gerald Combs d3c837f6e0 Falco bridge: Fix a couple of integer casts 2024-02-08 13:17:21 -08:00
Gerald Combs 98ebebec80 Sysdig Event+Falco Bridge: Highlight I/O data
Pass the sysdig.param.asyncevent.data start and offset to the Falco Bridge
dissector, and use that to highlight the evt.buffer and fd fields.

Pass the data to the ELF dissector if we find an ELF magic ID.
2024-02-07 16:55:04 -08:00
Gerald Combs 2a73e99cfb Falco bridge: Syscall conversation updates
Add a pinfo conversation filter which enables related packets based on
(container.id, proc.id) combinations. Register the "Process" conversation
filter first so that the "Go" menu behavior matches the related packet
display.

Handle cases where container.id is missing.

Add 64-bit integer type support to conversations.
2024-02-06 12:24:28 -08:00
Martin Mathieson 714e568f66 Fix some more spelling errors 2024-02-06 10:46:08 +00:00
John Thacker 7b114620c7 opcua: Have a default signature length preference
If the OpenSecureChannel message is not captured, then whether
messages are signed, and what the signature length is is unknown.
This creates a preference that can be set to a default value to use,
instead of assuming that all messages on the channel are unsigned.

Fix #15206
2024-02-05 08:30:57 +00:00
Darius Davis 89ce06c459 Fix a grab-bag of typos.
One of these modifies a field name ("hart_ip.pt.rsp.transducer_serail_number"
in packet-hartip.c), a few are in text displayed for fields (in packet-nvme.c)
or for unknown fields (in packet-oer.c and packet-per.c), one is in a
preprocessor macro (in packet-cip.[ch]), and the rest are all in comments.

   arry -> array
   authos -> authors
   compatability -> compatibility
   contigous -> contiguous
   dispaly -> display
   erorr -> error
   filed (where it was obviously incorrect) -> field or filled
   hueristic -> heuristic
   regsiter -> register
   serail -> serial
2024-02-05 11:58:31 +10:00
Gerald Combs 126c95fe2b Falco bridge: Set our sinsp buffer format
Set our buffer format to PF_EOLS_COMPACT, which seems to offer the
closest thing to raw data.
2024-02-03 01:01:22 +00:00
Gerald Combs d053622cea Falco bridge: Allocate our tap data 2024-01-31 09:50:36 -08:00
Gerald Combs 3588090b2a Falco bridge+falcodump: Various fixes
Fix building with Visual C++ and recent versions of falco-libs.
2024-01-31 00:03:48 +00:00
John Thacker 28e9035eec MATE: Update examples
Fix the distributed examples to use the "new" style configuration,
as shown in the WSUG and Wiki. Fix the FTP example in the WSUG,
as it's missing the Match keyword

Related to #12118.
Fix #16940
2024-01-30 16:05:15 +00:00
John Thacker 4ec5c7f78f MATE: Handle fields that are in different data sources
In addition to the start and end offset locations, store a pointer to
the data source tvb in each mate_range. The start and end offsets
are only relevant within a data source.

If a field has a data source different from one of the protocol,
transport protocol, or payload ranges, search in the tree for the
ancestor nodes of the field, and see if an ancestor is located within
one of the ranges.

In order to workaround #17877 (non-visible items can't change length
after being added to the tree, which affects most protocols), set
the tree as visible similar to done with a number of Lua postdissectors
that need all fields. Unfortunately this is overkill that hurts
performance.

Fix #19619
2024-01-30 10:28:32 +00:00
Gerald Combs 3e519a0385 Falco bridge: Correctly handle trailing internal events 2024-01-29 14:27:19 -08:00
Martin Mathieson 4571d9f194 Fix more FT_BOOLEAN items with no mask - set len to BASE_NONE 2024-01-25 22:01:03 +00:00
Loris Degioanni 78a8793cbc "Follow" implementation in logray
Add a syscall-oriented follow window to logray, which shows the read/write buffers of the currently selected file descriptor.
2024-01-23 20:07:11 +00:00
Martin Mathieson 651122a798 Undo some more double colons 2024-01-20 15:11:08 +00:00
Gerald Combs 8d79ea2f0d Falco bridge: Improve our internal event detection 2024-01-17 18:50:33 -08:00
David Perry bf909bf93e Add descriptions for heur dissector tables
Build on !13975 to add human-readable descriptions for all heuristic
dissector tables in Wireshark.

Chosen names are meant to give some info on when a heuristic dissector
lookup will be made. Terms like 'fallback' are used when the heuristic
is only consulted if other checks do not result in dissection, for
example.

People with more intimate knowledge of the protocols and dissectors
involved are encouraged to suggest or implement better descriptions.
2024-01-17 08:35:43 +00:00
Gerald Combs bcfa25bdfc Falco bridge: Add a quick CPU+PID cache
Try caching strings based on their CPU ID, PID, and field index. This
lets us use a constant 64-bit key before spending CPU time hashing
strings. This saves about 500ms when loading a test capture here.
2024-01-16 18:25:51 +00:00
Loris Degioanni f374ddf2fb Falco bridge: Add conversation filters
Add conversation filters for container, process, process, process and
descendant, thread and FD.
2024-01-13 15:04:47 -08:00
Gerald Combs 06f80366d5 Falco bridge: Update our memory stats 2024-01-13 22:11:27 +00:00
John Thacker d4bc9d4036 opcua: Parse more Server and Client Certificates
Even though these files are generated and warn not to change
them, the generator is not working currently, so patch them.
(See the disscussion in !14000)
2024-01-13 01:30:58 +00:00
Gerald Combs eec059c598 Falco bridge: Use ws_strtoi
Fetch an integer value using ws_strtoi. This saves about 400ms when
loading a test capture here.
2024-01-12 14:19:42 -08:00
John Thacker 9152670fe5 opcua: Use fragment_add_seq_offset
This is the reassembly API call for fragments that start at a
different value. This is better than examining the entire
chain, and also would have a better chance of working with
out of order fragments (though TCP should handle that for us.)
2024-01-12 14:18:13 +00:00
Gerald Combs 3c62d285ac Falco bridge: Use g_str_hash
Use g_str_hash for our string interning. This reduces the load time for
a large file here from ~13s to ~10s.
2024-01-12 02:06:19 +00:00
Gerald Combs 8f3756431f Falco bridge: Remove an unused struct member 2024-01-11 15:11:35 -08:00
John Thacker 7ce05b9dd7 opcua: X.509 Certificate dissection
Dissect the X.509 v3 Certificates used in OPC UA.

Use proto_tree_add_bytes_with_length for adding NULL bytes to
the tree with a (0) length different than the length taken up
in the tvb. It's somewhat nicer than changing the item length later.
2024-01-11 10:30:30 -05:00
Gerhard Gappmeier 76f6b5285d opcua: fix payload size for unencrypted chunked messages
fixes #19581
also fix one typo
2024-01-11 14:37:25 +00:00
Gerald Combs 73bf0d5b23 Falco bridge: Minor performance improvement
Use a vector instead of a map. This reduces the load time for
a large file here from ~19s to ~13s.
2024-01-10 18:11:16 -08:00
Gerald Combs ba6f76e0d5 Falco bridge: Add a preference to show internal events 2024-01-10 16:29:04 -08:00
Gerald Combs c659ffbed1 Falco bridge: Disable memory statistics debugging 2024-01-10 15:54:36 -08:00