Ethereal-dev: Re: [Ethereal-dev] xxx-utils.h files

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

From: Ed Warnicke <hagbard@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Mar 2001 20:52:02 -0500 (EST)
On Fri, 23 Mar 2001, Guy Harris wrote:

> > I've finished excising the packet.c's dependency on 
> > packet-{osi,vines,ipv6}.{c,h}.  The attached patch 
> > contains the changes to existing code and the tarball contains
> > the {osi,vines,ipv6}-utils.{c,h} files that are new.
> 
> Hmm.
> 
> Should *all* the declarations for protocol XXX be moved to
> "epan/XXX-utils.h", or just the stuff used by code in libethereal?

Not necessarily.  I was being somewhat mechanical when I made these moves.
In principle we only want to have the things in these that libethereal
really needs.  

> 
> For example, should the DDP packet types be in "epan/atalk-utils.h", or
> should they be in a "packet-atalk.h" file, as they were before?

See above comments, I absolutely don't object to moving them back if 
that makes sense. 

> 
> And, if they should go into "epan", should we also move stuff such as
> "etypes.h", "llcsaps.h", "nlpid.h", "oui.h", "ppptypes.h", and "xdlc.h"
> to "epan"?

The real question is where these things absolutely need to be known 
at compile time.  In general I'd rather keep epan as light as we 
can.  I don't think the dissectors belong there.  I don't think 
that thing that are only used by the dissectors belong there.

> 
> And, while we're at it, should we also move "xdlc.c" to "epan"? 

There are currently no dependencies I can identify on xdlc.c in 
libethereal, so I don't see why we should introduce it.  The reason only
reason I moved the xxx-utils stuff into epan was to resolve 
the dependencies.  I'll go back and do a tighter job of it.

> 
> (I suspect the answer to the last question is "yes", which suggests that
> the answer to the question in the previous paragraph is "yes", which
> suggests that we might as well move all the stuff that declares protocol
> field values, etc. into files in "epan".)
> 

It sounds like what we really need to do is try and decide among ourselves 
what it really is we want libethereal to be and how we see the rest 
of the ethereal stuff partitioned.

Ed