Wireshark-dev: Re: [Wireshark-dev] Registering protocol details
From: Paul Offord <[email protected]>
Date: Mon, 8 Aug 2016 07:42:15 +0000

Thanks Pascal,

 

I think you are right.  I’ll rethink my code.

 

Best regards…Paul

 

From: [email protected] [mailto:[email protected]] On Behalf Of Pascal Quantin
Sent: 07 August 2016 20:52
To: Developer support list for Wireshark <[email protected]>
Subject: Re: [Wireshark-dev] Registering protocol details

 

Hi Paul,

 

2016-08-07 18:42 GMT+02:00 Paul Offord <[email protected]>:

Hi Anders,

 

Ah – I understand.  I had asked Gerald about that at SF16 and he mentioned the ability to use other pcap-ng block types.  I’d like to do that in the future, but I don’t want to tackle it yet.  This wouldn’t overcome the problem I have anyway.

 

So going back to the original question, can I call function calls like proto_register_add_subtree and proto_register_add_item from with the dissect_foo function or do I have to make them from proto_register_foo?

 

As far as I know you need to register fields before dissection starts. It can be done dynamically based on some file selected in preferences, but I don't think it can be done on the fly during dissection.
That said when looking at the proto_register_field_array() code, I do not see any assertion related to this, but I would not be surprised if things like filtering do not work as expected if you add new fields as dissection goes. And as far as I can tell, no dissector is doing something as you suggest yet.
I will let another developer correct my assumptions if I'm wrong.

Regards,

Pascal.


______________________________________________________________________

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________