- Roger has take over maintenance.
- mtr now uses an "int" to pass options to the kernel.
- Makes things work on Solaris and *BSD I'm told.
- mtr doesn't fire off a flurry of packets when a new second comes
around. Instead they are spaced evenly around the whole
second. This allows people with a relatively slow first link to do
meaningful measurements of whatever is behind that.
source: ftp://ftp.bitwizard.nl/mtr/mtr-0.22.tar.gz
+
Matt Kimball <mkimball@xmission.com> is the primary author of mtr.
+ Roger Wolff <R.E.Wolff@BitWizard.nl> is currently maintaing mtr.
+
+
Bug reports and feature requests should be sent to the mtr
mailing list. See the README file for details.
WHAT'S NEW?
+ v0.22
+ Roger has take over maintenance.
+ mtr now uses an "int" to pass options to the kernel.
+ Makes things work on Solaris and *BSD I'm told.
+ mtr doesn't fire off a flurry of packets when a new
+ second comes around. Instead they are spaced evenly
+ around the whole second. This allows people with a
+ relatively slow first link to do meaningful measurements
+ of whatever is behind that.
+
v0.21
mtr now drops root permissions after it acquires the raw
sockets it needs.
WHERE CAN I GET THE LATEST VERSION OR MORE INFORMATION?
- See the mtr web page at 'http://www.mkimball.org/mtr.html'.
+ See the mtr web page at
+ http://www.BitWizard.nl/mtr/
Subscribe to the mtr mailing list. All mtr related announcements
are posted to the mtr mailing list. To subscribe, send email to
Bug reports and feature requests should be sent to the mtr
mailing list.
+
permission to write to. The only priveledge gained is access to the
raw socket descriptors, which would allow the malicious user to listen
to all ICMP packets arriving at the system, and send forged packets
-with arbitrary ncontents.
+with arbitrary contents.
If you have further questions or comments about security issues,
please direct them to the mtr mailing list. See README for details.
--- /dev/null
+
+- Stuff to implement:
+
+ - Allow mtr to log the return packets, for later analysis.
+
+ - Request timestamping at the remote site.
+ Andreas Fasbender has an algorithm that will allow us to
+ convert these measurements into one-way measurements, not just
+ round-trip.
+
+ - 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
+ was slow, mtr will rock with this feature.... :-)
+ (Anybody have the statistics experience to tell me how
+ to do the data analysis?)
+
+ - Allow MTR to keep on getting the icmp host unreachables, and
+ work through that. Some hosts don't answer PINGs.
+
+- Bugs to fix?
+ - ?
+
AC_INIT(mtr.c)
-AM_INIT_AUTOMAKE(mtr, 0.21)
+AM_INIT_AUTOMAKE(mtr, 0.22)
AC_SUBST(GTK_OBJ)
AC_SUBST(CURSES_OBJ)
getyx(stdscr, y, x);
move(y, startstat);
- printw(" %3d%% %4d%4d %5d%5d%7d",
+ printw(" %3d%% %3d %3d %4d %4d %6d",
net_percent(at),
net_returned(at), net_xmit(at),
net_best(at), net_avg(at), net_worst(at));
.PP
For the latest version, see the mtr web page at
-.BR http://www.mkimball.org/mtr.html .
+.BR http://www.bitwizard.nl/mtr/ .
.PP
Subscribe to the mtr mailing list. All mtr related announcements
}
}
+
+extern float WaitTime;
+extern struct timeval intervaltime;
+#include <stdio.h>
+#include <math.h>
+
void net_send_batch() {
- int at;
- int n_unknown = 10;
-
- for(at = 0;n_unknown && (at < MaxHost); at++) {
- if(host[at].addr == 0) {
- net_send_query(at + 1);
- n_unknown--;
- } else {
- net_send_ping(at);
- }
+ static int n_unknown = 10;
+ static int at;
- if(host[at].addr == remoteaddress.sin_addr.s_addr) {
- break;
- }
+ if(host[at].addr == 0) {
+ net_send_query(at + 1);
+ n_unknown--;
+ } else {
+ net_send_ping(at);
}
+
+ if ((host[at].addr == remoteaddress.sin_addr.s_addr) ||
+ (n_unknown == 0)) {
+ float wt = WaitTime / (float) at;
+
+ intervaltime.tv_sec = (int)(wt);
+ intervaltime.tv_usec = 1000000.0 * (wt - floor(wt));
+ at = 0;
+ n_unknown = 10;
+ return;
+ }
+
+ at++;
}
+
int net_preopen() {
- char trueopt = 1;
+ int trueopt = 1;
sendsock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
if(sendsock == -1)
#ifdef IP_HDRINCL
/* FreeBSD wants this to avoid sending out packets with protocol type RAW
to the network. */
- if(setsockopt(sendsock, 0, IP_HDRINCL, &trueopt, sizeof(trueopt)))
+ if(setsockopt(sendsock, SOL_IP, IP_HDRINCL, &trueopt, sizeof(trueopt)))
+ {
+ perror("setsockopt(IP_HDRINCL,1)");
return -1;
+ }
#endif
recvsock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
extern float WaitTime;
double dnsinterval;
+struct timeval intervaltime;
+
void select_loop() {
fd_set readfd;
int anyset;
int action, maxfd;
int dnsfd, netfd;
int NumPing;
- struct timeval lasttime, thistime, selecttime, intervaltime;
+ struct timeval lasttime, thistime, selecttime;
+ float wt;
NumPing = 0;
anyset = 0;
gettimeofday(&lasttime, NULL);
- intervaltime.tv_sec = (int)WaitTime;
- intervaltime.tv_usec = 1000000.0 * (WaitTime - floor(WaitTime));
+ wt = WaitTime/10;
+ intervaltime.tv_sec = (int)wt;
+ intervaltime.tv_usec = 1000000.0 * (wt - floor(wt));
while(1) {
FD_ZERO(&readfd);