diff -ur mtr-0.37/AUTHORS mtr-0.38/AUTHORS --- mtr-0.37/AUTHORS Mon Apr 12 15:57:22 1999 +++ mtr-0.38/AUTHORS Tue Apr 13 23:38:14 1999 @@ -17,10 +17,10 @@ Andrew Stesin, Aaron Scarisbrick, Craig Milo Rogers (Rogers@ISI.EDU), - Russell Nelson, - Alexander V. Lukyanov, - Charles Levert, - Bertrand Leconte, + Russell Nelson (rn-mtr@crynwr.com), + Alexander V. Lukyanov (lav@yars.free.net), + Charles Levert (charles@comm.polymtl.ca), + Bertrand Leconte (B.Leconte@mail.dotcom.fr), Anand Kumria, Adam Kramer (l3zqc@qcunix1.acc.qc.edu), Philip Kizer (pckizer@nostrum.com), @@ -31,7 +31,7 @@ Brian Casey, Bill Bogstad (bogstad@pobox.com), Moritz Barsnick (barsnick@gmx.net) - R??? Sparks (rjsparks@nostrum.com) + Robert Sparks (rjsparks@nostrum.com) and anyone who has slipped through the cracks of my mail file. diff -ur mtr-0.37/Makefile.in mtr-0.38/Makefile.in --- mtr-0.37/Makefile.in Mon Apr 12 20:30:07 1999 +++ mtr-0.38/Makefile.in Mon Apr 12 20:34:20 1999 @@ -113,8 +113,8 @@ NROFF = nroff DIST_COMMON = README AUTHORS COPYING INSTALL Makefile.am Makefile.in \ -NEWS TODO acconfig.h aclocal.m4 config.h.in configure configure.in \ -install-sh missing mkinstalldirs stamp-h.in +NEWS TODO acconfig.h aclocal.m4 config.h.in configure.in install-sh \ +missing mkinstalldirs stamp-h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) diff -ur mtr-0.37/TODO mtr-0.38/TODO --- mtr-0.37/TODO Sun Apr 11 15:48:01 1999 +++ mtr-0.38/TODO Fri Apr 16 11:05:19 1999 @@ -3,7 +3,8 @@ - Allow mtr to log the return packets, for later analysis. Done: 0.25 . Todo: allow the userinterface(s) to work while - still logging to a file. + still logging to a file. Write a "logfile displaying" mode to + mtr. - Request timestamping at the remote site. Andreas Fasbender has an algorithm that will allow us to @@ -31,11 +32,14 @@ - Bugs to fix? - Do something useful if host couldn't be resolved. + -- Done. - Revert to curses mode even if DISPLAY is set, but a problem prevents us from running in X11 mode. --> The problem is that gtk_init simply calls exit for us if it finds a problem. Tricky! Suggestions welcome. + --> Call "gtk_check_init" when available. (i.e. new enough + (1.2?) GTK version). - Nice to have: @@ -44,9 +48,6 @@ - Show state ("looking up host") while doing the DNS lookup for a new host. - - Check why it still tries to go for X11 display if DISPLAY is unset. - (I saw code to handle this) - - Read environment variable "MTR_DEFAULTS" as a commandline before parsing the commandline. -- DONE. (ok it's MTR_OPTIONS.) @@ -58,5 +59,9 @@ At the moment (march 1999) autoconf 2.13 is still too new to require everyone to upgrade. About a year from now we can put this in.... + + - Allow a toggle between hostname/IP number display. (for example a + click on the hostname could revert to ip number display in gtk version. + curses: "n" key toggles hostnames/ipnumbers? diff -ur mtr-0.37/configure mtr-0.38/configure --- mtr-0.37/configure Mon Apr 12 20:30:09 1999 +++ mtr-0.38/configure Mon Apr 12 20:34:23 1999 @@ -700,7 +700,7 @@ PACKAGE=mtr -VERSION=0.37 +VERSION=0.38 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } diff -ur mtr-0.37/configure.in mtr-0.38/configure.in --- mtr-0.37/configure.in Sun Apr 11 15:48:01 1999 +++ mtr-0.38/configure.in Mon Apr 12 20:34:19 1999 @@ -1,5 +1,5 @@ AC_INIT(mtr.c) -AM_INIT_AUTOMAKE(mtr, 0.37) +AM_INIT_AUTOMAKE(mtr, 0.38) AC_SUBST(GTK_OBJ) AC_SUBST(CURSES_OBJ) diff -ur mtr-0.37/curses.c mtr-0.38/curses.c --- mtr-0.37/curses.c Mon Apr 12 15:52:54 1999 +++ mtr-0.38/curses.c Wed Apr 14 20:48:42 1999 @@ -238,11 +238,10 @@ move(0, 0); pwcenter("Matt's traceroute [v" VERSION "]"); printw("\n"); + attroff(A_BOLD); printw(LocalHostname); - move(1, maxx - 24); time(&t); - printw(ctime(&t)); - attroff(A_BOLD); + mvprintw(1, maxx-25, ctime(&t)); printw("Keys: "); attron(A_BOLD); printw("D"); attroff(A_BOLD); diff -ur mtr-0.37/dns.c mtr-0.38/dns.c --- mtr-0.37/dns.c Sun Apr 11 15:48:01 1999 +++ mtr-0.38/dns.c Wed Jun 9 17:40:55 1999 @@ -208,10 +208,25 @@ #define getheader_pr(x) ((x->databyte_b >> 6) & 1) #define getheader_ra(x) (x->databyte_b >> 7) +#if 0 + +/* The execution order inside an expression is undefined! That means that + this might work, but then again, it might not... Sun Lint pointed this + one out...*/ + #define sucknetword(x) (((word)*(x) << 8) | (((x)+= 2)[-1])) #define sucknetshort(x) (((short)*(x) << 8) | (((x)+= 2)[-1])) #define sucknetdword(x) (((dword)*(x) << 24) | ((x)[1] << 16) | ((x)[2] << 8) | (((x)+= 4)[-1])) #define sucknetlong(x) (((long)*(x) << 24) | ((x)[1] << 16) | ((x)[2] << 8) | (((x)+= 4)[-1])) +#else + +#define sucknetword(x) ((word) (((x)[0] << 8) | ((x)[1] << 0))),(x)+=2 +#define sucknetshort(x) ((short) (((x)[0] << 8) | ((x)[1] << 0))),(x)+=2 +#define sucknetdword(x) ((dword) (((x)[0] << 24) | ((x)[1] << 16) | \ + ((x)[2] << 8) | ((x)[3] << 0))),(x)+=4 +#define sucknetlong(x) ((long) (((x)[0] << 24) | ((x)[1] << 16) | \ + ((x)[2] << 8) | ((x)[3] << 0))),(x)+=4 +#endif enum { STATE_FINISHED, @@ -736,7 +751,7 @@ void dorequest(char *s,int type,word id){ packetheader *hp; int r,i; - byte buf[MaxPacketsize+1]; + int buf[(MaxPacketsize/4)+1]; r = res_mkquery(QUERY,s,C_IN,type,NULL,0,NULL,buf,MaxPacketsize); if (r == -1){ restell("Resolver error: Query too large."); diff -ur mtr-0.37/gtk.c mtr-0.38/gtk.c --- mtr-0.37/gtk.c Sun Apr 11 15:48:01 1999 +++ mtr-0.38/gtk.c Wed Apr 14 20:48:53 1999 @@ -165,8 +165,10 @@ GTK_SIGNAL_FUNC(Pause_clicked), NULL); gtk_widget_show(Pause_Button); + /* allow root only to set zero delay */ Adjustment = (GtkAdjustment *)gtk_adjustment_new(WaitTime, - 0.00, 999.99, + getuid()==0 ? 0.00:1.00, + 999.99, 1.0, 10.0, 0.0); Button = gtk_spin_button_new(Adjustment, 0.5, 2); diff -ur mtr-0.37/mtr.c mtr-0.38/mtr.c --- mtr-0.37/mtr.c Mon Apr 12 07:56:02 1999 +++ mtr-0.38/mtr.c Thu Apr 15 14:06:24 1999 @@ -96,6 +96,8 @@ fprintf (stderr, "mtr: wait time must be positive\n"); exit (1); } + if (getuid() != 0 && WaitTime < 1.0) + WaitTime = 1.0; break; } } @@ -129,10 +131,6 @@ parse_arg (argc, argv); optind = 0; } - - - - int main(int argc, char **argv) { diff -ur mtr-0.37/net.c mtr-0.38/net.c --- mtr-0.37/net.c Mon Apr 12 15:52:54 1999 +++ mtr-0.38/net.c Tue May 11 08:31:14 1999 @@ -326,7 +326,7 @@ int max; max = 0; - for(at = 0; at < MaxHost; at++) { + for(at = 0; at < MaxHost-2; at++) { if(host[at].addr == remoteaddress.sin_addr.s_addr) { return at + 1; } else if(host[at].addr != 0) { @@ -374,7 +374,8 @@ } if ((host[batch_at].addr == remoteaddress.sin_addr.s_addr) || - (n_unknown > MAX_UNKNOWN_HOSTS)) { + (n_unknown > MAX_UNKNOWN_HOSTS) || + (batch_at >= MaxHost-2)) { numhosts = batch_at+1; batch_at = 0; return 1; .