liboping.git
10 years agomove unicode detection to a separate function
Antoine Beaupré [Fri, 6 Dec 2013 05:07:09 +0000 (00:07 -0500)]
move unicode detection to a separate function

this will ease transition to a commandline option override

10 years agoautodetect unicode, and fallback to ACS scancodes on failure
Antoine Beaupré [Fri, 6 Dec 2013 04:35:00 +0000 (23:35 -0500)]
autodetect unicode, and fallback to ACS scancodes on failure

this is fairly ugly - we use a hidden ncurses function to detect
unicode (but at least we don't reimplement it), then we mess around
with the character arrays to display the rights symbols

i am not sure i like this, but i prefer to braindump than to stall, so
let's move forward.

10 years agoRefactor the graph printing into its own function.
Florian Forster [Thu, 5 Dec 2013 17:15:52 +0000 (18:15 +0100)]
Refactor the graph printing into its own function.

This makes it much easier and cleaner to add a second, non-Unicode
implementation and possibly even a non-color version.

10 years agoswitch to ncursesw in the build chain
Antoine Beaupré [Tue, 3 Dec 2013 05:33:39 +0000 (00:33 -0500)]
switch to ncursesw in the build chain

10 years agoMerge remote-tracking branch 'anarcat/autogen'
Florian Forster [Tue, 3 Dec 2013 14:33:18 +0000 (15:33 +0100)]
Merge remote-tracking branch 'anarcat/autogen'

10 years agoignore generated file
Antoine Beaupré [Tue, 3 Dec 2013 05:34:32 +0000 (00:34 -0500)]
ignore generated file

10 years agobetter wrapping: add a cursor and respect inner borders
Antoine Beaupré [Tue, 3 Dec 2013 04:15:13 +0000 (23:15 -0500)]
better wrapping: add a cursor and respect inner borders

10 years agorework scaling algorithm so it covers the whole range
Antoine Beaupré [Tue, 3 Dec 2013 03:57:00 +0000 (22:57 -0500)]
rework scaling algorithm so it covers the whole range

i did this after some stress testing, now it covers the whole range on input

10 years agocleanup safety checks
Antoine Beaupré [Tue, 3 Dec 2013 03:32:46 +0000 (22:32 -0500)]
cleanup safety checks

make sure that if we go beyond the max ratio, we just mark it as one

10 years agowrap around the window once the histogram grows too big
Antoine Beaupré [Tue, 3 Dec 2013 03:32:15 +0000 (22:32 -0500)]
wrap around the window once the histogram grows too big

10 years agoremove a little quirk i introduced by mistake
Antoine Beaupré [Tue, 3 Dec 2013 03:29:53 +0000 (22:29 -0500)]
remove a little quirk i introduced by mistake

this was breaking the border

10 years agomake histogram colors with a nicer background
Antoine Beaupré [Tue, 3 Dec 2013 03:29:24 +0000 (22:29 -0500)]
make histogram colors with a nicer background

10 years agorestore usual ping display, now that histograms are in a different window
Antoine Beaupré [Tue, 3 Dec 2013 03:10:41 +0000 (22:10 -0500)]
restore usual ping display, now that histograms are in a different window

10 years agoput histograms into the independent window, to eventually restore ping times display
Antoine Beaupré [Tue, 3 Dec 2013 03:06:26 +0000 (22:06 -0500)]
put histograms into the independent window, to eventually restore ping times display

10 years agoadd autogen script for clueless people like me
Antoine Beaupré [Tue, 3 Dec 2013 01:51:05 +0000 (20:51 -0500)]
add autogen script for clueless people like me

10 years agoimplement some prettyping-inspired display instead of textual
Antoine Beaupré [Tue, 3 Dec 2013 01:45:58 +0000 (20:45 -0500)]
implement some prettyping-inspired display instead of textual

this is a first stab at porting "prettyping.sh" into noping. the idea
is to show a histogram of ping times instead of numerical values. with
some work, we could actually show both, but this focuses on
implementing the hard part (the histogram) properly.

it is very rudimentary for now:

 * the math may be wrong for the size of the bar, I was mostly in a
   rush to make unicode work and have something pretty quickly.

 * all hosts are on the same line: each should have its own line

 * the histogram should be displayed in a separate window

 * it should use background colors as well

 * it should fallback when the terminal is not unicode-capable

 * the scaling logic is fully automatic, which necessarily gives weird
   results at first

this requires switching to the ncursesw library and other unicode
ncurses hackery described in this post:

http://newsgroups.derkeiler.com/Archive/Rec/rec.games.roguelike.development/2010-09/msg00050.html

pretty ping is a awk/bash script, MIT-licensed, available here:

https://bitbucket.org/denilsonsa/small_scripts/src/tip/prettyping.sh

11 years agoSolaris 10 compatibility patch
Scott Severtson [Mon, 21 May 2012 14:44:02 +0000 (10:44 -0400)]
Solaris 10 compatibility patch

Solaris 10's version of netinet/ip.h doesn't include a definition for
IPTOS_MINCOST, which results in the following build error:

---
libtool: link: ( cd ".libs" && rm -f "liboping.la" && ln -s
"../liboping.la" "liboping.la" )
gcc -DHAVE_CONFIG_H -I.   -D_XPG4_2 -D__EXTENSIONS__ -Wall -Werror -g
-O2 -c oping.c
oping.c: In function `usage_qos_exit':
oping.c:311: error: `IPTOS_MINCOST' undeclared (first use in this function)
oping.c:311: error: (Each undeclared identifier is reported only once
oping.c:311: error: for each function it appears in.)
oping.c: In function `set_opt_send_qos':
oping.c:389: error: `IPTOS_MINCOST' undeclared (first use in this function)
gmake[3]: *** [oping.o] Error 1
---

I've attached a patch to define this value, consistent with how the
Asterisk project resolved this issue:
https://issues.asterisk.org/view.php?id=12050

The patch was developed against liboping 1.6.2; it doesn't appear
there have been any changes in git since this release.

Thanks,
--Scott Severtson

Signed-off-by: Florian Forster <octo@verplant.org>
12 years agoBump ABI version; update ChangeLog. liboping-1.6.2
Florian Forster [Tue, 31 Jan 2012 16:20:15 +0000 (17:20 +0100)]
Bump ABI version; update ChangeLog.

12 years agoMac OX S 10.7 compile fixes.
Clayton O'Neill [Sun, 30 Oct 2011 23:36:46 +0000 (19:36 -0400)]
Mac OX S 10.7 compile fixes.

I've attached a patch that's required to be able to compile liboping on
MacOS 10.7 (Lion).  The issue is that the IPv6 API's are changing from
RFC 2292 to 3542, and Apple's headers require you to state which API you
want to use by defining a constant.  I've changed it to use either based
on the presence of constants, but to prefer 3542 on MacOS.

One problem I see with this is that if you have both multicast and
unicast TTL's set, then this won't report both of them, but I'm not sure
if that's even valid and it would require more significant rework.
Also, I noticed you have fixed the IP_RECVTOS issue in head.  That patch
is also required to be able to compile on Solaris and MacOS.

Signed-off-by: Florian Forster <octo@verplant.org>
12 years agooping: Make the exit status the number of hosts failed.
Florian Forster [Wed, 7 Sep 2011 01:08:32 +0000 (21:08 -0400)]
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).

