Skip to content

Commit

Permalink
mtr v0.76
Browse files Browse the repository at this point in the history
 - display load sharing hosts in --raw output.  added about button in
   gui.

source: ftp://ftp.bitwizard.nl/mtr/mtr-0.76.tar.gz
  • Loading branch information
rewolff authored and traviscross committed Feb 3, 2013
1 parent ae6cb80 commit 5c7494c
Show file tree
Hide file tree
Showing 25 changed files with 154 additions and 82 deletions.
2 changes: 2 additions & 0 deletions NEWS
@@ -1,4 +1,6 @@
WHAT'S NEW?
V0.76 display load sharing hosts in --raw output.
added about button in gui.
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
Expand Down
5 changes: 5 additions & 0 deletions README
Expand Up @@ -60,6 +60,11 @@ INSTALLING
knows how to make this automatic using autoconf / the configure script,
please tell me....

This should now also work:
./configure CFLAGS="-arch i386 -arch x86_64" LIBS="-lresolv" \
--without-gtk --disable-endian-check --disable-dependency-tracking



WHERE CAN I GET THE LATEST VERSION OR MORE INFORMATION?

Expand Down
12 changes: 9 additions & 3 deletions configure.in
@@ -1,5 +1,5 @@
AC_INIT(mtr.c)
AM_INIT_AUTOMAKE(mtr, 0.75)
AM_INIT_AUTOMAKE(mtr, 0.76)


AC_SUBST(GTK_OBJ)
Expand Down Expand Up @@ -49,7 +49,7 @@ AC_ARG_ENABLE(ipv6,
WANTS_IPV6=$enableval, WANTS_IPV6=yes)

