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

What is the substitute of private_data field in packet_info structure? I checked the old and the new code and figured out that the private_data field is removed. The replacement from the code which i can make out is removing the private_data, but what if we have no option of removing it?

I am here trying to convert my plugins from old Wireshark version 1.2.10 to latest version.

Please help me with this.

asked 12 Jan '17, 01:06

chirag's gravatar image

chirag
11448
accept rate: 0%


What kind of data were you storing in pinfo->private_data field ? Without knowing, here is already a few suggestions.

If it's data for a sub dissector, use the the data parameter that is now the 4th parameter of the dissector_t structure.

If it is data used internally in the dissector, you can eventually use the p_add_proto_data() / p_get_proto_data() function

permanent link

answered 12 Jan '17, 01:55

Pascal%20Quantin's gravatar image

Pascal Quantin
5.5k1060
accept rate: 30%

Hi pascal, thanks for the answer. yes I used the extra param void *data in place of private_data. In the old code it was used to share the data between the dissector. After understanding the code I was able to replace it. Anyways thanks for the quick answer.

(12 Jan '17, 01:59) chirag

If an answer has solved your issue, please accept the answer for the benefit of other users by clicking the checkmark icon next to the answer. Please read the FAQ for more information.

(12 Jan '17, 02:07) Jaap ♦
Your answer
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
×37
×3
×1

question asked: 12 Jan '17, 01:06

question was seen: 1,108 times

last updated: 12 Jan '17, 02:07

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