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-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.1.2.tar.bz2 (source tarball)
- liboping-1.1.2.tar.gz (source tarball)
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. :)
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.