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

Dissector: calculate difference between timestamps in packets

0

Hello guys,

My task is as following: i want to extend a custom dissector with the ability to calculate the difference between timestamps. Some packets contain a TLV containing a timestamp and whenever a timestamp TLV occurs after the first timestamp, the difference to the last timestamp should calculated and displayed.

I do not know yet how to store the values I am retrieving from packets so that i can reuse them at a later point of time. Can anyone show me an example, please?

Bye, hhhannes

asked 27 Nov '13, 00:42

hhhannes's gravatar image

hhhannes
16337
accept rate: 0%

1

If I understand you want to save data and use them in another call of your dissector ?

First packet -> save timestamp
Second packet -> get last timestamp

I am right ?

If so use conversation Interface

(27 Nov '13, 02:55) Afrim

Thanks. Are there dissectors which contain good examples for the use of the conversation feature?

(27 Nov '13, 07:42) hhhannes

Yes take a look at epan/dissector/packet-tcp.c

(27 Nov '13, 07:57) Afrim
3

@Afrim: That may be a bit steep learning curve

@hhhannes: Check Request/Response tracking

(27 Nov '13, 09:12) Jaap ♦