Commit Graph

84047 Commits

Author SHA1 Message Date
João Valverde 2fc8c0e36b dfilter: Handle a bitwise expr on the RHS 2022-03-23 11:04:41 +00:00
João Valverde 0335ebdc3a dfilter: ftype_is_true -> ftype_is_zero 2022-03-23 11:04:41 +00:00
Gerald Combs de0db2ad0a Qt: QVariant::type() is deprecated in Qt6.
Fix

ui/qt/rtp_stream_dialog.cpp:708:26: error: 'type' is deprecated: Use typeId() or metaType(). [-Werror,-Wdeprecated-declarations]
            } else if (v.type() == QVariant::String) {
                         ^

and similar errors. Although the warnings recommend typeId() or
metaType(), userType() exists in both Qt 5 and 6 so use it instead.
2022-03-23 09:30:49 +00:00
Gerald Combs ea11891f21 Qt: QMouseEvent::globalPos() is deprecated in Qt6.
Fix

ui/qt/tcp_stream_dialog.cpp:1669:31: error: 'globalPos' is deprecated: Use globalPosition() [-Werror,-Wdeprecated-declarations]
        ctx_menu_.exec(event->globalPos());
                              ^

and similar warnings.
2022-03-23 09:16:00 +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
Gerald Combs 0a351fb6ba Falco Bridge: Update the README.
Update the Licensing section of the README.
2022-03-22 17:51:32 +00:00
Gerald Combs e06864e777 Falco Bridge: Miscellaneous fixes.
Fix some issues found by the pre-commit script. Add a missing Debian
symbol. Update the README.
2022-03-22 17:51:32 +00:00
Gerald Combs 34cb45c743 Falco Bridge: Remove some unused code. 2022-03-22 17:51:32 +00:00
Gerald Combs 110dbffbe9 Rename Sysdig Bridge to Falco Bridge.
The Sysdig Bridge plugin loads Falco plugins, so rename it to Falco
Bridge.

Make it optional and dependent on libsinsp+libscap, similar to our codec
plugins.

Remove some unused code.
2022-03-22 17:51:32 +00:00
Gerald Combs be03aa1a4d CMake+Sysdig Bridge: Add a FindSinsp module.
Add a FindSinsp CMake module, and use it in the Sysdig Bridge plugin
CMakeLists.txt. It still needs work, but should at least be usable on
more machines.

Conflicts:
	plugins/epan/sysdig_bridge/CMakeLists.txt
2022-03-22 17:51:32 +00:00
Gerald Combs 90bd33e4e2 Sysdig Bridge: Make sure we fetch the correct field info.
Fetch the current field number's type and format instead of the first
field's.
2022-03-22 17:51:32 +00:00
Gerald Combs 3ae5ccbe52 Remove some debugging code. 2022-03-22 17:51:32 +00:00
Gerald Combs b9946577d6 Sysdig Bridge: Remove old code.
Remove commented & ifdef0'd code that loaded plugins directly. Destroy
our libsinsp instance on exit.
2022-03-22 17:51:32 +00:00
Gerald Combs 349c067414 Sysdig Bridge: Handle info and conversation fields.
Fix our field length display as well.
2022-03-22 17:51:32 +00:00
Gerald Combs bee0393a94 Sysdig Bridge: Switch to libsinsp/libscap.
Switch from loading the cloudtrail plugin directly to doing so
indirectly via libsinsp. This should let us start leveraging the rich
functionality offered by libsinsp.
2022-03-22 17:51:32 +00:00
Gerald Combs 9b106b500c Sysdig Bridge: Update the Sysdig Plugin fields.
Update the Sysdig Plugin fields to match falcosecurity/libs scap.c.
2022-03-22 17:51:32 +00:00
Gerald Combs 72b1e028a8 Sysdig Event: Find the sdplugin dissector once.
We only need to search for dissectors at startup while registering
handoffs.
2022-03-22 17:51:32 +00:00
Gerald Combs a075ce1be7 Sysdig bridge: Update a struct.
Update ss_plugin_extract_field to match

https://github.com/falcosecurity/plugin-sdk-go/blob/main/pkg/sdk/plugin_info.h
2022-03-22 17:51:32 +00:00
Gerald Combs 24aa07281a Sysdig bridge: Fix a couple of offsets.
It looks like the source ID and event data are 4 bytes further into each
block. Quick fix pending more details about the block format.
2022-03-22 17:51:32 +00:00
Gerald Combs 9a889e9546 Sysdig bridge: Set our plugin API version to 0.2.0. 2022-03-22 17:51:32 +00:00
Gerald Combs 70aed62c86 Sysdig bridge: Fix compilation.
Fix

logshark/plugins/epan/sysdig_bridge/packet-sysdig-bridge.c:86:39: error: this old-style function definition is not preceded by a prototype [-Werror,-Wstrict-prototypes]
register_conversation_filters_mappings()
                                      ^
1 error generated.
2022-03-22 17:51:32 +00:00
Mark Stemm 58e3976910 Use the plugin name as the protocol short name
Prior versions had a dedicated plugin API function for this, but we
removed it from the plugin API, so just use the plugin name.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-03-22 17:51:32 +00:00
Loris Degioanni 0555c413d1 Sysdig Bridge: Fix a memory allocation crash.
avoid moving plugin states around the address space by mallocing all of the memory at the beginning instead of using realloc every time a plugin is detected. This prevents crashes and other types of bad behavior that were caused by plugins accessing garbage memory.
2022-03-22 17:51:32 +00:00
Mark Stemm 39c8e1ac2c Use register_shutdown_routine, not cleanup_routine
register_cleanup_routine is called after reading a single capture
file. Since the async extraction is set up per plugin instead of
per-instance, we want register_shutdown_routine().

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-03-22 17:51:32 +00:00
Mark Stemm 5fdc4142b9 Update to use single extract_fields func
Update to reflect newest API changes (single extract_fields
func). This simplifies dissect_plg_bridge a bit, as the setup/calling
plugin function can mostly be unified based on the field type, with
just looking at the res_str/res_u64 part of the field struct
afterward.
2022-03-22 17:51:32 +00:00
Mark Stemm c34693bb20 Update to reflect latest plugins api changes
Although not used by wireshark directly, update
plugin_next/plugin_next_batch to note they return structs for events
instead of pointers + lens + timestamps.

Extract functions now use field names, so no need to extract or keep
track of field ids. The a "abbrev" property of header_field_info
contains the field name e.g. ct.xxx.
2022-03-22 17:51:32 +00:00
Mark Stemm 665a04e5e9 Update pluginevent to match falcosecurity/libs
It recently changed from 320 to 322, probably as a result of a rebase
to master, so reflect that change here.

It won't change once the plugin changes code is merged to master.
2022-03-22 17:51:32 +00:00
Loris Degioanni 8c3f436cc0 load the plugins from the wireshark directory 2022-03-22 17:51:32 +00:00
Loris Degioanni d226a7aa98 separate list of conversation filters for logshark
Conflicts:
	CMakeLists.txt
2022-03-22 17:51:32 +00:00
Loris Degioanni 2d6b0e8885 conversation-like filtering and coloring for sysdig plugins 2022-03-22 17:51:32 +00:00
Loris Degioanni de5f59d7a4 sysdig: initial implementation of sysdig plugins support
This commit introduces a new wireshark plugin which is able to act as proxy to sysdig plugins, loading them into Wireshark and transforming their output into dissectors that Wireshark can use to display the data.
2022-03-22 17:51:32 +00:00
Loris Degioanni 625a042ff8 initial skeleton for sysdig plugins experiments 2022-03-22 17:51:32 +00:00
Dario Lombardo a3877af990
debian: add missing symbol. 2022-03-22 17:14:38 +01:00
Joakim Karlsson 67a3256bcd rpcrdma: fix build issue [-Wmaybe-uninitialized] 2022-03-22 14:21:13 +00:00
Joakim Karlsson f07c30fffe CBOR: fix build issue [-Wmaybe-uninitialized] 2022-03-22 14:09:42 +00:00
Nardi Ivan 7c1dd842ff Diameter: improve IMEI/IMEISV dissection in User-Equipment-Info AVP
3GPP.User-Equipment-Info AVP should contain the IMEISV (if type is 0).
However some implementations put the IMEI there: decode it but display a
protocol error indication too.
2022-03-22 13:59:00 +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
Jaap Keuter 3e3db6cd3e CFM: Unindent dissector code by restructuring loop conditions
Include missing default switches to handle incorrect protocol values.
2022-03-22 07:37:02 +00:00
Gerald Combs 1e39a66746 etwdump: Clarify "ETW".
Not everyone knows what ETW is.
2022-03-21 15:35:48 -07:00
João Valverde 631cf34f0c dfilter: Use a function pointer array to free registers 2022-03-21 18:43:36 +00:00
Constantine Gavrilov 89a39134ff NVMeOF TCP: fix storing of QID for TCP protocol -- fix missing commit. 2022-03-21 18:31:21 +00:00
João Valverde 6a0129a0e3 dfilter: Fix EditorConfig settings 2022-03-21 17:49:12 +00:00
João Valverde 54d8627c9a dfilter: Add more comments to optimization pass 2022-03-21 17:36:41 +00:00
João Valverde d60f2580ba dfilter: Pass around constants in instructions
The DFVM instructions arguments are generic boxed types but instead
of using FVALUE and PCRE types the code passes aroung REGISTER types
instead. Change that to pass constants in the instruction.
2022-03-21 17:09:56 +00:00
João Valverde 94d909103e dfilter: Remove DFVM constant initialization 2022-03-21 17:09:43 +00:00
João Valverde ae17e733ac dfilter: Use more DFVM values in gencode 2022-03-21 17:09:29 +00:00
João Valverde 769f1f10de dfilter: Add DFVM value constructor 2022-03-21 17:09:19 +00:00
Constantine Gavrilov 402bd8f28d NVMeOF TCP: fix storing of QID for TCP protocol. 2022-03-21 16:21:43 +02:00
João Valverde 1b574e7466 dfilter: Cleanup dfvm_apply() 2022-03-21 12:38:09 +00:00