oping: Make the exit status the number of hosts failed.
As far as I know, EXIT_FAILURE is only portable when used as-is, i.e. without
adding anything to it. Especially with "EXIT_FAILURE == -1" we might run into
trouble. I think it's more convenient to just use the number of failed hosts
rather than 1+<num> (on Linux).
As far as I know, EXIT_FAILURE is only portable when used as-is, i.e. without
adding anything to it. Especially with "EXIT_FAILURE == -1" we might run into
trouble. I think it's more convenient to just use the number of failed hosts
rather than 1+<num> (on Linux).
fiddle with failure threshold messages and comments
oping: Implement the "-Z" option.
This makes it possible to configure the threshold for exiting with a non-zero
exit status due to missing replies.
This makes it possible to configure the threshold for exiting with a non-zero
exit status due to missing replies.
non-zero process exit status when too many packets are unreturned
The number of unreturned packets in excess of 50% is summed over all
hosts. If this is nonzero, this count plus 1 is the process exit
status.
The number of unreturned packets in excess of 50% is summed over all
hosts. If this is nonzero, this count plus 1 is the process exit
status.
guard use of IP_RECVTOS which is unavailable on kfreebsd
configure.ac: autoconf 2.65 works just fine, too.
README: Add note about capabilities.
Manual pages: Update the copyright information.
Bump version to 1.6.2; Update ChangeLog.
configure.ac: autoconf 2.67 works just fine.
Merge pull request #1 from barak/master
upstream update + tweaks
upstream update + tweaks
git ignore more build debris
Update configure.ac and Makefile.am per autotools
Tweak configure.ac and Makefile.am per autoreconf instructions.
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
Accept autoupdate modifications.
Manually integrate portions of autoscan configure.scan.
Tweak configure.ac and Makefile.am per autoreconf instructions.
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
Accept autoupdate modifications.
Manually integrate portions of autoscan configure.scan.
src/Makefile.am: Make setcap and chmod fault-tolerant.
This is required because this weird Debian fakeroot utility gives the
impression as if the install was run by root, when in fact it isn't.
What good this should do is beyond me.
This is required because this weird Debian fakeroot utility gives the
impression as if the install was run by root, when in fact it isn't.
What good this should do is beyond me.
src/liboping.c: Fix a compiler warning
… regarding a non-static format string. Thanks to Brian Edwards for
reporting this problem.
… regarding a non-static format string. Thanks to Brian Edwards for
reporting this problem.
Bump version to 1.6.1; Update ChangeLog.
Update and unify copyright headers.
Build system: Automatically set capabilities flag / set-UID bit when installing as root.
noping: Fix compatibility with ncurses 5.8.
Hello,
My name is Gaetan and I maintain liboping in Arch Linux; our distro is
in the process of switching to ncurses-5.8, and I wanted to report that
I had to patch liboping to make noping work with the newer ncurses.
Specifically, if I update ncurses and run the old noping binary, then
nothing is displayed in the ncurses window (although the summary output
displayed on stdout at the end is correct). Same if I recompile noping
against the new ncurses library.
The reason seems to be that calling newwin() with ncols=0 does not
produce a full width window anymore. Anyway, the simple patch attached
fixed this issue for me.
Cheers.
Signed-off-by: Florian Forster <octo@verplant.org>
Hello,
My name is Gaetan and I maintain liboping in Arch Linux; our distro is
in the process of switching to ncurses-5.8, and I wanted to report that
I had to patch liboping to make noping work with the newer ncurses.
Specifically, if I update ncurses and run the old noping binary, then
nothing is displayed in the ncurses window (although the summary output
displayed on stdout at the end is correct). Same if I recompile noping
against the new ncurses library.
The reason seems to be that calling newwin() with ncols=0 does not
produce a full width window anymore. Anyway, the simple patch attached
fixed this issue for me.
Cheers.
Signed-off-by: Florian Forster <octo@verplant.org>
src/oping.c: Fix a compiler warning about uninitialized variables.
Some verions of GGC don't notice that usage_qos_exit() won't return and
complain about the variables "prec" and "class" being used uninitalized.
This commit adds the "noreturn" attribute to that function and
initializes the variables. Thanks to James Bromberger for reporting this
problem.
Some verions of GGC don't notice that usage_qos_exit() won't return and
complain about the variables "prec" and "class" being used uninitalized.
This commit adds the "noreturn" attribute to that function and
initializes the variables. Thanks to James Bromberger for reporting this
problem.
Bump version to 1.6.0; Update ChangeLog.
README: Remove whitespace.
src/liboping.c: Change coding style a bit.
liboping: use SO_TIMESTAMP when available
Current implementation of liboping relies on getting enough CPU shares
and getting those in a timely manner in order to determine correct ping
response times.
Avoid this limitation when kernel is able to provide packet reception
times using SO_TIMESTAMP. (as is done by iputils's ping utility)
Signed-off-by: Florian Forster <octo@verplant.org>
Current implementation of liboping relies on getting enough CPU shares
and getting those in a timely manner in order to determine correct ping
response times.
Avoid this limitation when kernel is able to provide packet reception
times using SO_TIMESTAMP. (as is done by iputils's ping utility)
Signed-off-by: Florian Forster <octo@verplant.org>
README: Document Linux capabilities and UNIX set-UID root solutions.
oping(8): Document the new SetUID behavior in connection with the "-f" option.
Bump version to 1.5.1; Update ChangeLog.
src/oping.c: Mark unused argument to avoid compiler warnings.
src/oping.c: Remove __attribute__ flags when using non-GNU compiler.
src/liboping.c: Always set the QoS member. Default to 0.
This should fix the following warning / error:
liboping.c:599: warning: comparison is always true due to limited
range of data type
Thanks to James Bromberger for reporting this!
This should fix the following warning / error:
liboping.c:599: warning: comparison is always true due to limited
range of data type
Thanks to James Bromberger for reporting this!
oping: Add alias for the "Voice Admit" DSCP.
Bump version to 1.5.0; Update ChangeLog.
ping_iterator_get_info(3): Document the "PING_INFO_RECV_QOS" flag.
src/oping.h: Change the default payload message.
Merge branch 'vm/qos'
oping(8): Document the displayed "qos=" field.
src/oping.c: Only print QoS information if it's not 0/0.
AUTHORS: Add Vladimir Melnikov.
src/oping.c: Add function for formatted printing of the QoS byte.
oping(8): Document the "be" and "cs<n>" DSCP abbreviations.
Rename "ToS" to "QoS" everywhere, to account for DSCP being used in IPv6 …
… and recommended for IPv4.
… and recommended for IPv4.
src/oping.c: Remove useless "strlen".
src/oping.c: Add the "be" and "cs[0-7]" DSCPs.
oping(8): Document the "-Q" option.
src/oping.c: Implement named arguments for DiffServ flags.
oping: Improve parsing of the "-z" argument.
Fix printing the ToS value.
Apparently "%#04x" prints 0 as "0000" instead of "0x00". *sigh*
Apparently "%#04x" prints 0 as "0000" instead of "0x00". *sigh*
ping_set_tos: Improve error handling.
ping_receive_one: Fix a typo.
src/liboping.c: Fix building with debugging enabled.
Rename "PING_INFO_TOS" → "PING_INFO_RECV_TOS".
ping_setopt(3): Document the new "PING_OPT_TOS" option.
src/liboping.c: Set the "IP_RECVTOS" and "IPV6_RECVTCLASS" socket options.
src/liboping.c: Use an uint8_t for storing the ToS.
Implement support for QoS / ToS fields.
Hello Florian,
I've made some functionality extension to debug QoS in the network -
ability to set tos (present in most standard "pings") and to verify
received tos field (didn't see any ping command with this feature).
May be it will need to someone else.
Best regards,
Vladimir
Hello Florian,
I've made some functionality extension to debug QoS in the network -
ability to set tos (present in most standard "pings") and to verify
received tos field (didn't see any ping command with this feature).
May be it will need to someone else.
Best regards,
Vladimir
src/Makefile.am: Use "LDADD" for applications, "LIBADD" for the library.
Use "LDFLAGS" only for "-version-info".
Use "LDFLAGS" only for "-version-info".
Relicense: Use the LGPL v2.1 (or later) for liboping.
The "oping" and "noping" utilities are still GPL v2.
Sebastian Harl, the only other copyright holder on the library, agrees
with this license change.
The "oping" and "noping" utilities are still GPL v2.
Sebastian Harl, the only other copyright holder on the library, agrees
with this license change.
oping(8): Document the colors used by noping.
Bumbed version to 1.4.0, updated ChangeLog.
oping(8): Document "noping", too.
README: Document "oping" and "noping".
README: Convert to Unicode.
src/oping.c: Define NCURSES_OPAQUE.
src/oping.c: Resizing the scrolling region seems to work with this parameters.
I don't understand what I'm doing different to previously, but whatever
it is it seems to do the trick.
I don't understand what I'm doing different to previously, but whatever
it is it seems to do the trick.
noping: Further cleanup of the curses stuff.
noping: Use colors to highlight "unusual" response times.
noping: Print host name in bold.
noping: Handle resizing of X windows gracefully.
src/oping.c: Move "context_get_packet_loss" into a separate function.
src/oping.c: Move calculation of average and stddev to separate functions.
src/oping.c: Add ncurses based front-end.
src/oping.c: Move printing header and footer into separate functions.
contrib/liboping.spec: Added "provided as is" header.
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.