libpcap problem
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Eelco_Cramer
Posted On:   Monday, November 13, 2006 07:09 AM

Hi, I am trying to use the jpcap (http://netresearch.ics.uci.edu/kfujii/jpcap/doc/index.html) package on Debian Linux. I have installed and configured jpcap according to the installation manual, readme & FAQ. But I am still getting a unsatisfied link error. jpcap consist of a java package and a shared object library that interfaces with libpcap. I have also tried another jpcap package (http://jpcap.sourceforge.net/) which runs fine. But because this package does not support packet sending it is unusable to me. But since this package also bridges call to libpcap I believe it is safe to say that libpcap is installed and configured   More>>

Hi,


I am trying to use the jpcap
(http://netresearch.ics.uci.edu/kfujii/jpcap/doc/index.html) package on
Debian Linux. I have installed and configured jpcap according to the
installation manual, readme & FAQ. But I am still getting a unsatisfied
link error.


jpcap consist of a java package and a shared object library that
interfaces with libpcap.


I have also tried another jpcap package (http://jpcap.sourceforge.net/)
which runs fine. But because this package does not support packet
sending it is unusable to me. But since this package also bridges call
to libpcap I believe it is safe to say that libpcap is installed and
configured properly.


I have tried running my program on both JDK 1.5 and JDK 1.4.2 but I get
the same result.


I have included a stacktrace and a ldconfig dump.


Any thoughts on this would be greatly appreciated. Also if anyone knows
of an alternative way of capturing ethernet packages in Java, please
feel free to do suggestions.


Kind regards,

Eelco


---8 < stack trace >8---

			
PNmcrs:~/myapp# java -jar myapp.jar tap1

Exception in thread "main" java.lang.UnsatisfiedLinkError:
/usr/lib/j2sdk1.4-sun/jre/lib/i386/libjpcap.so:

/usr/lib/j2sdk1.4-sun/jre/lib/i386/libjpcap.so: undefined symbol:

pcap_sendpacket

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)

at java.lang.Runtime.loadLibrary0(Runtime.java:788)

at java.lang.System.loadLibrary(System.java:834)

at jpcap.JpcapCaptor. (Unknown Source)

at myapp.MyApp.main(MyApp.java:32)


---8 < eo stack trace >8---


---8 < ldconfig output >8---
PNmcrs:/usr/include# ldconfig -p |grep pcap

libpcap.so.0.8 (libc6) => /usr/lib/libpcap.so.0.8

libpcap.so.0.7 (libc6) => /usr/lib/libpcap.so.0.7

---8 < eo ldconfig output >8---

   <<Less

Re: libpcap problem

Posted By:   Robert_Lybarger  
Posted On:   Monday, November 13, 2006 09:45 PM

The message looks like your JNI layer is complaining about expected-but-missing code in the native pcap library itself. The/your Debian pcap library might not actually provide the packet sending functionality? I'd check the version and make sure one way or the other.
About | Sitemap | Contact