I recently downloaded the JEthereal.jar
file to capture packet traffic on my internet connection through JEthereal
and also to study it. It reads the packets from a .pcap
file just fine but on trying to capture packets it gave me a message that:
"No device found. This probably means that you installed JPcap but not libpcap / WinPcap.Please follow the instructions on the website to install it. It takes about 15 seconds and is well worth it."
So I downloaded its source code and opened it in Eclipse since I had already installed WinPcap
.
On going through the code I came to the part where network devices are supposed to be discovered. The static method getDeviceList()
from the JpcapCaptor
class in the jpcap
package which should return an array of network devices of type NetworkInterface
. The following is its declaration given on the internet:
public static NetworkInterface[] getDeviceList()
However, in the source code that I have downloaded the method is left without a body and its been declared native
i.e.
public static native NetworkInterface[] getDeviceList();
What should I do now to identify my devices? On searching on the net and on this portal I came to know that a jpcap.dll
file should be present in my system32 folder (I am using Windows7) and I should install WinPcap
for that. I had already installed WinPcap
and there is no jpcap.dll
file in the system32 folder. Also, i suppose i should add system32 to my PATH variable, i haven't done that yet since there is no jpcap.dll
there.
Thanx in advance!!