libvirt/tools/wireshark
Michal Privoznik caa9560c15 wireshark: Prefer ws_version.h over config.h
A wireshark plugin must declare what major and minor version it
was built with as these are checked when wireshark loads plugins.
On the top of that, we use major + minor + micro to adapt to
changed API between releases. So far, we were getting these
version numbers from wireshark/config.h.

And while most distributions install wireshark/config.h file some
don't. On distros shipping it it's hack^Wsaved during built by
packaging system and installed later. But some distros are not
doing that. At least not for new enough wireshark because as of
wireshark's commit v2.9.0~1273 the ws_version.h is installed
which contains the version macros we need and is installed by
wireshark itself.

But of course, some distros which have new enough wireshark
packaged do not ship ws_version.h and stick to the hack. That is
why we can't simply bump the minimal version and switch to the
new header file. We need a configure check and adopt our code to
deal with both ways. At least for the time being.

Based on Andrea's original patch:

https://www.redhat.com/archives/libvir-list/2020-September/msg00156.html

Closes: https://gitlab.com/libvirt/libvirt/-/issues/74
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-09-08 10:58:24 +02:00
..
samples tools: wireshark: fix link to wireshark repo 2020-09-01 21:58:45 +02:00
src wireshark: Prefer ws_version.h over config.h 2020-09-08 10:58:24 +02:00
util Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00
meson.build meson: tools/wireshark: generate protocol header files 2020-08-03 09:27:05 +02:00
README.rst Prefer https: everywhere where possible 2020-09-01 21:58:46 +02:00

About

This is the project of Google Summer of Code 2013 accepted by QEMU.org and libvirt community. The goal of this project is, provide Wireshark dissector for Libvirt RPC protocol. It will provide Libvirt packet overview/detail analysing in Wireshark. Furthermore, it will be able to build(generated) from RPC protocol definition placed in Libvirt source tree to support latest protocol specification.

See also:

Installation

Run ./configure with --with-wireshark-dissector option enabled. Then dissector will compiled with libvirt itself.

Add/Remove protocol from dissector's support

Modify variable WS_DISSECTOR_PROTO_FILES in tools/wireshark/src/Makefile.am.

Changing installation directory

You can change installation directory of pluggable shared object(libvirt.so) by specifying --with-ws-plugindir=<path>.

You can install libvirt.so into your local wireshark plugin directory:

$ ./configure --with-wireshark-dissector \
              --with-ws-plugindir=$HOME/.wireshark/plugins