test.c
@@ -2,6 +2,7 @@ #include <stdlib.h> #include "dns.h" #include <time.h> #include <netinet/ip.h> int main(void) { @@ -12,7 +13,11 @@ struct timespec ret; int r; r = reachable(buf, IP); r = reachable(buf, "10.0.0.0"); printf("%d\n", r); /* print_packet(buf + sizeof(struct ip)); */ r = reachable(buf, "127.0.0.2"); printf("%d\n", r); /* ret = resolve(buf, hostname, IP, type); */