From: Roger Wolff Date: Mon, 2 Nov 1998 00:00:00 +0000 (+0000) Subject: mtr v0.28 X-Git-Tag: v0.28^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bafd94f76927641bc0280aa4fd86240c9977178;p=thirdparty%2Fmtr.git 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 --- 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 {