""
This commit is contained in:
3
README
3
README
@@ -31,3 +31,6 @@ interface in promiscuous mode. Therefore, you will need to use the -p option
|
|||||||
to iftop to get sensible results. Cf.
|
to iftop to get sensible results. Cf.
|
||||||
http://www.tcpdump.org/lists/workers/2002/02/msg00010.html
|
http://www.tcpdump.org/lists/workers/2002/02/msg00010.html
|
||||||
|
|
||||||
|
The version of curses distributed with Solaris may not be sufficient for
|
||||||
|
iftop's needs. You will probably need ncurses or similar.
|
||||||
|
|
||||||
|
|||||||
48
configure.in
48
configure.in
@@ -39,6 +39,15 @@ AC_ARG_WITH(resolver,
|
|||||||
[resolver=$withval],
|
[resolver=$withval],
|
||||||
[resolver=netdb])
|
[resolver=netdb])
|
||||||
|
|
||||||
|
AC_ARG_WITH(libpcap,
|
||||||
|
[ --with-libpcap=WHERE Where the libpcap packet-capture library is found.
|
||||||
|
The pcap library should be installed in WHERE/lib,
|
||||||
|
and the header file in either WHERE/include or
|
||||||
|
WHERE/include/pcap.
|
||||||
|
[default=look in standard locations]],
|
||||||
|
[libpcap_prefix=$withval],
|
||||||
|
[libpcap_prefix=""])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Fairly generic checks.
|
dnl Fairly generic checks.
|
||||||
dnl
|
dnl
|
||||||
@@ -208,16 +217,49 @@ fi
|
|||||||
|
|
||||||
dnl Otherwise, no resolver at all. Boo hoo.
|
dnl Otherwise, no resolver at all. Boo hoo.
|
||||||
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Ensure that the machine even has libpcap. We do this late, because libpcap
|
dnl Find libpcap.
|
||||||
dnl calls netdb functions that might need libraries on some systems....
|
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
|
if test x$libpcap_prefix = x ; then
|
||||||
|
libpcap_prefix="/usr /usr/local /opt /software"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([where to find pcap.h])
|
||||||
|
foundpcaph=0
|
||||||
|
oldCPPFLAGS=$CPPFLAGS
|
||||||
|
for prefix in "" $libpcap_prefix ; do
|
||||||
|
for x in "" /pcap ; do
|
||||||
|
if test x$prefix != x ; then
|
||||||
|
CPPFLAGS="$oldCPPFLAGS -I$prefix/include$x"
|
||||||
|
fi
|
||||||
|
AC_TRY_CPP([
|
||||||
|
#include <pcap.h>
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([$prefix/include$x])
|
||||||
|
foundpcaph=1
|
||||||
|
break
|
||||||
|
])
|
||||||
|
done
|
||||||
|
if test $foundpcaph = 1 ; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $foundpcaph = 0 ; then
|
||||||
|
AC_MSG_RESULT([no idea])
|
||||||
|
AC_MSG_ERROR([can't find pcap.h
|
||||||
|
You're not going to get very far without libpcap.])
|
||||||
|
else
|
||||||
|
dnl assume that -lpcap is under $prefix/lib
|
||||||
|
if test x$prefix != x ; then
|
||||||
|
LDFLAGS="$LDFLAGS -L$prefix"
|
||||||
|
fi
|
||||||
AC_CHECK_LIB(pcap, pcap_open_live, , [
|
AC_CHECK_LIB(pcap, pcap_open_live, , [
|
||||||
AC_MSG_ERROR([can't find libpcap
|
AC_MSG_ERROR([can't find libpcap
|
||||||
You're not going to get very far without libpcap.])
|
You're not going to get very far without libpcap.])
|
||||||
])
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
foundpcap=0
|
foundpcap=0
|
||||||
AC_CHECK_HEADERS([pcap.h pcap/pcap.h], [
|
AC_CHECK_HEADERS([pcap.h pcap/pcap.h], [
|
||||||
|
|||||||
2
ui.c
2
ui.c
@@ -877,7 +877,7 @@ void ui_loop() {
|
|||||||
case '!': {
|
case '!': {
|
||||||
char *s;
|
char *s;
|
||||||
dontshowdisplay = 1;
|
dontshowdisplay = 1;
|
||||||
if ((s = edline(0, "Command", ""))) {
|
if ((s = edline(0, "Command", "")) && s[strspn(s, " \t")]) {
|
||||||
int i, dowait = 0;
|
int i, dowait = 0;
|
||||||
erase();
|
erase();
|
||||||
refresh();
|
refresh();
|
||||||
|
|||||||
Reference in New Issue
Block a user