Whether Jnetpcap support wireless packet .pcap reading or not

Mark Bednarczyk

PLEASE HELP ME i am in trouble man......
Atleast answer whether Jnetpcap support wireless packet reading or not ( I read all question on this forum n there is something written about radiotap header so I assume it support wireless packet reading, but now not able to read package and giving error )

I use program given at jnetpcap.com/tutorial/usage ( Tutoral 2- API usuage ) to read WIRELESS packet downloaded from crawdad dataset.
So please help me...
( System information:- jnetpcap version 1.3.0
libpcap version 1.1.1-10
java version 1.6.0_27
eclipse Indigo 3.7.2
os Ubuntu 12.04 64 bit
processor AMD processor opteron )

Wireless and JnetPcap

I want to use JNetPcap with my wireless files. So how is JNetPcap for wireless packets saved using pcap-ng format ?( Does it work with pcap-ng ?) I want information form network layer and above layer of OSI model.

how to learn jnetpcap?

i am new on jnetpcap and also on java.
i want to develop a packet analyzer tool like wireshark(small version of it) with basic functionality.
so from where i start i tried basic examples on the tutorial .
i learn how to get the interfaces and also fetching packets little bit.
please help me on this


device list is empty

I have very little experience with JNetPcap , i start with how to get device description i wrote this code:
List alldevs;
alldevs= new ArrayList();

// For any error msgs
StringBuilder errbuf = new StringBuilder();

//Getting a list of devices
int r = Pcap.findAllDevs(alldevs, errbuf);
if (alldevs.isEmpty()) { System.out.println("Network devices not found:");}

the result is:
Network devices not found:

that mean the divice list is an empty list althought i have 2 network card ( wireless and wired ) how can me resolve this pb.

[Exception] Exception in thread "DisposableGC" java.lang.IllegalStateException: g0:: .......

Hello Everyone,

I am running a small Java program which is capturing network packets using jNetPcap. Program is workign fine but at run-time I am experiencing an exception

Exception in thread "DisposableGC" java.lang.IllegalStateException: g0:: size < 0 :: culprit=JMemoryReference[prev=null, next=null]
at org.jnetpcap.nio.LinkSequence.remove(Unknown Source)
at org.jnetpcap.nio.DisposableReference.remove(Unknown Source)
at org.jnetpcap.nio.JMemoryReference.remove(Unknown Source)
at org.jnetpcap.nio.DisposableGC.dispose(Unknown Source)
at org.jnetpcap.nio.DisposableGC.drainRefQueueLoop(Unknown Source)
at org.jnetpcap.nio.DisposableGC$2.run(Unknown Source)
at java.lang.Thread.run(Thread.java:679)

But the program keeps on running. I was looking for the solution to this problem and came across a thread where it was discussed and mentioend that it is fixed in the upcomming releases of jNetPcap as mentioned in the following link


Now whenever I am using the release 1.4 or highr I am getting a complite time exception and unable to proceede further. The new exception is

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.slytechs.library.NativeLibrary.dlopen(Ljava/lang/String;)J
at com.slytechs.library.NativeLibrary.dlopen(Native Method)
at com.slytechs.library.NativeLibrary.(Unknown Source)
at com.slytechs.library.JNILibrary.(Unknown Source)
at com.slytechs.library.JNILibrary.loadLibrary(Unknown Source)
at com.slytechs.library.JNILibrary.register(Unknown Source)
at com.slytechs.library.JNILibrary.register(Unknown Source)
at com.slytechs.library.JNILibrary.register(Unknown Source)
at org.jnetpcap.Pcap.(Unknown Source)
at TrafficAnalysis.packetCapturer(TrafficAnalysis.java:73)
at TrafficAnalysis.main(TrafficAnalysis.java:215)

Syndicate content