Anonymitaet commented on code in PR #183: URL: https://github.com/apache/pulsar-client-cpp/pull/183#discussion_r1092677877
########## wireshark/README.md: ########## @@ -60,50 +46,25 @@ $ brew install wireshark $ sudo apt install wireshark-dev ``` -## Compile the dissector - -> **Tip** -> -> If the compiler cannot find the Wireshark headers, add the include path manually. -> `-DWIRESHARK_INCLUDE_PATH=<WIRESHARK_INCLUDE_PATH>` +### Build from source -Compile the dissector. +Run the following commands in this subdirectory. ```shell -cmake -DBUILD_WIRESHARK=ON . -make pulsar-dissector +cmake -B build +cmake --build build ``` -This creates the `pulsar-dissector.so` plugin library in the Wireshark directory. +Then the `pulsar-dissector.so` plugin will be created under the `build-wireshark` directory. -## Install Wireshark dissector +### Copy to the plugin directory -Copy the dissector in the appropriate location so that Wireshark can find it at startup. +Run the Wireshark, then click the menu `Help - About Wireshark - Plugins`, you will find the plugin directory. For example, it's `/usr/lib/x86_64-linux-gnu/wireshark/plugins/3.2/epan` on Ubuntu 20.04. Then, copy the dissector into that directory: Review Comment: ```suggestion 1. Run the Wireshark and click **Help - About Wireshark - Plugins**, and then you can find the plugin directory. For example, it's `/usr/lib/x86_64-linux-gnu/wireshark/plugins/3.2/epan` on Ubuntu 20.04. 2. Copy the dissector into that directory. ``` In technical writing, we usually use bold for menus. Details see https://docs.google.com/document/d/1lc5j4RtuLIzlEYCBo97AC8-U_3Erzs_lxpkDuseU0n4/edit?pli=1#bookmark=kix.m5ccxnsf33mu ########## wireshark/README.md: ########## @@ -60,50 +46,25 @@ $ brew install wireshark $ sudo apt install wireshark-dev ``` -## Compile the dissector - -> **Tip** -> -> If the compiler cannot find the Wireshark headers, add the include path manually. -> `-DWIRESHARK_INCLUDE_PATH=<WIRESHARK_INCLUDE_PATH>` +### Build from source -Compile the dissector. +Run the following commands in this subdirectory. ```shell -cmake -DBUILD_WIRESHARK=ON . -make pulsar-dissector +cmake -B build +cmake --build build ``` -This creates the `pulsar-dissector.so` plugin library in the Wireshark directory. +Then the `pulsar-dissector.so` plugin will be created under the `build-wireshark` directory. -## Install Wireshark dissector +### Copy to the plugin directory -Copy the dissector in the appropriate location so that Wireshark can find it at startup. +Run the Wireshark, then click the menu `Help - About Wireshark - Plugins`, you will find the plugin directory. For example, it's `/usr/lib/x86_64-linux-gnu/wireshark/plugins/3.2/epan` on Ubuntu 20.04. Then, copy the dissector into that directory: -### Find the Personal Plugins Location - -1. Open Wireshark. -2. Click **About Wireshark**. -3. Click **Folders** tab. - -You can see the location of personal plugins, which is important for the next step. - -Example - -Wireshark 4.0.3 on macOS - -```shell -~/.local/lib/wireshark/plugins/4-0/ -``` - -### Copy Wireshark dissector to appropriate location - -```shell -mkdir -p ~/.local/lib/wireshark/plugins/4-0/epan -cd wireshark -cp pulsar-dissector.so ~/.local/lib/wireshark/plugins/4-0/epan +```bash +sudo cp ./build/pulsar-dissector.so /usr/lib/x86_64-linux-gnu/wireshark/plugins/3.2/epan/ ``` -### Complete installation +To verify it has been loaded successfully, restart the Wireshark, you will see the plugin in the plugin list: Review Comment: ```suggestion To verify whether it has been loaded successfully, restart the Wireshark and then you can see the plugin in the plugin list: ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
