summaryrefslogtreecommitdiffstats
path: root/host_test.c
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-01-12 22:14:32 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-01-12 22:14:32 +0100
commit9526d60b2cf092444af86924288c222d804a36a3 (patch)
treedfa1ff7e74656b22a287a9176bc47a6f4c9565cb /host_test.c
parentmalo sem se učil, kako delujejo protokoli (diff)
downloaddnsfind-9526d60b2cf092444af86924288c222d804a36a3.tar
dnsfind-9526d60b2cf092444af86924288c222d804a36a3.tar.gz
dnsfind-9526d60b2cf092444af86924288c222d804a36a3.tar.bz2
dnsfind-9526d60b2cf092444af86924288c222d804a36a3.tar.lz
dnsfind-9526d60b2cf092444af86924288c222d804a36a3.tar.xz
dnsfind-9526d60b2cf092444af86924288c222d804a36a3.tar.zst
dnsfind-9526d60b2cf092444af86924288c222d804a36a3.zip
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;
+}