12 years agofiddle with failure threshold messages and comments
Barak A. Pearlmutter [Tue, 6 Sep 2011 07:03:59 +0000 (08:03 +0100)]
fiddle with failure threshold messages and comments

12 years agooping: Implement the "-Z" option.
Florian Forster [Mon, 5 Sep 2011 02:51:14 +0000 (22:51 -0400)]
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.

12 years agonon-zero process exit status when too many packets are unreturned
Barak A. Pearlmutter [Thu, 1 Sep 2011 12:22:05 +0000 (13:22 +0100)]
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.

12 years agoguard use of IP_RECVTOS which is unavailable on kfreebsd
Barak A. Pearlmutter [Thu, 1 Sep 2011 11:48:57 +0000 (12:48 +0100)]
guard use of IP_RECVTOS which is unavailable on kfreebsd

12 years agoconfigure.ac: autoconf 2.65 works just fine, too.
Florian Forster [Sat, 27 Aug 2011 15:12:19 +0000 (17:12 +0200)]
configure.ac: autoconf 2.65 works just fine, too.

12 years agoREADME: Add note about capabilities.
Florian Forster [Fri, 2 Sep 2011 02:55:32 +0000 (22:55 -0400)]
README: Add note about capabilities.

12 years agoManual pages: Update the copyright information.
Florian Forster [Sun, 13 Mar 2011 19:26:43 +0000 (20:26 +0100)]
Manual pages: Update the copyright information.

