trim trailing whitespace

This commit is contained in:
a1346054 2021-09-05 13:17:33 +00:00
parent 001ea8a190
commit c8ddefe816
35 changed files with 132 additions and 137 deletions

12
AUTHORS
View File

@ -7,7 +7,7 @@
Bug reports and feature requests should be sent as described in
the README file.
Thanks to everyone who has provided feedback on mtr.
Thanks to everyone who has provided feedback on mtr.
Thanks especially to those of you who have sent code:
(Reverse alphabetical order, and sometimes I just add people at
@ -30,11 +30,11 @@
Davin Milun
Josh Martin <jmartin@columbiaservices.net>
Alexander V. Lukyanov <lav@yars.free.net>
Charles Levert <charles@comm.polymtl.ca>
Charles Levert <charles@comm.polymtl.ca>
Bertrand Leconte <B.Leconte@mail.dotcom.fr>
Anand Kumria
Olav Kvittem <Olav.Kvittem@uninett.no>
Adam Kramer <l3zqc@qcunix1.acc.qc.edu>
Adam Kramer <l3zqc@qcunix1.acc.qc.edu>
Philip Kizer <pckizer@nostrum.com>
Simon Kirby
Sami Kerola <kerolasa@iki.fi>
@ -49,7 +49,7 @@
Travis Cross <tc@traviscross.com>
Brian Casey <bcasey@imagiware.com>
Andrew Brown <atatat@atatdot.net>
Bill Bogstad <bogstad@pobox.com>
Bill Bogstad <bogstad@pobox.com>
Marc Bejarano <marc.bejarano@openwave.com>
Moritz Barsnick <barsnick@gmx.net>
Thomas Klausner <wiz@NetBSD.org>
@ -63,7 +63,7 @@
and anyone who has slipped through the cracks of my mail file.
Authors: If you want your Email mentioned here, send it to me.
If you don't want your Email mentioned here, tell me.
Authors: If you want your Email mentioned here, send it to me.
If you don't want your Email mentioned here, tell me.
-- REW

View File

@ -6,7 +6,7 @@ gui-library with a setuid program.
The split format is:
<pos> <host> <loss%> <rcvd pckts> <sent pckts> <best> <avg> <worst>
<pos> <host> <loss%> <rcvd pckts> <sent pckts> <best> <avg> <worst>
The "raw" format is:
@ -22,7 +22,7 @@ x <pos> <seqnum>
pingline:
p <pos> <pingtime (ms)> <seqnum>
dnsline:
dnsline:
d <pos> <hostname>
timestampline:
@ -37,7 +37,7 @@ ICMP timestamping first. :-)
Someone suggested to put the following text here. As to context: Some
people are wondering why mtr sometimes reports hosts beyond the
destination host.
destination host.
The FINAL host will occasionally be mentioned at position n, n+1, n+2
@ -102,4 +102,3 @@ h 15 152.63.50.89
h 16 152.179.99.218
h 17 152.179.99.218
h 18 152.179.99.218

View File

@ -40,7 +40,7 @@ $(PATHFILES): Makefile
dist_man_MANS = mtr.8 mtr-packet.8
PATHFILES += man/mtr.8 man/mtr-packet.8
install-exec-hook:
install-exec-hook:
`setcap cap_net_raw+ep $(DESTDIR)$(sbindir)/mtr-packet` \
|| chmod u+s $(DESTDIR)$(sbindir)/mtr-packet
@ -172,4 +172,3 @@ endif
dist-hook:
$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version

View File

