Ethereal-dev: Re: [Ethereal-dev] how to access a global variable defined inwiretap(new format

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

From: "Guy Harris" <gharris@xxxxxxxxx>
Date: Wed, 24 May 2006 19:03:27 -0700 (PDT)
Ravi Kondamuru wrote:

> I still feel passing through the pseudo_header is a good way!! :)

It's definitely better than a global variable, because a global variable
would imply that you can't have more than one file of the new type open -
which is *NOT* a valid assumption with Wiretap (consider, for example,
mergecap).

You don't even want static global variables, because that doesn't handle
more than one file of the new type open - the endian type should be part
of a structure allocated by the open function and attached to the wtap
structure, just as is done by some other read modules (see, for example,
libpcap.c).

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev