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
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?
AC_INIT(mtr.c)
-AM_INIT_AUTOMAKE(mtr, 0.75)
+AM_INIT_AUTOMAKE(mtr, 0.76)
AC_SUBST(GTK_OBJ)
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.])
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
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
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
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
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
{
int option,i;
+ if (!dns) return;
res_init();
if (!_res.nscount) {
fprintf(stderr,"No nameservers defined.\n");
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
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
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
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
static int tag;
static GtkWidget *Pause_Button;
static GtkWidget *Entry;
+static GtkWidget *main_window;
void gtk_add_ping_timeout (void)
{
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:
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",
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);
void gtk_open(void)
{
- GtkWidget *Window;
- GdkPixmap *icon;
+ GdkPixbuf *icon;
int argc;
char *args[2];
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);
}
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
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
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
"\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);
}
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. */
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
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
if( addrcmp( (void *) &(host[index].addrs[i]), addrcopy, af ) != 0 &&
i<MAXPATH ) {
addrcpy( (void *) &(host[index].addrs[i]), addrcopy, af );
+
+ /* rafaelmartins: multi path support to '--raw' */
+ display_rawhost(index, (void *) &(host[index].addrs[i]));
}
/* end multi paths */
}
return 0;
}
+
static void set_fd_flags(int fd)
{
#if defined(HAVE_FCNTL) && defined(FD_CLOEXEC)
int oldflags;
+ if (fd < 0) return;
+
oldflags = fcntl(fd, F_GETFD);
if (oldflags == -1) {
perror("Couldn't get fd's flags");
set_fd_flags(recvsock4);
#ifdef ENABLE_IPV6
recvsock6 = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
+ if (recvsock6 >= 0)
+ set_fd_flags(recvsock6);
#endif
- set_fd_flags(recvsock6);
return 0;
}
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
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 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
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 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
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
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
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
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
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 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
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 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