How to compile this plugin?

I follow the foo dissector example, but would like to know how to compile it.

An example of a foo dissector is shown in this link: http://www.wireshark.org/docs/wsdg_html_chunked/ChDissectAdd.html

You will notice that it mentions that the interlink directory contains good examples of support files that I can use, and that I need to modify Makefile.am and makefile.common, etc. I modified them to display the foo module.

However, now I would like to know how to build it. I tried to run automake, but it complains that there is no configure.in. Sorry, I am not familiar with the gnu build environment yet.

In addition, is it possible to build this module separately? Or do I need all the other sources of access to the channels? Of course, I installed wirehark-dev under ubuntu.

+3
source share
2 answers

Answering my own question.

It seems like I should follow the instructions contained in the Wireshark source. i.e. doc / README.plugins

Provides all the information needed to create plugins for Wireshark.

+1
source

I went through the README.plugins procedure and this is what I got:

1) Rename the plugins directory

  • Custom.m4.example to Custom.m4
  • Custom.make.example for Custom.make
  • Custom.nmake.example to Custom.nmake

2) Rename all occurrences of foo in these files to your protocol name

3) Go to the wirehark top level directory and run autogen and configure it as root

./autogen.sh
./configure

. , . , gryphon

  • ChangeLog
  • CMakeLists.txt
  • Makefile.am
  • Makefile.common
  • Makefile.in
  • Makefile.nmake
  • moduleinfo.h
  • moduleinfo.nmake
  • plugin.c
  • plugin.rc.in

4) , . make install

make -C plugins
make install

5) , , Wireshark

WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 ./wireshark

6) , , " ", "". . #include "config.h" :

#include "moduleinfo.h"
+5
source

Source: https://habr.com/ru/post/1790153/


All Articles