How to update command-line interface to talk to nodes

24 views
Skip to first unread message

Huy Đỗ Quang

unread,
Aug 19, 2024, 6:19:27 AM8/19/24
to mininet-wifi-discuss
 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

Ramon Fontes

unread,
Aug 19, 2024, 6:29:55 AM8/19/24
to Huy Đỗ Quang, mininet-wifi-discuss
Did you recompile the code?

--
You received this message because you are subscribed to the Google Groups "mininet-wifi-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mininet-wifi-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mininet-wifi-discuss/3eb19947-7641-4e40-b0bc-b5ec02a5fff0n%40googlegroups.com.

Huy Đỗ Quang

unread,
Aug 19, 2024, 6:43:15 AM8/19/24
to mininet-wifi-discuss
Thanks for quick answer. 
I ran the below commands successfully to recompile the code but still not working:

sudo make clean
sudo make install 


Vào lúc 17:29:55 UTC+7 ngày Thứ Hai, 19 tháng 8, 2024, ramonre...@gmail.com đã viết:

Ramon Fontes

unread,
Aug 19, 2024, 6:47:57 AM8/19/24
to Huy Đỗ Quang, mininet-wifi-discuss
This is the correct way:

mininet-wifi/mininet$ sudo make install
mininet-wifi/mininet$ cd ..
mininet-wifi$ sudo make install

Huy Đỗ Quang

unread,
Aug 19, 2024, 7:36:04 AM8/19/24
to mininet-wifi-discuss
Thank you so much for your help! I really appreciate it! Everything is working now.
I'll likely have a few more questions as I continue customizing Mininet-WiFi, so I hope it's okay if I reach out again.
Thanks in advance!  

Vào lúc 17:47:57 UTC+7 ngày Thứ Hai, 19 tháng 8, 2024, ramonre...@gmail.com đã viết:
Reply all
Reply to author
Forward
0 new messages