Re: parameter arrays
"John R." <[email protected]>
| Newsgroups | gmane.network.ethereal.devel |
|---|---|
| Message-ID | <[email protected]> |
On 5/24/06, Guy Harris <[email protected]> wrote: > Typically, for an array of N myprot.ufield values, they just put each one > in as a myprot.ufield value, perhaps using proto_tree_add_XXX_format() so > that each one could be tagged with the instance number. > > It might be useful to have a call to do the tagging for you; no such call > currently exists. > Is it possible to append text to the field name after the field and value have been added using proto_tree_add_item? I'd like to add the "[index]" string that way. Otherwise I guess I would have to switch case off the type to determine which proto_tree_add_XXX_format call to use, even though I'm willing to accept the default formatting given the type as set in the hf table. Maybe proto_tree_add_item_format_field which allows controlling only the format of the field name (and not the value) would be useful. Or just as good for this purpose would be a proto_tree_add_item_element or some such as you describe and the formatting for array indexes would be common across dissectors if you accept default formatting. -- John.