12 years agoBump version to 1.6.2; Update ChangeLog.
Florian Forster [Sun, 13 Mar 2011 19:18:47 +0000 (20:18 +0100)]
Bump version to 1.6.2; Update ChangeLog.

12 years agoconfigure.ac: autoconf 2.67 works just fine.
Florian Forster [Sat, 27 Aug 2011 15:12:19 +0000 (17:12 +0200)]
configure.ac: autoconf 2.67 works just fine.

12 years agoMerge pull request #1 from barak/master
Florian Forster [Sat, 27 Aug 2011 15:00:37 +0000 (08:00 -0700)]
Merge pull request #1 from barak/master

upstream update + tweaks

12 years agogit ignore more build debris
Barak A. Pearlmutter [Sun, 21 Aug 2011 13:32:21 +0000 (15:32 +0200)]
git ignore more build debris

12 years agoUpdate configure.ac and Makefile.am per autotools
Barak A. Pearlmutter [Sun, 21 Aug 2011 13:03:11 +0000 (15:03 +0200)]
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.

13 years agosrc/Makefile.am: Make setcap and chmod fault-tolerant.
Florian Forster [Thu, 10 Mar 2011 16:10:16 +0000 (17:10 +0100)]
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.

13 years agosrc/liboping.c: Fix a compiler warning
Florian Forster [Mon, 7 Mar 2011 08:12:06 +0000 (09:12 +0100)]
src/liboping.c: Fix a compiler warning

… regarding a non-static format string. Thanks to Brian Edwards for
reporting this problem.

13 years agoBump version to 1.6.1; Update ChangeLog. liboping-1.6.1
Florian Forster [Sun, 6 Mar 2011 08:46:54 +0000 (09:46 +0100)]
Bump version to 1.6.1; Update ChangeLog.

13 years agoUpdate and unify copyright headers.
Florian Forster [Sun, 6 Mar 2011 08:41:02 +0000 (09:41 +0100)]
Update and unify copyright headers.

13 years agoBuild system: Automatically set capabilities flag / set-UID bit when installing as...
Florian Forster [Sun, 6 Mar 2011 08:34:22 +0000 (09:34 +0100)]
Build system: Automatically set capabilities flag / set-UID bit when installing as root.

13 years agonoping: Fix compatibility with ncurses 5.8.
Gaetan Bisson [Mon, 28 Feb 2011 13:41:24 +0000 (14:41 +0100)]
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>
13 years agosrc/oping.c: Fix a compiler warning about uninitialized variables.
Florian Forster [Wed, 16 Feb 2011 08:45:35 +0000 (09:45 +0100)]
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.

13 years agoBump version to 1.6.0; Update ChangeLog. liboping-1.6.0
Florian Forster [Wed, 26 Jan 2011 08:48:28 +0000 (09:48 +0100)]
Bump version to 1.6.0; Update ChangeLog.

13 years agoREADME: Remove whitespace.
Florian Forster [Wed, 26 Jan 2011 08:45:11 +0000 (09:45 +0100)]
README: Remove whitespace.

13 years agosrc/liboping.c: Change coding style a bit.
Florian Forster [Sat, 15 Jan 2011 19:36:25 +0000 (20:36 +0100)]
src/liboping.c: Change coding style a bit.

13 years agoliboping: use SO_TIMESTAMP when available
Bruno Prémont [Sat, 15 Jan 2011 18:44:49 +0000 (19:44 +0100)]
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>
13 years agoREADME: Document Linux capabilities and UNIX set-UID root solutions.
Florian Forster [Sat, 27 Nov 2010 12:24:59 +0000 (13:24 +0100)]
README: Document Linux capabilities and UNIX set-UID root solutions.

13 years agooping(8): Document the new SetUID behavior in connection with the "-f" option. liboping-1.5.1
Florian Forster [Wed, 17 Nov 2010 10:04:47 +0000 (11:04 +0100)]
oping(8): Document the new SetUID behavior in connection with the "-f" option.

