To avoid a plugin corrupting any of the main Wireshark structures, I’d like to use a mechanism just like Plugin IF. The more I look at it I realise that I would basically need to create all the same functionality as Plugin IF, and so duplicate things like the callback registration function etc. I’d like to re-use what you have done if I could and so my revised proposal is:
file_state state; /* Current state of capture file */
gchar *filename; /* Name of capture file */
guint32 count; /* Total number of frames */
guint32 num; /**< Frame number */
unsigned int passed_dfilter; /**< 1 = display, 0 = no display */
If you don’t think this is acceptable, is it OK if I just copy the plugin_if code (renaming as necessary)?
Thanks and regards…Paul
Thanks for the prompt response Roland.
Your proposed way sounds better, so I’ll rethink it in the way you describe.
Thanks and regards…Paul
[email protected] [mailto:[email protected]]
On Behalf Of Roland Knall
The plugin_if functionality exists, because methods called by plugins run in a different thread context than the gui. Therefore, if you want to gui to act in a certain way, you have to somehow cross the context to achieve whatever you want to do.
Your proposed idea goes in the other direction. You just want the gui to provide you with information about the currently selected frame nr. The approach here would be to add such a functionality in a ui/*.h file, which exposes this information for both gtk and qt interfaces (for now you would need to implement both) and allow anyone to get this information without a thread change.
The plugin if functions also by default do not return anything, as they can (at least theoratically) be bound to multiple outputs. the plugin_if_goto_frame could not only trigger the callback for the qt interface, but for a simultanously running gtk interface as well. In reality, this will not happen, but it could. So if you would ask the interface to give you the current frame number and 2-3 different systems are connected, which of the returned values (and it must be returned by a ref-parameter not return value) will you accept?
So, to summarize, no, the plugin-if is not the right thing to use, this is a funcionality best exposed in some ui/*.h file, maybe a new one, and an interface the gui implementations provide.
On Mon, Jan 4, 2016 at 4:32 PM, Paul Offord <[email protected]> wrote:
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
- Prev by Date: [Wireshark-dev] 802.11 monitor interfaces created by Wireshark do not have otherbss flag set
- Next by Date: Re: [Wireshark-dev] Add plugin_if_get_framenr()
- Previous by thread: Re: [Wireshark-dev] Add plugin_if_get_framenr()
- Next by thread: Re: [Wireshark-dev] Add plugin_if_get_framenr()