Re: how to access a global variable defined inwiretap(new format) from epan/dissector
"Guy Harris" <[email protected]>
| Newsgroups | gmane.network.ethereal.devel |
|---|---|
| Message-ID | <[email protected]> |
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).