if test "x$WANTS_GTK" = "xyes"; then
AM_PATH_GTK_2_0(2.4.0, CFLAGS="$CFLAGS $GTK_CFLAGS"
AM_PATH_GTK_2_0(2.6.0, CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS -lm",
AC_MSG_WARN(Building without GTK2 display support)
AC_DEFINE(NO_GTK, 1, [Define if you don't have the GTK+ libraries available.])
Expand Down Expand Up @@ -108,7 +108,13 @@ AC_MSG_CHECKING(for C flags to get more warnings)
ac_save_CFLAGS="$CFLAGS"
if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
dnl gcc is the easiest C compiler
warning_CFLAGS="-Wall -Wno-pointer-sign"
warning_CFLAGS="-Wall"
# Check if compiler supports -Wno-pointer-sign and add it if supports
CFLAGS_saved="$CFLAGS"
CFLAGS="$CFLAGS -Wno-pointer-sign"
AC_COMPILE_IFELSE([ AC_LANG_SOURCE([[ int foo; ]])],
[ warning_CFLAGS="${warning_CFLAGS} -Wno-pointer-sign" ],)
CFLAGS="$CFLAGS_saved"
else
dnl Vendor supplied C compilers are a bit tricky
case "$host_os" in
Expand Down
5 changes: 2 additions & 3 deletions curses.c
Expand Up @@ -3,9 +3,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
5 changes: 2 additions & 3 deletions display.c
Expand Up @@ -3,9 +3,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
5 changes: 2 additions & 3 deletions display.h
Expand Up @@ -3,9 +3,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
6 changes: 3 additions & 3 deletions dns.c
Expand Up @@ -3,9 +3,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down Expand Up @@ -484,6 +483,7 @@ void dns_open(void)
{
int option,i;

if (!dns) return;
res_init();
if (!_res.nscount) {
fprintf(stderr,"No nameservers defined.\n");
Expand Down
5 changes: 2 additions & 3 deletions dns.h
Expand Up @@ -3,9 +3,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
3 changes: 1 addition & 2 deletions getopt.h
Expand Up @@ -5,8 +5,7 @@
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
License as published by the Free Software Foundation version 2.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
7 changes: 3 additions & 4 deletions getopt1.c
Expand Up @@ -2,10 +2,9 @@
Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
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
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
96 changes: 82 additions & 14 deletions gtk.c
Expand Up @@ -4,9 +4,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down Expand Up @@ -55,6 +54,7 @@ extern int af;
static int tag;
static GtkWidget *Pause_Button;
static GtkWidget *Entry;
static GtkWidget *main_window;

void gtk_add_ping_timeout (void)
{
Expand Down Expand Up @@ -122,6 +122,68 @@ gint Pause_clicked(UNUSED GtkWidget *Button, UNUSED gpointer data)
return FALSE;
}

gint About_clicked(UNUSED GtkWidget *Button, UNUSED gpointer data)
{
gchar *authors[] = {
"Roger Wolff <R.E.Wolff@BitWizard.nl>",
"Bohdan Vlasyuk <bohdan@cec.vstu.vinnica.ua>",
"Evgeniy Tretyak <evtr@ukr.net>",
"John Thacker <thacker@math.cornell.edu>",
"Juha Takala",
"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>",
"Antonio Querubin <tony@aloha.net>",
"Russell Nelson <rn-mtr@crynwr.com>",
"Davin Milun <milun@acm.org>",
"Josh Martin <jmartin@columbiaservices.net>",
"Alexander V. Lukyanov <lav@yars.free.net>",
"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> ",
"Philip Kizer <pckizer@nostrum.com>",
"Simon Kirby",
"Christophe Kalt",
"Steve Kann <stevek@spheara.horizonlive.com>",
"Brett Johnson <brett@jdacareers.com>",
"Roland Illig <roland.illig@gmx.de>",
"Damian Gryski <dgryski@uwaterloo.ca>",
"Rob Foehl <rwf@loonybin.net>",
"Mircea Damian",
"Cougar <cougar@random.ee>",
"Brian Casey",
"Andrew Brown <atatat@atatdot.net>",
"Bill Bogstad <bogstad@pobox.com> ",
"Marc Bejarano <marc.bejarano@openwave.com>",
"Moritz Barsnick <barsnick@gmx.net>",
NULL
};

gtk_show_about_dialog(GTK_WINDOW(main_window)
, "version", VERSION
, "copyright", "Copyright \xc2\xa9 1997,1998 Matt Kimball"
, "website", "http://www.bitwizard.nl/mtr/"
, "authors", authors
, "comments", "The 'traceroute' and 'ping' programs in a single network diagnostic tool."
, "license",
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License version 2 as\n"
"published by the Free Software Foundation.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details."
, NULL);
return TRUE;
}

/*
* There is a small problem with the following code:
Expand Down Expand Up @@ -182,6 +244,11 @@ void Toolbar_fill(GtkWidget *Toolbar)
g_signal_connect(GTK_OBJECT(Button), "clicked",
GTK_SIGNAL_FUNC(Window_destroy), NULL);

Button = gtk_button_new_from_stock(GTK_STOCK_ABOUT);
gtk_box_pack_end(GTK_BOX(Toolbar), Button, FALSE, FALSE, 0);
g_signal_connect(GTK_OBJECT(Button), "clicked",
GTK_SIGNAL_FUNC(About_clicked), NULL);

Button = gtk_button_new_with_mnemonic("_Restart");
gtk_box_pack_end(GTK_BOX(Toolbar), Button, FALSE, FALSE, 0);
g_signal_connect(GTK_OBJECT(Button), "clicked",
Expand Down Expand Up @@ -443,7 +510,7 @@ void Window_fill(GtkWidget *Window)
GtkWidget *Toolbar;
GtkWidget *scroll;

gtk_window_set_title(GTK_WINDOW(Window), "My traceroute [v" VERSION "]");
gtk_window_set_title(GTK_WINDOW(Window), "My traceroute");
gtk_window_set_default_size(GTK_WINDOW(Window), 650, 400);
gtk_container_set_border_width(GTK_CONTAINER(Window), 10);
VBox = gtk_vbox_new(FALSE, 10);
Expand All @@ -465,8 +532,7 @@ void Window_fill(GtkWidget *Window)

void gtk_open(void)
{
GtkWidget *Window;
GdkPixmap *icon;
GdkPixbuf *icon;

int argc;
char *args[2];
Expand All @@ -477,19 +543,21 @@ void gtk_open(void)
argv[1] = NULL;
gtk_do_init(&argc, &argv);

Window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
icon = gdk_pixbuf_new_from_xpm_data((const char**)mtr_icon);
gtk_window_set_default_icon(icon);

main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

g_set_application_name("My traceroute");

Window_fill(Window);
Window_fill(main_window);

g_signal_connect(GTK_OBJECT(Window), "delete_event",
g_signal_connect(GTK_OBJECT(main_window), "delete_event",
GTK_SIGNAL_FUNC(Window_destroy), NULL);
g_signal_connect(GTK_OBJECT(Window), "destroy",
g_signal_connect(GTK_OBJECT(main_window), "destroy",
GTK_SIGNAL_FUNC(Window_destroy), NULL);

icon = gtk_load_pixmap(mtr_icon);
gtk_widget_show_all(Window);
gdk_window_set_icon(Window->window, NULL, icon, NULL);
gdk_window_set_icon_name(Window->window, "mtr");
gtk_widget_show_all(main_window);
}


Expand Down
5 changes: 2 additions & 3 deletions mtr-curses.h
Expand Up @@ -3,9 +3,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
5 changes: 2 additions & 3 deletions mtr-gtk.h
Expand Up @@ -3,9 +3,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
11 changes: 7 additions & 4 deletions mtr.c
Expand Up @@ -3,9 +3,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down Expand Up @@ -380,6 +379,7 @@ int main(int argc, char **argv)
"\t\t[--report-wide] [--report-cycles=COUNT] [--curses] [--gtk]\n"
"\t\t[--raw] [--split] [--no-dns] [--address interface]\n" /* BL */
"\t\t[--psize=bytes/-s bytes]\n" /* ok */
"\t\t[--report-wide|-w] [-u]\n" /* rew */
"\t\t[--interval=SECONDS] HOSTNAME [PACKETSIZE]\n", argv[0]);
exit(0);
}
Expand All @@ -402,7 +402,10 @@ int main(int argc, char **argv)
hints.ai_socktype = SOCK_DGRAM;
error = getaddrinfo( Hostname, NULL, &hints, &res );
if ( error ) {
perror( gai_strerror(error) );
if (error == EAI_SYSTEM)
perror ("Failed to resolve host");
else
fprintf (stderr, "Failed to resolve host: %s\n", gai_strerror(error));
exit( EXIT_FAILURE );
}
/* Convert the first addrinfo into a hostent. */
Expand Down
5 changes: 2 additions & 3 deletions mtr.h
Expand Up @@ -4,9 +4,8 @@
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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down

0 comments on commit 5c7494c

Please sign in to comment.