Other

exec jnetpcap Test have ERROR on aix6.1

Network devices found:
#0: lo0 [No description available]
#1: en1 [No description available]

Choosing 'en1' on your behalf:
pcap=libpcap version 1.3.0
Exception in thread "main" org.jnetpcap.packet.structure.AnnotatedMethodException: [Tcp.] null
at org.jnetpcap.packet.structure.AnnotatedFieldMethod$ObjectFunction.execute(Unknown Source)
at org.jnetpcap.packet.structure.AnnotatedFieldMethod$ObjectFunction.objectMethod(Unknown Source)
at org.jnetpcap.packet.structure.AnnotatedJField.getValue(Unknown Source)
at org.jnetpcap.packet.format.TextFormatter.fieldBefore(Unknown Source)
at org.jnetpcap.packet.format.JFormatter.format(Unknown Source)
at org.jnetpcap.packet.format.JFormatter.format(Unknown Source)
at org.jnetpcap.packet.format.JFormatter.format(Unknown Source)
at org.jnetpcap.packet.JHeader.toString(Unknown Source)
at java.lang.String.valueOf(String.java:1512)
at java.lang.StringBuilder.append(StringBuilder.java:191)
at Test$1.nextPacket(Test.java:117)
at Test$1.nextPacket(Test.java:1)
at org.jnetpcap.Pcap.loop(Native Method)
at org.jnetpcap.Pcap.loop(Unknown Source)
at Test.main(Test.java:164)

Utility: eclipse stop button shutdown hook workaround

An outstanding issue with IDE environments (Eclipse/NetBeans/etc) is the fact that under IDE environment pressing the "red stop" button to terminate the application while running or debugging causes the process to terminate so abruptly as not to allow java VM hooks to execute and perform the necessary cleanup, among other things. Just look at this Eclipse bug 38016.

Compiling binaries from source

Can you please write me how to compile the newest version of JnetPcap from source? I need to have a version of JnetPcap with this bug fixed, but as the newest binaries are available for 1.4r1380, I need to compile them by myself. I need to compile Windows and Linux versions of binaries (both 32 and 64 bit). However, I am in possession of only Ubuntu 32-bit to perform this operation...

I can check out the sources from here: http://sourceforge.net/p/jnetpcap/code/1427/tree/jnetpcap/trunk/src/c/

I need to obtain the following files after the compilation:
- jnetpcap-pcap100.dll (32 & 64-bit)
- jnetpcap.dll (32 & 64-bit)
- libjnetpcap-pcap100.so (32 & 64-bit)
- libjnetpcap.so (32 & 64-bit)

I do not need to compile JAR, since I can just directly include JnetPcap sources in my project.

How to use jNetPcap with named pipe

Has anyone here used jNetPcap to read PCAP information from a named pipe? If so, how? Can you just read it like a regular file, or is there more involved.

Dump offline packets to an offline file

Syndicate content