Ethereal-dev: Re: [Ethereal-dev] recursive taps

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

From: Jason House <jhouse@xxxxxxxxx>
Date: Thu, 31 Oct 2002 10:33:47 -0500
It looks like my e-mail really had the wrong effect...  I'm not trying to make
the API sound bad, but instead am trying to think of the generality of the
interface and future capabilities.  My goal is not to complicate things.  My
thoughts about recursion is that it would probably only require minor tweaks and
no major overhauls.  When I get more time to sit down and code, I'll see what I
can do.  For now, I'm just trying to get out thoughts for discussion...

As far as API for recursive taps, her is one possibility:

/* init routine that returns rs instead of storing it in the tapping core */
void* /* returns pointer to rs */
init_sub_tap_listener( char *cmd, char *config ); /* called to initialize each
sub_tap */

/* provide access (if needed) for a tap to call another tap's functions */
/* truly recursive taps that only call themselves, will never use this since
they already know which functions to call */
ethereal_tap_list* /* the structure holding the function pointers */
find_tap_listener( char *cmd ); /* called once post registration */

The first function being analogous to the previously proposed initialization
call of  char* init_tap_listener( char *cmd, char *config ).  Overall, the two
added function calls are extra for allowing recursion.  The normal taps can
function as they normally would.  The individual _init() routines for each tap
listener currently call register_tap_listener().  There could be some kind of
flag that init_sub_tap_listener would set/unset in order to make the
register_tap_listener() not insert the new tap listener into the tapping core,
but merely hold onto rs for init_sub_tap_listener() to return.

I know there are variants on the approach, but I think all implementations would
be relatively simple...   Eventually, I should try coding more than I talk...
but I know that for most of november, I will not have that luxury.  For now, I'm
just adding commentary for thought... Please don't interpret my talking/review
of implementations as dislike.  I'm highly interested in the tap system, but
lack the time resources that I would like to dedicate to it.

Pia Sahlberg wrote:

> >From: "Krishnan, Prabhakar" Subject: RE: [Ethereal-dev] Re: recursive taps
> >Date: Thu, 31 Oct 2002 01:14:43 -0800
> >
> >
> >I tried the rpcstat tap functions on tethereal.
> >It works & looks Ok.
> >the tap API looks sufficient  and simple too.
>
> Thanks for the feedback and confirmation. I know many people use these
> extensions and they work reasonably well.
>
> I misphrased what I meant with the confirmation/verification of the tap
> system.
>
> What I really want to be verified is that the actual API itself is
> simple and useful itself.
> I.e. I consider the tap system working/verified/successful (according to the
> criterias I myself set up for it) if someone else, apart from me, preferably
> someone with little ethereal develople knowledge/experience can use the API
> to create their own extension.
>
> The test I want on the tap system is someone else to develop a simple
> extension and find it simple to do so. If someone can do this with the
> current API then I, myself, think the tap system works.
>
> _________________________________________________________________
> Surf the Web without missing calls! Get MSN Broadband.
> http://resourcecenter.msn.com/access/plans/freeactivation.asp