mirror of
https://github.com/svpcom/wfb-ng.git
synced 2025-02-21 16:03:49 -04:00
Increase pcap buffer
Don't set rfmon twice
This commit is contained in:
parent
c471ae9f52
commit
e0ea2a3c4b
4
rx.cpp
4
rx.cpp
@ -55,9 +55,9 @@ Receiver::Receiver(const char *wlan, int radio_port, Aggregator *agg) : agg(agg)
|
||||
throw runtime_error(string_format("Unable to open interface %s in pcap: %s\n", wlan, errbuf));
|
||||
}
|
||||
|
||||
if (pcap_set_snaplen(ppcap, 2048) !=0) throw runtime_error("set_snaplen failed");
|
||||
if (pcap_set_snaplen(ppcap, 4096) !=0) throw runtime_error("set_snaplen failed");
|
||||
if (pcap_set_promisc(ppcap, 1) != 0) throw runtime_error("set_promisc failed");
|
||||
if (pcap_set_rfmon(ppcap, 1) !=0) throw runtime_error("set_rfmon failed");
|
||||
//if (pcap_set_rfmon(ppcap, 1) !=0) throw runtime_error("set_rfmon failed");
|
||||
if (pcap_set_timeout(ppcap, -1) !=0) throw runtime_error("set_timeout failed");
|
||||
//if (pcap_set_buffer_size(ppcap, 2048) !=0) throw runtime_error("set_buffer_size failed");
|
||||
if (pcap_activate(ppcap) !=0) throw runtime_error(string_format("pcap_activate failed: %s", pcap_geterr(ppcap)));
|
||||
|
4
tx.cpp
4
tx.cpp
@ -49,9 +49,9 @@ Transmitter::Transmitter(const char *wlan, int k, int n, uint8_t radio_rate, uin
|
||||
if (ppcap == NULL){
|
||||
throw runtime_error(string_format("Unable to open interface %s in pcap: %s", wlan, errbuf));
|
||||
}
|
||||
if (pcap_set_snaplen(ppcap, 1024) !=0) throw runtime_error("set_snaplen failed");
|
||||
if (pcap_set_snaplen(ppcap, 4096) !=0) throw runtime_error("set_snaplen failed");
|
||||
if (pcap_set_promisc(ppcap, 1) != 0) throw runtime_error("set_promisc failed");
|
||||
if (pcap_set_rfmon(ppcap, 1) !=0) throw runtime_error("set_rfmon failed");
|
||||
//if (pcap_set_rfmon(ppcap, 1) !=0) throw runtime_error("set_rfmon failed");
|
||||
if (pcap_set_timeout(ppcap, -1) !=0) throw runtime_error("set_timeout failed");
|
||||
//if (pcap_set_buffer_size(ppcap, 2048) !=0) throw runtime_error("set_buffer_size failed");
|
||||
if (pcap_activate(ppcap) !=0) throw runtime_error(string_format("pcap_activate failed: %s", pcap_geterr(ppcap)));
|
||||
|
Loading…
Reference in New Issue
Block a user