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

I'm trying to print a specific data inside my Wireshark Custom Dissector to a file that I can upload to a different program. I tried opening and writing to a data using fopen and fprintf but Wireshark crashes when I upload my captured packet it crashes. Is there any way I can write a print-to-file function inside a custom dissector?

asked 06 Aug '15, 14:40

J1Ronnie's gravatar image

accept rate: 0%

OS and Wireshark version?

There are platform independent file I/O routines in wsutil\file_util that might be handy.

Arguably though, writing to a file in a dissector is not a good idea, it will slow down dissection and live captures. Maybe it should be driven from a user generated action, e.g. a menu option.

permanent link

answered 07 Aug '15, 01:20

grahamb's gravatar image

grahamb ♦
accept rate: 22%

Yes, look into using a tap for that.

(07 Aug '15, 05:31) Jaap ♦
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: 06 Aug '15, 14:40

question was seen: 1,489 times

last updated: 07 Aug '15, 05:31

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