Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] Easier dissector building

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

From: "Ph. Marek" <philipp.marek@xxxxxxxxxx>
Date: Wed, 18 Dec 2002 14:13:52 +0100
Hello everyone!

I'm afraid that this is a dumb question but has someone done some work to make 
dissector writing easier?

I'm thinking about eg a perl-script which gets a c-structure and some base 
data (has to be udp packet, on port x, with packet data byte y=z) which 
builds a dissector out of this.

I just had a look (in CVS) into packet-dns and packet-udp (which I believed to 
be some simple dissectors - but I think I'm wrong :-) and was astonished.
I know that the code is straightforward but the simple work of catching every 
change is what holds me back. If there's some script which generates this 
data from a c source it would take some work from me.

Or the other way round:
how about building a dissector which ain't attached anywhere by default. It is 
configured by a data file (text, generated eg. from c structures by a 
perl-script) and applies this data to user-defined packets - this is possible 
today, IIRC. (specifying which dissector to use on a class of packets, that 
is). 
I know that that would be slow but it would be the most dynamic - no more 
recompiling, ...

And this preformatted text-files could then, when the development is over, be 
converted into c source for speed reasons ...


Regards,

Phil