Read Raw Ethernet Packets With LabVIEW

Updated May 8, 2024

Reported In

Software

  • LabVIEW

Issue Details

I am looking at possibilities of reading raw ethernet packets from a program like Wireshark, are there any functions or an API that can be used to read these packets in LabVIEW?

Solution

LabVIEW has no APIs for reading raw ethernet packets, LabVIEW has several APIs that can be used for communication over Ethernet which are documented in this document: Using the Right Networking Protocol . However, you cannot go lower than that using native LabVIEW functions since they follow a protocol and cannot read raw packets. A workaround is to use a wrapper for a third-party library used for ethernet packet sniffing. In the following link, you can find a community example that provides a library of VIs that work together to wrap various ethernet packet sniffing functions available from WinPcap, a Windows packet capture program: Ethernet Packet Sniffer Utility Using WinPcap Functions example