Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 5752] Adding heuristic dissector code to Sercos III dissec

Date: Sat, 19 Mar 2011 18:26:56 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5752

Guy Harris <guy@xxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6012|                            |review_for_checkin+
               Flag|                            |
   Attachment #6012|1                           |0
        is obsolete|                            |

--- Comment #3 from Guy Harris <guy@xxxxxxxxxxxx> 2011-03-19 18:26:52 PDT ---
(From update of attachment 6012)
> As by the time the dissector registers itself as being heuristic (and the dissector being part of libwireshark) the plugin is not loaded yet

The way dissector registration is done is:

    the "register" routines for all built-in dissectors are called;

    the "register" routines for all Python dissectors are called;

    the "register" routines for all plugin dissectors are called;

    the "register handoff" routines for all built-in dissectors are called;

    the "register handoff" routines for all Python dissectors are called;

    the "register handoff" routines for all plugin dissectors are called.

In the "register" routine, a dissector module should register its header fields
and tree types, should create its dissector tables, and should register
dissector functions by name.  By the time the handoff routines are called, all
the dissector tables should exist; in the handoff routine, dissectors should
register in those tables.

That's what the code in this patch is doing, so I'll check that patch in.  The
problem was that the openSAFETY dissector *wasn't* doing that; it was
registering the dissector as a heuristic dissector for SERCOS III in the
"register" routine, not in the "register handoff" routine - and that wouldn't
even be guaranteed to work if all the dissectors were built-in; if it worked,
it was by chance (or by alphabetical order).

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.