( A bit of background can be found in my previous question here, if it assists someone in helping me: JamVm not running an application (that uses jpcap) on Gumstix ).
I am trying to run a packet sniffing java application on a Gumstix overo board. The application has been developed using Netbeans on windows 7. When I tried to run it on Gumstix (using JamVm), I got an error saying that a file libjpcap.so is missing. I then searched for jpcap package (or libjpcap.so) for angstrom distribution, and also for arm architecture (regardless of distro) but couldn't find anything.
Therefore, as suggested on the jpcap website (http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/install.html), I am now trying to compile the jpcap source code on my Gumstix board. In the makefile (/src/c/Makefile), I set JAVA_HOME to /usr/java/latest. When I execute 'make', I get a large number of errors. A few of them are shown below:
root@overo:/usr/src/jpcapTar/jpcap-0.7/src/c# make
gcc -shared -L. -I/usr/java/latest/include -I/usr/java/latest/include/linux\
-I/usr/include\
JpcapCaptor.c JpcapSender.c JpcapWriter.c\
packet_arp.c packet_datalink.c packet_icmp.c packet_ip.c\
packet_ipv6.c packet_tcp.c packet_udp.c\
-o libjpcap.so -lpcap
JpcapCaptor.c:6:16: error: jni.h: No such file or directory
JpcapCaptor.c:7:17: error: pcap.h: No such file or directory
In file included from JpcapCaptor.c:35:
Jpcap_sub.h:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before '
*' token
Jpcap_sub.h:54: error: expected '=', ',', ';', 'asm' or '__attribute__' before '
*' token
Jpcap_sub.h:55: error: 'PCAP_ERRBUF_SIZE' undeclared here (not in a function)
Jpcap_sub.h:57: error: expected '=', ',', ';', 'asm' or '__attribute__' before '
JpcapHandler'
Jpcap_sub.h:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before '
UnknownHostException
Seeing that jni.h caused the first error message, I searched my linux box and but couldn't find jni.h. Is this missing file the cause of the errors? Have I forgotten to add some paths somewhere?
Any help would be highly appreciated. Thanks in advance.