O'Reilly logo

Python Network Programming Cookbook - Second Edition by Dr. M. O. Faruque Sarker, Pradeeban Kathiravelu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

You may emulate mobile ad hoc network (MANET) and vehicular ad hoc network (VANET) using Mininet-WiFi, and visualize them in a graphical interface. VANET is a subset of MANET, which can be emulated by sub-classing the generic interfaces of Mininet-WiFi. In this recipe, we will adopt and extend an example from the Mininet-WiFi.

Listing 9.4 shows the code to emulate a mobile network:

 #!/usr/bin/env python # Python Network Programming Cookbook, Second Edition -- Chapter - 9 # This program is optimized for Python 2.7.12. # It may run on any other version with/without modifications. from mininet.net import Mininet from mininet.node ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required