Bohdan Vlasyuk (bohdan@cec.vstu.vinnica.ua)
Juha Takala
+ evtr@ukr.net (Evgeniy Tretyak)
David Sward (sward@clark.net)
David Stone (stone@AsIf.com)
Andrew Stesin
Greg Stark (gsstark@mit.edu)
Robert Sparks (rjsparks@nostrum.com)
+ Mike Simons (msimons@moria.simons-clan.com)
Aaron Scarisbrick,
Craig Milo Rogers (Rogers@ISI.EDU)
Russell Nelson (rn-mtr@crynwr.com)
WHAT'S NEW?
+ v0.50 Make "interface address" option work.
+ Changes to "select" loop to allow window resizes (select
+ interruption) to work. Thanks Mike!
+
v0.49 Fix compilation problems on several platforms.
v0.48 Draw names in red (GTK) or bold (Curses) if host doesn't
v0.45 People are pressuring me to release new versions with their
changes. That's fine. Now this version just adds dynamic
switching between numeric / dns names, and some minor
- stuff I forgot. This release serves as a code-sycn-release.
+ stuff I forgot. This release serves as a code-sync-release.
new version with even more new stuff in about two weeks!
I'm afraid I don't know how to fix the MaxOS-X compilation
problems in the source. Help wanted...
v0.43 Compile fixes.
- v0.41 Added afr's patch to allow disabeling of gtk without Robn's hack.
+ v0.41 Added afr's patch to allow disabling of gtk without Robn's hack.
Made report mode report the newly added extra resolution.
v0.40 Fixed some problems with HPUX and SunOS.
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?)
-
- Implement rfc2317 mechanism to do reverse lookups for networks that
have DNS delegations on non-octet boundaries. -- Daniel Bergstrom
(noa@melody.se)
+ - The longer MTR runs, the less meaningful the packet loss
+ statistic. Or more meaningful, depending on your point of view.
+ Perhaps MTR should use a circular buffer of some configurable
+ number of results, and calculate the loss against that. -- Jacob Elder
+
+ - It would be nice if the window size wasn't fixed. If I'm only 5
+ hops from the host I'm monitoring, MTR wastes a lot of screen real
+ estate. -- Jacob Elder
+
------------------------------------------------------------------------
Things that shouldn't be on the TODO list because they're done. ;-)
+ - 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?)
+
- Allow mtr to also send larger packets.
This will enable us to get a feel for the speed of the links
we're traversing. (Van Jacobson was working on this His tool
AC_INIT(mtr.c)
-AM_INIT_AUTOMAKE(mtr, 0.49)
+AM_INIT_AUTOMAKE(mtr, 0.50)
AC_SUBST(GTK_OBJ)
AC_SUBST(CURSES_OBJ)
char dummy;
extern int sendsock; /* from net.c:115 */
+ bzero(&source, sizeof(source)); /* -- Evgeniy Tretyak */
+
source.sin_family = AF_INET;
source.sin_port = 0;
#include <sys/select.h>
#include <string.h>
#include <math.h>
+#include <errno.h>
#include "display.h"
#include "dns.h"
struct timeval lasttime, thistime, selecttime;
float wt;
int dt;
+ int rv;
NumPing = 0;
anyset = 0;
if(netfd >= maxfd)
maxfd = netfd + 1;
- if(anyset || paused) {
- selecttime.tv_sec = 0;
- selecttime.tv_usec = 0;
+ do {
+ if(anyset || paused) {
+ selecttime.tv_sec = 0;
+ selecttime.tv_usec = 0;
- select(maxfd, (void *)&readfd, NULL, NULL, &selecttime);
- } else {
- if(Interactive)
- display_redraw();
-
- gettimeofday(&thistime, NULL);
-
- if(thistime.tv_sec > lasttime.tv_sec + intervaltime.tv_sec ||
- (thistime.tv_sec == lasttime.tv_sec + intervaltime.tv_sec &&
- thistime.tv_usec >= lasttime.tv_usec + intervaltime.tv_usec)) {
- lasttime = thistime;
- if(NumPing >= MaxPing && !Interactive)
- break;
- if (net_send_batch())
- NumPing++;
+ rv = select(maxfd, (void *)&readfd, NULL, NULL, &selecttime);
+ } else {
+ if(Interactive)
+ display_redraw();
+
+ gettimeofday(&thistime, NULL);
+
+ if(thistime.tv_sec > lasttime.tv_sec + intervaltime.tv_sec ||
+ (thistime.tv_sec == lasttime.tv_sec + intervaltime.tv_sec &&
+ thistime.tv_usec >= lasttime.tv_usec + intervaltime.tv_usec)) {
+ lasttime = thistime;
+ if(NumPing >= MaxPing && !Interactive)
+ break;
+ if (net_send_batch())
+ NumPing++;
+ }
+
+ selecttime.tv_usec = (thistime.tv_usec - lasttime.tv_usec);
+ selecttime.tv_sec = (thistime.tv_sec - lasttime.tv_sec);
+ if (selecttime.tv_usec < 0) {
+ --selecttime.tv_sec;
+ selecttime.tv_usec += 1000000;
+ }
+ selecttime.tv_usec = intervaltime.tv_usec - selecttime.tv_usec;
+ selecttime.tv_sec = intervaltime.tv_sec - selecttime.tv_sec;
+ if (selecttime.tv_usec < 0) {
+ --selecttime.tv_sec;
+ selecttime.tv_usec += 1000000;
+ }
+
+ if ((selecttime.tv_sec > (time_t)dnsinterval) ||
+ ((selecttime.tv_sec == (time_t)dnsinterval) &&
+ (selecttime.tv_usec > ((time_t)(dnsinterval * 1000000) % 1000000)))) {
+ selecttime.tv_sec = (time_t)dnsinterval;
+ selecttime.tv_usec = (time_t)(dnsinterval * 1000000) % 1000000;
+ }
+
+ rv = select(maxfd, (void *)&readfd, NULL, NULL, &selecttime);
}
+ } while ((rv < 0) && (errno == EINTR));
- selecttime.tv_usec = (thistime.tv_usec - lasttime.tv_usec);
- selecttime.tv_sec = (thistime.tv_sec - lasttime.tv_sec);
- if (selecttime.tv_usec < 0) {
- --selecttime.tv_sec;
- selecttime.tv_usec += 1000000;
- }
- selecttime.tv_usec = intervaltime.tv_usec - selecttime.tv_usec;
- selecttime.tv_sec = intervaltime.tv_sec - selecttime.tv_sec;
- if (selecttime.tv_usec < 0) {
- --selecttime.tv_sec;
- selecttime.tv_usec += 1000000;
- }
-
- if ((selecttime.tv_sec > (time_t)dnsinterval) ||
- ((selecttime.tv_sec == (time_t)dnsinterval) &&
- (selecttime.tv_usec > ((time_t)(dnsinterval * 1000000) % 1000000)))) {
- selecttime.tv_sec = (time_t)dnsinterval;
- selecttime.tv_usec = (time_t)(dnsinterval * 1000000) % 1000000;
- }
-
- select(maxfd, (void *)&readfd, NULL, NULL, &selecttime);
+ if (rv < 0) {
+ perror ("Select failed");
+ exit (1);
}
-
anyset = 0;
/* Handle any pending resolver events */