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] lightening libethereals dependencies

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: Thu, 22 Mar 2001 21:46:09 -0500 (EST)
On Thu, 22 Mar 2001, Guy Harris wrote:

> > I've moved some of the utilites that are in dissectors that packet.c 
> > depends on into some utility modules in the epan directory.
> > 
> > In particular I've moved some utilities from packet-sna and packet-atalk 
> > into epan/atalk-utils.{c,h} and epan/sna-utils.{c,h}.
> 
> Hmm.
> 
> Perhaps the similar routines for MAC and IP addresses ("ether_to_str()",
> "ether_to_str_punct()", "ip_to_str()", "ip_to_str_buf()",
> "ip6_to_str()") should be moved from "epan/packet.c", which is a bit of
> a grab-bag of stuff, into "epan/ether-utils.c", "epan/ip-utils.c", and
> "epan/ipv6-utils.c"?
> 

This is very likely.  I'm not really cleaning much as I do this (in 
fact I have just realized that I've neglected the Makefile.nmake file...
doh! ).  I thought that more specific cleanup could be done on 
a subsequent pass.

The eventual goal is to split ethereal into clean pieces.  The current 
goal is to break compile time dependencies of libethereal on 
everything else in ethereal.    

There are a couple of tricky things along the way though,  and I would 
appreciate comments:

1)	packet.c depends on dissect_frame

	My intention currently is to use the find_dissector,
	call_dissector facilities to make this a run time, rather 
	than compile time, dependency.  

2)	proto.c depends on register.c

	This is a tough one.  As previously stated my first instinct 
	here was to move progressively towards an "all dissectors 
	are plugins" architecture, but it was very rightly pointed 
	out that there is a great deal of usefulness in sometimes 
	being able to compile a static binary.  I am thinking about 
	possible solutions... I need to do a bit more research on 
	the subject.  

Ed