From dd34a5b4e62b2fb9b60377d0c5da2f2bc2ef4532 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 12 Mar 2009 08:56:36 +0100 Subject: [PATCH] src/liboping/test_liboping.c: Remove legacy file. --- src/liboping/test_liboping.c | 59 ------------------------------------ 1 file changed, 59 deletions(-) delete mode 100644 src/liboping/test_liboping.c diff --git a/src/liboping/test_liboping.c b/src/liboping/test_liboping.c deleted file mode 100644 index cd7a781e..00000000 --- a/src/liboping/test_liboping.c +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include - -#include "liboping.h" - -int main (int argc, char **argv) -{ - pingobj_t *ping; - pingobj_iter_t *iter; - - int i; - - if (argc < 2) - { - printf ("Usage: %s [host [host [...]]]\n", argv[0]); - return (1); - } - - if ((ping = ping_construct ()) == NULL) - { - fprintf (stderr, "ping_construct failed\n"); - return (-1); - } - - for (i = 1; i < argc; i++) - { - printf ("Adding host `%s'..\n", argv[i]); - - if (ping_host_add (ping, argv[i]) > 0) - { - fprintf (stderr, "ping_host_add (verplant.org) failed\n"); - return (-1); - } - } - - while (1) - { - if (ping_send (ping) < 0) - { - fprintf (stderr, "ping_send failed\n"); - return (-1); - } - - for (iter = ping_iterator_get (ping); iter != NULL; iter = ping_iterator_next (iter)) - { - const char *host; - double latency; - - host = ping_iterator_get_host (iter); - latency = ping_iterator_get_latency (iter); - - printf ("host = %s, latency = %f\n", host, latency); - } - - sleep (5); - } - - return (0); -} -- 2.30.2