summaryrefslogtreecommitdiffstats
path: root/host_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'host_test.c')
-rw-r--r--host_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/host_test.c b/host_test.c
index 0584686..b0d95c5 100644
--- a/host_test.c
+++ b/host_test.c
@@ -4,6 +4,9 @@ int main (int argc, char ** argv) {
fprintf(stderr, "%s network hostnumber\n", argv[0]);
return 1;
}
- printf("%s\n", inet_ntoa(host(str2net(argv[1]), atoi(argv[2]))));
+ struct in_net h = host(str2net(argv[1]), strtoll(argv[2], NULL, 10));
+ char b[16];
+ strcpy(b, inet_ntoa(h.addr));
+ printf("addr: %s mask %s\n", b, inet_ntoa(h.mask));
return 0;
}