Or the MATE plugin.  It registers its fields after the user selects a MATE
configuration file (in preferences).  (Note that it doesn't currently
support reconfiguration.  So while you can add a configuration file without
restarting Wireshark changing the configuration file requires restarting.)

On Sat, Jul 2, 2016 at 5:53 PM, Michael Mann <[email protected]> wrote:

> You may want to look at the diameter dissector
> (register_diameter_fields).  It registers a lot of its fields when
> Wireshark sees a diameter packet for the first time.
>
>
> -----Original Message-----
> From: marko <[email protected]>
> To: wireshark-dev <[email protected]>
> Sent: Sat, Jul 2, 2016 5:19 pm
> Subject: Re: [Wireshark-dev] Adding dynamic fields to tree from dissector
>
> On Tue, Jun 21, 2016 at 1:27 PM, [email protected] <[email protected]> wrote:
> > I can indeed figure out all possible fields and their types because I
> > have a protocol in some binary format selected by wireshark user
> > through settings.
>
> I have tried to implement this and found out that all dissectors
> register their fields in a first routine that is called by wireshark:
> proto_register_*.
> But I can get info about protocol fields and types only after user
> chooses file with protocol description via dissector setting. It means
> that I can get that info only in
> proto_reg_handoff_*.
>
> Is there a way to register fields in a proto_reg_handoff_*, not in a
> proto_register_*?
> ___________________________________________________________________________
> Sent via: Wireshark-dev mailing list <[email protected]>
> Archives: https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
> mailto:[email protected]?subject=unsubscribe
> <[email protected]?subject=unsubscribe>
>
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <[email protected]>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>              mailto:[email protected]
> ?subject=unsubscribe
>
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to