https://github.com/opennms/jicmp6
https://github.com/opennms/jicmp6
c icmp java ping
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/opennms/jicmp6
- Owner: OpenNMS
- License: other
- Created: 2013-04-11T16:24:56.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2023-06-01T20:01:29.000Z (over 2 years ago)
- Last Synced: 2024-11-17T10:22:26.485Z (about 1 year ago)
- Topics: c, icmp, java, ping
- Language: C
- Size: 238 KB
- Stars: 3
- Watchers: 35
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Changelog: ChangeLog
- License: COPYING.md
Awesome Lists containing this project
README
= 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
[source]
----
git clone https://github.com/OpenNMS/jicmp6.git
----
.Switch into source code repository
[source]
----
cd jicmp6
----
.Initialize and update the git submodule.
[source]
----
git submodule update --init --recursive
----
.Update generated configuration files with
[source]
----
autoreconf -fvi
----
.Generate make files using `/usr/local/lib` as install path and compile JICMP6
[source]
----
./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.
[source]
----
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:
[source]
----
sysctl -w net.ipv4.ping_group_range="0 429496729"
----
... or by creating a `sysctl` configuration file in `/etc`:
[source]
----
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.