Markus Chou [Sat, 6 Jul 2013 17:01:10 +0000 (01:01 +0800)]
fix building on osx
On Linux, they use 'BIND_4_COMPAT' and #include <arpa/nameser_compat.h> in <arpa/nameser.h>
On OSX, if 'BIND_8_COMPAT' is #defined, <arpa/nameser_compat.h> is #included in <arpa/nameser.h>
rewolff [Tue, 18 Jun 2013 05:36:08 +0000 (22:36 -0700)]
Merge pull request #16 from rpwoodbu/fix_sizes
Convey static array sizes with a constant instead of manual immediate values.
Good work. You say "log scale" while it is quadratic. wouldn't
for (i=NUM_FACTORS-1,t=1.0;i>0;i--, t = t/2.5) factors[i] = t;
work better? (I'm away, I remember seeing factors 0.02 and 0.05 next to each other hence the 2.5 )
Vaibhav Bajpai [Sun, 5 May 2013 16:35:53 +0000 (18:35 +0200)]
when looping on a list of service names with --csv, do not exit on the first
failure; instead write the error on stderr, skip that service names and move
on to the next service name in the list
Vaibhav Bajpai [Sun, 5 May 2013 15:09:12 +0000 (17:09 +0200)]
added --filename=FILE option
service names read from this file are allocated in a linked list
multiple service names are only accepted with --csv flag
without --csv flag, the first service name is used
Vaibhav Bajpai [Sun, 5 May 2013 14:06:37 +0000 (16:06 +0200)]
updated --csv format: VERSION;TIMESTAMP;STATUS;HOSTNAME;TTL;ENDPOINT;ASN;PING(ms)
STATUS field is hardcoded to "OK" for now; not sure what "FAIL" would mean
Kyle J. McKay [Fri, 22 Feb 2013 16:51:59 +0000 (08:51 -0800)]
Support building on OS X
* Add support for new --without-glib configure option to disable
all use of glib (also requires --without-gtk to be effective).
This has the side effect of disabling the "mtr -z" functionality.
* Improve configure support for detecting which library to link
with, if any, to get the resolver functions.
* Do not define BIND_8_COMPAT when compiling for Darwin/OS X.
* Autoconfigure whether or not a suitable struct __res_state_ext
needs to be defined.
* If the arpa/nameser_compat.h header is available and usable,
include it immediately after arpa/nameser.h.
Instead of sending ICMP ECHO or UDP packets, this mode opens a TCP
connection to the port of choice (80 by default) and sets IP_TTL
or IPV6_UNICAST_HOPS to control the TTL of the outgoing SYN packet.
Instead of using ICMP ECHO sequence or UDP destination port, the
source port number is used to track how many hops away a router is.
For getting the final hop, sockets are left open until a timeout
is reached (10 seconds default) and a write is attempted as soon
as the socket becomes available for writing. Anything other than
a succesful write or a "Connection refused" error is ignored.
R.E. Wolff [Tue, 12 Feb 2013 08:26:45 +0000 (09:26 +0100)]
Modernize for current autoconf/automake.
Add 'foreign' option so automake doesn't insist on ChangeLog file.
added file added by rename in previous commit.
Travis Cross [Sat, 9 Feb 2013 09:48:52 +0000 (09:48 +0000)]
Use format +git:XXXXXXXX
The colon is kinder to Debian than a dash and seems stylistically
better. The dash feels as though it introduces another version level,
e.g. -rc1-alpha2. We could just do +gitXXXXXXXX but as git commit
hashes are in lowercase hexadecimal the result can be something really
ugly like +giteaf0cb71. It's also easier to select the commit hash
for a copy/paste operation when there is something to separate it.
Travis Cross [Sat, 9 Feb 2013 08:16:48 +0000 (08:16 +0000)]
Add git version handling to build system
When building from a git tree, the version number built into the
binary will be appended with +git-XXXXXXXX.
The base version number is stored in-tree in configure.in and is that
of the last tagged release. Presumably the git version is later than
the last tag, so we use '+git' rather than '-git' to produce the
correct the lexical sort order -- though of course the sort order
between any two git revisions can only be determined from the git tree
rather than from a lexical sort.
Travis Cross [Fri, 1 Feb 2013 01:58:14 +0000 (01:58 +0000)]
Add -z / --show-ip support
This new option displays both the hostname and the IP address of a
host in the path. This is particularly important when the hostname
determined by a reverse lookup has no corresponding forward record.
This is similar to the -b (both) option in tracepath, but -b was
already taken in mtr for --bitpattern.
Using this option also implies -w / --report-wide as this option isn't
terribly useful without it in report mode.
In general we endeavor to only show the IP address once per line, but
in the split view we consistently add a separate field for IP address
to the output.
Roger Wolff [Fri, 2 Dec 2011 00:00:00 +0000 (00:00 +0000)]
mtr v0.82
- Removed old Changelog file appended at the end as oldest changes.
2011-03-28 Mark Kamichoff <prox@prolixium.com>
- Enable decoding of ICMP extensions for MPLS for curses and report
interfaces. Use the -e flag or press 'e' to enable it.
Roger Wolff [Fri, 19 Sep 2008 00:00:00 +0000 (00:00 +0000)]
mtr v0.75
- Feelgood patch to move sprintf to snprintf. People might think that
sprintf might cause a buffer overflow. Now it's clean. cut-paste
patches: you can now copy an intermediate host to the clipboard.
Roger Wolff [Tue, 19 Aug 2008 00:00:00 +0000 (00:00 +0000)]
mtr v0.74
- Martin Pels' patch to allow UDP probes.
- KES reported a build problem. Turns out I need to install gtk-1.2
on my development sytem, otherwise my release script causes the
build to break.
- changed some docs to advertise the new mailing list. added
documentation for the Mac OS X compilation problem. added
-Wno-pointer-sign to the compiler options.
- Nico Lichtmaier's cleanup-gtk patch. (now mtr uses a more modern
dialect of gtk).
Roger Wolff [Mon, 7 Apr 2008 00:00:00 +0000 (00:00 +0000)]
mtr v0.73
- Some securty patches. Although MTR drops privileges as soon as
possible after opening the sockets, it still had some sprintf
calls, which have now been converted into snprintf.
Roger Wolff [Thu, 23 Mar 2006 00:00:00 +0000 (00:00 +0000)]
mtr v0.70
- Antinio submitted a cumulative patch containing some nice
improvements. He also submitted an automake patch that causes mtr
to no longer compile on my system. I refuse to have mtr "in the
dark" that I can't test-compile the dist.
Roger Wolff [Thu, 13 Jan 2005 00:00:00 +0000 (00:00 +0000)]
mtr v0.69
- make distclean should now also remove "rej" files.
- Antonio Querubin: update getopt.h . More cleanups using new
infrastructure.
- rcw: Fixed IPV6 support: When compiled in an IPV6-supporting
environment, but when the kernel doesn't support IPV6, mtr would
fail to start.
Roger Wolff [Tue, 11 Jan 2005 00:00:00 +0000 (00:00 +0000)]
mtr v0.68
- included some old patches.
- included patch from Antonio Querubin for better IPV6 support
restructured some more whitespace.
- added mtr.h where "global" things should go. Not finished moving
things around, but now that the infrastructure is there, it should
be easy.
Roger Wolff [Sun, 12 Dec 2004 00:00:00 +0000 (00:00 +0000)]
mtr v0.66
- Through the Debian bugtracking system a bug report and fix was sent
my way, that deals with stupid optmization trying to save some 768
bytes of memory, sacrificing "it works" on a different
architecture... (default char signedness)
Roger Wolff [Wed, 25 Aug 2004 00:00:00 +0000 (00:00 +0000)]
mtr v0.65
- Dancer Vesperman noted that mtr no longer traces past a section of
non-responding hosts. Apparently I added a line in net.c that
didn't make sense in mtr-0.56. I can't find the reason for adding
that line, so someone who thinks (s)he needs it, should holler.
Roger Wolff [Sun, 15 Aug 2004 00:00:00 +0000 (00:00 +0000)]
mtr v0.63
- Suggestion by RCW: Add -lm at line 70 of Configure.in. On my
system no ill effects ensued, so this version released so that he
can test if it still works on his sytem.
- Let me add that it's stupid that I have to specify that this this
program now requires Automake version 1.5 to build, where Automake
was intended to make software independent of different versions of
build software!
- For those concerned about the above statement: If you're just
trying to compile and use MTR, there is no need for automake. Just
when you're messing with the configure and build system of mtr is
automake a tool you need.
Roger Wolff [Thu, 12 Aug 2004 00:00:00 +0000 (00:00 +0000)]
mtr v0.62
- Apparently someone changed gethostbyname into gethostbyname2 in
mtr.c in an attempt to add IPV6 support. For systems without ipv6
support, the old gethostbyname should be used! Linux has the call
even if you don't enable IPV6. Thanks Gary (rsub)
Roger Wolff [Wed, 11 Aug 2004 00:00:00 +0000 (00:00 +0000)]
mtr v0.61
- Attempt to get/print the local IP address. Now shows as 0.0.0.0 :-(
Hints and tips appreciated! -- REW
- Lots of blank space reformatting.
- Moved the interface address setting to net.c (where it belongs).
Roger Wolff [Tue, 10 Aug 2004 00:00:00 +0000 (00:00 +0000)]
mtr v0.59
- Josh Martin suggested to add some bounds checking to the dynamic
field code. This caused me to delve in, and rewrite some
things. Now 50 lines of code less, but cleaner code. :-)