Commit 44feaf16 authored by Deathcrow's avatar Deathcrow

Ported fixes to legacy mode

parent 049f9059
......@@ -62,15 +62,15 @@ def parse_senders( sender_args, sender ):
print("Malformed senders")
raise SystemExit
def process_raw_tcpprobe_file(tcpprobe_file, sender):
# processing for a continuously recorded tcp_probe file (deprecated)
def process_raw_tcpprobe_file(tcpprobe_file, sender):
# processing for a continuously recorded tcp_probe file (legacy mode)
tcpprobe_file.seek(0)
for line in tcpprobe_file:
bandwith_interval = args.samplerate
line_split = line.split()
for key, i in enumerate(sender):
if (args.utility == "netperf" and line_split[1] == r"["+i['src']+r"]:"+i['src_port']) \
or (args.utility == "iperf3" and line_split[2] == r"["+i['dst']+r"]:"+i['port']):
if (args.utility == "netperf" and line_split[1] == bracket_open+sender[key]['src']+bracket_close+":"+sender[key]['src_port']) \
or (args.utility == "iperf3" and line_split[2] == bracket_open+sender[key]['dst']+bracket_close+":"+sender[key]['port']):
# and line_split[2][:-5] == r"["+i['dst']+r"]:":
i['tcpprobe_file'].write(line)
# i['tcpprobe_file'].close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment