indigo423 / jicmp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jicmp-build

About JICMP

JICMP is a small library to allow the use of IPv4 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/jicmp.git

Switch into source code repository

cd jicmp

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 JICMP

./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 JICMP as non-root

Mac OS X supports non-root ICMP through the $$SOCK_DGRAM$$ 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

About

License:Other


Languages

Language:Java 69.4%Language:C 22.3%Language:Makefile 2.7%Language:Shell 1.9%Language:Perl 1.8%Language:M4 1.6%Language:C++ 0.3%