aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ip/dhcpd/testping.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-12-26 04:48:52 +0000
committerrsc <devnull@localhost>2005-12-26 04:48:52 +0000
commit87a52e0485d3281ebea6bf4b725aa8023690e96f (patch)
tree0abc2d2ddb875196177231639d3cb4519e814b9d /src/cmd/ip/dhcpd/testping.c
parent35d26aa32167e84326cdb745c0e906393b8de71d (diff)
downloadplan9port-87a52e0485d3281ebea6bf4b725aa8023690e96f.tar.gz
plan9port-87a52e0485d3281ebea6bf4b725aa8023690e96f.tar.bz2
plan9port-87a52e0485d3281ebea6bf4b725aa8023690e96f.zip
new goodies
Diffstat (limited to 'src/cmd/ip/dhcpd/testping.c')
-rwxr-xr-xsrc/cmd/ip/dhcpd/testping.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/cmd/ip/dhcpd/testping.c b/src/cmd/ip/dhcpd/testping.c
new file mode 100755
index 00000000..b5ca90c5
--- /dev/null
+++ b/src/cmd/ip/dhcpd/testping.c
@@ -0,0 +1,22 @@
+#include <u.h>
+#include <libc.h>
+#include <ip.h>
+#include <bio.h>
+#include <ndb.h>
+#include "dat.h"
+
+char *blog = "ipboot";
+
+void
+main(int argc, char **argv)
+{
+ fmtinstall('E', eipconv);
+ fmtinstall('I', eipconv);
+
+ if(argc < 2)
+ exits(0);
+ if(icmpecho(argv[1]))
+ fprint(2, "%s live\n", argv[1]);
+ else
+ fprint(2, "%s doesn't answer\n", argv[1]);
+}