summaryrefslogtreecommitdiffstats
path: root/host_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'host_test.c')
-rw-r--r--host_test.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/host_test.c b/host_test.c
new file mode 100644
index 0000000..0584686
--- /dev/null
+++ b/host_test.c
@@ -0,0 +1,9 @@
+#include "host.c"
+int main (int argc, char ** argv) {
+ if (argc != 3) {
+ fprintf(stderr, "%s network hostnumber\n", argv[0]);
+ return 1;
+ }
+ printf("%s\n", inet_ntoa(host(str2net(argv[1]), atoi(argv[2]))));
+ return 0;
+}