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