13 years agoBump version to 1.5.1; Update ChangeLog.
Florian Forster [Wed, 17 Nov 2010 09:09:47 +0000 (10:09 +0100)]
Bump version to 1.5.1; Update ChangeLog.

13 years agosrc/oping.c: Mark unused argument to avoid compiler warnings.
Florian Forster [Wed, 17 Nov 2010 09:02:56 +0000 (10:02 +0100)]
src/oping.c: Mark unused argument to avoid compiler warnings.

13 years agosrc/oping.c: Remove __attribute__ flags when using non-GNU compiler.
Florian Forster [Wed, 17 Nov 2010 09:02:37 +0000 (10:02 +0100)]
src/oping.c: Remove __attribute__ flags when using non-GNU compiler.

13 years agosrc/liboping.c: Always set the QoS member. Default to 0.
Florian Forster [Wed, 17 Nov 2010 08:01:19 +0000 (09:01 +0100)]
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!

13 years agooping: Add alias for the "Voice Admit" DSCP.
Florian Forster [Fri, 29 Oct 2010 08:09:58 +0000 (10:09 +0200)]
oping: Add alias for the "Voice Admit" DSCP.

13 years agoBump version to 1.5.0; Update ChangeLog. liboping-1.5.0
Florian Forster [Wed, 27 Oct 2010 13:40:32 +0000 (15:40 +0200)]
Bump version to 1.5.0; Update ChangeLog.

13 years agoping_iterator_get_info(3): Document the "PING_INFO_RECV_QOS" flag.
Florian Forster [Wed, 27 Oct 2010 13:40:06 +0000 (15:40 +0200)]
ping_iterator_get_info(3): Document the "PING_INFO_RECV_QOS" flag.

13 years agosrc/oping.h: Change the default payload message.
Florian Forster [Wed, 27 Oct 2010 13:18:15 +0000 (15:18 +0200)]
src/oping.h: Change the default payload message.

13 years agoMerge branch 'vm/qos'
Florian Forster [Wed, 27 Oct 2010 12:32:13 +0000 (14:32 +0200)]
Merge branch 'vm/qos'

13 years agooping(8): Document the displayed "qos=" field.
Florian Forster [Wed, 27 Oct 2010 12:31:54 +0000 (14:31 +0200)]
oping(8): Document the displayed "qos=" field.

13 years agosrc/oping.c: Only print QoS information if it's not 0/0.
Florian Forster [Wed, 27 Oct 2010 10:11:51 +0000 (12:11 +0200)]
src/oping.c: Only print QoS information if it's not 0/0.

13 years agoAUTHORS: Add Vladimir Melnikov.
Florian Forster [Wed, 27 Oct 2010 09:27:42 +0000 (11:27 +0200)]
AUTHORS: Add Vladimir Melnikov.

13 years agosrc/oping.c: Add function for formatted printing of the QoS byte.
Florian Forster [Wed, 27 Oct 2010 09:05:35 +0000 (11:05 +0200)]
src/oping.c: Add function for formatted printing of the QoS byte.

13 years agooping(8): Document the "be" and "cs<n>" DSCP abbreviations.
Florian Forster [Wed, 27 Oct 2010 08:30:40 +0000 (10:30 +0200)]
oping(8): Document the "be" and "cs<n>" DSCP abbreviations.

13 years agoRename "ToS" to "QoS" everywhere, to account for DSCP being used in IPv6 …
Florian Forster [Wed, 27 Oct 2010 07:59:09 +0000 (09:59 +0200)]
Rename "ToS" to "QoS" everywhere, to account for DSCP being used in IPv6 …

… and recommended for IPv4.

13 years agosrc/oping.c: Remove useless "strlen".
Florian Forster [Wed, 27 Oct 2010 07:53:18 +0000 (09:53 +0200)]
src/oping.c: Remove useless "strlen".

13 years agosrc/oping.c: Add the "be" and "cs[0-7]" DSCPs.
Florian Forster [Wed, 27 Oct 2010 06:58:08 +0000 (08:58 +0200)]
src/oping.c: Add the "be" and "cs[0-7]" DSCPs.

13 years agooping(8): Document the "-Q" option.
Florian Forster [Tue, 26 Oct 2010 16:22:37 +0000 (18:22 +0200)]
oping(8): Document the "-Q" option.

13 years agosrc/oping.c: Implement named arguments for DiffServ flags.
Florian Forster [Tue, 26 Oct 2010 15:42:38 +0000 (17:42 +0200)]
src/oping.c: Implement named arguments for DiffServ flags.

13 years agooping: Improve parsing of the "-z" argument.
Florian Forster [Tue, 26 Oct 2010 14:20:51 +0000 (16:20 +0200)]
oping: Improve parsing of the "-z" argument.

13 years agoFix printing the ToS value.
Florian Forster [Tue, 26 Oct 2010 13:49:09 +0000 (15:49 +0200)]
Fix printing the ToS value.

Apparently "%#04x" prints 0 as "0000" instead of "0x00". *sigh*

13 years agoping_set_tos: Improve error handling.
Florian Forster [Tue, 26 Oct 2010 13:48:24 +0000 (15:48 +0200)]
ping_set_tos: Improve error handling.

13 years agoping_receive_one: Fix a typo.
Florian Forster [Tue, 26 Oct 2010 13:47:49 +0000 (15:47 +0200)]
ping_receive_one: Fix a typo.

13 years agosrc/liboping.c: Fix building with debugging enabled.
Florian Forster [Tue, 26 Oct 2010 13:17:10 +0000 (15:17 +0200)]
src/liboping.c: Fix building with debugging enabled.

13 years agoRename "PING_INFO_TOS" → "PING_INFO_RECV_TOS".
Florian Forster [Tue, 26 Oct 2010 13:11:24 +0000 (15:11 +0200)]
Rename "PING_INFO_TOS" → "PING_INFO_RECV_TOS".

13 years agoping_setopt(3): Document the new "PING_OPT_TOS" option.
Florian Forster [Tue, 26 Oct 2010 13:10:04 +0000 (15:10 +0200)]
ping_setopt(3): Document the new "PING_OPT_TOS" option.

13 years agosrc/liboping.c: Set the "IP_RECVTOS" and "IPV6_RECVTCLASS" socket options.
Florian Forster [Tue, 26 Oct 2010 13:09:45 +0000 (15:09 +0200)]
src/liboping.c: Set the "IP_RECVTOS" and "IPV6_RECVTCLASS" socket options.

13 years agosrc/liboping.c: Use an uint8_t for storing the ToS.
Florian Forster [Tue, 26 Oct 2010 13:09:10 +0000 (15:09 +0200)]
src/liboping.c: Use an uint8_t for storing the ToS.

13 years agoImplement support for QoS / ToS fields.
Vladimir Melnikov [Tue, 26 Oct 2010 12:20:03 +0000 (14:20 +0200)]
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

13 years agosrc/Makefile.am: Use "LDADD" for applications, "LIBADD" for the library.
Florian Forster [Tue, 13 Jul 2010 14:07:53 +0000 (16:07 +0200)]
src/Makefile.am: Use "LDADD" for applications, "LIBADD" for the library.

Use "LDFLAGS" only for "-version-info".

13 years agoRelicense: Use the LGPL v2.1 (or later) for liboping.
Florian Forster [Sun, 27 Jun 2010 09:52:01 +0000 (11:52 +0200)]
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.

13 years agooping(8): Document the colors used by noping. liboping-1.4.0
Florian Forster [Sun, 13 Jun 2010 18:33:57 +0000 (20:33 +0200)]
oping(8): Document the colors used by noping.

13 years agoBumbed version to 1.4.0, updated ChangeLog.
Florian Forster [Sun, 13 Jun 2010 17:58:30 +0000 (19:58 +0200)]
Bumbed version to 1.4.0, updated ChangeLog.

13 years agooping(8): Document "noping", too.
Florian Forster [Sun, 13 Jun 2010 17:50:26 +0000 (19:50 +0200)]
oping(8): Document "noping", too.

13 years agoREADME: Document "oping" and "noping".
Florian Forster [Sun, 13 Jun 2010 17:47:55 +0000 (19:47 +0200)]
README: Document "oping" and "noping".

