As a part of university project I created a topology using Mininet and tried to generate traffic using Scapy. To generate TCP attack on topology a python script named "My_SYNfloodattack.py" is called. Following is a part of main script that shows how it calls.
...
def attack():
attack_hosts = ['h2','h3','h4','h5','h6','h7','h8','h9','h10','h11','h12','h13','h14','h15',
'h16','h17','h18','h19','h20','h21','h22','h23','h24','h25','h26','h27','h28']
for item in attack_hosts:
h1 = net.get(item)
i = int(item[1:])
h1.cmd('sudo python /home/pox/ext/My_SYNflood_attack.py 10.0.0.%s 10.0.0.253'%i)
...
when I call attack function, first time 'My_SYNflood_attack.py' is called by "h2", 100 packet is sent completely, then this process happens to "h3" and so on.
The problem is that I want to call the function simultaneously, all hosts in list ('h3' to 'h28') start to send packet together.
I searched and read about multithreading and multiprocessing but how can I use it in mininet?
Thanks in advance.