[ENB] Fix enabling of MAC pcap file

when using

[pcap]
enable = true
filename = /tmp/enb.pcap

in enb.conf, there is no pcap file created.

The problem is somewhere in the way how arguments are handled.
pcap.enable is properly parsed into args.pcap.  However, later on,
lte_stack->init(args.stack, rrc_cfg, lte_phy.get()) only passes
args.stack down the road, not args.pcap.  enb_stack_lte::init() then
basically uses args.stack.pcap and not args.pcap, and the latter appears
always false.

Let's remove pcap_args_t from all_args and only use the instance in
stack_args_t.

Closes: #359
master
Harald Welte 5 years ago committed by Andre Puschmann
parent 743f1e2e8c
commit 10720aeace

@ -101,7 +101,6 @@ struct all_args_t {
enb_args_t enb;
enb_files_t enb_files;
srslte::rf_args_t rf;
pcap_args_t pcap;
log_args_t log;
gui_args_t gui;
general_args_t general;

@ -97,8 +97,8 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
("rf.time_adv_nsamples", bpo::value<string>(&args->rf.time_adv_nsamples)->default_value("auto"), "Transmission time advance")
("rf.burst_preamble_us", bpo::value<string>(&args->rf.burst_preamble)->default_value("auto"), "Transmission time advance")
("pcap.enable", bpo::value<bool>(&args->pcap.enable)->default_value(false), "Enable MAC packet captures for wireshark")
("pcap.filename", bpo::value<string>(&args->pcap.filename)->default_value("ue.pcap"), "MAC layer capture filename")
("pcap.enable", bpo::value<bool>(&args->stack.pcap.enable)->default_value(false), "Enable MAC packet captures for wireshark")
("pcap.filename", bpo::value<string>(&args->stack.pcap.filename)->default_value("ue.pcap"), "MAC layer capture filename")
("gui.enable", bpo::value<bool>(&args->gui.enable)->default_value(false), "Enable GUI plots")

Loading…
Cancel
Save