User Guide
The core maintainers have done a lot of work fixing bugs and making code compile on the various
platforms Wireshark supports.
To ensure Wireshark's source code quality, and to reduce the workload of the core maintainers, there
are some things you should think about before submitting a patch.
Warn!
Ignoring the code requirements will make it very likely that your patch will be re-
jected!
• Follow the Wireshark source code style guide. Just because something compiles on your plat-
form, that doesn't mean it'll compile on all of the other platforms for which Wireshark is built.
Wireshark runs on many platforms, and can be compiled with a number of different compilers.
See Section 7.2, “Coding styleguides” for details.
• Fuzz test your changes! Fuzz testing is a very effective way to automatically find a lot of dis-
sector related bugs. You'll take a capture file containing packets affecting your dissector and the
fuzz test will randomly change bytes in this file, so that unusual code paths in your dissector are
checked. There are tools available to automatically do this on any number of input files, see: ht-
tp://wiki.wireshark.org/FuzzTesting for details.
3.9.5. Sending your patch for inclusion
After generating a patch of your changes, you might want to have your changes included into the
SVN repository.
To submit a patch, open a new ticket in the Wireshark bug database at http://bugs.wireshark.org/
bugzilla/enter_bug.cgi?product=Wireshark. You must first create a bug, then attach your patch or
patches.
• Set the Product, Priority, and Severity as needed.
• Add a Summary and Description, and create a bug using the Commit button. If your code has
passed fuzz testing, please say so in the description.
• Once the bug has been created, select Create a New Attachment and upload your patch or
patches. Set the review_for_checkin flag to ?.
• If possible and applicable, attach a capture file that demonstrates your new feature or protocol.
Tip!
Setting the review_for_checkin is important. Without it, your patch won't show up in
the pending patch request queue.
You might get one of the following responses to your patch request:
• Your patch is checked into the SVN repository. Congratulations!
• You are asked to provide additional information, capture files, or other material. If you haven't
fuzzed your code, you may be asked to do so.
• Your patch is rejected. You should get a response with the reason for rejection. Common reas-
ons include not following the style guide, buggy or insecure code, and code that won't compile
on other platforms. In each case you'll have to fix each problem and upload another patch.
Work with the Wireshark sources
35