This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Hi all,

I'm writing a dissector (over UDP) which has header fields (32 bytes) but also footer fields (padding of 8 bytes). The remaining data (between my protocol header and protocol footer) are passed to the usual "data" dissector.

When creating my dissector subtree I do not success to highlight just the header and the footer.

With the following code I highlight the full UDP payload (my protocol header + the data + my protocol footer): amin_item = proto_tree_add_item(tree, proto_amin, tvb, 0, -1, FALSE); amin_tree = proto_item_add_subtree(amin_item, ett_amin);

Besides, with the following code I only highlight my protocol header: amin_item = proto_tree_add_item(tree, proto_amin, tvb, 0, 32, FALSE); amin_tree = proto_item_add_subtree(amin_item, ett_amin);

How could I create my subtree and only highlight my protocol header + my protocol footer?

Thanks.

PS: In the Ethernet frame with padding, when clicking to the Ethernet subtree, Ethernet header fields and padding are highlighted (the data between is not highlighted). I would like to do the same.

asked 09 Dec '13, 06:08

Wolfy_21's gravatar image

Wolfy_21
1112
accept rate: 0%

edited 09 Dec '13, 06:17

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×637
×16

question asked: 09 Dec '13, 06:08

question was seen: 1,419 times

last updated: 09 Dec '13, 06:17

p​o​w​e​r​e​d by O​S​Q​A