13 years agoREADME: Convert to Unicode.
Florian Forster [Sun, 13 Jun 2010 17:39:30 +0000 (19:39 +0200)]
README: Convert to Unicode.

13 years agosrc/oping.c: Define NCURSES_OPAQUE.
Florian Forster [Sun, 13 Jun 2010 17:35:29 +0000 (19:35 +0200)]
src/oping.c: Define NCURSES_OPAQUE.

13 years agosrc/oping.c: Resizing the scrolling region seems to work with this parameters.
Florian Forster [Sat, 12 Jun 2010 14:04:02 +0000 (16:04 +0200)]
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.

13 years agonoping: Further cleanup of the curses stuff.
Florian Forster [Fri, 11 Jun 2010 22:28:01 +0000 (00:28 +0200)]
noping: Further cleanup of the curses stuff.

13 years agonoping: Use colors to highlight "unusual" response times.
Florian Forster [Tue, 8 Jun 2010 16:43:11 +0000 (18:43 +0200)]
noping: Use colors to highlight "unusual" response times.

13 years agonoping: Print host name in bold.
Florian Forster [Tue, 8 Jun 2010 16:04:11 +0000 (18:04 +0200)]
noping: Print host name in bold.

13 years agonoping: Handle resizing of X windows gracefully.
Florian Forster [Tue, 8 Jun 2010 15:52:38 +0000 (17:52 +0200)]
noping: Handle resizing of X windows gracefully.

13 years agosrc/oping.c: Move "context_get_packet_loss" into a separate function.
Florian Forster [Tue, 8 Jun 2010 14:02:46 +0000 (16:02 +0200)]
src/oping.c: Move "context_get_packet_loss" into a separate function.

13 years agosrc/oping.c: Move calculation of average and stddev to separate functions.
Florian Forster [Tue, 8 Jun 2010 08:20:59 +0000 (10:20 +0200)]
src/oping.c: Move calculation of average and stddev to separate functions.

13 years agosrc/oping.c: Add ncurses based front-end.
Florian Forster [Tue, 8 Jun 2010 07:37:33 +0000 (09:37 +0200)]
src/oping.c: Add ncurses based front-end.

13 years agosrc/oping.c: Move printing header and footer into separate functions.
Florian Forster [Tue, 8 Jun 2010 07:27:48 +0000 (09:27 +0200)]
src/oping.c: Move printing header and footer into separate functions.

14 years agocontrib/liboping.spec: Added "provided as is" header.
Florian Forster [Tue, 26 Jan 2010 20:11:51 +0000 (21:11 +0100)]
contrib/liboping.spec: Added "provided as is" header.

14 years agocontrib/liboping.spec: Added example spec file.
Benjamin Petrin [Tue, 26 Jan 2010 20:06:13 +0000 (21:06 +0100)]
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.

14 years agominor doc fixes for liboping
Vadim Zeitlin [Sun, 20 Dec 2009 20:45:48 +0000 (21:45 +0100)]
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>
14 years agoChangeLog: Oops, there were actually a couple more changes in that release. liboping-1.3.4
Florian Forster [Sun, 20 Dec 2009 11:13:28 +0000 (12:13 +0100)]
ChangeLog: Oops, there were actually a couple more changes in that release.

14 years agoBumped version to 1.3.4 and updated ChangeLog.
Florian Forster [Sun, 20 Dec 2009 09:25:51 +0000 (10:25 +0100)]
Bumped version to 1.3.4 and updated ChangeLog.

14 years agosrc/liboping.c: ping_receive_all: Clear the timer when a FD signals an error.
Florian Forster [Thu, 10 Dec 2009 15:43:54 +0000 (16:43 +0100)]
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.

14 years agobindings/perl: Bumped version to 1.21 and updated Changes.
Florian Forster [Thu, 1 Oct 2009 12:33:02 +0000 (14:33 +0200)]
bindings/perl: Bumped version to 1.21 and updated Changes.

14 years agobindings/perl/Oping.xs: Fix an off-by-one error when allocating a Perl string.
Fredrik Soderblom [Thu, 1 Oct 2009 12:24:46 +0000 (14:24 +0200)]
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.

14 years agooping: Temporarily drop privileges if supported by the system.
Florian Forster [Thu, 1 Oct 2009 08:28:10 +0000 (10:28 +0200)]
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.