clj-net-pcap is a wrapper/adapter/facade (No matter how you want to call it.) around jNetPcap that enables and eases packet capturing with Clojure.
clj-net-pcap is currently available for Linux and Windows for both x86 and x86_64 architecture.
Please note that clj-net-pcap requires native packet capturing libraries. For Linux, this is the libpcap library. For Windows, this is the winpcap library. Typically, these libraries have to be installed separately. On Linux, this is usually done via the packet manager of the respective distribution.
When using clj-net-pcap via Leiningen or Maven, all Java/Clojure related dependencies should be resolved and pulled in automatically.
Additionally, please note that on Linux clj-net-pcap expects the libpcap library to be named "libpcap.so". If this is not the case this can be fixed by, e.g., adding a symbolic link like shown for Fedora below:
sudo ln -s /usr/lib64/libpcap.so.1 /usr/lib64/libpcap.so
clj-net-pcap is primarily intended as a library that is used by other applications. However, it can be run as sample stand-alone command line application as follows:
java -jar clj-net-pcap-standalone-jar-file.jar
For more information about the available options use the "-h" or "--help" option.
API docs are available:
http://ruedigergad.github.io/clj-net-pcap/doc/
Detailed results of unit tests are available:
http://ruedigergad.github.io/clj-net-pcap/test-results/html/
We published two papers in which we describe the clj-net-pcap architecture and implementation and assess the performance:
- Improving Network Traffic Acquisition and Processing with the Java Virtual Machine, Ruediger Gad, Martin Kappes, and Inmaculada Medina-Bulo, 20th IEEE ISCC 2015, in press
- The full text of the authors accepted version is available via ResearchGate.
- The link to the final published version on IEEEXplore will be added once it is available.
- Bridging the Gap between Low-Level Network Traffic Data Acquisition and Higher-Level Frameworks, Ruediger Gad, Martin Kappes, and Inmaculada Medina-Bulo, 38th IEEE COMPSACW 2014.
If you want to reference clj-net-pcap, you can refer to our paper, e.g., in LaTeX:
@inproceedings{gad_improving_2015,
title = {Improving {Network} {Traffic} {Acquisition} and {Processing} with the {Java} {Virtual} {Machine}},
booktitle = {2015 20th {IEEE} {Symposium} on {Computers} and {Communications} ({ISCC})},
author = {Gad, Ruediger and Kappes, Martin and Medina-Bulo, Immaculada},
month = jul,
year = {2015},
note = {in press},
}
@INPROCEEDINGS{gad_bridging_2014,
author={Gad, Ruediger and Kappes, Martin and Medina-Bulo, Inmaculada},
booktitle={Computer Software and Applications Conference Workshops (COMPSACW), 2014 IEEE 38th International},
title={Bridging the Gap between Low-Level Network Traffic Data Acquisition and Higher-Level Frameworks},
year={2014},
month={July},
pages={67-72},
keywords={Data acquisition;Instruction sets;Java;Libraries;Pipelines;Prototypes;Surveillance;Java Virtual Machine;Networks;Packet Capturing;Performance},
doi={10.1109/COMPSACW.2014.15},
}
clj-net-pcap uses Leiningen. Please note that Leiningen version 2.x is used.