From 6dab04021cc1f97e5d95ca7da56e95a1fed8046a Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Tue, 31 May 2022 13:47:51 +0000 Subject: [PATCH] Further update to listen for any traffic. Need to refine to returning DNS or ICMP about DNS --- test.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/test.c b/test.c index 2bef6e4..7ddbf1c 100644 --- a/test.c +++ b/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); */ -- Gitblit v1.10.0