Wireshark-dev: Re: [Wireshark-dev] Routines for registering dissectors with a "portnumber", and
From: Jeff Morriss <[email protected]>
Date: Mon, 20 Dec 2010 13:56:09 -0500
Stephen Fisher wrote:
On Mon, Dec 20, 2010 at 06:45:38PM +0100, news.gmane.com wrote:

The first should be illustrated. The pinfo member fd points to a structure that has been changed between 1.2.x and 1.4.x. You this structure to retrieve the packet number, used to identify conversations.
Using accessor functions to set and get values as in object-oriented 
programming instead of directly using the variables would help prevent 
problems like this.
And submitting dissectors to Wireshark (rather than relying on a "fixed" 
API) can prevent even more problems like this (by, in effect, pushing 
the maintenance of the dissector to whoever is changing the API in the 
first place).  :-)
(Yes, yes, I know...  I too maintain a few custom dissectors that my 
employer would probably not let me publish.  But I also accept that I 
have to modify the things from time to time as the API evolves.)
Personally I'm not convinced that settling on a fixed API is such a good 
idea anyway...  API stability in a branch, sure...