forked from osmocom/wireshark
README.dissector was split from README.developer in 2013 - update some
documents referring to the split out sections. Remove trailing whitespace while at this. Change-Id: I36cfe0ac55e8f653bffbf850e01f582aacf85557 Reviewed-on: https://code.wireshark.org/review/4094 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
This commit is contained in:
parent
0a0654a7aa
commit
6a7414f726
|
@ -29,6 +29,7 @@ You'll find additional information in the following README files:
|
|||
- README.capture - the capture engine internals
|
||||
- README.design - Wireshark software design - incomplete
|
||||
- README.developer - this file
|
||||
- README.dissector - How to dissect a packet
|
||||
- README.display_filter - Display Filter Engine
|
||||
- README.idl2wrs - CORBA IDL converter
|
||||
- README.packaging - how to distribute a software package containing WS
|
||||
|
|
|
@ -8,7 +8,7 @@ remarks and patches to the developer mailing list.
|
|||
|
||||
Prerequisites
|
||||
-------------
|
||||
As this file is an addition to README.developer, it is essential to read
|
||||
As this file is an addition to README.dissector, it is essential to read
|
||||
and understand that document first.
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
1. Plugins
|
||||
|
||||
Writing a "plugin" dissector is not very different from writing a standard
|
||||
one. In fact all of the functions described in README.developer can be
|
||||
one. In fact all of the functions described in README.dissector can be
|
||||
used in the plugins exactly as they are used in standard dissectors.
|
||||
|
||||
(Note, however, that not all OSes on which Wireshark runs can support
|
||||
|
@ -52,7 +52,7 @@ with "foo".
|
|||
|
||||
Your plugins/foo/Makefile.common should only list the main source file(s),
|
||||
which exports register_*() and handoff_*(), for your dissector in the
|
||||
DISSECTOR_SRC variable. All other supporting source files should be
|
||||
DISSECTOR_SRC variable. All other supporting source files should be
|
||||
listed in the DISSECTOR_SUPPORT_SRC variable.
|
||||
The header files for your dissector, if any, must be listed in the
|
||||
DISSECTOR_INCLUDES variable. The DISSECTOR_INCLUDES variable should not
|
||||
|
@ -75,30 +75,30 @@ for building the plugin. Its contents should match that in moduleinfo.h
|
|||
|
||||
2.8 plugin.rc.in
|
||||
|
||||
Your plugins/foo/plugin.rc.in is the Windows resource template file used
|
||||
Your plugins/foo/plugin.rc.in is the Windows resource template file used
|
||||
to add the plugin specific information as resources to the DLL.
|
||||
No modifications are needed here.
|
||||
|
||||
3. Changes to existing Wireshark files
|
||||
|
||||
There are two ways to add your plugin dissector to the build, as a custom
|
||||
extension or as a permanent addition. The custom extension is easy to
|
||||
configure, but won't be used for inclusion in the distribution if that's
|
||||
extension or as a permanent addition. The custom extension is easy to
|
||||
configure, but won't be used for inclusion in the distribution if that's
|
||||
your goal. Setting up the permanent addition is somewhat more involved.
|
||||
|
||||
3.1 Custom extension
|
||||
|
||||
Go to the plugins directory and copy the three Custom.*.example files to
|
||||
Custom.*. Now you have three files ready for building a plugin with the
|
||||
Go to the plugins directory and copy the three Custom.*.example files to
|
||||
Custom.*. Now you have three files ready for building a plugin with the
|
||||
name "foo". Replace the name if you so require.
|
||||
|
||||
If you want to add the plugin to your own Windows installer add a text
|
||||
file named custom_plugins.txt to the packaging/nsis directory, with a
|
||||
If you want to add the plugin to your own Windows installer add a text
|
||||
file named custom_plugins.txt to the packaging/nsis directory, with a
|
||||
"File" statement for NSIS:
|
||||
|
||||
File "..\..\plugins\foo\foo.dll"
|
||||
|
||||
Then open packaging/nsis/Custom.nmake and add the relative path to your
|
||||
Then open packaging/nsis/Custom.nmake and add the relative path to your
|
||||
DLL to CUSTOM_PLUGINS:
|
||||
|
||||
CUSTOM_PLUGINS= \
|
||||
|
@ -166,7 +166,7 @@ plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
|
|||
|
||||
3.2.4 Changes to the top level configure.ac
|
||||
|
||||
You need to add your plugins Makefile (in alphbetical order) to the
|
||||
You need to add your plugins Makefile (in alphbetical order) to the
|
||||
AC_OUTPUT rule in the configure.ac
|
||||
|
||||
AC_OUTPUT(
|
||||
|
@ -180,7 +180,7 @@ AC_OUTPUT(
|
|||
|
||||
3.2.5 Changes to epan/Makefile.am
|
||||
|
||||
Add the relative path of all your plugin source files (in alphbetical
|
||||
Add the relative path of all your plugin source files (in alphbetical
|
||||
order) to plugin_src:
|
||||
|
||||
plugin_src = \
|
||||
|
@ -225,7 +225,7 @@ PLUGINS= \
|
|||
|
||||
3.2.7.2 Changes to packaging/nsis/wireshark.nsi
|
||||
|
||||
Add the relative path of your plugin DLL (in alphbetical order) to the
|
||||
Add the relative path of your plugin DLL (in alphbetical order) to the
|
||||
list of "File" statements in the "Dissector Plugins" section:
|
||||
|
||||
File "${STAGING_DIR}\plugins\${VERSION}\ethercat.dll"
|
||||
|
@ -235,7 +235,7 @@ File "${STAGING_DIR}\plugins\${VERSION}\irda.dll"
|
|||
|
||||
3.2.7.3 Other installers
|
||||
|
||||
The U3 and PortableApps installers build their manifests, including
|
||||
The U3 and PortableApps installers build their manifests, including
|
||||
plugins, from wireshark.nsi via the packaging/ws-manifest.pl script.
|
||||
|
||||
4. Development and plugins on Unix
|
||||
|
@ -246,7 +246,7 @@ The first thing is that you'll have to run autogen.sh and configure once
|
|||
more to setup your build environment.
|
||||
|
||||
The good news is that if you are working on a single plugin then you will
|
||||
find recompiling the plugin MUCH faster than recompiling a dissector and
|
||||
find recompiling the plugin MUCH faster than recompiling a dissector and
|
||||
then linking it back into Wireshark. Use "make -C plugins" to compile just
|
||||
your plugins.
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ data you may want to keep track of from a request to a response.
|
|||
|
||||
We also need a structure that holds persistent information for each
|
||||
conversation. A conversation is identified by SRC/DST address, protocol and
|
||||
SRC/DST port, see README.developer.
|
||||
SRC/DST port, see README.dissector, section 2.2.
|
||||
In this case we only want to have a hash table to track the actual
|
||||
transactions that occur for this unique conversation.
|
||||
Some protocols negotiate session parameters during a login phase and those
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
++++++++++++++++++++++++++++++++++++++
|
||||
<!-- WSDG Chapter Build Introduction -->
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
[[ChapterBuildIntro]]
|
||||
|
||||
== Introduction
|
||||
|
@ -28,7 +28,7 @@ Wireshark consists of the following major parts:
|
|||
|
||||
=== Coding Style
|
||||
|
||||
The coding style guides for Wireshark can be found in the "Code style"
|
||||
The coding style guides for Wireshark can be found in the "Code style"
|
||||
section of the file 'doc/README.developer'.
|
||||
|
||||
[[ChCodeGLib]]
|
||||
|
@ -51,4 +51,4 @@ See https://developer.gnome.org/glib/[] for details about GLib.
|
|||
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
<!-- End of WSDG Chapter Build Introduction -->
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
++++++++++++++++++++++++++++++++++++++
|
||||
<!-- WSDG Chapter Dissection -->
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
[[ChapterDissection]]
|
||||
|
||||
== Packet dissection
|
||||
|
@ -34,9 +34,9 @@ built-in one. So starting with a plugin makes initial development simpler, while
|
|||
the finished code may make more sense as a built-in dissector.
|
||||
|
||||
[NOTE]
|
||||
.Read README.developer
|
||||
.Read README.dissector
|
||||
====
|
||||
The file 'doc/README.developer' contains detailed information about implementing
|
||||
The file 'doc/README.dissector' contains detailed information about implementing
|
||||
a dissector. In many cases it is more up to date than this document.
|
||||
====
|
||||
|
||||
|
@ -302,7 +302,7 @@ Now we can enhance the protocol display with some detail.
|
|||
ti = proto_tree_add_item(tree, proto_foo, tvb, 0, -1, ENC_NA);
|
||||
foo_tree = proto_item_add_subtree(ti, ett_foo);
|
||||
proto_tree_add_item(foo_tree, hf_foo_pdu_type, tvb, 0, 1, ENC_BIG_ENDIAN);
|
||||
}
|
||||
}
|
||||
----
|
||||
====
|
||||
|
||||
|
@ -432,7 +432,7 @@ static const value_string packettypenames[] = {
|
|||
{ 2, "Terminate" },
|
||||
{ 3, "Data" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
};
|
||||
----
|
||||
====
|
||||
|
||||
|
@ -785,7 +785,7 @@ msg_init_protocol(void)
|
|||
{
|
||||
fragment_table_init(&msg_fragment_table);
|
||||
reassembled_table_init(&msg_reassembled_table);
|
||||
}
|
||||
}
|
||||
----
|
||||
====
|
||||
|
||||
|
@ -1060,7 +1060,7 @@ WS_DLL_PUBLIC_DEF void plugin_register_tap_listener(void)
|
|||
register_foo_stat_trees();
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
----
|
||||
====
|
||||
|
||||
|
@ -1097,7 +1097,7 @@ static void foo_stats_tree_init(stats_tree* st)
|
|||
{
|
||||
st_node_packets = stats_tree_create_node(st, st_str_packets, 0, TRUE);
|
||||
st_node_packet_types = stats_tree_create_pivot(st, st_str_packet_types, st_node_packets);
|
||||
}
|
||||
}
|
||||
----
|
||||
====
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ static int foo_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissec
|
|||
stats_tree_tick_pivot(st, st_node_packet_types,
|
||||
val_to_str(pi->packet_type, msgtypevalues, "Unknown packet type (%d)"));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
----
|
||||
====
|
||||
|
||||
|
@ -1130,9 +1130,9 @@ us to record statistics by packet type.
|
|||
=== How to use conversations
|
||||
|
||||
Some info about how to use conversations in a dissector can be found in the file
|
||||
'doc/README.developer', chapter 2.2.
|
||||
'doc/README.dissector', chapter 2.2.
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
<!-- End of WSDG Chapter Dissection -->
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
|
|
|
@ -396,7 +396,8 @@ various other sources of information:
|
|||
.Read the README
|
||||
====
|
||||
'README.developer' is packed full with all kinds of details relevant
|
||||
to the developer of Wireshark source code. It advices you around common
|
||||
to the developer of Wireshark source code. Its companion file
|
||||
'README.dissector' advises you around common
|
||||
pitfalls, shows you basic layout of dissector code, shows details of the
|
||||
APIs available to the dissector developer, etc.
|
||||
====
|
||||
|
|
Loading…
Reference in New Issue