Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] Tap query (Voip Calls)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Lars Roland <lars.roland@xxxxxxx>
Date: Sun, 13 Feb 2005 23:04:51 +0100
Martin Mathieson schrieb:
While playing with a "Voip Calls" Graph Analysis for an H.323 call, I
thought it would good if clicking on an RTP entry would open the relevant
RTP analysis window.

I added an extra 'analysis' function callback field to 'struct
graph_analysis_item_t' and for RTP entries, set it to call
rtp_analysis_cb().  This worked insofar as it correctly summons an RTP
Analysis window, but the Graph Analysis window now refers to invalid data
after the taps are reinitialised as a result...

I'm not sure of the best way to make this work.  Here is what I've
considered:

(1) The single 'tap reset' function that is passed to
register_tap_listener() doesn't distinguish between:
        - resetting because new packets are coming
        - resetting because the same packets are going to scanned again.
reset functions should be called only for the second reason. If it is called whenever new packets are coming, it is a bug. I had to change the original voip call analysis tap to make it use "reset" and "draw" functions correctly. Due to lack of time I haven't had a look at the rtp analysis tap, but I suspect it to have the same bugs as the original VoIP tap, as the latter used it as a basis.

If the Voip Calls taps knew this difference, in the second case they could
avoid throwing away the data referred to by open Graph Analysis windows (it
could also quickly return from the tap 'packet callback' functions, speeding
things up somewhat).

(2)  Change Voip Calls to use fixed rather than dynamic memory, so that if
the same packets are re-tapped the same details go back into the same memory
addresses and the Graph Analysis window will continue to refer to valid
data.

Well, it uses fixed memory (at least the structure to hold basic tap information is static, while the "per call" data has to be dynamic). I plan to change it to use dynamic memory to allow calling it more than once, e.g. with different tap packet filter expressions. However this feature will take some time to develop, as it will require some additional "pointer magic".

So what exactly should be changed to use fixed instead of dynamic memory.

(3) The Graph Analysis window could keep a copy of the data it needs so it
can't be invalidated behind its back.  However even now, an open window gets
very confused when a different capture file is loaded...

Hmm, strange things happen with your ethereal, is it up to date? Currently the graph analysis window gets updated only when you press the "Graph" button in the Call Analysis window. It fetches the selected data at "click" time and I see no problem with that, as the Call Analysis window is always up to date and even recognizes loading of new capture files.

Can you provide a scheme, how you trigger the bugs you are reporting, so I can reproduce them?

Regards,
Lars