summaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorpdw <>2003-06-06 22:42:35 +0000
committerpdw <>2003-06-06 22:42:35 +0000
commit4089483e6ab31e8a899928d259a4b11535519124 (patch)
treee32f1f48b31fb18c5b74fa585e763a321fbd0255 /options.c
parentc7429ed887fd49a32e25bdfcf336f6ecae9bd028 (diff)
downloadiftop-4089483e6ab31e8a899928d259a4b11535519124.zip
Solaris/autoconf patch from Jonathan Abbey <jonabbey@ganymeta.org>
Diffstat (limited to 'options.c')
-rw-r--r--options.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/options.c b/options.c
index bec2070..4e6b7f4 100644
--- a/options.c
+++ b/options.c
@@ -4,6 +4,8 @@
*
*/
+#include "config.h"
+
#include <sys/types.h>
#include <stdio.h>
@@ -37,6 +39,7 @@ char optstr[] = "+i:f:nN:hpbBP";
* likely to want to listen. We also compare candidate interfaces to lo. */
static char *bad_interface_names[] = {
"lo:",
+ "lo",
"dummy",
"vmnet",
NULL /* last entry must be NULL */
@@ -87,7 +90,13 @@ static void set_defaults() {
inet_aton("255.255.255.0", &options.netfiltermask);
options.dnsresolution = 1;
options.portresolution = 1;
+#ifdef NEED_PROMISCUOUS_FOR_OUTGOING
+ options.promiscuous = 1;
+ options.promiscuous_but_choosy = 1;
+#else
options.promiscuous = 0;
+ options.promiscuous_but_choosy = 0;
+#endif
options.showbars = 1;
options.showports = OPTION_PORTS_OFF;
options.aggregate_src = 0;
@@ -200,6 +209,7 @@ void options_read(int argc, char **argv) {
case 'p':
options.promiscuous = 1;
+ options.promiscuous_but_choosy = 0;
break;
case 'P':