Commit fad17b4d authored by chris's avatar chris

""

parent b27214e6
......@@ -31,3 +31,6 @@ interface in promiscuous mode. Therefore, you will need to use the -p option
to iftop to get sensible results. Cf.
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.
......@@ -39,6 +39,15 @@ AC_ARG_WITH(resolver,
[resolver=$withval],
[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 Fairly generic checks.
dnl
......@@ -208,16 +217,49 @@ fi
dnl Otherwise, no resolver at all. Boo hoo.
dnl
dnl Ensure that the machine even has libpcap. We do this late, because libpcap
dnl calls netdb functions that might need libraries on some systems....
dnl Find libpcap.
dnl
AC_CHECK_LIB(pcap, pcap_open_live, , [
AC_MSG_ERROR([can't find libpcap
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_MSG_ERROR([can't find libpcap
You're not going to get very far without libpcap.])
])
fi
foundpcap=0
AC_CHECK_HEADERS([pcap.h pcap/pcap.h], [
......
......@@ -877,7 +877,7 @@ void ui_loop() {
case '!': {
char *s;
dontshowdisplay = 1;
if ((s = edline(0, "Command", ""))) {
if ((s = edline(0, "Command", "")) && s[strspn(s, " \t")]) {
int i, dowait = 0;
erase();
refresh();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment