Ethereal-dev: Re: [Ethereal-dev] tap registration and packet traversal

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

From: "Lars Ruoff (Alplog)" <lars.ruoff@xxxxxxxxxxxxxxxxxx>
Date: Thu, 15 May 2003 09:14:33 +0200
Thank you.

In a more general way of speaking, what is the best way to traverse all
packets?
I took the tap_rtp as an example, and what is done there is that a tap
listener is registered,
then redissect_packets is called, so that the tap function is called for
each packet and finally the tap is unregistered again.
However this is so slow, since all the protocol tree is being reconstructed
again (is it?), although there is not really a need for it.
Is there a faster method?
It would be nice to have a version of redissect_packets, wich calls only the
taps but not the proto-dissectors.

Lars.

----- Original Message -----
From: "Ronnie Sahlberg" <ronnie_sahlberg@xxxxxxxxxxxxxx>
To: "Lars Ruoff (Alplog)" <lars.ruoff@xxxxxxxxxxxxxxxxxx>; "Ethereal-Dev"
<Ethereal-dev@xxxxxxxxxxxx>
Sent: Wednesday, May 14, 2003 11:25 PM
Subject: Re: [Ethereal-dev] tap registration and packet traversal


> register_all_tap_listeners only registers that the tap is available
> and the only thing it does is to tell ethereal/tethereal the tap
> listener exists, i.e. tha thte command lines works and that ethereal will
> put it on the menu.
>
> the tap itself is not activated at this point. it only tells ethereal that
> it exists
> and that it can be activated by the menu/commandline by calling a
callback.
>
> tap listeners only receive packets when they are activated.
>
> ----- Original Message -----
> From: "Lars Ruoff (Alplog)"
> Sent: Tuesday, May 13, 2003 6:31 PM
> Subject: [Ethereal-dev] tap registration and packet traversal
>
>
> > Hi everybody,
> >
> > I'm new to Ethereal-Dev.
> > I'm working on a replacement for the RTP analysis tap for my own needs
but
> i
> > have a very hard time to see clear in all that.
> > There is one thing i haven't figured out about the tap system:
> > In tap_rtp.c, in seems that the tap is registered only once the user has
> > selected the "RTP Analysis..." menu item.
> > On the other hand, all taps seems to get registered in the
> > register_all_tap_listeners function from gtk/main.c
> > So when do the tap listeners get registered/should be registered??
> > Do the other tap's packet_xxx-functions get called every time a packet
is
> > beeing dissected??
> > Indeed, i would like to have my tap running only while the user is in my
> > dialog, cause it is quite cpu-intensive and there is no need for the tap
> to
> > be running otherwise.
> > In fact, i use the tap system for the sole purpose of traversing all the
> > captured packets and doing some calculation on it before displaying my
> > dialog box.
> > (but i don't want a time overhead for dissecting packets when the dialog
> box
> > is not active)
> > Is this the way to do?
> >
> > help would be appreciated,
> > thanks
> >
> > _______________________________________________
> > Ethereal-dev mailing list
> > Ethereal-dev@xxxxxxxxxxxx
> > http://www.ethereal.com/mailman/listinfo/ethereal-dev
>