Wireshark-dev: Re: [Wireshark-dev] dissector array display handling
From: "Manthos S." <s.manthos@xxxxxxxxx>
Date: Tue, 3 Aug 2010 16:58:38 +0200
Hello all,
i dont think it somthing terrible what i am asking for. I just want to know which are the right expressions of "field_name" and "value" in the following function:
proto_tree_add_bytes_format(pal_dl_DataList_subtree, hf_pal_dataLength, tvb, offset, 4, dataLength, "%d: [ %s : %s , ", i, field_name, value );
Any ideas?
Have a nice day!
Spanos
On Mon, Aug 2, 2010 at 12:57 PM, Manthos S. <s.manthos@xxxxxxxxx> wrote:
Dear experts,
Thank you all for your answers, they have been very helpful for me to understand a bit more the wireshark logik.
I am a step forward and i need some more easy help.
I managed the loop for displaying the array content properly.
Instead of using the simple proto_tree_add_item() i am using now the proto_tree_add_bytes_format(), in order to be able to add brackets, index numbers etc. in my gui tree. (i hope *_bytes_* is the right one)
My question is:
How can i add in the printf part of the proto_tree_add_bytes_format() the name of the field and the value. In which structure are these infos saved? I need something like that or similar (????):
proto_tree_add_bytes_format(pal_dl_DataList_subtree, hf_pal_dataLength, tvb, offset, 4, dataLength, "%d: [ %s : %s , ", i, field_name, value );
With the proto_tree_add_bytes_format_value() the name of the field is added automaticaly, according DEVELOPER.readme. But i want to insert the index number in front of the name, so i have to use proto_tree_add_bytes_format().
My aim is to achieve a gui presence like this:
+ array_name
index1:[ FieldName : Value ,
FieldName : Value ,
FieldName : Value ,
... ]
index2:[ FieldName : Value ,
FieldName : Value ,
FieldName : Value ,
... ]
etc.
Looking forward to get youranswers.
Cheers
Manthos Spanos
ps. to answers your question, i am developing a dissector for an lower layer interface for LTE defined from FemtoForum.
On Fri, Jul 2, 2010 at 9:44 PM, Guy Harris <guy@xxxxxxxxxxxx> wrote:Found them:
On Jul 2, 2010, at 12:36 PM, Guy Harris wrote:
>
> On Jul 2, 2010, at 9:53 AM, Jeff Morriss wrote:
>
>> There's no API to do that automatically.
>
> Having such an API has been discussed on the mailing list; see, for example
>
> http://www.wireshark.org/lists/wireshark-dev/200702/msg00439.html
>
> and followups (although I have no idea what happened to the 2006 mail messages I cited in one of the followups).
http://www.wireshark.org/lists/wireshark-dev/200611/msg00294.html
http://www.wireshark.org/lists/wireshark-dev/200611/msg00301.html
http://www.wireshark.org/lists/wireshark-dev/200611/msg00306.html
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
- References:
- Re: [Wireshark-dev] dissector array display handling
- From: Manthos S.
- Re: [Wireshark-dev] dissector array display handling
- Prev by Date: Re: [Wireshark-dev] Lua on Windows 7, 64-bit
- Next by Date: [Wireshark-dev] buildbot failure in Wireshark 1.2 on OSX-10.5-PowerPC
- Previous by thread: Re: [Wireshark-dev] dissector array display handling
- Next by thread: Re: [Wireshark-dev] How to format a subtree banner?
- Index(es):