SUSTech-HPCLab / CS305-2023Spring-Project

GNU General Public License v3.0
10 stars 5 forks source link

How to trigger events in real time? #7

Open LogicDX342 opened 1 year ago

LogicDX342 commented 1 year ago

I set a breakpoint on each event listener's method. However, it only stops on the events that occur when I create or exit Mininet. I tried using commands in the Mininet CLI such as py net.addLink(s1,s3) or link s1 s3 down, all of which took effect, but did not stop at the breakpoint.

EricLee543 commented 1 year ago

I have not tested the test_network.py under a debugging environment. Based on my experience, how breakpoint effect is highly related to your IDE settings. In this project, I think debugging with print statement is enough. If you want to check the network packet, I recommend you use Wireshark to capture the packet. If anyone who has experience on using debugger in this project, please share your knowledge.

LogicDX342 commented 1 year ago

I also tried simply using print, but that didn't work either. It seems that devices added after the network has been established do not trigger any events.

EricLee543 commented 1 year ago

If packetIn event is not triggered. Please make sure your VM has installed arping. Enter arping in the terminal. If there is a command not found. Please use sudo apt-install arping.