@ -24,12 +24,12 @@ simple as:
Please note that this refers to the tarballs from
https://www.bitwizard.nl/mtr/files/
and not the tarballs that github can produce.
and not the tarballs that github can produce.
(in the past, there was a Makefile in the distribution that did
the `./configure` for you and then ran make again with the generated
Makefile, but this has suffered some bitrot. It didn't work well
with git.)
with git.)
If you're building from the git repository, you'll need to run:
@ -75,7 +75,7 @@ BUILDING FOR WINDOWS
Building for Windows requires Cygwin. To obtain Cygwin, see
https://cygwin.com/install.html.
Next, re-run cygwin's `setup-x86.exe` (or `setup-x86_64.exe` if you're using 64bit cygwin) with the following arguments,
Next, re-run cygwin's `setup-x86.exe` (or `setup-x86_64.exe` if you're using 64bit cygwin) with the following arguments,
which will install the packages required for building:
setup-x86.exe --package-manager --wait --packages automake,pkg-config,make,gcc-core,libncurses-devel,libjansson-devel
@ -110,4 +110,3 @@ when the server was upgraded, the mailing list died.)
REW

34
TODO
View File

@ -1,5 +1,4 @@
Hi everyone,
Hi everyone,
This is the "todo" file for mtr. I just realized that some people
might think that this is all in MY queue to implement. That is not
@ -16,7 +15,7 @@ implement something on this list. That way we get the design of
these things the way I like them. This should result in a better
maintainable mtr.
Oh, Feel free to provide suggestions for this list.
Oh, Feel free to provide suggestions for this list.
-- REW
@ -24,7 +23,7 @@ Oh, Feel free to provide suggestions for this list.
----------------------------------------------------------------------
- cleanup
- cleanup warnings that the newer GCC produces.
- cleanup warnings that the newer GCC produces.
- Stuff to implement:
@ -34,16 +33,16 @@ Oh, Feel free to provide suggestions for this list.
mtr.
- Request timestamping at the remote site.
Andreas Fasbender has an algorithm that will allow us to
Andreas Fasbender has an algorithm that will allow us to
convert these measurements into one-way measurements, not just
round-trip.
- allow "keyboard navigation" in the GTK version.
- allow "keyboard navigation" in the GTK version.
- Keep all packets and make the "best" and "worst" columns show the
xx-th percentile....
- Being able to expand the "column width" of the hosts listed would
- Being able to expand the "column width" of the hosts listed would
be nice, too.
- Display per host stats when multiple servers respond at a particular
@ -52,32 +51,32 @@ Oh, Feel free to provide suggestions for this list.
- Bugs to fix?
- Do something useful if host couldn't be resolved.
-- Done.
- 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.
it finds a problem. Tricky! Suggestions welcome.
--> Call "gtk_check_init" when available. (i.e. new enough
(1.2?) GTK version).
- Nice to have:
- stop sending packets when a new host is getting entered.
- stop sending packets when a new host is getting entered.
- Show state ("looking up host") while doing the DNS lookup for a new
host.
- to have a choice of icmp, tcp, and udp pings. -- Matt Martini
- Autoconf 2.13 has a neat function that can be used to find the
res_init function:
- Autoconf 2.13 has a neat function that can be used to find the
res_init function:
AC_SEARCH_LIBS(res_init, bind resolv, ,
AC_MSG_ERROR(No resolver library found))
At the moment (march 1999) autoconf 2.13 is still too new to require
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....
- Implement rfc2317 mechanism to do reverse lookups for networks that
@ -104,11 +103,11 @@ Oh, Feel free to provide suggestions for this list.
Things that shouldn't be on the TODO list because they're done. ;-)
- Allow a toggle between hostname/IP number display. (for example a
- 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.
- 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.... :-)
@ -120,9 +119,8 @@ Things that shouldn't be on the TODO list because they're done. ;-)
It should not probe more than 10 unknown hosts, but the counter need
not be reset at the start of the "round". This way if you probe
slowly (relative to the RTT time to the end host), it can probe
all hosts in the first "round".
all hosts in the first "round".
-- DONE.
- Read environment variable "MTR_DEFAULTS" as a commandline before
parsing the commandline. -- DONE. (ok it's MTR_OPTIONS.)

View File

@ -114,38 +114,38 @@ mtr \- a network diagnostic tool
]
.I HOSTNAME
.SH DESCRIPTION
.B mtr
combines the functionality of the
.B mtr
combines the functionality of the
.B traceroute
and
and
.B ping
programs in a single network diagnostic tool.
.PP
As
.B mtr
starts, it investigates the network connection between the host
As
.B mtr
runs on and
starts, it investigates the network connection between the host
.B mtr
runs on and
.BR HOSTNAME
by sending packets with purposely low TTLs. It continues to send
packets with low TTL, noting the response time of the intervening
routers. This allows
.B mtr
routers. This allows
.B mtr
to print the response percentage and response times of the internet
route to
.BR HOSTNAME .
route to
.BR HOSTNAME .
A sudden increase in packet loss or response time is often an indication
of a bad (or simply overloaded) link.
of a bad (or simply overloaded) link.
.PP
The results are usually reported as round-trip-response times in milliseconds
and the percentage of packet loss.
and the percentage of packet loss.
.SH OPTIONS
.TP
.B \-h\fR, \fB\-\-help
Print the summary of command line argument options.
.TP
.B \-v\fR, \fB\-\-version
Print the installed version of mtr.
Print the installed version of mtr.
.TP
.B \-4
Use IPv4 only.
@ -157,33 +157,33 @@ Use IPv6 only. (IPV4 may be used for DNS lookups.)
Reads the list of hostnames from the specified file.
.TP
.B \-r\fR, \fB\-\-report
This option puts
This option puts
.B mtr
into
into
.B report
mode. When in this mode,
.B mtr
will run for the number of cycles specified by the
will run for the number of cycles specified by the
.B \-c
option, and then print statistics and exit.
option, and then print statistics and exit.
.TP
\c
This mode is useful for generating statistics about network quality.
Note that each running instance of
This mode is useful for generating statistics about network quality.
Note that each running instance of
.B mtr
generates a significant amount of network traffic. Using
generates a significant amount of network traffic. Using
.B mtr
to measure the quality of your network may result in decreased
network performance.
network performance.
.TP
.B \-w\fR, \fB\-\-report\-wide
This option puts
This option puts
.B mtr
into
into
.B wide report
mode. When in this mode,
.B mtr
will not cut hostnames in the report.
will not cut hostnames in the report.
.TP
.B \-x\fR, \fB\-\-xml
Use this option to tell
@ -192,12 +192,12 @@ to use the xml output format. This format is better suited for
automated processing of the measurement results.
.TP
.B \-t\fR, \fB\-\-curses
Use this option to force
.B mtr
Use this option to force
.B mtr
to use the curses based terminal
interface (if available).
In case the list of hops exceeds the
height of your terminal, you can use the
In case the list of hops exceeds the
height of your terminal, you can use the
.B +
and
.B -
@ -215,19 +215,19 @@ information.
.TP
.B \-g\fR, \fB\-\-gtk
Use this option to force
.B mtr
to use the GTK+ based X11 window interface (if available).
GTK+ must have been available on the system when
.B mtr
was built for this to work. See the GTK+ web page at
.B mtr
to use the GTK+ based X11 window interface (if available).
GTK+ must have been available on the system when
.B mtr
was built for this to work. See the GTK+ web page at
.UR http://\:www.\:gtk.\:org/
.UE
for more information about GTK+.
.TP
.B \-l\fR, \fB\-\-raw
Use the raw output format. This format is better suited for
archival of the measurement results. It could be parsed to
be presented into any of the other display methods.
archival of the measurement results. It could be parsed to
be presented into any of the other display methods.
.IP
Example of the raw output format:
.nf
@ -273,14 +273,14 @@ was built for this to work.
.TP
.B \-p\fR, \fB\-\-split
Use this option to set
.B mtr
.B mtr
to spit out a format that is suitable for a split-user interface.
.TP
.B \-n\fR, \fB\-\-no\-dns
Use this option to force
.B mtr
Use this option to force
.B mtr
to display numeric IP numbers and not try to resolve the
host names.
host names.
.TP
.B \-b\fR, \fB\-\-show\-ips
Use this option to tell
@ -288,7 +288,7 @@ Use this option to tell
to display both the host names and numeric IP numbers. In split mode
this adds an extra field to the output. In report mode, there is usually
too little space to add the IPs, and they will be truncated. Use the
wide report (-w) mode to see the IPs in report mode.
wide report (-w) mode to see the IPs in report mode.
.TP
.B \-o \fIFIELDS\fR, \fB\-\-order \fIFIELDS
Use this option to specify which fields to display and in which order.
@ -354,7 +354,7 @@ root user may choose values between zero and one.
.TP
.B \-c \fICOUNT\fR, \fB\-\-report\-cycles \fICOUNT
Use this option to set the number of pings sent to determine
both the machines on the network and the reliability of
both the machines on the network and the reliability of
those machines. Each cycle lasts one second.
.TP
.B \-s \fIPACKETSIZE\fR, \fB\-\-psize \fIPACKETSIZE
@ -378,8 +378,8 @@ Specifies value for type of service field in IP header. Should be within range
- 255.
.TP
.B \-e\fR, \fB\-\-mpls
Use this option to tell
.B mtr
Use this option to tell
.B mtr
to display information from ICMP extensions for MPLS (RFC 4950)
that are encoded in the response packets.
.TP
@ -501,15 +501,15 @@ can be controlled while it is running with the following keys:
z toggle ASN info on/off
q exit
.SH BUGS
Some modern routers give a lower priority to ICMP ECHO packets than
Some modern routers give a lower priority to ICMP ECHO packets than
to other network traffic. Consequently, the reliability of these
routers reported by
routers reported by
.B mtr
will be significantly lower than the actual reliability of
these routers.
will be significantly lower than the actual reliability of
these routers.
.SH CONTACT INFORMATION
.PP
For the latest version, see the mtr web page at
For the latest version, see the mtr web page at
.UR http://\:www.\:bitwizard.\:nl/\:mtr/
.UE
.PP

