/* vi: set sw=4 ts=4: */
/*
- * $Id: ping.c,v 1.36 2001/01/31 19:00:21 kraai Exp $
+ * $Id: ping.c,v 1.38 2001/02/20 06:14:08 andersen Exp $
* Mini ping implementation for busybox
*
* Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
* Original copyright notice is retained at the end of this file.
*/
-#include "busybox.h"
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/file.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
+#include "busybox.h"
/* It turns out that libc5 doesn't have proper icmp support
argc--;
argv++;
if (argc < 1)
- usage(ping_usage);
+ show_usage();
ping(*argv);
return EXIT_SUCCESS;
}
break;
case 'c':
if (--argc <= 0)
- usage(ping_usage);
+ show_usage();
argv++;
pingcount = atoi(*argv);
break;
case 's':
if (--argc <= 0)
- usage(ping_usage);
+ show_usage();
argv++;
datalen = atoi(*argv);
break;
default:
- usage(ping_usage);
+ show_usage();
}
argc--;
argv++;
}
if (argc < 1)
- usage(ping_usage);
+ show_usage();
myid = getpid() & 0xFFFF;
ping(*argv);