Ethereal-dev: Re: [Ethereal-dev] Dynamic arrays in proto_register_field_array and proto_regist

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

From: Stefano Pettini <spettini@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Jan 2005 22:37:36 +0100
LEGO wrote:

My experience with mate tells me that you cannot do that. Not at
runtime. I lost days trying to figure out that It could not be done.

Here's the problem.

Reliable Multicast Transport (RMT) IETF working group has defined two transport protocols: ALC and NORM. Since reliable multicast is a complex field, not every protocol, algorithm or idea is useful to solve a every problem.

So, RMT wg decided to ratify "pluggable" protocols, composed of many "building blocks". There are RFCs for transport format, encoding, error correction, and congestion control algorithms. A protocol, or Protocol Instantiation, like ALC and NORM, is composed of many building blocks.

This is why I want to generate etts and hfs array dynamically. I'm writing "subdissectors" for many building blocks, plus two dissectors for ALC and NORM that call the others. Please note that protocols are composed, not stacked. ALC dissector should import etts and hfs of its building blocks.

This could be resolved as runtime. Since this kind of aggregation is easily predictable (ALC is always composed of the same building blocks), I'm also thinking about how to generate the right arrays at compile time, using preprocessing macros.

Any other idea?

Thanks.

Stefano