This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to compute and display custom metrics for my dissector

0

Hello,

I am developping a custom dissector that shall compute the maximum delay between several pdu (e.g max delay between "keep alive" pdus).

To provide the "raw data" I add this kind of code :

foo_tap = register_tap("foo"); (in proto_registerxxx)

and

tap_queue_packet(foo_tap, pinfo, &foo_info); (after dissecting packet)

To use my dissector as the tap listener, I added this code :

register_tap_listener("foo", NULL, NULL, 0, foostat_reset, foostat_packet, foostat_draw); (in proto reg handoff)

I also added the three functions foostat_reset, foostat_packet and foostat_draw.

===

Now I have a few questions (I did not managed to find any example in the README.xxx):

  1. How can I display my metrics ?
  2. How can I keep all this code in the same dll ?
  3. foostat_packet is called only when my display filter contains foo. If I do not have a foo filter, it is not called, even if I receive a foo pdu. Is this normal ?

Thank you !

asked 13 May '16, 09:05

hpa's gravatar image

hpa
16448
accept rate: 0%

edited 13 May '16, 09:08


One Answer:

0

"I did not managed to find any example in the README.xxx"

Have you read doc/README.tapping?

answered 19 Jul '16, 09:36

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

edited 19 Jul '16, 09:37