ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] Regarding Memory allocation

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

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Fri, 4 Mar 2005 11:59:01 +0100 (CET)

On Fri, 4 Mar 2005, harshas wrote:

> Hello ,
>   I want to append  some information in the info column of the
> ethereal.Ethereal
>  is already displaying some info I want to add some more info to it.I tried
> with column append string routine like this.
>  if (check_col(pinfo->cinfo,COL_INFO))
>          col_append_str(pinfo->cinfo,COL_INFO," xxx ");
> I could not print anything. Please tell me is their any other method  to
> append the
>   info in the column info.
>  Regards
>     harsha
>

>From README.developer

   If you're setting it to a string you've constructed, or will be
   appending to the column later, use "col_add_str()".

So it all depends on how you _start_ filling the column. If it's already
filled using col_set_str(pinfo->cinfo, COL_INFO, "Blah"); you'll need to
clear it first, like so:

    col_clear(pinfo->cinfo, COL_INFO);

Good luck,
Jaap