Skip to content

Commit

Permalink
mtr v0.61
Browse files Browse the repository at this point in the history
 - 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).

source: ftp://ftp.bitwizard.nl/mtr/mtr-0.61.tar.gz
  • Loading branch information
rewolff authored and traviscross committed Feb 3, 2013
1 parent 5536e69 commit 3adcb26
Show file tree
Hide file tree
Showing 7 changed files with 1,047 additions and 905 deletions.
6 changes: 6 additions & 0 deletions NEWS
@@ -1,4 +1,10 @@
WHAT'S NEW?
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).

v0.60 John Thacker submitted a surprisingly simple patch to
enable linking against GTK2. (up to 2.4.0)

Expand Down
2 changes: 1 addition & 1 deletion configure.in
@@ -1,5 +1,5 @@
AC_INIT(mtr.c)
AM_INIT_AUTOMAKE(mtr, 0.60)
AM_INIT_AUTOMAKE(mtr, 0.61)


AC_SUBST(GTK_OBJ)
Expand Down
6 changes: 5 additions & 1 deletion curses.c
Expand Up @@ -23,6 +23,9 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#if defined(HAVE_NCURSES_H)
# include <ncurses.h>
Expand Down Expand Up @@ -471,6 +474,7 @@ void mtr_curses_redraw()
int hd_len = 0;
char buf[1024];
char fmt[16];


erase();
getmaxyx(stdscr, maxy, maxx);
Expand All @@ -482,7 +486,7 @@ void mtr_curses_redraw()
pwcenter("My traceroute [v" VERSION "]");
attroff(A_BOLD);

mvprintw(1, 0, "%s", LocalHostname);
mvprintw(1, 0, "%s (%s)", LocalHostname, inet_ntoa(*net_localaddr()));
printw("(tos=0x%X ", tos);
printw("psize=%d ", abs(packetsize) );
printw("bitpattern=0x%02X)", (unsigned char)(abs(bitpattern)));
Expand Down

0 comments on commit 3adcb26

Please sign in to comment.