cnp3 / ipmininet

Mininet extension to make experimenting with IP networks easy
GNU General Public License v2.0
65 stars 51 forks source link

How do I get link delay from the network state? #103

Closed CavalryXD closed 3 years ago

CavalryXD commented 3 years ago

we can get the network state in IPMininet, the usage in here and if I set link delay in addLink() related, How can I get this argument in TopologyDB? Thanks

jadinm commented 3 years ago

At the moment, it is not possible to export it through TopologyDB to the produced json There is no particular challenge to adding it, it would only require one more line there https://github.com/cnp3/ipmininet/blob/master/ipmininet/topologydb.py#L129

If you can access the IPNet object, you can already access that without using TopologyDB with

net["your-node-name"].intf("your-interface-name").params.get('delay', -1)
CavalryXD commented 3 years ago

Thanks for your reply, It's a good idea and I use the interface in Mininet net.topo.linkInfo('node1', 'node2') It seems to figure out