From 9bafd94f76927641bc0280aa4fd86240c9977178 Mon Sep 17 00:00:00 2001 From: Roger Wolff Date: Mon, 2 Nov 1998 00:00:00 +0000 Subject: [PATCH] mtr v0.28 - DNS lookups are now suppressed if you don't want them. source: ftp://ftp.bitwizard.nl/mtr/mtr-0.28.tar.gz --- configure.in | 2 +- report.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index a0d27ab..d9f5c57 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(mtr.c) -AM_INIT_AUTOMAKE(mtr, 0.27) +AM_INIT_AUTOMAKE(mtr, 0.28) AC_SUBST(GTK_OBJ) AC_SUBST(CURSES_OBJ) diff --git a/report.c b/report.c index 9181781..9f2fe3c 100644 --- a/report.c +++ b/report.c @@ -28,6 +28,8 @@ #include "report.h" #include "net.h" +extern int dns; + void report_open() { printf("%-40s LOSS RCVD SENT BEST AVG WORST\n", "HOST"); fflush(stdout); @@ -49,9 +51,9 @@ void report_close() { sprintf(name, "???"); } else { haddr = htonl(addr); - host = gethostbyaddr((char *)&haddr, sizeof(int), AF_INET); + host = dns?gethostbyaddr((char *)&haddr, sizeof(int), AF_INET):NULL; - if(host != NULL) { + if (host != NULL) { strncpy(name, host->h_name, 80); name[80] = 0; } else { -- 2.47.3