Send ICMP (IPv4) or ICMPv6 (IPv6) echo requests to a set of addresses without waiting for answers
C Makefile Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status

send-echo-request sends one ICMP (IPv4) or ICMPv6 (IPv6) echo request each to a list of addresses without waiting for the echo reply packets. A packet is sent every 0.5 seconds. Optionally, sending the packets is repeated in an infinite loop.

As send-echo-request does not wait for or evaluate any echo reply packets, processing the received reply packets must be done in another place if necessary. One such example is my someone else is using the internet LED (YUP LED) setup which uses iptables to have the kernel trigger a LED on arrival of certain packets.

send-echo-request has been designed and developed on and for use on GNU/Linux (Fedora) and uClibc/Linux (OpenWRT). On other systems, YMMV.

Running send-echo-request should be easy enough:

# send-echo-request --help
# send-echo-request -vv --loop ::1
# send-echo-request -q  --loop

send-echo-request is licensed under GPLv2+, i.e. GNU GPL version 2 or (at your option) any later version. Read the LICENSE file for details.

Building and installing, generic Linux edition

This requires GNU make and gcc and possibly a few more things I forgot to list here.

Building send-echo-request should be easy:

$ make

This builds both host-build/send-echo-request.exe and host-build/send-echo-request.stripped versions of the executable to be run on the build host. You can choose to ln -s one of them to send-echo-request for convenience:

$ ln -s host-build/send-echo-request.exe send-echo-request

If you want to run send-echo-request as a non-root user, the root user must give the executable the required set of capabilities:

# setcap "cap_net_raw=ep" host-build/send-echo-request.exe

The complete cap_net_raw=ep cap_net_admin=ep capability set often used for the iputils' ping and ping6 executables appears not to be required for the more limited feature set of send-echo-request.

For installation using GNU make, you can optionally define DESTDIR and bindir, and then run

make install
make uninstall

Building and installing, embedded/OpenWRT hack edition

After setting up an OpenWRT buildroot and building at least the toolchain part of it, you can build a cross-compile version of send-echo-request like so:

$ make STAGING_DIR="\$(HOME)/src/openwrt-build/12.09/staging_dir" crossprefix="\$(STAGING_DIR)/toolchain-i386_gcc-4.6-linaro_uClibc-"

This builds both cross-i486-openwrt-linux-uclibc-build/send-echo-request.exe and cross-i486-openwrt-linux-uclibc-build/send-echo-request.stripped versions of the executable to be run on the embedded OpenWRT system.

Stripping the symbols reduces the file size from ~20K to ~8K, so the cross-i486-openwrt-linux-uclibc-build/send-echo-request.stripped executable is probably the better candidate for installing to the OpenWRT system:

-rwxrwxr-x. 1 USER GROUP 21838 Aug 23 21:57 send-echo-request.exe
-rwxrwxr-x. 1 USER GROUP  8432 Aug 23 21:57 send-echo-request.stripped

After copying the cross-i486-openwrt-linux-uclibc-build/send-echo-request.stripped executable over to the OpenWRT host, it should be available for use:

$ scp cross-i486-openwrt-linux-uclibc-build/send-echo-request.stripped openwrt_host:/bin/send-echo-request

(Yes, this a hack: No IPKG software package. No proper build process for the OpenWRT buildchain and send-echo-request. However, it works for me. YMMV.)