Skip to content

Commit

Permalink
Merge pull request #407 from a1346054/fixes
Browse files Browse the repository at this point in the history
Minor cleanup
  • Loading branch information
rewolff committed Sep 5, 2021
2 parents dca7750 + c8ddefe commit ec42ba6
Show file tree
Hide file tree
Showing 44 changed files with 184 additions and 189 deletions.
12 changes: 6 additions & 6 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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
7 changes: 3 additions & 4 deletions FORMATS
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -22,7 +22,7 @@ x <pos> <seqnum>
pingline:
p <pos> <pingtime (ms)> <seqnum>

dnsline:
dnsline:
d <pos> <hostname>

timestampline:
Expand All @@ -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
Expand Down Expand Up @@ -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

3 changes: 1 addition & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -172,4 +172,3 @@ endif

dist-hook:
$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -110,4 +110,3 @@ when the server was upgraded, the mailing list died.)


REW

34 changes: 16 additions & 18 deletions TODO
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -16,15 +15,15 @@ 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

----------------------------------------------------------------------

- cleanup
- cleanup warnings that the newer GCC produces.
- cleanup warnings that the newer GCC produces.

- Stuff to implement:

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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.... :-)
Expand All @@ -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.)

26 changes: 13 additions & 13 deletions bash-completion/mtr
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,43 @@ _mtr_module()
'-F'|'--filename')
local IFS=$'\n'
compopt -o filenames
COMPREPLY=( $(compgen -f -- $cur) )
COMPREPLY=( $(compgen -f -- "$cur") )
return 0
;;
'-a'|'--address')
COMPREPLY=( $(compgen -W "ADDRESS" -- $cur) )
COMPREPLY=( $(compgen -W "ADDRESS" -- "$cur") )
return 0
;;
'-f'|'--first-ttl'|'-m'|'--max-ttl'|'-m'|'--max-unknown'|'-B'|'--bitpattern'|'-Q'|'--tos'|'-c'|'--report-cycles')
COMPREPLY=( $(compgen -W "NUMBER" -- $cur) )
'-f'|'--first-ttl'|'-m'|'--max-ttl'|'-U'|'--max-unknown'|'-B'|'--bitpattern'|'-Q'|'--tos'|'-c'|'--report-cycles')
COMPREPLY=( $(compgen -W "NUMBER" -- "$cur") )
return 0
;;
'-P'|'--port'|'-L'|'--localport')
COMPREPLY=( $(compgen -W "PORT" -- $cur) )
COMPREPLY=( $(compgen -W "PORT" -- "$cur") )
return 0
;;
'-s'|'--psize')
COMPREPLY=( $(compgen -W "SIZE" -- $cur) )
COMPREPLY=( $(compgen -W "SIZE" -- "$cur") )
return 0
;;
'-i'|'--interval'|'-G'|'--gracetime'|'-Z'|'--timeout')
COMPREPLY=( $(compgen -W "SECONDS" -- $cur) )
COMPREPLY=( $(compgen -W "SECONDS" -- "$cur") )
return 0
;;
'-M'|'--mark')
COMPREPLY=( $(compgen -W "MARK" -- $cur) )
COMPREPLY=( $(compgen -W "MARK" -- "$cur") )
return 0
;;
'--displaymode')
COMPREPLY=( $(compgen -W "{0..2}" -- $cur) )
COMPREPLY=( $(compgen -W "{0..2}" -- "$cur") )
return 0
;;
'-y'|'--ipinfo')
COMPREPLY=( $(compgen -W "{0..4}" -- $cur) )
COMPREPLY=( $(compgen -W "{0..4}" -- "$cur") )
return 0
;;
'-o'|'--order')
COMPREPLY=( $(compgen -W "LDRSNBAWVGJMXI" -- $cur) )
COMPREPLY=( $(compgen -W "LDRSNBAWVGJMXI" -- "$cur") )
return 0
;;
esac
Expand All @@ -58,11 +58,11 @@ _mtr_module()
--curses --displaymode --gtk --no-dns --show-ips --order --ipinfo
--aslookup --help --version
'
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- "$cur") )
return 0
;;
esac
COMPREPLY=( $(compgen -W "ip_address hostname" -- $cur) )
COMPREPLY=( $(compgen -W "ip_address hostname" -- "$cur") )
return 0
}
complete -F _mtr_module mtr
6 changes: 3 additions & 3 deletions build-aux/mangen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#

if [ $# -lt 3 ]; then
echo Usage: mangen.sh VERSION IN OUT
echo "Usage: mangen.sh VERSION IN OUT"
exit 1
fi

Expand All @@ -20,10 +20,10 @@ OUT=$3
# URL completely disappear from man pages. We need to strip
# those codes out when building for MacOS
#
if [ $(uname -s) = "Darwin" ]; then
if [ "$(uname -s)" = "Darwin" ]; then
RMURUE='-e s/\.UR.//g -e s/\.UE//g'
else
RMURUE=""
fi

sed -e "s|@VERSION[@]|$VERSION|g" $RMURUE $IN >$OUT
sed -e "s|@VERSION[@]|$VERSION|g" $RMURUE "$IN" >"$OUT"
Loading

0 comments on commit ec42ba6

Please sign in to comment.