From bac15e7edf532c4a87f0f219c8f70d93d4c7e752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 18 Jan 2022 14:05:06 +0100 Subject: dela --- host_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'host_test.c') 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; } -- cgit v1.2.3