Code

liboping.git
15 years agosrc/liboping.c: Use ph-addrfamily to determine the protocol type.
Florian Forster [Mon, 23 Mar 2009 08:34:37 +0000 (09:34 +0100)]
src/liboping.c: Use ph-addrfamily to determine the protocol type.

15 years agosrc/liboping.c: Be more fault-tolerant when checking for the TTL.
Vladimir V. Melnikov [Mon, 23 Mar 2009 08:30:26 +0000 (09:30 +0100)]
src/liboping.c: Be more fault-tolerant when checking for the TTL.

If it's not included in the auxiliary data, fall back to the value
included in the IPv4 header which is provided via the raw socket.

15 years agosrc/liboping.c: Only include <stdint.h> if the configure script found it.
Vladimir V. Melnikov [Mon, 23 Mar 2009 08:29:31 +0000 (09:29 +0100)]
src/liboping.c: Only include <stdint.h> if the configure script found it.

15 years agobuild system: Actually link with libxnet and use CPPFLAGS.
Florian Forster [Mon, 23 Mar 2009 08:24:54 +0000 (09:24 +0100)]
build system: Actually link with libxnet and use CPPFLAGS.

(Instead of CFLAGS.)

15 years agosrc/liboping.c: Added compatibility with old Solaris versions.
Vladimir V. Melnikov [Mon, 23 Mar 2009 08:22:01 +0000 (09:22 +0100)]
src/liboping.c: Added compatibility with old Solaris versions.

Apparently the X/Open conforming `recvmsg' function is in the `xnet'
library. Check for this library and use it if it exists.

Also set the ominous MSG_XPG4_2 flag. Didn't find out what it does, but
apparently it's a Solaris internal flag..

15 years agoNet::Oping: Improve the POD a little.
Florian Forster [Mon, 23 Mar 2009 07:53:28 +0000 (08:53 +0100)]
Net::Oping: Improve the POD a little.

15 years agobuild system: Define ABI and API versions in the configure script.
Florian Forster [Mon, 23 Mar 2009 07:53:15 +0000 (08:53 +0100)]
build system: Define ABI and API versions in the configure script.

15 years agobindings/perl: Bumped version to 1.10; Updated Changes. Net-Oping-1.10
Florian Forster [Sun, 15 Mar 2009 12:57:32 +0000 (13:57 +0100)]
bindings/perl: Bumped version to 1.10; Updated Changes.

15 years agobindings/perl: Add some more simple syntax tests.
Florian Forster [Sun, 15 Mar 2009 13:03:15 +0000 (14:03 +0100)]
bindings/perl: Add some more simple syntax tests.

15 years agobindings/perl: Add the `ttl' method.
Florian Forster [Sun, 15 Mar 2009 12:47:32 +0000 (13:47 +0100)]
bindings/perl: Add the `ttl' method.

15 years agobindings/perl: Add the `get_recv_ttl' method.
Florian Forster [Sun, 15 Mar 2009 13:16:19 +0000 (14:16 +0100)]
bindings/perl: Add the `get_recv_ttl' method.

15 years agoBumped version to 1.1.0; Updated ChangeLog. liboping-1.1.0
Florian Forster [Sun, 15 Mar 2009 11:13:17 +0000 (12:13 +0100)]
Bumped version to 1.1.0; Updated ChangeLog.

15 years agoAUTHORS: Added contributors so far.
Florian Forster [Sun, 15 Mar 2009 10:58:50 +0000 (11:58 +0100)]
AUTHORS: Added contributors so far.

15 years agosrc/oping.c: Allow setting of the TTL using `-t'.
Florian Forster [Sun, 15 Mar 2009 10:47:43 +0000 (11:47 +0100)]
src/oping.c: Allow setting of the TTL using `-t'.

15 years agosrc/liboping.c: When setting the TTL, update all existing pinghost_t, too.
Florian Forster [Sun, 15 Mar 2009 10:41:20 +0000 (11:41 +0100)]
src/liboping.c: When setting the TTL, update all existing pinghost_t, too.

15 years agomanual pages: Fix some more typos.
Florian Forster [Sun, 15 Mar 2009 10:27:39 +0000 (11:27 +0100)]
manual pages: Fix some more typos.

15 years agosrc/oping.c: Print the received TTL, too.
Florian Forster [Sun, 15 Mar 2009 10:24:40 +0000 (11:24 +0100)]
src/oping.c: Print the received TTL, too.

15 years agosrc/liboping.c: Add debugging output to the TTL setting code.
Florian Forster [Sun, 15 Mar 2009 10:24:20 +0000 (11:24 +0100)]
src/liboping.c: Add debugging output to the TTL setting code.

15 years agomanual pages: Fix some minor issues and typos.
Florian Forster [Sun, 15 Mar 2009 10:21:57 +0000 (11:21 +0100)]
manual pages: Fix some minor issues and typos.

15 years agosrc/liboping.c: Provide the TTL on received packets.
Florian Forster [Sun, 15 Mar 2009 10:21:21 +0000 (11:21 +0100)]
src/liboping.c: Provide the TTL on received packets.

Thanks to Vladimir V. Melnikov for the suggestion and initial patch.

15 years agosrc/liboping.c: Make -Wextra happy.
Florian Forster [Thu, 12 Mar 2009 07:48:10 +0000 (08:48 +0100)]
src/liboping.c: Make -Wextra happy.

Removed an unused parameter.

15 years agoping_setopt(3): Document the PING_VERSION define.
Florian Forster [Thu, 12 Mar 2009 07:39:07 +0000 (08:39 +0100)]
ping_setopt(3): Document the PING_VERSION define.

A typo if fixed, too.

15 years agosrc/oping.c: Allow shorter interval settings.
Florian Forster [Thu, 12 Mar 2009 07:38:21 +0000 (08:38 +0100)]
src/oping.c: Allow shorter interval settings.

Previously, only 1/5s was allowed. Now everything down to 1/1000s is
accepted.

15 years agosrc/oping.c: Use `context_destroy' to free the context.
Florian Forster [Thu, 12 Mar 2009 07:37:10 +0000 (08:37 +0100)]
src/oping.c: Use `context_destroy' to free the context.

15 years agosrc/oping.c: Make all functions (except `main') static.
Florian Forster [Thu, 12 Mar 2009 07:36:39 +0000 (08:36 +0100)]
src/oping.c: Make all functions (except `main') static.

15 years agosrc/liboping.c: Remove dead code which broke strict aliasing rules.
Florian Forster [Thu, 12 Mar 2009 07:35:55 +0000 (08:35 +0100)]
src/liboping.c: Remove dead code which broke strict aliasing rules.

Thanks to Alan Pevec for the pointer.

15 years agosrc/liboping.c: Use thread-safe error handling.
Florian Forster [Thu, 12 Mar 2009 07:34:51 +0000 (08:34 +0100)]
src/liboping.c: Use thread-safe error handling.

I. e. move to `strerror_r'.

15 years agosrc/{lib,}oping.c: Fix a few problems -Wextra has found. liboping-1.0.0
Florian Forster [Tue, 17 Feb 2009 13:56:22 +0000 (14:56 +0100)]
src/{lib,}oping.c: Fix a few problems -Wextra has found.

15 years agosrc/{lib,}oping.c: Don't cast `size_t' to `unsigned int' when printing.
Florian Forster [Tue, 17 Feb 2009 13:52:33 +0000 (14:52 +0100)]
src/{lib,}oping.c: Don't cast `size_t' to `unsigned int' when printing.

Use the "%zu" format string instead.

15 years agosrc/mans/*.pod: Updated copyright information.
Florian Forster [Tue, 17 Feb 2009 13:42:02 +0000 (14:42 +0100)]
src/mans/*.pod: Updated copyright information.

15 years agoBumped version to 1.0.0.
Florian Forster [Tue, 17 Feb 2009 13:31:49 +0000 (14:31 +0100)]
Bumped version to 1.0.0.

15 years agoChangeLog, README: Updated information for the 1.0.0 release.
Florian Forster [Tue, 17 Feb 2009 13:31:25 +0000 (14:31 +0100)]
ChangeLog, README: Updated information for the 1.0.0 release.

15 years agobindings/perl/Makefile.PL: Let the Perl module depend on liboping.la.
Sebastian Harl [Tue, 17 Feb 2009 10:51:27 +0000 (11:51 +0100)]
bindings/perl/Makefile.PL: Let the Perl module depend on liboping.la.

When building the Perl module from the liboping sources (instead of e.g. a
stand-alone Perl package), the module will now be rebuilt if the library has
been changed.

15 years agosrc/liboping.c: Beautify two debugging messages.
Florian Forster [Tue, 17 Feb 2009 12:16:02 +0000 (13:16 +0100)]
src/liboping.c: Beautify two debugging messages.

Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
15 years agosrc/liboping.c: Fix a (too conservative) off-by-one error in ping_iterator_get_info()
Florian Forster [Tue, 17 Feb 2009 12:15:39 +0000 (13:15 +0100)]
src/liboping.c: Fix a (too conservative) off-by-one error in ping_iterator_get_info()

Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
15 years agobindings/perl: Add support for the number of dropped packets.
Florian Forster [Tue, 17 Feb 2009 12:14:58 +0000 (13:14 +0100)]
bindings/perl: Add support for the number of dropped packets.

Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
15 years agobindings/perl: Update license information in the XS file.
Florian Forster [Tue, 17 Feb 2009 12:14:30 +0000 (13:14 +0100)]
bindings/perl: Update license information in the XS file.

Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
15 years agobindings/perl: Fix error handling in Perl:ping() and XS:_ping_iterator_get_hostname().
Florian Forster [Tue, 17 Feb 2009 12:14:02 +0000 (13:14 +0100)]
bindings/perl: Fix error handling in Perl:ping() and XS:_ping_iterator_get_hostname().

Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
15 years agobindings/perl: Improve license information and fix typos in the documentation.
Florian Forster [Tue, 17 Feb 2009 12:12:12 +0000 (13:12 +0100)]
bindings/perl: Improve license information and fix typos in the documentation.

Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
15 years agobuild system: Added some serious voodoo to make MakeMaker behave.
Florian Forster [Tue, 17 Feb 2009 10:29:43 +0000 (11:29 +0100)]
build system: Added some serious voodoo to make MakeMaker behave.

It is now, at last, possible to build the Perl module before installing
liboping and still have it linked correctly.

15 years agobindings/perl: Use OPING_VERSION to enable the work-around for 0.3.5.
Florian Forster [Tue, 17 Feb 2009 08:30:54 +0000 (09:30 +0100)]
bindings/perl: Use OPING_VERSION to enable the work-around for 0.3.5.

15 years agosrc/liboping.c: Fix an incorrect assertion in `ping_timeval_add'.
Florian Forster [Tue, 17 Feb 2009 08:17:03 +0000 (09:17 +0100)]
src/liboping.c: Fix an incorrect assertion in `ping_timeval_add'.

15 years agobindings/perl: Fix a memory leak in _ping_iterator_get_hostname(). Net-Oping-1.02
Florian Forster [Tue, 17 Feb 2009 07:50:06 +0000 (08:50 +0100)]
bindings/perl: Fix a memory leak in _ping_iterator_get_hostname().

Thanks to "Iceberg" who reported this issue and provided the patch via
rt.cpan.org.

Signed-off-by: Florian Forster <octo@verplant.org>
16 years agobindings/Makefile.am: Don't build the Perl bindings automatically.
Florian Forster [Fri, 22 Aug 2008 07:47:14 +0000 (09:47 +0200)]
bindings/Makefile.am: Don't build the Perl bindings automatically.

To build the Perl bindings, do:
  $ cd bindings; make perl install

16 years agoping_iterator_get_info: Provide the number of timed out packets.
Florian Forster [Fri, 22 Aug 2008 07:00:24 +0000 (09:00 +0200)]
ping_iterator_get_info: Provide the number of timed out packets.

16 years agosrc/liboping.c: Use \#ifdef's around `EAI_SYSTEM'.
Florian Forster [Wed, 30 Jan 2008 07:11:12 +0000 (08:11 +0100)]
src/liboping.c: Use \#ifdef's around `EAI_SYSTEM'.

Apparently this define is mentioned in RFC3493 but not in SUS. At least Cygwin
seems not to have this define..

16 years agobindings/perl/Makefile.PL: Removed that `use 5.008007;' from yet another place.
Florian Forster [Sun, 27 Jan 2008 15:45:07 +0000 (16:45 +0100)]
bindings/perl/Makefile.PL: Removed that `use 5.008007;' from yet another place.

Why is everything kept in 1000 places in Perl modules? *argh*

16 years agoMerge branch 'origin'
Florian Forster [Sun, 27 Jan 2008 15:20:26 +0000 (16:20 +0100)]
Merge branch 'origin'

16 years agoNet::Oping: Bumped version to 1.01. Net-Oping-1.01
Florian Forster [Sun, 27 Jan 2008 15:19:23 +0000 (16:19 +0100)]
Net::Oping: Bumped version to 1.01.

Also added `use 5.006;' to Net/Oping.pm, because `use warnings;' is a Perl 5.6
feature.

16 years agoIntegrate bindings subdirectory into the build process.
Sebastian Harl [Sun, 27 Jan 2008 15:13:04 +0000 (16:13 +0100)]
Integrate bindings subdirectory into the build process.

 * Added bindings/Makefile.am.
 * Added support for the variable PERL, which specifies the Perl interpreter
   command, to the configure script.
 * Added the --with-perl-bindings option to the configure script. Any argument
   (except "yes" and "no") will be passed as options to "perl Makefile.PL".

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@verplant.org>
16 years agobindings/perl/Makefile.PL: Search for the header file and give up if it cannot be...
Florian Forster [Sat, 26 Jan 2008 17:50:40 +0000 (18:50 +0100)]
bindings/perl/Makefile.PL: Search for the header file and give up if it cannot be found.

16 years agoNet::Oping: Added a note about the need to be root to the module's POD.
Florian Forster [Sat, 26 Jan 2008 17:00:13 +0000 (18:00 +0100)]
Net::Oping: Added a note about the need to be root to the module's POD.

16 years agobindings/perl/MANIFEST: Sorted the entries alphabetically.
Florian Forster [Sat, 26 Jan 2008 16:20:48 +0000 (17:20 +0100)]
bindings/perl/MANIFEST: Sorted the entries alphabetically.

16 years agoNet::Oping: Removed `use 5.008007;' because we (hopefully) don't need it.
Florian Forster [Sat, 26 Jan 2008 16:20:31 +0000 (17:20 +0100)]
Net::Oping: Removed `use 5.008007;' because we (hopefully) don't need it.

16 years agobindings/perl/MANIFEST: Remove the ppport.h header file from this list. Net-Oping-1.00
Florian Forster [Sat, 26 Jan 2008 13:53:41 +0000 (14:53 +0100)]
bindings/perl/MANIFEST: Remove the ppport.h header file from this list.

16 years agosrc/liboping.c: Return the number of bytes actually required to store the username
Florian Forster [Sat, 26 Jan 2008 13:00:02 +0000 (14:00 +0100)]
src/liboping.c: Return the number of bytes actually required to store the username

Including the terminating NULL-byte.

16 years agoMerge branch 'liboping-0.3'
Florian Forster [Sat, 26 Jan 2008 12:59:23 +0000 (13:59 +0100)]
Merge branch 'liboping-0.3'

16 years agoMerge branch 'pull/liboping-0.3' into liboping-0.3
Florian Forster [Sat, 26 Jan 2008 12:59:07 +0000 (13:59 +0100)]
Merge branch 'pull/liboping-0.3' into liboping-0.3

16 years agosrc/liboping.c: Return the number of bytes actually required to store the hostname
Florian Forster [Sat, 26 Jan 2008 12:58:30 +0000 (13:58 +0100)]
src/liboping.c: Return the number of bytes actually required to store the hostname

Including the terminating NULL-byte.

16 years agobindings/perl: Added an improved version of the Perl bindings created by Olivier...
Florian Forster [Sat, 26 Jan 2008 12:57:05 +0000 (13:57 +0100)]
bindings/perl: Added an improved version of the Perl bindings created by Olivier Fredj.

16 years agoMerge branch 'origin'
Florian Forster [Sat, 26 Jan 2008 09:36:20 +0000 (10:36 +0100)]
Merge branch 'origin'

16 years agosrc/liboping.c: Added the `username' field which holds the name provided by the user.
Florian Forster [Sat, 26 Jan 2008 09:35:08 +0000 (10:35 +0100)]
src/liboping.c: Added the `username' field which holds the name provided by the user.

Alex Brooks has reported that he cannot reliably remove hosts he added without
a fully qualified domain name, such as `foobar'. The reason is that the
`hostname' the user provided is replaced with the `canonical hostname', if they
differ. To fix this problem I introduced a new fields `username' which holds
the hostname as it was supplied by the user. This is the only name checked when
removing a host now.

Applications may access this name using the new `PING_INFO_USERNAME' option for
`ping_iterator_get_info'.

17 years agoProvide a fallback if `ICMP6_ECHO_REQUEST' or `ICMP6_ECHO_REPLY' is not defined.
Doug MacEachern [Wed, 29 Aug 2007 20:09:52 +0000 (22:09 +0200)]
Provide a fallback if `ICMP6_ECHO_REQUEST' or `ICMP6_ECHO_REPLY' is not defined.

Hello,

I just started looking at liboping, looks great so far! I needed the attached
patch to compile on aix 5.2, works as expected once built. I chose to hardwire
the constant values due to conflicts when including aix's netinet/ip6_icmp.h.
I can try to untangle if desired but prefer to spend as little time on aix as
possible :)

% uname -a
AIX orange 2 5 000919934C00

% find /usr/include/ -name "*.h" | xargs grep ICMP6_ | egrep '128|129'
/usr/include/netinet/ip6_icmp.h:#define ICMP6_ECHO      128 /* echo service */
/usr/include/netinet/ip6_icmp.h:#define ICMP6_ECHOREPLY 129 /* echo reply */

17 years agoBumped version to 0.3.5; Updated ChangeLog and debian/changelog liboping-0.3.5
Florian Forster [Tue, 27 Mar 2007 09:23:16 +0000 (11:23 +0200)]
Bumped version to 0.3.5; Updated ChangeLog and debian/changelog

17 years agoMerge branch 'es/close'
Florian Forster [Tue, 27 Mar 2007 09:15:17 +0000 (11:15 +0200)]
Merge branch 'es/close'

17 years agooping.h: Use `extern "C"' if `__cplusplus' is defined.
Alex Brooks [Tue, 27 Mar 2007 09:14:19 +0000 (11:14 +0200)]
oping.h: Use `extern "C"' if `__cplusplus' is defined.

17 years agooping.h: #include <sys/types.h> so that `size_t' is defined.
Alex Brooks [Tue, 27 Mar 2007 09:11:31 +0000 (11:11 +0200)]
oping.h: #include <sys/types.h> so that `size_t' is defined.

17 years agoClose the filedescriptor in `ping_free', not `ping_host_remove'.
Esteban Sanchez [Tue, 27 Mar 2007 09:06:56 +0000 (11:06 +0200)]
Close the filedescriptor in `ping_free', not `ping_host_remove'.

17 years agoping_iterator_get(3): Added the `AUTHOR' section.
Florian Forster [Sat, 16 Dec 2006 11:07:39 +0000 (12:07 +0100)]
ping_iterator_get(3): Added the `AUTHOR' section.

17 years agoBumped version to 0.3.4; Updated ChangeLog and debian/changelog liboping-0.3.4
Florian Forster [Fri, 1 Dec 2006 08:24:04 +0000 (09:24 +0100)]
Bumped version to 0.3.4; Updated ChangeLog and debian/changelog

17 years agoFix usage of `strcasecmp' in `ping_host_remove'.
Wojtek [Fri, 1 Dec 2006 08:13:57 +0000 (09:13 +0100)]
Fix usage of `strcasecmp' in `ping_host_remove'.

The compare function needs to be checked wether it returns zero. Without this
fix the first host is being removed unless it's the host being looked for.
That is obviously not good nor correct.

18 years agoBumped version to 0.3.3; Updated ChangeLog and debian/changelog liboping-0.3.3
Florian Forster [Sun, 16 Jul 2006 10:34:46 +0000 (12:34 +0200)]
Bumped version to 0.3.3; Updated ChangeLog and debian/changelog

18 years agoMerge branch 'v022/net-unreach'
Florian Forster [Sun, 16 Jul 2006 10:29:35 +0000 (12:29 +0200)]
Merge branch 'v022/net-unreach'

18 years agoChangeLog: Added note about the E{HOST,NET}UNREACH bugfix.
Florian Forster [Sun, 16 Jul 2006 10:25:42 +0000 (12:25 +0200)]
ChangeLog: Added note about the E{HOST,NET}UNREACH bugfix.

18 years agoliboping.c: Catch `EHOSTUNREACH' and `ENETUNREACH'
Florian Forster [Sun, 16 Jul 2006 10:19:42 +0000 (12:19 +0200)]
liboping.c: Catch `EHOSTUNREACH' and `ENETUNREACH'

When the kernel cannot send out a packet to a host because the host or network
is unreachable, `sendto' may return with `EHOSTUNREACH' or `ENETUNREACH'. So
far all errors returned by `sendto' were considered fatal and the pinging was
aborted. This is wrong when the host is unreachable, so catching and ignoring
these errors is reasonable..
Thanks to Wolfgang Kroener for reporting and debigging this problem with me :)

18 years agoBumped version to 0.3.2, updated ChangeLog(s). liboping-0.3.2
Florian Forster [Thu, 13 Jul 2006 14:06:17 +0000 (16:06 +0200)]
Bumped version to 0.3.2, updated ChangeLog(s).

18 years agoRemoved unneccesary comments.
Florian Forster [Wed, 12 Jul 2006 07:31:40 +0000 (09:31 +0200)]
Removed unneccesary comments.

18 years agoFixed the build system to version the generated shared objects and set an `soname...
Florian Forster [Wed, 12 Jul 2006 07:31:26 +0000 (09:31 +0200)]
Fixed the build system to version the generated shared objects and set an `soname' for them.

18 years agooping: Drop root privileges as soon as possible.
Florian Forster [Wed, 12 Jul 2006 06:50:23 +0000 (08:50 +0200)]
oping: Drop root privileges as soon as possible.

18 years agoBumped version to 0.3.1 liboping-0.3.1
Florian Forster [Sun, 9 Jul 2006 22:20:19 +0000 (00:20 +0200)]
Bumped version to 0.3.1

18 years agoconfigure.ac: There's no configure-script in src/.
Florian Forster [Sun, 9 Jul 2006 22:15:43 +0000 (00:15 +0200)]
configure.ac: There's no configure-script in src/.

18 years agoRemove more libltdl.
Florian Forster [Sun, 9 Jul 2006 22:13:25 +0000 (00:13 +0200)]
Remove more libltdl.

18 years agoRemove libltdl.
Florian Forster [Sun, 9 Jul 2006 22:12:24 +0000 (00:12 +0200)]
Remove libltdl.

I have no clue what I was thinking when including this.

18 years agoMakefile.am: Don't include debian/ in the distribution tarball. liboping-0.3.0
Florian Forster [Sun, 9 Jul 2006 17:49:55 +0000 (19:49 +0200)]
Makefile.am: Don't include debian/ in the distribution tarball.

18 years agoBumped version to 0.3.0; Updated ChangeLog.
Florian Forster [Sun, 9 Jul 2006 17:36:37 +0000 (19:36 +0200)]
Bumped version to 0.3.0; Updated ChangeLog.

18 years agoAUTHORS: Document the only author so far ;)
Florian Forster [Sun, 9 Jul 2006 17:33:43 +0000 (19:33 +0200)]
AUTHORS: Document the only author so far ;)

18 years agoMerge branch 'origin'
Florian Forster [Fri, 7 Jul 2006 09:32:48 +0000 (11:32 +0200)]
Merge branch 'origin'

18 years agoUpdated the license information in the .c and .h files: Only allow GPLv2.
Florian Forster [Fri, 7 Jul 2006 09:31:38 +0000 (11:31 +0200)]
Updated the license information in the .c and .h files: Only allow GPLv2.

18 years agooping: Print the error message if ping_send failes.
Florian Forster [Fri, 16 Jun 2006 17:04:52 +0000 (19:04 +0200)]
oping: Print the error message if ping_send failes.

18 years agoUpdate the manpages: Added information about setting the source address.
Florian Forster [Mon, 12 Jun 2006 21:03:05 +0000 (23:03 +0200)]
Update the manpages: Added information about setting the source address.

18 years agoUpdated the oping library to understand the `-I' option (bind to a specified address).
Florian Forster [Mon, 12 Jun 2006 20:48:54 +0000 (22:48 +0200)]
Updated the oping library to understand the `-I' option (bind to a specified address).

18 years agoActually bind to the configured address.
Florian Forster [Mon, 12 Jun 2006 20:48:23 +0000 (22:48 +0200)]
Actually bind to the configured address.

D'oh!

18 years agoReset the address-family to `AF_UNSPEC' before setting the source address.
Florian Forster [Mon, 12 Jun 2006 20:46:08 +0000 (22:46 +0200)]
Reset the address-family to `AF_UNSPEC' before setting the source address.

In >90% of all cases you will pass an IP-address to that option anyway. After
the address has been looked up, set `obj->addrfamily' accordingly.