View File

@ -424,7 +424,7 @@ void dispatch_buffer_commands(
if (buffer->incoming_read_position >= COMMAND_BUFFER_SIZE - 1) {
/*
If we've filled the buffer without a complete command, the
only thing we can do is discard what we've read and hope that
only thing we can do is discard what we've read and hope that
new data is better formatted.
*/
printf("0 command-buffer-overflow\n");

View File

@ -591,7 +591,7 @@ int construct_ip4_packet(
/*
The routing mark requires CAP_NET_ADMIN, as opposed to the
CAP_NET_RAW which we are sometimes explicitly given.
If we don't have CAP_NET_ADMIN, this will fail, so we'll
If we don't have CAP_NET_ADMIN, this will fail, so we'll
only set the mark if the user has explicitly requested it.
Unfortunately, this means that once the mark is set, it won't

View File

@ -82,7 +82,7 @@ int main(
struct net_state_t net_state;
/*
To minimize security risk, the only thing done prior to
To minimize security risk, the only thing done prior to
dropping SUID should be opening the network state for
raw sockets.
*/

View File

@ -319,7 +319,7 @@ int find_source_addr(
int len;
struct sockaddr_storage dest_with_port;
#ifdef __linux__
// The Linux code needs these.
// The Linux code needs these.
struct sockaddr_in *srcaddr4;
struct sockaddr_in6 *srcaddr6;
#endif

View File

@ -352,7 +352,7 @@ void icmp_send_probe(
timeout = 1000 * request->timeout;
} else {
/*
IcmpSendEcho2 will return invalid argument on a timeout of
IcmpSendEcho2 will return invalid argument on a timeout of
zero. Our Unix implementation allows it. Bump up the timeout
to 1 millisecond.
*/

View File

@ -153,7 +153,7 @@ void check_length_order(
if (resolve_probe_addresses(net_state, &param, &p0.remote_addr,
&p0.local_addr)) {
fprintf(stderr, "Error decoding localhost address (%s/%s)\n",
fprintf(stderr, "Error decoding localhost address (%s/%s)\n",
probe_err, strerror (errno));
exit(EXIT_FAILURE);
}
@ -575,18 +575,18 @@ void send_probe(
error(EXIT_FAILURE, errno, "gettimeofday failure");
}
// there might be an off-by-one in the number of tries here.
// there might be an off-by-one in the number of tries here.
// this is intentional. It is no use exhausting the very last
// open port. Max 10 retries would've been acceptable too I think.
// open port. Max 10 retries would've been acceptable too I think.
for (trytimes=MIN_PORT; trytimes < MAX_PORT; trytimes++) {
packet_size = construct_packet(net_state, &probe->platform.socket,
probe, packet, PACKET_BUFFER_SIZE,
param);
if (packet_size > 0) break; // no retry if we succeed.
if ((param->protocol != IPPROTO_TCP) &&
if ((param->protocol != IPPROTO_TCP) &&
(param->protocol != IPPROTO_SCTP)) break; // no retry if not TCP/SCTP
if ((errno != EADDRINUSE) && (errno != EADDRNOTAVAIL)) {
@ -594,7 +594,7 @@ void send_probe(
}
probe->sequence = net_state->platform.next_sequence++;
if (net_state->platform.next_sequence > MAX_PORT) {
net_state->platform.next_sequence = MIN_PORT;
}

View File

@ -20,7 +20,7 @@
#define PROBE_UNIX_H
#ifndef IPPROTO_SCTP
// Needed for Netbsd.
// Needed for Netbsd.
#define IPPROTO_SCTP 132 /* SCTP */
#endif

View File

@ -50,7 +50,7 @@
#define HTTP_PORT 80
/* We can't rely on header files to provide this information, because
the fields have different names between, for instance, Linux and
the fields have different names between, for instance, Linux and
Solaris */
struct ICMPHeader {
uint8_t type;

View File

@ -550,7 +550,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
fprintf (stderr,
_("%s: option `%c%s' doesn't allow an argument\n"),
argv[0], argv[optind - 1][0], pfound->name);
}
}
nextchar += strlen (nextchar);
return '?';
}

View File

@ -207,7 +207,7 @@ static void reverse_host6(
{
int i;
char *b = buff;
// We need to process the top 64 bits, or 8 bytes.
// We need to process the top 64 bits, or 8 bytes.
for (i = 8-1; i >= 0; i--, b += 4, buff_length -= 4)
snprintf(b, buff_length,
"%x.%x.", addr->s6_addr[i] & 0xf, addr->s6_addr[i] >> 4);

View File

@ -231,8 +231,8 @@ void execute_packet_child(
*/
execlp(mtr_packet_path, "mtr-packet", (char *) NULL);
/*
Then try to find it where WE were executed from.
/*
Then try to find it where WE were executed from.
*/
strncpy (buf, myname, 240);
strcat (buf, "-packet");

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
@ -451,7 +451,7 @@ static void mtr_curses_hosts(
hd_len = 0;
for (i = 0; i < MAXFLD; i++) {
/* Ignore options that don't exist */
/* On the other hand, we now check the input side. Shouldn't happen,
/* On the other hand, we now check the input side. Shouldn't happen,
can't be careful enough. */
j = ctl->fld_index[ctl->fld_active[i]];
if (j == -1)
@ -698,8 +698,8 @@ void mtr_curses_redraw(
pwcenter(buf);
attroff(A_BOLD);
mvprintw(1, 0, "%s (%s) -> %s (%s)",
ctl->LocalHostname, net_localaddr(),
mvprintw(1, 0, "%s (%s) -> %s (%s)",
ctl->LocalHostname, net_localaddr(),
ctl->Hostname, net_remoteaddr());
t = time(NULL);
mvprintw(1, maxx - 25, iso_time(&t));

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
@ -18,7 +18,7 @@
#include <netinet/in.h>
/* Don't put a trailing comma in enumeration lists. Some compilers
/* Don't put a trailing comma in enumeration lists. Some compilers
(notably the one on Irix 5.2) do not like that. */
enum { ActionNone, ActionQuit, ActionReset, ActionDisplay,
ActionClear, ActionPause, ActionResume, ActionMPLS, ActionDNS,

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -4,7 +4,7 @@
Changes/additions Copyright (C) 1998 R.E.Wolff@BitWizard.nl
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
@ -94,7 +94,7 @@ int gtk_detect(
{
if (getenv("DISPLAY") != NULL) {
/* If we do this here, gtk_init exits on an error. This happens
BEFORE the user has had a chance to tell us not to use the
BEFORE the user has had a chance to tell us not to use the
display... */
return TRUE;
} else {
@ -568,7 +568,7 @@ void gtk_redraw(
}
// GTK 3 has changed the interface a bit. Here a few defines so that we can
// work with GTK2 or GTK3 as required.
// work with GTK2 or GTK3 as required.
#ifdef HAVE_GTK3
#define gtk_vbox_new_(orientation,sz) gtk_box_new(orientation, sz)
#define gtk_hbox_new_(orientation,sz) gtk_box_new(orientation, sz)

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -4,7 +4,7 @@
Copyright (C) 2005 R.E.Wolff@BitWizard.nl
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
@ -547,18 +547,18 @@ int net_send_batch(
int n_unknown = 0, i;
int restart = 0;
/* randomized packet size and/or bit pattern if packetsize<0 and/or
bitpattern<0. abs(packetsize) and/or abs(bitpattern) will be used
/* randomized packet size and/or bit pattern if packetsize<0 and/or
bitpattern<0. abs(packetsize) and/or abs(bitpattern) will be used
*/
if (batch_at < ctl->fstTTL) {
if (ctl->cpacketsize < 0) {
/* Someone used a formula here that tried to correct for the
"end-error" in "rand()". By "end-error" I mean that if you
have a range for "rand()" that runs to 32768, and the
destination range is 10000, you end up with 4 out of 32768
0-2768's and only 3 out of 32768 for results 2769 .. 9999.
As our destination range (in the example 10000) is much
smaller (reasonable packet sizes), and our rand() range much
/* Someone used a formula here that tried to correct for the
"end-error" in "rand()". By "end-error" I mean that if you
have a range for "rand()" that runs to 32768, and the
destination range is 10000, you end up with 4 out of 32768
0-2768's and only 3 out of 32768 for results 2769 .. 9999.
As our destination range (in the example 10000) is much
smaller (reasonable packet sizes), and our rand() range much
larger, this effect is insignificant. Oh! That other formula
didn't work. */
packetsize =
@ -578,9 +578,9 @@ int net_send_batch(
if (host_addr_cmp(i, &ctl->unspec_addr, ctl->af) == 0)
n_unknown++;
/* The second condition in the next "if" statement was added in mtr-0.56,
/* The second condition in the next "if" statement was added in mtr-0.56,
but I don't remember why. It makes mtr stop skipping sections of unknown
hosts. Removed in 0.65.
hosts. Removed in 0.65.
If the line proves necessary, it should at least NOT trigger that line
when host[i].addr == 0 */
if (host_addr_cmp(i, remoteaddress, ctl->af) == 0) {

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -5,7 +5,7 @@
raw.c -- raw output (for logging for later analysis)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -5,7 +5,7 @@
raw.h -- raw output (for logging for later analysis)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -3,7 +3,7 @@
Copyright (C) 1997,1998 Matt Kimball
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,

View File

@ -7,7 +7,7 @@
Copyright (C) 1998 Bertrand Leconte <B.Leconte@mail.dotcom.fr>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
@ -77,7 +77,7 @@ void split_redraw(
fprintf(stderr, "split_redraw()\n");
#endif
/*
/*
* If there is less lines than last time, we delete them
* TEST THIS PLEASE
*/
@ -166,7 +166,7 @@ int split_keyaction(
tv.tv_usec = 0;
if (select(1, &readfds, NULL, NULL, &tv) > 0) {
if (read(0, &c, 1) <= 0)
if (read(0, &c, 1) <= 0)
return ActionQuit;
} else
return 0;

View File

@ -5,7 +5,7 @@
Copyright (C) 1998 Bertrand Leconte <B.Leconte@mail.dotcom.fr>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,