Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Helpful tip when asking questions: if your question involves software other than packet-sniffing software, do not assume that the people who might be able to answer your question are at all familiar with the software in question or the particular feature of that software that's involved.

From looking at some stuff on the Mathworks site, it appears that a "MEX file" is a file containing compiled C, C++, or Fortran code that can be used as an extension callable from Mathworks.

Presumably by "read[ing] UDP data" you either mean "capturing UDP packets from an interface" or "reading UDP packets from a capture file", as those are tasks for which you would use the libpcap API.

On Windows, code such as that could use either the old no-longer-maintained WinPcap or the new and maintained Npcap.

For recent releases of Wireshark, the installer installs Npcap, not Winpcap, by default. Npcap should be binary-compatible with WinPcap, but you probably have to install it with the "Install Npcap in WinPcap API-compatible Mode". That option appears to be the default if Npcap isn't currently installed, but perhaps it wasn't specified.

Check whether you have WinPcap, Npcap, or both installed, and uninstall both of them. Then try installing WinPcap 4.1.3. (The version of Wireshark is irrelevant to an application that uses WinPcap/Npcap; it's only the version of WinPcap or Npcap that's installed that matters. Npcap is, and WinPcap was, developed by a separate group of developers from the Wireshark developers; the only connection between them is that Wireshark uses WinPcap or Npcap for packet capture and have an installer for Npcap - formerly an installer for WinPcap - bundled with the Wireshark installer.)

In the longer term, you probably want to use Npcap. If your code is built with the WinPcap SDK, then it should work with Npcap IF Npcap was installed with the "Install Npcap in WinPcap API-compatible Mode" option - and it might not work if both WInPcap and Npcap are installed. Npcap has its own SDK, downloadable from https://npcap.com/, with which yo can build your code.

Helpful tip when asking questions: if your question involves software other than packet-sniffing software, do not assume that the people who might be able to answer your question are at all familiar with the software in question or the particular feature of that software that's involved.

From looking at some stuff on the Mathworks site, it appears that a "MEX file" is a file containing compiled C, C++, or Fortran code that can be used as an extension callable from Mathworks.

Presumably by "read[ing] UDP data" you either mean "capturing UDP packets from an interface" or "reading UDP packets from a capture file", as those are tasks for which you would use the libpcap API.

On Windows, code such as that could use either the old no-longer-maintained WinPcap or the new and maintained Npcap.

For recent releases of Wireshark, the installer installs Npcap, not Winpcap, by default. Npcap should be binary-compatible with WinPcap, but you probably have to install it with the "Install Npcap in WinPcap API-compatible Mode". That option appears to be the default if Npcap isn't currently installed, but perhaps it wasn't specified.

Check whether you have WinPcap, Npcap, or both installed, and uninstall both of them. Then try installing WinPcap 4.1.3. (The version of Wireshark is irrelevant to an application that uses WinPcap/Npcap; it's only the version of WinPcap or Npcap that's installed that matters. Npcap is, and WinPcap was, developed by a separate group of developers from the Wireshark developers; the only connection between them is that Wireshark uses WinPcap or Npcap for packet capture and have an installer for Npcap - formerly an installer for WinPcap - bundled with the Wireshark installer.)

In the longer term, you probably want to use Npcap. If your code is built with the WinPcap SDK, then it should work with Npcap IF Npcap was installed with the "Install Npcap in WinPcap API-compatible Mode" option - and it might not work if both WInPcap and Npcap are installed. Npcap has its own SDK, downloadable from https://npcap.com/, with which yo can build your code.

Helpful tip when asking questions: if your question involves software other than packet-sniffing software, do not assume that the people who might be able to answer your question are at all familiar with the software in question or the particular feature of that software that's involved.

From looking at some stuff on the Mathworks site, it appears that a "MEX file" is a file containing compiled C, C++, or Fortran code that can be used as an extension callable from Mathworks.

Presumably by "read[ing] UDP data" you either mean "capturing UDP packets from an interface" or "reading UDP packets from a capture file", as those are tasks for which you would use the libpcap API.

On Windows, code such as that could use either the old no-longer-maintained WinPcap or the new and maintained Npcap.

For recent releases of Wireshark, the installer installs Npcap, not Winpcap, by default. Npcap should be binary-compatible with WinPcap, but you probably have to install it with the "Install Npcap in WinPcap API-compatible Mode". That option appears to be the default if Npcap isn't currently installed, but perhaps it wasn't specified.

Check whether you have WinPcap, Npcap, or both installed, and uninstall both of them. Then try installing WinPcap 4.1.3. (The version of Wireshark is irrelevant to an application that uses WinPcap/Npcap; it's only the version of WinPcap or Npcap that's installed that matters. Npcap is, and WinPcap was, developed by a separate group of developers from the Wireshark developers; the only connection between them is that Wireshark uses WinPcap or Npcap for packet capture and have an installer for Npcap - formerly an installer for WinPcap - bundled with the Wireshark installer.)

In the longer term, you probably want to use Npcap. If your code is built with the WinPcap SDK, then it should work with Npcap IF Npcap was installed with the "Install Npcap in WinPcap API-compatible Mode" option - and it might not work if both WInPcap and Npcap are installed. Npcap has its own SDK, downloadable from https://npcap.com/, with which yo you can build your code.