Support the Wireshark plugin for more Wireshark distributions#183
Conversation
1486ce6 to
f054988
Compare
|
@Demogorgon314 Could you help verify this CMakeLists.txt work on macOS? Not sure if |
|
I tried it on macOS, and it has a compile error. ➜ wireshark git:(bewaremypower/wireshark-fix) ✗ cmake -B build -DWIRESHARK_INCLUDE_PATH=/opt/homebrew/Cellar/wireshark/4.0.3/include
-- Use WIRESHARK_INCLUDE_PATH: /opt/homebrew/Cellar/wireshark/4.0.3/include
-- Use GLIB_INCLUDE_DIRS: /opt/homebrew/Cellar/glib/2.74.5/include/glib-2.0;/opt/homebrew/Cellar/glib/2.74.5/lib/glib-2.0/include;/opt/homebrew/opt/gettext/include;/opt/homebrew/Cellar/pcre2/10.42/include
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/wangkai/Developer/github/pulsar-client-cpp/wireshark/build
➜ wireshark git:(bewaremypower/wireshark-fix) ✗ cmake --build build
[ 25%] Building CXX object CMakeFiles/pulsar-dissector.dir/pulsarDissector.cc.o
/Users/wangkai/Developer/github/pulsar-client-cpp/wireshark/pulsarDissector.cc:21:1: error: unknown type name 'constexpr'
constexpr int kWiresharkMajorVersion = WIRESHARK_VERSION_MAJOR;
^
/Users/wangkai/Developer/github/pulsar-client-cpp/wireshark/pulsarDissector.cc:22:1: error: unknown type name 'constexpr'
constexpr int kWiresharkMinorVersion = WIRESHARK_VERSION_MINOR;
^
In file included from /Users/wangkai/Developer/github/pulsar-client-cpp/wireshark/pulsarDissector.cc:37:
/Users/wangkai/Developer/github/pulsar-client-cpp/wireshark/build/generated/lib/PulsarApi.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
#include <google/protobuf/port_def.inc>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
gmake[2]: *** [CMakeFiles/pulsar-dissector.dir/build.make:83: CMakeFiles/pulsar-dissector.dir/pulsarDissector.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/pulsar-dissector.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
And if I don't specify the |
|
I see. Mark it as drafted now. I will fix it soon. |
7122b07 to
9302d3a
Compare
|
@Anonymitaet The comments have been addressed now. @Demogorgon314 I've fixed the build failure and added the workflow to build the Wireshark plugin on macOS, could you also verify whether it could be loaded? |
|
@BewareMyPower Now it can build success and load, but it still needs manually specific |
|
@Demogorgon314 It's confirmed that the install path |
### Motivation apache#182 fixes the Wireshark build process on macOS. However, it breaks the compatibility with some Wireshark distributions like the default Wireshark 3.2.3 on Ubuntu 20.04. The reason is some Wireshark distributions use `config.h` to record the versions, while other might use `ws_version.h`. See https://listman.redhat.com/archives/libvir-list/2020-September/msg00377.html for a similar fix. ### Modifications Try to find the `ws_version.h` first, if it's not found, find the `config.h`. Add the workflow to verify it can be built on Ubuntu. To be more user friendly: - Separate the dissector from the whole project so that we can build the dissector without building the Pulsar C++ client. - Refactor the README of the Wireshark dissector by focusing on how to use. ### Verifications Add a workflow to build Wireshark dissector on both Ubuntu and macOS.
107b59c to
23323eb
Compare
|
Thanks! Now the docs LGTM. |
* Support the Wireshark plugin for more Wireshark distributions ### Motivation #182 fixes the Wireshark build process on macOS. However, it breaks the compatibility with some Wireshark distributions like the default Wireshark 3.2.3 on Ubuntu 20.04. The reason is some Wireshark distributions use `config.h` to record the versions, while other might use `ws_version.h`. See https://listman.redhat.com/archives/libvir-list/2020-September/msg00377.html for a similar fix. ### Modifications Try to find the `ws_version.h` first, if it's not found, find the `config.h`. Add the workflow to verify it can be built on Ubuntu. To be more user friendly: - Separate the dissector from the whole project so that we can build the dissector without building the Pulsar C++ client. - Refactor the README of the Wireshark dissector by focusing on how to use. ### Verifications Add a workflow to build Wireshark dissector on both Ubuntu and macOS. (cherry picked from commit 63c4245)
Motivation
#182 fixes the Wireshark build process on macOS. However, it breaks the compatibility with some Wireshark distributions like the default Wireshark 3.2.3 on Ubuntu 20.04. The reason is some Wireshark distributions use
config.hto record the versions, while other might usews_version.h.See
https://listman.redhat.com/archives/libvir-list/2020-September/msg00377.html for a similar fix.
Modifications
Try to find the
ws_version.hfirst, if it's not found, find theconfig.h.To be more user friendly:
Verifications
Add a workflow to build Wireshark dissector on both Ubuntu and macOS.
Documentation
doc-required(Your PR needs to update docs and you will update later)
doc-not-needed(Please explain why)
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)