char *tmpbpf;
char *tmpctype;
intmax_t value;
+ int promisc = 0;
if (unlikely(aconf == NULL)) {
return NULL;
}
}
+ aconf->promisc = LIBPCAP_PROMISC;
+ if (ConfGetChildValueBoolWithDefault(if_root, if_default, "promisc", &promisc) != 1) {
+ SCLogDebug("could not get promisc or none specified");
+ } else {
+ aconf->promisc = promisc;
+ }
+
return aconf;
}
}
}
- int pcap_set_promisc_r = pcap_set_promisc(ptv->pcap_handle,LIBPCAP_PROMISC);
+ /* set Promisc, and Timeout. Must be called before pcap_activate */
+ int pcap_set_promisc_r = pcap_set_promisc(ptv->pcap_handle, pcapconfig->promisc);
//printf("ReceivePcapThreadInit: pcap_set_promisc(%p) returned %" PRId32 "\n", ptv->pcap_handle, pcap_set_promisc_r);
if (pcap_set_promisc_r != 0) {
SCLogError(SC_ERR_PCAP_SET_PROMISC, "Couldn't set promisc mode, error %s", pcap_geterr(ptv->pcap_handle));
int threads;
/* socket buffer size */
int buffer_size;
+ /* promiscuous value */
+ int promisc;
/* BPF filter */
char *bpf_filter;
ChecksumValidationMode checksum_mode;
# rings. In this case, set up the threads variable to N to start N threads
# listening on the same interface.
#threads: 16
+ # set to no to disable promiscuous mode:
+ #promisc: no
# Put default values here
- interface: default
#checksum-checks: auto