Ethereal-users: [Ethereal-users] Can I get the field ID?

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

From: "Nicholas, John S" <John.Nicholas@xxxxxxxxxxxxxx>
Date: Fri, 16 Feb 2001 10:15:15 -0800
Hi,

I am trying to implement a dissector with out knowing the details of the structure being decoded. 
I fact I do know the structure, but it would be much easier to code if I can fill a structure (actually 
more than one) with the field names and type, length, etc.  We have a tool/database that has the 
format information and I want to be able to have that tool fill in the structure for me.  Anyway, I think 
I can do it if I can get the ID (used by proto_tree_add_item) given a string containing a fieldname.

In other words, how do I do this?
  proto_tree_add_item(pep_tree_sub, stringtmp, tvb, offset, 4, value32);

    where stringtmp is a variable containing "hf_pep_t0462_status"

Thanks

John Nicholas