Ethereal-dev: [Ethereal-dev] Re: [Ethereal-users] COL_INFO question.

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

Date: Wed, 12 Jun 2002 09:43:40 +0200
> On Tue, Jun 11, 2002 at 11:12:51PM -0700, Jaime Fournier wrote:
> > What do I have to do to print out hf_epm_inquiry_type
> > value on the COL_INFO as it is in the expanded tree
> > format?
>
>                if (check_col(pinfo->cinfo, COL_INFO))
>                    col_add_fstr(pinfo->cinfo, COL_INFO,
>                        "Interface Type: %u ", hf_epm_inquiry_type);
>
> as it is, after all, an unsigned integer.  "col_add_fstr()" is like
> "printf()"....

Off course, but why would you?

What I thought the OP meant was, if you have a (sequence of) byte(s) 
which you want to add to the Info column AND to the protocol tree, 
how do you do that?

First extract the value (tvb_get_()) into a variable (check if you 
have enough tvb space yadda, yadda yadda). Then add it to the Info 
column (check if you can using checkcol() and finally add it to the 
protocol tree (check if allowed using if (tree) )

The hf_ thing is IMHO just an identifier so you can link information 
you know at compile time with information at runtime. It does not 
represent the value of an item in the frame.

PS.
Shouldn't this question be posted to ethereal-dev? Please answer to this 
mail to 
ethereal-dev@xxxxxxxxxxxx

-- 
Andreas Sikkema
andreas.sikkema@xxxxxxxxxxx
"While you're waiting, read the free novel we sent you. 
 It's a Spanish story about a guy named `Manual'" - Dilbert