https://github.com/opennms/jicmp
https://github.com/opennms/jicmp
c icmp java ping
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/opennms/jicmp
- Owner: OpenNMS
- License: other
- Created: 2013-04-11T16:25:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2023-06-01T19:49:54.000Z (over 2 years ago)
- Last Synced: 2024-04-15T15:36:14.030Z (over 1 year ago)
- Topics: c, icmp, java, ping
- Language: Java
- Size: 472 KB
- Stars: 17
- Watchers: 38
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Changelog: ChangeLog
- License: COPYING.md
Awesome Lists containing this project
README
= 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
[source]
----
git clone https://github.com/OpenNMS/jicmp.git
----.Switch into source code repository
[source]
----
cd jicmp
----.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 JICMP
[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 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:
[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
----