Skip to content

OpenNMS/jicmp6

Repository files navigation

About JICMP6

JICMP6 is a small library to allow the use of IPv6 ICMP (raw) packets in Java.

Build from source

Requirements
  • git

  • automake

  • autoconf

  • libtool

  • Java JDK 1.8+

The repository has a git submodule which contains Macros required to compile from source code.

Clone the respository on local disk
git clone https://github.com/OpenNMS/jicmp6.git
Switch into source code repository
cd jicmp6
Initialize and update the git submodule.
git submodule update --init --recursive
Update generated configuration files with
autoreconf -fvi
Generate make files using /usr/local/lib as install path and compile JICMP6
./configure
make
Tip
If you want to change the install path the ./configure --prefix=/your/custom/path can be used.
Install the library on your system, root permissions may required when working as non-root user.
sudo make install

Using JICMP6 as non-root

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"
  1. 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

Despite having IPv4 in the option name, this also effects IPv6 sockets.