README.tapping: minor changes.

Change-Id: I0614d4c0cc8c9aada8660297b9d08f9d03129e29
Reviewed-on: https://code.wireshark.org/review/33433
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
This commit is contained in:
Dario Lombardo 2019-05-30 14:59:13 +02:00 committed by Jaap Keuter
parent 23ec0666c5
commit 01a30c1018
1 changed files with 7 additions and 14 deletions

View File

@ -4,7 +4,7 @@ In order to use the tapping system, very little knowledge of Wireshark
internals are required. internals are required.
As examples on how to use the tap system see the implementation of As examples on how to use the tap system see the implementation of
tap-rpcstat.c (tshark version) tap-rpcprogs.c (tshark version)
ui/qt/rpc_service_response_time_dialog.cpp (wireshark version) ui/qt/rpc_service_response_time_dialog.cpp (wireshark version)
If all you need is to keep some counters, there's the stats_tree API, If all you need is to keep some counters, there's the stats_tree API,
@ -18,11 +18,8 @@ protocol dissector, and
2, event driven code in an extension such as tap-rpcstat.c that registers 2, event driven code in an extension such as tap-rpcstat.c that registers
a tap listener and processes received data. a tap listener and processes received data.
So you want to hack together a tap application? So you want to hack together a tap application?
TAP TAP
=== ===
First you must decide which protocol you are interested in writing a tap First you must decide which protocol you are interested in writing a tap
@ -55,11 +52,10 @@ need.
TAP LISTENER TAP LISTENER
============ ============
(see tap-rpcstat.c as an example) (see tap-rpcprogs.c as an example)
Interfacing your application is not that much harder either. Interfacing your application is not that much harder either.
Only 4 callbacks and two functions. Only 4 callbacks and two functions.
The two functions to start or stop tapping are The two functions to start or stop tapping are
register_tap_listener(const char *tapname, void *tapdata, const char *fstring, register_tap_listener(const char *tapname, void *tapdata, const char *fstring,
@ -69,14 +65,14 @@ register_tap_listener(const char *tapname, void *tapdata, const char *fstring,
void (*draw)(void *tapdata), void (*draw)(void *tapdata),
void (*finish)(void *tapdata)); void (*finish)(void *tapdata));
This function is used to register an instance of a tap application
to the tap system.
remove_tap_listener(void *tapdata); remove_tap_listener(void *tapdata);
remove_tap_listener(void *tapdata)
This function is used to deregister and stop a tap listener. This function is used to deregister and stop a tap listener.
register_tap_listener() is used to register an instance of a tap application The parameters have the following meanings:
to the tap system.
*tapname *tapname
is the name of the tap we want to listen to. I.e. the name used in is the name of the tap we want to listen to. I.e. the name used in
@ -239,8 +235,5 @@ Well, try this :
Let struct contain a command line and make (*packet) execute it? Let struct contain a command line and make (*packet) execute it?
The possibilities are rather large. The possibilities are rather large.
See tap-rpcstat.c for an example
See tap.c as well. It contains lots of comments and descriptions on the tap See tap.c as well. It contains lots of comments and descriptions on the tap
system. system.