Skip to content

Commit

Permalink
exp - set a socket buffer size as small as possible, blocking inject
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Aug 21, 2023
1 parent 4181ad1 commit ac4cc7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions executables/example_pollute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ int main(int argc, char *const *argv) {
options_txrx.enable_non_openhd_mode= true;
options_txrx.tx_without_pcap= false;
options_txrx.debug_tx_injection_time= true;
options_txrx.tx_without_pcap=true;

std::shared_ptr<WBTxRx> txrx=std::make_shared<WBTxRx>(cards,options_txrx);
// We do not need receive in this mode
Expand Down
1 change: 1 addition & 0 deletions executables/injection_rate_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ int main(int argc, char *const *argv) {
WBTxRx::Options options_txrx{};
//options_txrx.pcap_rx_set_direction= false;
options_txrx.log_all_received_validated_packets= false;
options_txrx.tx_without_pcap= true;

std::shared_ptr<WBTxRx> txrx=std::make_shared<WBTxRx>(cards,options_txrx);
// No idea if and what effect stbc and ldpc have on the rate, but openhd enables them if possible by default
Expand Down
1 change: 1 addition & 0 deletions src/raw_socket_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ static int open_wifi_interface_as_raw_socket(const std::string &wifi) {
// debug the timeout after setting
//SocketHelper::debug_send_rcv_timeout(sock,console);
// buff size
SocketHelper::set_socket_send_rcv_buffsize(sock,1510*1, true);
SocketHelper::debug_send_rcv_buffsize(sock,console);
//const int wanted_sendbuff_bytes=128*1024*1024;
//SocketHelper::set_socket_send_rcv_buffsize(sock,wanted_sendbuff_bytes, true);
Expand Down

0 comments on commit ac4cc7a

Please sign in to comment.