LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sniff ethernet frames

Solved!
Go to solution

This was asked back in 2002, with no useful resoultion.

 

In Labview, can I connect to a network port and receive all network traffic? The application I am working on needs to start when a certian packet is sent on the network. I'd like to scan the network traffic for this packet and trigger when I see it.

 

Thanks,

 

 

--

Brian Rose
0 Kudos
Message 1 of 5
(4,140 Views)

Maybe this will help?

 

 

What kind of packet are you looking for? Is it multicast, unicast or broadcast? Ist it UDP or TCP? It is some low level packet (e.g. ARP, etc.)? Where does it come from?

 

If you only want to use plain LabVIEW, you need to listen on a defined UDP or TCP port.

Message 2 of 5
(4,132 Views)
Solution
Accepted by topic author Mister_Rose

You can use the TCP Listen VI to create a listener on a specific port. If a connection is established then you can use TCP Read to read the byte stream. However, you cannot go any lower than that with the LabVIEW functions. It sounds like you want to do something similar to what Wireshark does? If so, you should do a search for WinPCap on these forum. Someone had started writing functions that would interface to WinPCap (which is used by Wireshark). Don't know how far it got. I had written about half a dozen VIs that called the WinPCap library via a helper DLL and used this to capture raw packets going between a PC and an instrument.

 

EDIT: I see that altenbach found the link. Smiley Wink

Message Edited by smercurio_fc on 02-17-2009 10:02 AM
Message 3 of 5
(4,125 Views)

 

Or you can use the network sniffing library from controlsag. (www.controlsag.ro). Check the software section.

cosmin

0 Kudos
Message 4 of 5
(3,767 Views)
I have also used the WinPcap and it worked great, I had no problem sniffing and processing ethernet streams in labview.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 5
(3,760 Views)