30
32
The source files and header files for your dissector
34
Examples of these files can be found in plugins/h223.
32
36
2.1 AUTHORS, COPYING, and ChangeLog
34
38
The AUTHORS, COPYING, and ChangeLog are the standard sort of GPL project
35
files; see plugins/docsis for examples.
37
2.2 Makefile.am and Makefile.nmake
39
For your plugins/xxx/Makefile.am and plugins/xxx/Makefile.nmake files,
40
see the corresponding files in plugins/docsis. Replace all occurrences
41
of "docsis" in those files with "xxx".
43
For your plugins/xxx/Makefile.am file, see the corresponding file in
44
plugins/h223. Replace all occurrences of "h223" in those files with "xxx".
43
46
2.3 Makefile.common
45
48
Your plugins/xxx/Makefile.common should list the source files for your
46
dissector, in the DISSECTOR_SRC variable, and the header files for your
47
dissector, if any, in the DISSECTOR_INCLUDES variable. (The
48
DISSECTOR_INCLUDES variable should not include moduleinfo.h.)
52
Your plugins/xxx/moduleinfo.h file is used to set the version
53
information for the plugin. An example follows:
55
/* Included *after* config.h, in order to re-define these macros */
68
/* Version number of package */
69
#define VERSION "0.0.8"
49
dissector in the DISSECTOR_SRC variable, and all supporting source files
50
in the DISSECTOR_SUPPORT_SRC variable.
51
The header files for your dissector, if any, must be listed in the
52
DISSECTOR_INCLUDES variable. The DISSECTOR_INCLUDES variable should not
57
For your plugins/xxx/Makefile.nmake file, see the corresponding file in
58
plugins/h223. No modifications are needed here.
62
Your plugins/xxx/moduleinfo.h file is used to set the version information
67
Your plugins/xxx/moduleinfo.nmake is used to set the version information
68
for building the plugin. Its contents should match that in moduleinfo.h
72
Your plugins/xxx/plugin.rc.in is the Windows resource template file
73
used to add the plugin specific information as resources to the DLL.
74
No modifications are needed here.
71
76
3. Changes to existing Wireshark files
73
You will also need to change the plugins/Makefile.am toplevel
74
Makefile.am, the plugins/Makefile.nmake toplevel Makefile.nmake, the
75
toplevel Makefile.am file, and the toplevel configure.in file.
78
You will also need to change the plugins/Makefile.am, the
79
plugins/Makefile.nmake, the toplevel Makefile.am file, and the
80
toplevel configure.in file.
77
82
3.1 Changes to plugins/Makefile.am
213
5. How to update an "old style" plugin (using plugin_init function)
220
5. Update "old style" plugins
222
5.1 How to update an "old style" plugin (using plugin_register and
223
plugin_reg_handoff functions).
225
The plugin registration has changed with the extension of the build
226
scripts. These now generate the additional code needed for plugin
227
encapsulation in plugin.c. When using the new style build scripts,
228
stips the parts outlined below:
230
o Remove the following include statments:
233
#include "moduleinfo.h"
235
o Removed the definition:
237
#ifndef ENABLE_STATIC
238
G_MODULE_EXPORT gchar version[] = VERSION;
241
o Move relevant code from the blocks and delete these functions:
243
#ifndef ENABLE_STATIC
248
#ifndef ENABLE_STATIC
253
This will leave a clean dissector source file without plugin specifics.
255
5.2 How to update an "old style" plugin (using plugin_init function)
215
257
The plugin registering has changed between 0.10.9 and 0.10.10; everyone
216
258
is encouraged to update their plugins as outlined below: