contrib/liboping.spec: Added example spec file.
I'm using collectd and the ping plugin for a project I'm working on. I noticed
that collectd is distributing a starter spec file for building RPMs but that
there wa s no such spec file for liboping. I created one which I have attached
to this email. I'm not too familiar with creating RPMs but I think it's a good
start and I was able to get a package built and installed using it. I'm giving
it to you so if you wish to put in on your website for others to start with
when creating packages t hen you may. I hope others may find this useful.
I'm using collectd and the ping plugin for a project I'm working on. I noticed
that collectd is distributing a starter spec file for building RPMs but that
there wa s no such spec file for liboping. I created one which I have attached
to this email. I'm not too familiar with creating RPMs but I think it's a good
start and I was able to get a package built and installed using it. I'm giving
it to you so if you wish to put in on your website for others to start with
when creating packages t hen you may. I hope others may find this useful.
minor doc fixes for liboping
Hello,
I was reading the documentation of your liboping library as I'd like to
use it for a small project of mine and couldn't help noticing a few typos
in the docs, please find attached a tiny patch fixing them.
Thanks for writing this library!
VZ
Signed-off-by: Florian Forster <octo@verplant.org>
Hello,
I was reading the documentation of your liboping library as I'd like to
use it for a small project of mine and couldn't help noticing a few typos
in the docs, please find attached a tiny patch fixing them.
Thanks for writing this library!
VZ
Signed-off-by: Florian Forster <octo@verplant.org>
ChangeLog: Oops, there were actually a couple more changes in that release.
Bumped version to 1.3.4 and updated ChangeLog.
src/liboping.c: ping_receive_all: Clear the timer when a FD signals an error.
The loop likely never ends if the error isn't handled, so the least we
can do is ignore the file descriptor in the future.
The loop likely never ends if the error isn't handled, so the least we
can do is ignore the file descriptor in the future.
bindings/perl: Bumped version to 1.21 and updated Changes.
bindings/perl/Oping.xs: Fix an off-by-one error when allocating a Perl string.
In the previous code the null byte was included in the Perl string,
making the string handling awkward.
In the previous code the null byte was included in the Perl string,
making the string handling awkward.
oping: Temporarily drop privileges if supported by the system.
This tries to solve the read-from-any-file-issue more elegantly by
dropping privileges first thing after start-up and regaining privileges
just to open the sockets.
This has the advantage that the "-f" option is available for all users
again and files are opened according to *their* permissions.
Systems not supporting the _POSIX_SAVED_IDS feature still behave as
before, i. e. if real and effective user IDs don't match, only "-" may
be specified as input file.
This tries to solve the read-from-any-file-issue more elegantly by
dropping privileges first thing after start-up and regaining privileges
just to open the sockets.
This has the advantage that the "-f" option is available for all users
again and files are opened according to *their* permissions.
Systems not supporting the _POSIX_SAVED_IDS feature still behave as
before, i. e. if real and effective user IDs don't match, only "-" may
be specified as input file.
ChangeLog: Updated the changelog to reflect the last change.
oping: Allow “-f -” even if uid and euid differ.
Thanks to Sebastian for the idea :)
Thanks to Sebastian for the idea :)
Bumped version to 1.3.3; Updated ChangeLog.
oping: Disable the “-f” option when real and effective user IDs don't match.
Thanks to Steve Kemp who reported this issue as Debian bug #548684.
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548684>
Thanks to Steve Kemp who reported this issue as Debian bug #548684.
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548684>
Bumped version to 1.3.2; Updated ChangeLog.
src/oping.h: Do not check HAVE_*_H for system headers.
Imho, this is not a good thing to do for an installed header since it requires
every user to define those macros as well.
Imho, this is not a good thing to do for an installed header since it requires
every user to define those macros as well.
15 years agoping_iterator_get_info(3): Document missing functionality under Debian Etch. liboping-1.3.1
ping_iterator_get_info(3): Document missing functionality under Debian Etch.
COPYING: Add GPLv2.
Bumped version to 1.3.1; Updated ChangeLog.
src/liboping.c: Fixed argument verification.
ping_iterator_get_info()'s 'buffer' argument _may_ be NULL, since the user
might only be interested in the size of the (to be) returned value. If
'buffer' is NULL, '*buffer_len' should be 0, though, to make sure nothing gets
written to 'buffer'.
This bug was introduced in commit 9ae85a09d919777c9be52e55b23c08bf2c8c1d0e.
ping_iterator_get_info()'s 'buffer' argument _may_ be NULL, since the user
might only be interested in the size of the (to be) returned value. If
'buffer' is NULL, '*buffer_len' should be 0, though, to make sure nothing gets
written to 'buffer'.
This bug was introduced in commit 9ae85a09d919777c9be52e55b23c08bf2c8c1d0e.
Net::Oping: Set the $VERSION variable correctly.
.gitignore: Add tarballs.
ChangeLog: Updated the date of the 1.3.0 entry.
Net::Oping: Bumped version to 1.20.
Net::Oping: Add the `device' method.
src/oping.h: Update OPING_VERSION.
Bumped version to 1.3.0; Updated ChangeLog.
Merge branch 'liboping-1.2'
src/oping.c: Added -D <interface name> command line option.
This option sets the outgoing network device to use.
I decided not to reuse the -I command line option for that purpose (which is
what GNU ping is doing), for the following reasons:
* In theory, an interface name could be confused with a host name.
* Imho, it's better to specify things explicitly.
* This approach is more flexible.
This option sets the outgoing network device to use.
I decided not to reuse the -I command line option for that purpose (which is
what GNU ping is doing), for the following reasons:
* In theory, an interface name could be confused with a host name.
* Imho, it's better to specify things explicitly.
* This approach is more flexible.
Added support for PING_OPT_DEVICE.
This option may be used to set the outgoing network device to be used. The
value passed must be a char-pointer to a null-terminated string specifying an
interface name (e.g. eth0).
Please note that this might not be supported by all operating systems. In that
case, ping_setopt() sets the error to "operation not supported".
This option may be used to set the outgoing network device to be used. The
value passed must be a char-pointer to a null-terminated string specifying an
interface name (e.g. eth0).
Please note that this might not be supported by all operating systems. In that
case, ping_setopt() sets the error to "operation not supported".
src/liboping.c: Catch NULL pointers passed to public functions.
Libraries should not segfault - ever - no matter what a user is doing and how
stupid that might be.
Libraries should not segfault - ever - no matter what a user is doing and how
stupid that might be.
Added .gitignore.
src/liboping.c: Let ping_setopt() return -1 if 'value' is NULL.
The manpage states that 'value' must not be NULL. Anyway, imho, it's still
better to avoid segfaults inside a library.
The manpage states that 'value' must not be NULL. Anyway, imho, it's still
better to avoid segfaults inside a library.
src/liboping.c: Fix some format strings.
src/liboping.c: Fixed the handling of multiple hosts.
ping_receive_all() used to always pass the first host object to
ping_receive_one() which used that host object to determine the expected
address family. Thus, when pinging v4 and v6 hosts in parallel, some of them
would have never been considered but assumed to be timed out.
While at it, the code has been clarified in regard to matching an ECHO_REPLY
with the appropriate host object.
ping_receive_all() used to always pass the first host object to
ping_receive_one() which used that host object to determine the expected
address family. Thus, when pinging v4 and v6 hosts in parallel, some of them
would have never been considered but assumed to be timed out.
While at it, the code has been clarified in regard to matching an ECHO_REPLY
with the appropriate host object.
src/liboping.c: Do not reset recv_ttl in ping_receive_one().
Instead, reset the value of all host object in ping_receive_all().
ping_receive_one() does not necessarily get a pointer to the host object for
which we receive a reply, since ICMP messages may be received on _any_ raw
socket.
Instead, reset the value of all host object in ping_receive_all().
ping_receive_one() does not necessarily get a pointer to the host object for
which we receive a reply, since ICMP messages may be received on _any_ raw
socket.
Minor documentation fixes.
src/oping.c: Exit successfully when using the -h option.
src/oping.c: Improved the help output.
A short description has been added for each option. Also, print the program
version and author.
A short description has been added for each option. Also, print the program
version and author.
src/oping.c: Improved and unified error messages when parsing CL options.
Bumped version to 1.2.0; Updated ChangeLog.
AUTHORS: Add Dan Sully.
oping(8): Document the new `-f' option.
src/oping.c: Change some codig style.
src/oping.c: Only treat "-" as STDIN, not all strings beginning with "-".
Allow reading of files containing hostnames.
Signed-off-by: Dan Sully <daniel-github@electricrain.com>
Signed-off-by: Florian Forster <octo@verplant.org>
Signed-off-by: Dan Sully <daniel-github@electricrain.com>
Signed-off-by: Florian Forster <octo@verplant.org>
src/liboping.c: Check if IPPROTO_IPV6 and IPV6_RECVHOPLIMIT are defined.
src/liboping.c: Made sstrerror() static.
This is a private helper function only.
This is a private helper function only.
Bumped version to 1.1.2; Updated ChangeLog.
15 years agosrc/liboping.c: Check if pointer is NULL before dereferencing it in `ping_receive_ipv4'.
src/liboping.c: Check if pointer is NULL before dereferencing it in `ping_receive_ipv4'.
Thanks to Tomasz Pala for pointing out the problem.
Thanks to Tomasz Pala for pointing out the problem.
src/oping.h: Bump the OPING_VERSION, too.
Bumped version to 1.1.1; Updated ChangeLog.
src/liboping.c: Use ph-addrfamily to determine the protocol type.
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.
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.
src/liboping.c: Only include <stdint.h> if the configure script found it.
build system: Actually link with libxnet and use CPPFLAGS.
(Instead of CFLAGS.)
(Instead of CFLAGS.)
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..
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..
Net::Oping: Improve the POD a little.
build system: Define ABI and API versions in the configure script.
bindings/perl: Bumped version to 1.10; Updated Changes.
bindings/perl: Add some more simple syntax tests.
bindings/perl: Add the `ttl' method.
bindings/perl: Add the `get_recv_ttl' method.
Bumped version to 1.1.0; Updated ChangeLog.
AUTHORS: Added contributors so far.
src/oping.c: Allow setting of the TTL using `-t'.
src/liboping.c: When setting the TTL, update all existing pinghost_t, too.
manual pages: Fix some more typos.
src/oping.c: Print the received TTL, too.
src/liboping.c: Add debugging output to the TTL setting code.
manual pages: Fix some minor issues and typos.
src/liboping.c: Provide the TTL on received packets.
Thanks to Vladimir V. Melnikov for the suggestion and initial patch.
Thanks to Vladimir V. Melnikov for the suggestion and initial patch.
src/liboping.c: Make -Wextra happy.
Removed an unused parameter.
Removed an unused parameter.
ping_setopt(3): Document the PING_VERSION define.
A typo if fixed, too.
A typo if fixed, too.
src/oping.c: Allow shorter interval settings.
Previously, only 1/5s was allowed. Now everything down to 1/1000s is
accepted.
Previously, only 1/5s was allowed. Now everything down to 1/1000s is
accepted.
src/oping.c: Use `context_destroy' to free the context.
src/oping.c: Make all functions (except `main') static.
src/liboping.c: Remove dead code which broke strict aliasing rules.
Thanks to Alan Pevec for the pointer.
Thanks to Alan Pevec for the pointer.
src/liboping.c: Use thread-safe error handling.
I. e. move to `strerror_r'.
I. e. move to `strerror_r'.
src/{lib,}oping.c: Fix a few problems -Wextra has found.
src/{lib,}oping.c: Don't cast `size_t' to `unsigned int' when printing.
Use the "%zu" format string instead.
Use the "%zu" format string instead.
src/mans/*.pod: Updated copyright information.
Bumped version to 1.0.0.
ChangeLog, README: Updated information for the 1.0.0 release.
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.
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.
src/liboping.c: Beautify two debugging messages.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
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>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
bindings/perl: Add support for the number of dropped packets.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
bindings/perl: Update license information in the XS file.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
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>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
bindings/perl: Improve license information and fix typos in the documentation.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
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.
It is now, at last, possible to build the Perl module before installing
liboping and still have it linked correctly.
bindings/perl: Use OPING_VERSION to enable the work-around for 0.3.5.
src/liboping.c: Fix an incorrect assertion in `ping_timeval_add'.
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>
Thanks to "Iceberg" who reported this issue and provided the patch via
rt.cpan.org.
Signed-off-by: Florian Forster <octo@verplant.org>
bindings/Makefile.am: Don't build the Perl bindings automatically.
To build the Perl bindings, do:
$ cd bindings; make perl install
To build the Perl bindings, do:
$ cd bindings; make perl install
ping_iterator_get_info: Provide the number of timed out packets.
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..
Apparently this define is mentioned in RFC3493 but not in SUS. At least Cygwin
seems not to have this define..
bindings/perl/Makefile.PL: Removed that `use 5.008007;' from yet another place.
Why is everything kept in 1000 places in Perl modules? *argh*
Why is everything kept in 1000 places in Perl modules? *argh*
Merge branch 'origin'
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.
Also added `use 5.006;' to Net/Oping.pm, because `use warnings;' is a Perl 5.6
feature.
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>
* 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>