18 years agoAdded the ability to set the source address in the library.
Florian Forster [Mon, 12 Jun 2006 20:30:13 +0000 (22:30 +0200)]
Added the ability to set the source address in the library.

Use `ping_setopt' and `PING_OPT_SOURCE' to set it. This _might_ fail under *BSD
and/or Mac OS X, I have to test that..

18 years agoMerge branch 'feature'
Florian Forster [Fri, 9 Jun 2006 21:26:19 +0000 (23:26 +0200)]
Merge branch 'feature'

18 years agoBumped version to 0.2.2; Updated ChangeLog liboping-0.2.2
Florian Forster [Mon, 5 Jun 2006 08:04:44 +0000 (10:04 +0200)]
Bumped version to 0.2.2; Updated ChangeLog

18 years agooping: Call `return' rather than `exit' in `main'.
Florian Forster [Sat, 3 Jun 2006 08:36:28 +0000 (10:36 +0200)]
oping: Call `return' rather than `exit' in `main'.

18 years agoUse `AI_CANONNAME' if it's defined.
Florian Forster [Sat, 3 Jun 2006 08:33:47 +0000 (10:33 +0200)]
Use `AI_CANONNAME' if it's defined.

This will follow PTR records. `www.verplant.org' is changed to `verplant.org',
for example. It's not what I intended (I wanted a reverse lookup of
IP-addresses), but still better than what we had originally. I don't know if
I'll leave it like this. Might be though..

18 years agooping: Improved the error message is a destination cannot be resolved.
Florian Forster [Fri, 2 Jun 2006 22:14:16 +0000 (00:14 +0200)]
oping: Improved the error message is a destination cannot be resolved.

Also no further error is printed if the command exits due to no resolvable
hosts: People will notice that condition..

18 years agooping: Exit if no hosts could be added.
Florian Forster [Fri, 2 Jun 2006 17:29:15 +0000 (19:29 +0200)]
oping: Exit if no hosts could be added.

If no hosts could be added (e.g. because resolving the hostnames failed) the
oping application didn't exit but seemed to hang. Actually it was calling
`poll' (or select?) without any file descriptors, and not outputting anything
at all.
This patch makes oping exit if no hosts could be added to the oping library.