Ethereal-dev: Re: [ethereal-dev] tvbuff + col_append mystery

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

From: Frank Singleton <frank.singleton@xxxxxxxxxxxx>
Date: Thu, 15 Jun 2000 08:48:32 -0500
Hi ,

Just to clarify things, it appears that its not so much
a col_append problem, but just that I cant get past
this statement unless I use the display filter with
my protocol string .

if (check_col(pinfo->fd, COL_INFO)) { ** why dont I get past here ??
..
}

/Frank..


Frank Singleton wrote:
> 
> Hi,
> 
> Well I am busy tvbuffing everything, but I am
> experiencing some strange things now.
> 
> When I run the logfile through my dissector, it
> no longer appears to "append" to the COL_INFO display, unless
> I explicitly enter my protocol display filter at the bottom of
> the GUI.
> 
> Here is a code <snip> typical of what I used in the
> pre-tvbuff days without problem.. I sprinkled
> some printf's here and there, and here is what I get.
> 
> start colinfo ,octet1 = 11
> end colinfo octet1 = 11
> msg type ,octet1 = 11
> 
> Note msgtype = 11 does exist in my
> static const value_string msgnames[] declaration.
> 
> Note: I do get "inside check_col" when I
> enter my protocol as the display filter.
> 
> eg:
> start colinfo ,octet1 = 11
> inside check_col
> found colinfo
> end colinfo octet1 = 11
> msg type ,octet1 = 11
> 
> Any thought would be appreciated.
> 
> I used the night build from 2000-06-14
> 
> Cheers / Frank..
> 
> <snip>
>     /* Save msgtype, and display it in INFO column */
> 
>     /* Get fd back for COL_INFO */
> 
>     printf("start colinfo ,octet1 = %i\n",octet1 );
> 
>     if (check_col(pinfo->fd, COL_INFO)) { ** why dont I get past here ??
>       printf("inside check_col  \n");
>       str = match_strval(octet1, msgnames);
>       if (!str) {
>         str = "Unknown";          /*   set a default value if not known */
>       }
>       printf("found colinfo \n");
> 
>       col_append_fstr(pinfo->fd, COL_INFO, " ( %s )", str); /* display
> msg type */
>     }
> 
>     printf("end colinfo octet1 = %i \n",octet1);
> <snip>

-- 
EUS/GN/V/Z Frank Singleton    ASO Americas BSS
Office : +1 972 583 3251      ECN 800 33251  
Pager  : +1 800 651 1184      Email : eusfrsi@xxxxxxxxxxxxxxx 
Amateur Radio: VK3FCS/KM5WS   Email : frank.singleton@xxxxxxxxxxxx

Hardware: HP Omnibook 4150 running Redhat Linux 6.2 (2.2.14 kernel).