JICMP is a small library to allow the use of IPv4 ICMP (raw) packets in Java.
-
git
-
automake
-
autoconf
-
libtool
-
Java JDK 1.5+
The repository has a git submodule which contains Macros required to compile from source code.
git clone https://github.com/OpenNMS/jicmp.git
cd jicmp
git submodule update --init --recursive
autoreconf -fvi
/usr/local/lib
as install path and compile JICMP./configure
make
Tip
|
If you want to change the install path the ./configure --prefix=/your/custom/path can be used.
|
sudo make install
Mac OS X supports non-root ICMP through the SOCK\_DRGAM interface, which JICMP uses by default.
Linux supports this as well, but you additionally need to set a sysctl OID to allow ping for non-root users.
You can set this temporarily by running:
sysctl -w net.ipv4.ping_group_range="0 429496729"
-
or by creating a
sysctl
configuration file in/etc
:
echo "net.ipv4.ping_group_range=0 429496729" > /etc/sysctl.d/03-non-root-icmp.conf