Ethereal-dev: Re: [Ethereal-dev] referencing specific tcp protocol data

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Fri, 29 Mar 2002 13:58:52 -0800
On Fri, Mar 29, 2002 at 07:38:11PM +0000, Phil Williams wrote:
> Well in this case, can I not get access to the data I require by looking
> up using header_field_info pointers, rather than names?

If you *had* the header_field_info pointer, you could.

However, the only way to get the header_field_info pointer, at present,
would be from the TCP dissector, or from a call to
"proto_registrar_get_nth()" - but the argument you'd hand to
"proto_registrar_get_nth()" is the "hf_" number for the field, and
that's *also* private to the TCP dissector.

The TCP dissector does not export that information.

Therefore, you would have to modify the TCP dissector to export that
information, unless you plan to put your statistical stuff *into* the
TCP dissector.

Having to modify dissectors every time you wanted to put in code to scan
a capture would suck.  It might be nice to eventually allow a new type
of plugin, over and above the dissector plugins that are currently the
*only* type of plugin we support, to do "tool" operations such as those
that involve scanning captures; to be a plugin, it'd have to work
without changing existing dissectors.