I'm currently working on a custom Mininet-WiFi project and I need to update the command-line interface (CLI) to add new functionalities for interacting with network nodes. Specifically, I want to introduce a new command that allows a node to send packets to a destination IP by routing through the nearest neighbor nodes. I tried to add the command to file
mn_wifi/cli.py like following:
def do_sendpacket(self, line):
"""Send a packet with content to a destination IP address by transferring through neighbor nodes until it reaches the destination. Usage: sta1 sendpacket <destination IP> <content>"""
But when I use CLI, it does not work:
mininet-wifi> sta1 sendpacket 10.0.0.2 "Hello"
bash: sendpacket: command not found
How can I modify the CLI to include this new command?
Thanks in advance