From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Wireshark

Hi all,

 

I need to open and configure Wiresharkoftware using labview.
Is any activeX component or any VI library is available to handle Wireshark software.

 

Kindly help me on the same.

 

Thanks in advance

0 Kudos
Message 1 of 11
(5,147 Views)

seen here

with the Platform SDK  you should be able to use Call Library Function nodes to get most functionality


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 11
(5,125 Views)

@Pankajusic wrote:

Hi all,

 

I need to open and configure Wiresharkoftware using labview.
Is any activeX component or any VI library is available to handle Wireshark software.

 

Kindly help me on the same.

 

Thanks in advance



What do you want to do? Wireshark is an application. You can launch it using the SystemExec function. The configuration for Wireshark are stored in configuration files that you could modify using file IO functions, but I don't think that is a good solution. I'm not aware of any interprocess communication interface like ActiveX or similar to Wireshark that would allow to control Wireshark from another program, and eventhough it may exist it is likely not a good idea to try to integrate an application like Wireshark in such a way into another application. Wiresharks power is in its interactive possibilities.

 

If you rather talk about doing something similar to what Wireshark does in LabVIEW then you would rather want to interface to the WinPCAP driver that Wireshark uses to capture network traffic.

 

Here, and here, and here and quite a few more pages on this site talk about the use of the Pcap driver in LabVIEW.

  

Rolf Kalbermatter
My Blog
Message 3 of 11
(5,072 Views)

Hi rolfk,

 

the control flow will be like:

 

Start the test.

Establishing Telnet connection, SSH connection  and FTP connection.

Launch wireshark application.

Select the port 

start recording on wireshark 

stop recording on wireshark

 

I need to automate the wireshark part using labview.

 

 

Please let me know if you have any questions.

0 Kudos
Message 4 of 11
(5,067 Views)

@Pankajusic wrote:
 

Please let me know if you have any questions.


I thought, it's you who had questions here. Smiley Wink

 

Anyhow, Wireshark does have command line options that you could use to to pass it configuration settings when you launch it through the LabVIEW SystemExec function. That is about as far as Wireshark allows to be controlled by third party apps. If you want to have more control you likely will have to directly interface to WinPcap through any of the links I showed you and do all the nitty gritty details yourself.

 

Sorry, no free ride here!

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 11
(5,061 Views)

Hi all,

 

Is it by any chance possible to load the wireshark application's UI into a LabVIEW application? I mean into a subpanel or something. I'm sorry if this is a silly question.

 

Regards,
Nitz

0 Kudos
Message 6 of 11
(4,718 Views)

Yes, it's possible with several Windows API calls to use child windows.

No, I don'tt think it is very useful at all. The window will sit in the LabVIEW front panel as child window. It will simply sit there and you would have to find a way to meaningfully interface to WireShark from within LabVIEW to do anything useful. I'm not sure if WireShark even has some kind of remote control interface but even if it has it would be quite a lot of work to implement something in LabVIEW for this.

 

So you would win nothing, if WireShark was embedded in a LabVIEW compared to just running WireShark alongside your LabVIEW application.

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 11
(4,709 Views)

Thank you very much Rolf. I agree with your explanation and I think I'm just going to use the CLI commands to communicate with Wireshark after launching it from LabVIEW. This is a very simple way for me.


But still, out of curiosity, do you have any links where I can learn more about the several Windows API calls you were referring to.

 

Thanks and Regards,
Nitz

0 Kudos
Message 8 of 11
(4,687 Views)

Well it revolves around Windows API functions like SetParent() and friends. Handling everything correctly is however pretty involved and with potential pitfalls depending on the Windows version and used UI engine.

 

Generally it is a nice exercise to thinker with but has in real world situations pretty limited use cases and is usually not worth the effort that it requires.

Rolf Kalbermatter
My Blog
Message 9 of 11
(4,674 Views)

Rolf,

 

Thank you very much. This will help me get started with it. As mentioned earlier, in my proeject I'm just going to use the CLI commands but I just wanted to learn this handling too. Sounds cool!


Thanks again. I really appreciate all the efforts that you guys have been putting to help people like me.

 

Regards,
Nitz

0 Kudos
Message 10 of 11
(4,661 Views)