Content
Description
liboping is a C library to generate ICMP echo requests, better known
as “ping packets”. It is intended for use in network monitoring applications or applications
that would otherwise need to fork ping(1) frequently. Included is a sample application,
called oping, which demonstrates the library's abilities. It is like
ping, ping6, and fping rolled into one. Since people are curious you might want to
see an example output.
liboping was inspired by ping, libping (homepage vanished) and fping: It differs from these existing solutions in that it can ”ping” multiple hosts in parallel using IPv4 or IPv6 transparently. Other design principles were an object oriented interface, simplicity and extensibility: Is simple because there are only a few interface functions and no external dependencies. It's extensible since all (internal) data is kept in “opaque data types”, so the storage may change or be extended without applications noticing it.
News
- 2009-12-20 Version 1.3.4 is available. A bug in the select(2) has been identified which led to indefinite, busy looping if a file descriptor entered an error state. The error handling has been fixed and the loop is now exited gracefully. The oping utility will now temporarily drop privileges to open files specified with “-f” if supported by the system. This way files are opened with the user's rights even when the binary is installed SetUID-root. An off-by-one error has been fixed in Net::Oping, the Perl bindings for liboping.
- 2009-09-29 Version 1.3.3 is available. The new release fixes a serious security issue in oping: If the application is installed with the SetUID-bit, anybody on the system could use oping to read arbitrary files using the “-f” option. Version 1.2.0 and all later versions are effected. Upgrading as soon as possible is highly recommended. Thanks to Steve Kemp for reporting this problem!
- 2009-07-27 Version 1.3.2 is available. It removes some
header checks from the installed
oping.h, which should not be contained in such a system wide file. Thanks to Sebastian Harl for fixing this. - 2009-07-20 Version 1.3.1 is available. The handling of
NULL-pointers passed to ping_iterator_get_info(3) has been corrected. The argument checking introduced in version 1.3.0 was too restrictive and prevented documented behavior. Thanks to Sebastian for catching the bug. - 2009-07-18 Version 1.3.0 is available. The handling of
multiple hosts has been fixed. Due to a bug introduced in version 1.0 or later incorrect
measurements may be returned. Also, the new
PING_OPT_DEVICEoption can be used to force a specific device to be used. Thanks to Sebastian Harl for providing the patches! - 2009-07-15 Version 1.2.0 is available. The oping
application can now read hostnames from a file in addition to being given the names on the
command line. Thanks to Dan Sully for the patch. Also the
sstrerrorfunction is now longer a public symbol. Since this function was never mentioned in the API, this change shouldn't cause any trouble. - 2009-04-05 Version 1.1.2 is available. It fixes a NULL-pointer dereference in the IPv4 code. The problem mostly occurred when pinging an unreachable host, but may be caused by other unexpected ICMPv4 packets, too. The bug was introduced in version 1.1.1 – earlier versions are not effected.
- 2009-03-23 Version 1.1.1 is available. It includes some fixes by Vladimir Melnikov which improve portability, especially to Solaris.
- 2009-03-15 Version 1.1.0 is available. This release adds the possibility to query the Time to Live (TTL) of received IP packets from the library. The oping application has been updated to make use of this and display the received TTL. A new command line option allows to set the TTL of outgoing network packets in the oping application, too.
- 2009-02-17 Version 1.0.0 is available. Since some bugs,
even one incorrect assertion, have been fixed, all users are encouraged to upgrade.
Despite being a new major number, the interface has not changed. The new version only number expresses that the interface is now considered stable and will not change in an incompatible manner anytime soon. This version improves portability, specifically to AIX and Cygwin, but possibly other systems as well. It is now possible to query the number of timed out packets from the library, for easier calculation of drop-rates. The version number is now available as a define from<oping.h>, so applications can decide at compile time which features are available. The Perl bindings in form of Net::Oping have been added to the distribution are built along with liboping unless disabled.
Thanks to Doug MacEachern and Alex Brooks who have contributed to this release! - 2008-01-26 A first version of Net::Oping has been uploaded to CPAN. This Perl module provides a high-level interface to liboping, so you can use the library from within Perl.
- 2007-03-27 Version
0.3.5 fixes an issue with the file
descriptor not being closed. Thanks to Esteban Sanchez
for submitting the patch. Also, Alex Brooks has pointed
our the
<sys/types.h>should be included and thatextern "C" { ... }would be nice to have included automatically. - 2006-12-01 Version
0.3.4 fixes an error in
ping_host_removewhich would lead to the wrong host being removed. Thanks to Wojtek for reporting this. - 2006-07-16 Version
0.3.3 improves error reporting:
ping_sendtodoesn't complain aboutEHOSTUNREACHandENETUNREACHanymore. - 2006-07-13 Version 0.3.2 improves the build system, to make it easier to link against liboping.
- 2006-07-10 Version
0.3.1 gets rid of
libltdlsince it's not used. Also other, minor build issues have been resolved. - 2006-07-09 Version 0.3.0 adds the ability to set the source address of generated packets. The oping application has been updated to make use of this feature.
- 2006-06-05 Version 0.2.2 improves oping: It now exits with an error message if no hosts could be resolved. Prior to this release it would just sit there and wait for no one in particular..
- 2006-06-01 Version 0.2.1 fixes problems when building under FreeBSD and Mac OS X.
- 2006-05-29 Version 0.2.0 has been released. You can now set the data sent to the remote host yourself and query the data returned from the remote side. The sample application, oping, has been beautified: It calculates the standard-deviation now and is even more ping-like.
- 2006-05-08 Version 0.1.1 has been released. It fixes a nasty bug with the sequence checking of returning packets. Internally the sequence is stored in an integer which did not overflow after 65535. This caused liboping to detect a sequence mismatch and discard the packet.
- 2006-05-08 Version 0.1.0 has been released.
Download
- liboping-1.3.4.tar.bz2 (source tarball)
SHA-256: 3737908bdba855e998c65dfc216d71cd9baadfb1bb30366a766ca04a69fc6d67 - liboping-1.3.4.tar.gz (source tarball)
SHA-256: 68ccdbfc7f92b4bf62d86d6ba086d2ef08d6f03a81c1b2873bfefdfe20ce9574
Debian package
Users of Debian GNU/Linux can install the
liboping0 and liboping-dev packages using APT and their favorite
Debian-mirror.
Development version
The development files are kept in a Git repository. You can “clone” it with the following command. Patches are welcome anytime. :)
A web interface to browse the repository is available, too.
Documentation
The only documentation right now are the manpages. You can find online versions here:
- liboping(3)
- oping(8)
- ping_construct(3)
- ping_get_error(3)
- ping_host_add(3)
- ping_iterator_get_context(3)
- ping_iterator_get(3)
- ping_iterator_get_info(3)
- ping_send(3)
- ping_setopt(3)
License information
liboping is distributed under the GPL, version 2. The license can also be found in the COPYING file in the source tarball.