Wireshark-dev: Re: [Wireshark-dev] Adding count to the displayed data
From: eymanm <[email protected]>
Date: Fri, 2 Jul 2010 14:07:54 -0400
Jaap,

The proto_item_append_text() works perfectly appending text to a variable. Although, it appears that my original intention is to append text to a FIELDNAME as in

static hf_register_info hf[] = {
		{ &hf_PROTOABBREV_FIELDABBREV,
			{ "FIELDNAME",           "PROTOABBREV.FIELDABBREV",
			FIELDTYPE, FIELDDISPLAY, FIELDCONVERT, BITMASK,
			"FIELDDESCR", HFILL }
		}
	};
Is there a way to such thing?
Thanks

On Thu, Jul 1, 2010 at 2:21 AM, Jaap Keuter <[email protected]> wrote:
On 06/30/2010 06:06 PM, eymanm wrote:
> I'm extracting a multiple pieces of similar data using a for(i=0; i<max;
> i++) loop. I'd like to add the "i" to each piece of data being
> displayed. Something like:
>
> Piece0
>    data
> Piece1
>    data
> Piece2
>    data
>
> and so on. I tried to use PROTO_ITEM_SET_GENERATED(i), didn't work. Can
> somebody advise how to do it?
> Thanks
>

Hi,

Have a look at proto_item_append_text().

Thanks,
Jaap
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:[email protected]?subject=unsubscribe