Wireshark-dev: Re: [Wireshark-dev] Adding Qt5 libs via VS Additional Dependencies

From: Roland Knall <rknall@xxxxxxxxx>
Date: Fri, 5 Aug 2016 12:56:40 +0200
This is exactly what I do here with my plugin. Although without the TCP part. The method to do it without using Qt in the dissector is to implement a tap interface in the dissector, and register the plugin on that interface. The plugin than can start the TCP server and monitors the tap interface and reacts accordingly to the commands. Would work fine for you, the same way you do it now, but would be far easier to maintain. The dissector would be stable and does never need to change, and all you would have to recompile is the plugin.

regards
Roland

On Fri, Aug 5, 2016 at 12:46 PM, Paul Offord <Paul.Offord@xxxxxxxxxxxx> wrote:

Hi Roland,

 

No, not really an RPC interface.  Some very simple commands and events flow back and forth, like this:

 

Command|GoToFrame|55

Response|MovedToFrame|55

Event|MovedToFrame|67

 

We needed it to be a dissector to enable us to detect when the user moves within a trace so that we can generate a suitable asynchronous event.  We also needed the functionality now, and it had to work with standard WS releases, so it had to be a plugin of some sort.  By the way, we are not planning to submit this to be incorporated into the main stream code.

 

You can see Syncro in action here http://www.youtube.com/watch?v=anEZGfF4P10&t=5m5s if you are interested.

 

Best regards…Paul

 

From: wireshark-dev-bounces@wireshark.org [mailto:wireshark-dev-bounces@wireshark.org] On Behalf Of Roland Knall
Sent: 05 August 2016 11:10


To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Adding Qt5 libs via VS Additional Dependencies

 

So, if I understand it correctly, it is a RPC interface? I still think, implementing this as a dissector is a major overkill, and will also lead to issues further down the line, if dissectory API changes or similar issues. I'd implement such an interface via a simple plugin architecture, which would have the added benefit, that you do not have the need for an active dissection runnning, to query the instance. A dissection should be mainly about "How to interpret packet data", which is not the case here.

 

regards

Roland

 

On Fri, Aug 5, 2016 at 11:33 AM, Paul Offord <Paul.Offord@xxxxxxxxxxxx> wrote:

Hi Roland,

 

The dissector is called Syncro and it allows a remote process to access the WS plugin_if extensions through a TCP connection.  We wanted to be able to achieve this without building a custom version of WS and so built it as a dissector.  We don’t use any of the GUI stuff from Qt, just the TCP server functionality, multi-threading functions and Signals & Slots to communicate between threads.

 

Best regards…Paul

 

From: wireshark-dev-bounces@wireshark.org [mailto:wireshark-dev-bounces@wireshark.org] On Behalf Of Roland Knall
Sent: 05 August 2016 10:25
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Adding Qt5 libs via VS Additional Dependencies

 

Paul, could you give an example, why you chose Qt libraries over Gtk? Was it not possible, or is it a personal choice?

 

I do have plugins for WS, which use Qt, but not for dissectors, so I am just curious, what was missing.

 

regards

Roland

 

On Fri, Aug 5, 2016 at 11:20 AM, Graham Bloice <graham.bloice@xxxxxxxxxxxxx> wrote:

On 5 August 2016 at 07:54, Paul Offord <Paul.Offord@xxxxxxxxxxxx> wrote:

Hi,

 

I have written a plugin dissector that uses some Qt5 functions.  To build with Visual Studio 2013 I have to manually add some Qt5 libs via Project -> Properties -> Linker -> Input -> Additional Dependencies.  This works OK but whenever I run:

 

cmake -D ENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64" ..\

 

to prepare the environment the Qt5 additional Dependencies are deleted.  How can I add my additional libs to the Cmake process in a way that won’t interfere with the standard build process?  Or should I be doing this some completely different way?

 

Thanks and regards…Paul

 

 


Although I'm suspicious of why a dissector should need anything from Qt, have a look at the CMake wiki page for "Finding a library" at https://cmake.org/Wiki/CMake:How_To_Find_Libraries

 

Basically add the appropriate find_package(), include_directories() and target_link_libraries() calls to the CMakeLists.txt of your plugin for the QT library you want.

 

Note that this behaviour is by design, CMake generates the Visual Studio solutions and projects from the info in the CMakeLists.txt files, there is no way to make changes in the VS IDE and push them back into the CMakeLists.txt files (except if you open the file in the VS editor).

 

You might also have to add steps to the CMakeLists.txt to copy the required Qt DLL to the staging directory and the update the packaging scripts to put it into an installer (packaging\nsis\custom_plugins.txt).

 

--

Graham Bloice


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe

 


______________________________________________________________________

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
______________________________________________________________________


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe

 


______________________________________________________________________

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
______________________________________________________________________

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe