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

I wrote a plugin for my protocol whose decoding depends on a file passed to it from the outside. Can I get that file can be properly set by acting directly on the properties of the plugin from the GUI of Wireshark?

Thank you in advance.

asked 13 May '14, 07:09

Junzo's gravatar image

accept rate: 100%

I'm assuming here that you want to set the pathname of the file from the GUI.

If so, you want to register a "filename" preference, which is a string preference that also supports a "Browse" button, allowing the user to browse the file system through the GUI. See, for example, epan/dissectors/packet-kerberos.c, which registers a "filename" preference using prefs_register_filename_preference().

permanent link

answered 14 May '14, 15:24

Guy%20Harris's gravatar image

Guy Harris ♦♦
accept rate: 19%

Two questions:

Is the correct call every time the function of reading the string from the preferences by entering the function call in "dissect_myProto" or is there a way to invoke it only when the preference is changed?

How do I delete the preference, and then deallocate the string corresponding to the fie, when I close my wireshark?

(15 May '14, 03:29) Junzo

The TPNCP dissector does something similar. Use a text entry for your file.

permanent link

answered 13 May '14, 23:30

Jaap's gravatar image

Jaap ♦
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 13 May '14, 07:09

question was seen: 1,495 times

last updated: 15 May '14, 03:29

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