""
This commit is contained in:
1
Makefile
1
Makefile
@@ -43,6 +43,7 @@ CFLAGS += -DUSE_GETHOSTBYADDR_R
|
|||||||
# Uncomment if you are using libresolv.
|
# Uncomment if you are using libresolv.
|
||||||
#
|
#
|
||||||
#LDLIBS += -lresolv # or /usr/lib/libresolv.a on Linux?
|
#LDLIBS += -lresolv # or /usr/lib/libresolv.a on Linux?
|
||||||
|
|
||||||
#
|
#
|
||||||
# Uncomment if you are using ares.
|
# Uncomment if you are using ares.
|
||||||
#
|
#
|
||||||
|
|||||||
5
README
5
README
@@ -20,5 +20,6 @@ in order to compile iftop.
|
|||||||
|
|
||||||
FreeBSD 4.7:
|
FreeBSD 4.7:
|
||||||
|
|
||||||
DNS resolution does not work due to the lack of a proper gethostbyaddr_r
|
This version of FreeBSD lacks a proper gethostbyaddr_r function. You should
|
||||||
implementation.
|
choose an alternative name resolution technique; see comments in the Makefile.
|
||||||
|
We recommend using ares (-DUSE_ARES).
|
||||||
|
|||||||
21
ui.c
21
ui.c
@@ -209,6 +209,8 @@ static void draw_bar_scale(int* y) {
|
|||||||
int i;
|
int i;
|
||||||
if(options.showbars) {
|
if(options.showbars) {
|
||||||
/* Draw bar graph scale on top of the window. */
|
/* Draw bar graph scale on top of the window. */
|
||||||
|
move(*y, 0);
|
||||||
|
clrtoeol();
|
||||||
mvhline(*y + 1, 0, 0, COLS);
|
mvhline(*y + 1, 0, 0, COLS);
|
||||||
for (i = 1; i <= scale[rateidx].max; i *= scale[rateidx].interval) {
|
for (i = 1; i <= scale[rateidx].max; i *= scale[rateidx].interval) {
|
||||||
char s[40], *p;
|
char s[40], *p;
|
||||||
@@ -773,17 +775,19 @@ void ui_loop() {
|
|||||||
dontshowdisplay = 1;
|
dontshowdisplay = 1;
|
||||||
if ((s = edline(0, "Net filter", options.filtercode))) {
|
if ((s = edline(0, "Net filter", options.filtercode))) {
|
||||||
char *m;
|
char *m;
|
||||||
|
if (s[strspn(s, " \t")] == 0) {
|
||||||
|
/* Empty filter; set to NULL. */
|
||||||
|
xfree(s);
|
||||||
|
s = NULL;
|
||||||
|
}
|
||||||
if (!(m = set_filter_code(s))) {
|
if (!(m = set_filter_code(s))) {
|
||||||
xfree(options.filtercode);
|
xfree(options.filtercode);
|
||||||
options.filtercode = s;
|
options.filtercode = s;
|
||||||
/* -lpcap will write junk to stderr; we do our best to
|
/* -lpcap will write junk to stderr; we do our best to
|
||||||
* erase it.... */
|
* erase it.... */
|
||||||
touchline(stdscr, 0, 2);
|
move(COLS - 1, LINES - 1);
|
||||||
move(0, 0);
|
wrefresh(curscr);
|
||||||
clrtoeol();
|
showhelp("Installed new filter");
|
||||||
move(1, 0);
|
|
||||||
clrtoeol();
|
|
||||||
refresh();
|
|
||||||
} else {
|
} else {
|
||||||
showhelp(m);
|
showhelp(m);
|
||||||
xfree(s);
|
xfree(s);
|
||||||
@@ -828,7 +832,12 @@ void ui_loop() {
|
|||||||
xfree(s);
|
xfree(s);
|
||||||
}
|
}
|
||||||
dontshowdisplay = 0;
|
dontshowdisplay = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
case KEY_CLEAR:
|
||||||
|
case 12: /* ^L */
|
||||||
|
wrefresh(curscr);
|
||||||
|
break;
|
||||||
case ERR:
|
case ERR:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user