• No results found

Mininet Python API Reference Manual

N/A
N/A
Protected

Academic year: 2021

Share "Mininet Python API Reference Manual"

Copied!
75
0
0

Loading.... (view fulltext now)

Full text

(1)

Mininet Python API Reference Manual

Mininet Python API Reference Manual

Generated by Doxygen 1.8.3.1

Generated by Doxygen 1.8.3.1

Tue Jul 30 2013 16:44:13 Tue Jul 30 2013 16:44:13

(2)
(3)

Contents

Contents

1

1 NamNamespespace ace IndIndexex 11

1.1

1.1 NamNamespespace ace LisListt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2

2 HieHierarrarchchicaical l IndIndexex 33

2.1

2.1 ClaClass ss HieHierarrarchchyy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3

3 ClClasass s InIndedexx 55

3.

3.1 1 ClClasass s LiListst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4

4 NamesNamespace pace DocumDocumentatentationion 77

4.1

4.1 topo topo NamesNamespace pace RefReferenceerence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 4.1.

4.1.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 5

5 ClaClass ss DocDocumeumentantatiotionn 99

5.1

5.1 mininmininet.cet.cli.CLli.CLI I Class Class RefReferenceerence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 5.1.

5.1.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . 1111 5.1.

5.1.2 2 MembeMember r FunctFunction ion DocumDocumentatentationion . . . . . . . 1111 5.

5.1.1.2.2.1 1 dedefafaulultt . . . . . . . 1111 5.

5.1.1.2.2.2 2 dodo_d_dpcpctltl . . . . . . . 1111 5.

5.1.1.2.2.3 3 dodo_d_dumumpp . . . . . . . 1111 5. 5.1.1.2.2.4 4 dodo_g_gtetermrm . . . . . . . 1111 5. 5.1.1.2.2.5 5 dodo_h_helelpp . . . . . . . 1111 5. 5.1.1.2.2.6 6 dodo_i_intntfsfs. . . . . . . 1111 5.

5.1.1.2.2.7 7 dodo_i_ipeperfrf . . . . . . . 1111 5.1

5.1.2..2.8 8 do_do_ipeiperfurfudpdp . . . . . . . 1111 5.

5.1.1.2.2.9 9 dodo_l_lininkk . . . . . . . 1122 5.1.

5.1.2.10 2.10 do_nedo_nett . . . . . . . 1122 5.1.

5.1.2.11 2.11 do_nodo_nodesdes . . . . . . . 1122 5.1.

5.1.2.12 2.12 do_nodo_noechoecho . . . . . . . 1122 5.1.

(4)

iiii CCOONNTTEENNTTSS

5.1.

5.1.2.14 2.14 do_pido_pingallngallfullfull . . . . . . . 1122 5.1.

5.1.2.15 2.15 do_pido_pingpaingpairr . . . . . . . 1122 5.1.

5.1.2.16 2.16 do_pido_pingpaingpairfullrfull . . . . . . . 1122 5.1

5.1.2..2.17 17 do_do_pxpx . . . . . . . 1122 5.1

5.1.2..2.18 18 do_do_pypy . . . . . . . 1122 5.1.

5.1.2.19 2.19 do_sodo_sourceurce . . . . . . . 1122 5.1.

5.1.2.20 2.20 do_tdo_timeime . . . . . . . 1133 5.1

5.1.2..2.21 21 do_do_xx . . . . . . . 1133 5.1.

5.1.2.22 2.22 do_xtdo_xtermerm . . . . . . . 1133 5.1.

5.1.2.23 2.23 emptyemptylineline. . . . . . . 1133 5.1.

5.1.2.24 2.24 waitwaitForForNodeNode . . . . . . . 1133 5.1.

5.1.3 3 MembeMember r Data Data DocumeDocumentatntationion. . . . . . . 1133 5.

5.1.1.3.3.1 1 hehelplpStStrr . . . . . . . 1133 5.2

5.2 mininmininet.net.node.ode.ContrController oller Class Class RefReferenceerence . . . . . . . 1133 5.2.

5.2.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . 1144 5.2.

5.2.2 2 MembeMember r FunctFunction ion DocumDocumentatentationion . . . . . . . 1144 5.

5.2.2.2.2.1 1 ststarartt . . . . . . . 1144 5.

5.2.2.2.2.2 2 ststopop . . . . . . . 1155 5.3

5.3 mininmininet.net.node.ode.CPULiCPULimitedmitedHost CHost Class Rlass Refeeferencerence . . . . . . . 1155 5.3.

5.3.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . 1166 5.3.

5.3.2 2 MembeMember r FunctFunction ion DocumDocumentatentationion . . . . . . . 1166 5.

5.3.3.2.2.1 1 coconfinfigg. . . . . . . 1166 5.

5.3.3.2.2.2 2 popopepenn . . . . . . . 1166 5.3

5.3.2..2.3 3 setsetCPUCPUFrFracac . . . . . . . 1166 5.4

5.4 mininmininet.tet.topoopo.Gra.Graph Cph Class lass RefReferencerencee . . . . . . . 1177 5.4.

5.4.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . 1177 5.5

5.5 mininmininet.net.node.ode.Host Host Class Class RefReferencerencee . . . . . . . 1177 5.5.

5.5.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . 1188 5.6

5.6 mininmininet.let.link.Iink.Intf ntf Class Class RefReferencerencee . . . . . . . 1188 5.6.

5.6.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . 1199 5.6.

5.6.2 2 ConstConstructor ructor & & DestruDestructor Documctor Documentatentationion. . . . . . . 1199 5.

5.6.6.2.2.1 1 ____ininitit__ __ . . . . . . . 1199 5.6.

5.6.3 3 MembeMember r FunctFunction ion DocumDocumentatentationion . . . . . . . 1199 5.

5.6.6.3.3.1 1 coconfinfigg. . . . . . . 1199 5.

5.6.6.3.3.2 2 sesetMtMACAC . . . . . . . 2200 5.

5.6.6.3.3.3 3 sesetPtPararamam . . . . . . . 2200 5.7

(5)

C

COONNTTEENNTTSS iiiiii

5.7.

5.7.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . 2211 5.7.

5.7.2 2 ConstConstructor ructor & & DestruDestructor Documctor Documentatentationion. . . . . . . 2211 5.

5.7.7.2.2.1 1 ____ininitit__ __ . . . . . . . 2211 5.8

5.8 mininmininet.let.link.Link.Link ink Class Class RefReferenceerence . . . . . . . 2211 5.8.

5.8.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . 2222 5.8.

5.8.2 2 ConstConstructor ructor & & DestruDestructor Documctor Documentatentationion. . . . . . . 2222 5.

5.8.8.2.2.1 1 ____ininitit__ __ . . . . . . . 2222 5.8.

5.8.3 3 MembeMember r FunctFunction ion DocumDocumentatentationion . . . . . . . 2222 5.

5.8.8.3.3.1 1 inintftfNaNameme . . . . . . . 2222 5.8

5.8.3..3.2 2 makmakeIneIntfPtfPairair . . . . . . . 2222 5.9

5.9 mininmininet.net.net.Met.Minineininet Ct Class lass RefReferencerencee . . . . . . . 2233 5.9.

5.9.1 1 DetaDetailed iled DescripDescriptiontion . . . . . . . 2255 5.9.

5.9.2 2 ConstConstructor ructor & & DestruDestructor Documctor Documentatentationion. . . . . . . 2255 5.

5.9.9.2.2.1 1 ____ininitit__ __ . . . . . . . 2255 5.9.

5.9.3 3 MembeMember r FunctFunction ion DocumDocumentatentationion . . . . . . . 2266 5.9

5.9.3..3.1 1 __g__getietitemtem__ __  . . . . . . . 2266 5.9

5.9.3..3.2 2 addaddConControtrollellerr. . . . . . . 2266 5.

5.9.9.3.3.3 3 adaddHdHosostt . . . . . . . 2266 5.

5.9.9.3.3.4 4 adaddLdLininkk . . . . . . . 2266 5.

5.9.9.3.3.5 5 adaddSdSwiwitctchh . . . . . . . 2266 5.

5.9.9.3.3.6 6 bubuilildd . . . . . . . 2277 5.9.

5.9.3.7 3.7 builbuildFdFromTromTopoopo . . . . . . . 2277 5.9

5.9.3..3.8 8 conconfigHfigHostostss . . . . . . . 2277 5.9

5.9.3..3.9 9 conconfigLfigLinkinkStaStatustus . . . . . . . 2277 5.9.

5.9.3.10 3.10 inteinteractract . . . . . . . 2277 5.9 5.9.3..3.11 11 ipeiperfrf . . . . . . . 2277 5.9. 5.9.3.12 3.12 monitmonitoror . . . . . . . 2288 5.9 5.9.3..3.13 13 pinpingg . . . . . . . 2288 5.9. 5.9.3.14 3.14 pingApingAllll . . . . . . . 2288 5.9.

5.9.3.15 3.15 pingApingAllFullFullll . . . . . . . 2288 5.9.

5.9.3.16 3.16 pingFpingFullull. . . . . . . 2288 5.9.

5.9.3.17 3.17 pingPpingPairair . . . . . . . 2299 5.9.

5.9.3.18 3.18 pingPpingPairFuairFullll . . . . . . . 2299 5.9

5.9.3..3.19 19 runrun . . . . . . . 2299 5.9.3.20

5.9.3.20 runCpuLimitTrunCpuLimitTestest . . . . . . . 2299 5.9

5.9.3..3.21 21 stastartrt . . . . . . . 2299 5.9.

5.9.3.22 3.22 startTstartTermserms . . . . . . . 2299

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

(6)

iivv CCOONNTTEENNTTSS

5.9.

5.9.3.23 3.23 statstaticArpicArp . . . . . . . 3300 5.9.

5.9.3.24 3.24 stopXstopXtermsterms . . . . . . . 3300 5.10

5.10 mininet.log.Mininmininet.log.MininetLogger Class etLogger Class ReferenceReference. . . . . . . 3300 5.10

5.10.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 3300 5.10

5.10.2 .2 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 3311 5.10

5.10.2.1 .2.1 outpoutputut . . . . . . . 3311 5.10

5.10.2.2 .2.2 setLosetLogLevgLevelel . . . . . . . 3311 5.11

5.11 mininet.net.Minimininet.net.MininetWithControlNet netWithControlNet Class ReferenceClass Reference . . . . . . . 3311 5.11

5.11.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 3322 5.11

5.11.2 .2 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 3322 5.11

5.11.2.1 .2.1 configconfigureCoureControlntrolNetwNetworkork . . . . . . . 3322 5.11.2.2

5.11.2.2 configureRoutedControlconfigureRoutedControlNetworkNetwork . . . . . . . 3322 5.12

5.12 mininet.node.mininet.node.Node Class Node Class ReferenceReference . . . . . . . 3322 5.12

5.12.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 3355 5.12.2

5.12.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 3355 5.12

5.12.2.1 .2.1 __ini__init__ t__ . . . . . . . 3355 5.12

5.12.3 .3 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 3355 5.12 5.12.3.1 .3.1 addIaddIntfntf . . . . . . . 3355 5.12 5.12.3.2 .3.2 cleancleanupup. . . . . . . 3366 5.1 5.12.32.3.3 .3 cmdcmd . . . . . . . 3366 5.12 5.12.3.4 .3.4 cmdPricmdPrintnt . . . . . . . 3366 5.1 5.12.32.3.5 .5 conconfigfig. . . . . . . 3366 5.12

5.12.3.6 .3.6 conneconnectioctionsTnsToo . . . . . . . 3366 5.12

5.12.3.7 .3.7 deletdeleteInteIntfsfs . . . . . . . 3366 5.12 5.12.3.8 .3.8 fdTfdToNodeoNode. . . . . . . 3377 5.1 5.12.32.3.9 .9 intintff . . . . . . . 3377 5.12.3.10 intfIsUp 5.12.3.10 intfIsUp . . . . . . . 3377 5.12.3.11 IP 5.12.3.11 IP . . . . . . . 3377 5.12.3.12 MAC 5.12.3.12 MAC . . . . . . . 3377 5.12.3.13 monitor 5.12.3.13 monitor . . . . . . . 3377 5.12.3.14 newPort 5.12.3.14 newPort . . . . . . . 3388 5.12.3.15 pexec 5.12.3.15 pexec . . . . . . . 3388 5.12.3.16 popen 5.12.3.16 popen . . . . . . . 3388 5.12.3.17 read 5.12.3.17 read . . . . . . . 3388 5.12.3.18 readline 5.12.3.18 readline . . . . . . . 3388 5.12.3.19 sendCmd 5.12.3.19 sendCmd . . . . . . . 3388 5.12.3.20 sendInt 5.12.3.20 sendInt . . . . . . . 3399

(7)

C COONNTTEENNTTSS vv 5.12.3.21 setARP 5.12.3.21 setARP . . . . . . . 3399 5.12.3.22 setDefaultRoute 5.12.3.22 setDefaultRoute . . . . . . . 3399 5.12.3.23 setHostRoute 5.12.3.23 setHostRoute . . . . . . . 3399 5.12.3.24 setIP 5.12.3.24 setIP . . . . . . . 3399 5.12.3.25 setMAC 5.12.3.25 setMAC . . . . . . . 3399 5.12.3.26 setParam 5.12.3.26 setParam . . . . . . . 4400 5.12.3.27 stop 5.12.3.27 stop . . . . . . . 4400 5.12.3.28 terminate 5.12.3.28 terminate . . . . . . . 4400 5.12.3.29 waitOutput 5.12.3.29 waitOutput . . . . . . . 4400 5.12.3.30 waitReadable 5.12.3.30 waitReadable . . . . . . . 4400 5.12.3.31 write 5.12.3.31 write . . . . . . . 4400 5.13

5.13 mininet.node.mininet.node.NOX Class NOX Class ReferenceReference . . . . . . . 4411 5.13

5.13.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 4411 5.13.2

5.13.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 4411 5.13

5.13.2.1 .2.1 __ini__init__ t__ . . . . . . . 4411 5.14

5.14 mininet.node.mininet.node.OVSController Class OVSController Class ReferenceReference . . . . . . . 4411 5.14

5.14.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 4422 5.15

5.15 mininet.node.mininet.node.OVSLegacyKernelSwitch OVSLegacyKernelSwitch Class RefClass Referenceerence . . . . . . . 4422 5.15

5.15.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 4433 5.15.2

5.15.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 4433 5.15

5.15.2.1 .2.1 __ini__init__ t__ . . . . . . . 4433 5.15

5.15.3 .3 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 4433 5.1 5.15.35.3.1 .1 setsetupup . . . . . . . 4433 5.1 5.15.35.3.2 .2 stastartrt . . . . . . . 4433 5.1 5.15.35.3.3 .3 stostopp . . . . . . . 4433 5.16

5.16 mininet.node.mininet.node.OVSSwitch Class OVSSwitch Class ReferenceReference . . . . . . . 4444 5.16

5.16.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 4455 5.16.2

5.16.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 4455 5.16

5.16.2.1 .2.1 __ini__init__ t__ . . . . . . . 4455 5.16

5.16.3 .3 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 4455 5.1

5.16.36.3.1 .1 stostopp . . . . . . . 4455 5.16

5.16.3.2 .3.2 TCReTCReapplyapply . . . . . . . 4455 5.17

5.17 mininet.node.mininet.node.RemoteController RemoteController Class RefereClass Referencence . . . . . . . 4455 5.17

5.17.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 4466 5.17.2

5.17.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 4466 5.17

5.17.2.1 .2.1 __ini__init__ t__ . . . . . . . 4466 5.17

5.17.3 .3 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 4466

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

(8)

v vii CCOONNTTEENNTTSS 5.1 5.17.37.3.1 .1 stastartrt . . . . . . . 4466 5.1 5.17.37.3.2 .2 stostopp . . . . . . . 4466 5.18

5.18 mininet.topomininet.topo.SingleSwitchRe.SingleSwitchReversedTversedTopo Class Referenceopo Class Reference . . . . . . . 4466 5.18

5.18.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 4477 5.18.2

5.18.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 4477 5.18

5.18.2.1 .2.1 __ini__init__ t__ . . . . . . . 4477 5.19

5.19 mininet.topomininet.topo.SingleSwitchT.SingleSwitchTopo Class Referenceopo Class Reference . . . . . . . 4477 5.19

5.19.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 4488 5.19.2

5.19.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 4488 5.19

5.19.2.1 .2.1 __ini__init__ t__ . . . . . . . 4488 5.20

5.20 mininet.log.Singlmininet.log.Singleton Class eton Class ReferenceReference . . . . . . . 4488 5.20

5.20.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 4499 5.21

5.21 mininet.log.StreamHmininet.log.StreamHandlerNoNewline andlerNoNewline Class RefeClass Referencerence . . . . . . . 4499 5.21

5.21.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 4499 5.21

5.21.2 .2 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 5500 5.2

5.21.21.2.1 .1 emiemitt . . . . . . . 5500 5.22

5.22 mininet.node.mininet.node.Switch Class Switch Class ReferenceReference. . . . . . . 5500 5.22

5.22.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 5511 5.22.2

5.22.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 5511 5.22

5.22.2.1 .2.1 __ini__init__ t__ . . . . . . . 5511 5.22

5.22.3 .3 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 5511 5.22

5.22.3.1 .3.1 sendCsendCmdmd . . . . . . . 5511 5.23

5.23 mininet.link.TCImininet.link.TCIntf Class ntf Class ReferenceReference . . . . . . . 5511 5.23

5.23.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 5522 5.23

5.23.2 .2 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 5522 5.2

5.23.23.2.1 .1 conconfigfig. . . . . . . 5522 5.24

5.24 mininet.link.TCLmininet.link.TCLink Class ink Class ReferenceReference . . . . . . . 5522 5.24

5.24.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 5533 5.25

5.25 mininet.topomininet.topo.T.Topo Class Referenceopo Class Reference . . . . . . . 5533 5.25

5.25.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 5544 5.25.2

5.25.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 5544 5.25

5.25.2.1 .2.1 __ini__init__ t__ . . . . . . . 5544 5.25

5.25.3 .3 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 5555 5.25 5.25.3.1 .3.1 addHoaddHostst . . . . . . . 5555 5.25 5.25.3.2 .3.2 addLiaddLinknk. . . . . . . 5555 5.25 5.25.3.3 .3.3 addNoaddNodede . . . . . . . 5555 5.25

(9)

C

COONNTTEENNTTSS vviiii

5.25

5.25.3.5 .3.5 addSwaddSwitchitch . . . . . . . 5566 5.2 5.25.35.3.6 .6 hoshoststs . . . . . . . 5566 5.25 5.25.3.7 .3.7 isSwiisSwitchtch . . . . . . . 5566 5.2 5.25.35.3.8 .8 linlinksks . . . . . . . 5566 5.2 5.25.35.3.9 .9 portport. . . . . . . 5577 5.25.3.10 sorted 5.25.3.10 sorted . . . . . . . 5577 5.25.3.11 switches 5.25.3.11 switches . . . . . . . 5577 5.26

5.26 mininet.topolibmininet.topolib.T.TreeTreeTopo Class opo Class ReferenceReference . . . . . . . 5577 5.26

5.26.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 5588 5.26

5.26.2 .2 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 5588 5.26

5.26.2.1 .2.1 addTaddTreeree . . . . . . . 5588 5.27

5.27 mininet.node.mininet.node.UserSwitch Class UserSwitch Class ReferenceReference . . . . . . . 5588 5.27

5.27.1 .1 DetaDetailed iled DescripDescriptiontion . . . . . . . 5599 5.27.2

5.27.2 Constructor Constructor & & Destructor Destructor DocumentationDocumentation. . . . . . . 5599 5.27

5.27.2.1 .2.1 __ini__init__ t__ . . . . . . . 5599 5.27

5.27.3 .3 MembeMember Functir Function Documeon Documentatntationion . . . . . . . 5599 5.2 5.27.37.3.1 .1 setsetupup . . . . . . . 5599 5.2 5.27.37.3.2 .2 stastartrt . . . . . . . 5599 5.2 5.27.37.3.3 .3 stostopp . . . . . . . 6600

Index

Index

60

60

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

(10)
(11)

Chapter 1

Chapter 1

Namespace Index

Namespace Index

1.

1.

1

1

Nam

Nam

esp

esp

ace

ace

Li

Li

st

st

Here is a list of all documented namespaces with brief descriptions: Here is a list of all documented namespaces with brief descriptions:

topo topo

N

(12)

2

(13)

Chapter 2

Chapter 2

Hierarchical Index

Hierarchical Index

2.

2.

1

1

Cl

Cl

ass

ass

Hi

Hi

era

era

rc

rc

hy

hy

This inheritance list is sorted roughly, but not completely, alphabetically: This inheritance list is sorted roughly, but not completely, alphabetically:

object object m

miinniinneett..lliinnkk..IInnttf f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 1818 m i n i n e t . l i n k . T C I n t f . . . .

m i n i n e t . l i n k . T C I n t f . . . . 5151 m i n i n e t . l i n k . L i n k . . . . m i n i n e t . l i n k . L i n k . . . . 2121

m

miinniinneett..lliinnkk..TTCCLLiinnk k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 5252 m i n i n e t . l o g . M i n i n e t L o g g e r . . . .

m i n i n e t . l o g . M i n i n e t L o g g e r . . . . 3030 m

miinniinneett..nneett..MMiinniinneet t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 2323 m

miinniinneett..nneett..MMiinniinneettWWiitthhCCoonnttrroollNNeet t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3131 m

miinniinneett..nnooddee..NNoodde e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 3232 m

miinniinneett..nnooddee..CCoonnttrroolllleer r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 1313 m i n i n e t . n o d e . N O X . . . . m i n i n e t . n o d e . N O X . . . . 4141 m

miinniinneett..nnooddee..OOVVSSCCoonnttrroolllleer r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4141 mininet.node.RemoteController . . . . . . . mininet.node.RemoteController . . . . . . . 4545 m i n i n e t . n o d e . H o s t . . . . m i n i n e t . n o d e . H o s t . . . . 1717

m

miinniinneett..nnooddee..CCPPUULLiimmiitteeddHHoosst t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 1515 m i n i n e t . n o d e . S w i t c h . . . . m i n i n e t . n o d e . S w i t c h . . . . 5050

mi

minininnetet.n.noodede..OVOVSLSLegegacacyKyKerernnelelSwSwititch ch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4242 m

miinniinneett..nnooddee..OOVVSSSSwwiittcch h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4444 m

miinniinneett..nnooddee..UUsseerrSSwwiittcch h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5858 m

miinniinneett..ttooppoo..GGrraapph h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 1717 m

miinniinneett..ttooppoo..TTooppo o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5353 m

miinniinneett..ttooppoo..LLiinneeaarrTTooppo . o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 2020 mi

minininenett..totoppoo.S.SiingngleleSwSwititchchReRevverersesedTdTopopo o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4646 m

miinniinneett..ttooppoo..SSiinngglleeSSwwiittcchhTTooppo o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4747 m

miinniinneett..ttooppoolliibb..TTrreeeeTTooppo o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5757 StreamHandler

StreamHandler m

miinniinneett..lloogg..StStrreeaammHHaannddlleerrNNooNNeewwlliinne e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4949 type

type m

miinniinneett..lloogg..SSiinngglleettoon n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4848 Cmd

Cmd m

miinniinneett..ccllii..CCLLI I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 99 Logger

Logger

m i n i n e t . l o g . M i n i n e t L o g g e r . . . .

(14)

4

(15)

Chapter 3

Chapter 3

Class Index

Class Index

3.

3.

1

1

Cl

Cl

as

as

s

s

Li

Li

st

st

Here are the classes, structs, unions and interfaces with brief descriptions: Here are the classes, structs, unions and interfaces with brief descriptions:

mininet.cli.CLI mininet.cli.CLI

Si

Simpmplle e cocommmmanand-d-llinine e iintntererffaace ce to to ttalalk k to to nnododes es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 99 mininet.node.Controller

mininet.node.Controller A

A ControllerControlleris ais a NodeNodeththat at is is runrunnining ng (o(or r hahas s exexececeded?) a?) an On OpepenFnFlolow w cocontntrorollller er . . . . . . . . . . . . . . . . . . . . .. 1313 mininet.node.CPULimitedHost mininet.node.CPULimitedHost C CPPU U lliimmiitteed d hhoosst t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 1515 mininet.topo.Graph mininet.topo.Graph Ut

Utililitity y clclasass s to to trtracack k nonodedes s anand d ededgeges s - - rereplplacaces es nenetwtwororkxkx.G.Graraph ph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 1717 mininet.node.Host

mininet.node.Host

A host is simply a

A host is simply a NodeNode . . . .. . . . 1717 mininet.link.Intf

mininet.link.Intf Ba

Basisic c ininteterfrfacace e obobjeject ct tthahat t cacan n coconfinfiggurure e ititseself lf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 1818 mininet.topo.LinearTopo

mininet.topo.LinearTopo Li

Linneaear r totopopollogogy y of of k k sswiwittchchees, s, wiwitth h n n hohoststs s pper er sswiwittch ch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 2020 mininet.link.Link

mininet.link.Link A

A bbaassiic c lliinnk k iis s jjuusst t a a vveetth h ppaaiir r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 2121 mininet.net.Mininet

mininet.net.Mininet Ne

Netwtworork k ememululatatioion n wiwith th hohoststs s spspawawnened d in in nenetwtworork k nanamemespspacaces es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 2323 mininet.log.MininetLogger

mininet.log.MininetLogger Mi

Minininenet-t-spspececifiific c lologggger er EnEnabable le eaeach ch miminininenet t .p.py y filfile e to to wiwith th onone e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3030 mininet.net.MininetWithControlNet

mininet.net.MininetWithControlNet C

Coonnttrrool l nneettwwoorrk k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3131 mininet.node.Node

mininet.node.Node A

A vivirtrtuaual l nenetwtworork k nonode de is is sisimpmply ly a a shshelell l in in a a nenetwtworork k nanamemespspacace e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3232 mininet.node.NOX

mininet.node.NOX Controller

Controllerto run ato run a NOXNOXaapppplliiccaattiioon n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4141 mininet.node.OVSController

mininet.node.OVSController O

Oppeen n vvSSwwiittcch h ccoonnttrroolllleer r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 4141 mininet.node.OVSLegacyKernelSwitch

mininet.node.OVSLegacyKernelSwitch Op

Open en VSVSwiwitctch h lelegagacy cy kekernernel-l-spspacace e swswititch ch ususining g ovovs-s-opopenenfloflowd wd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4242 mininet.node.OVSSwitch mininet.node.OVSSwitch O Oppeen n vvSSwwiittcch h sswwiittcch h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 4444 mininet.node.RemoteController mininet.node.RemoteController Controller

(16)

6

6 CCllaassssIInnddeexx

mininet.topo.SingleSwitchReversedTopo mininet.topo.SingleSwitchReversedTopo

Si

Singngle le sswiwitctch h coconnnnececteted d to to k k hohoststs, s, wiwith th rereveversrsed ed poportrts s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4646 mininet.topo.SingleSwitchTopo

mininet.topo.SingleSwitchTopo S

Siinngglle e sswwiittcch h ccoonnnneecctteed d tto o k k hhoosstts s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4747 mininet.log.Singleton

mininet.log.Singleton Singleton

Singletonppaatttteer n r n ffrroom m WWiikkiippeeddiia a SSeee e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4848 mininet.log.StreamHandlerNoNewline

mininet.log.StreamHandlerNoNewline St

StrereamamHaHandndleler r ththat at dodoesesn’n’t t prprinint t nenewlwlinines es bby y dedeffauault lt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4949 mininet.node.Switch

mininet.node.Switch A

A SwitchSwitchis ais a NodeNodeththat at is is rurunnnnining g (o(or r hahas s exexececeded?) a?) an n OpOpenenFlFlow ow swswititch ch . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5050 mininet.link.TCIntf

mininet.link.TCIntf Int

Interferfaceace cuscustomtomizizeded byby tctc (tr(traffiafficc concontrotrol)l) utiutilitlityy AllAllowowss spespecificificatcationion ofof banbandwidwidthdth limlimitsits (v(varioariousus metmeth- h-od

ods) s) as as wwelell l aas s dedelalayy, , loloss ss aand nd mamax x qqueueuue e llenenggth th . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5151 mininet.link.TCLink

mininet.link.TCLink Link

Linkwwitith h sysymmmmeetrtriic c TTC C ininttererffacaces es coconfinfiggurured ed vivia a opopts ts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5252 mininet.topo.Topo

mininet.topo.Topo Da

Data ta cecentnter er nenetwtwork ork rereprpresesenentatatition on ffor or ststruructcturured ed mumultlti-i-trtreeees s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5353 mininet.topolib.TreeTopo

mininet.topolib.TreeTopo T

Topopolologogy y ffor or a a trtree ee nenetwtworork k wiwith th a a gigivven en dedeptpth h anand d ffananouout t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5757 mininet.node.UserSwitch

mininet.node.UserSwitch U

(17)

Chapter 4

Chapter 4

Namespace Documentation

Namespace Documentation

4.1

4.1

top

top

o

o

Name

Name

spac

spac

e

e

Ref

Ref

eren

eren

ce

ce

Network topology creation. Network topology creation.

4.1.1

4.1.1

Detail

Detail

ed

ed

Descri

Descri

ption

ption

Network topology creation. Network topology creation. Author

Author

Brandon Heller

Brandon Heller (([email protected]@stanford.edu))

This package includes code to represent network topologies. This package includes code to represent network topologies.

A Topo object can be a topology database for NOX, can represent a physical setup for testing, and can even be emulated A Topo object can be a topology database for NOX, can represent a physical setup for testing, and can even be emulated with the Mininet package.

(18)

8

(19)

Chapter 5

Chapter 5

Class Documentation

Class Documentation

5.1

5.1

minin

minin

et.cl

et.cl

i.CLI

i.CLI

Class

Class

Referen

Referen

ce

ce

Simple command-line interface to talk to nodes. Simple command-line interface to talk to nodes. Inheritance diagram for mininet.cli.CLI:

Inheritance diagram for mininet.cli.CLI:

mininet.cli.CLI mininet.cli.CLI

Cmd Cmd

Public Member Functions

Public Member Functions

• dedeff __init__ __init__  •

• dedeff emptylineemptyline

Don’t repeat last command when you hit return. Don’t repeat last command when you hit return.

• dedeff do_helpdo_help

Describe available 

Describe available CLI CLI commands.commands.

• dedeff do_nodesdo_nodes

List all nodes. List all nodes.

• dedeff do_netdo_net

List network connections. List network connections.

• dedeff do_shdo_sh

Run an external shell command. Run an external shell command.

• dedeff do_pydo_py

Evaluate a Python expression. Evaluate a Python expression.

• dedeff do_pxdo_px

Execute a Python statement. Execute a Python statement.

• dedeff do_pingalldo_pingall

Ping between all hosts. Ping between all hosts.

• dedeff do_pingpairdo_pingpair

Ping between first two hosts, useful for testing. Ping between first two hosts, useful for testing.

(20)

1

100 CCllaassssDDooccuummeennttaattiioonn

• dedeff do_pingallfulldo_pingallfull

Ping between first two hosts, returns all ping results. Ping between first two hosts, returns all ping results.

• dedeff do_pingpairfulldo_pingpairfull

Ping between first two hosts, returns all ping results. Ping between first two hosts, returns all ping results.

• dedeff do_iperfdo_iperf

Simple iperf TCP test between two (optionally specified) hosts. Simple iperf TCP test between two (optionally specified) hosts.

• dedeff do_iperfudpdo_iperfudp

Simple iperf TCP test between two (optionally specified) hosts. Simple iperf TCP test between two (optionally specified) hosts.

• dedeff do_intfsdo_intfs

List interfaces. List interfaces.

• dedeff do_dumpdo_dump

Dump node info. Dump node info.

• dedeff do_linkdo_link

Bring link(s) between two nodes up or down. Bring link(s) between two nodes up or down.

• dedeff do_xtermdo_xterm

Spawn xterm(s) for the given node(s). Spawn xterm(s) for the given node(s).

• dedeff do_xdo_x

Create an X11 tunnel to the given node, optionally starting a client. Create an X11 tunnel to the given node, optionally starting a client.

• dedeff do_gtermdo_gterm

Spawn gnome-terminal(s) for the given node(s). Spawn gnome-terminal(s) for the given node(s).

• dedeff do_exitdo_exit

Exit. Exit.

• dedeff do_quitdo_quit

Exit. Exit.

• dedeff do_EOFdo_EOF

Exit. Exit.

• dedeff isattyisatty

Is our standard input a tty?  Is our standard input a tty? 

• dedeff do_noechodo_noecho

Run an interactive command with echoing turned off. Run an interactive command with echoing turned off.

• dedeff do_sourcedo_source

Read commands from an input file. Read commands from an input file.

• dedeff do_dpctldo_dpctl

Run dpctl (or ovs-ofctl) command on all switches. Run dpctl (or ovs-ofctl) command on all switches.

• dedeff do_timedo_time

Measure time taken for any command in Mininet. Measure time taken for any command in Mininet.

• dedeff defaultdefault

Called on an input line when the command prefix is not recognized. Called on an input line when the command prefix is not recognized.

• dedeff waitForNodewaitForNode

Wait for a node to finish, and print its output. Wait for a node to finish, and print its output.

Public Attributes

Public Attributes

•• mnmn •• nodelistnodelist •• nodemapnodemap •• localslocals •• stdinstdin •• inPollerinPoller •• inputFileinputFile

(21)

5

5..1 1 mmiinniinneett..ccllii..CCLLI I CCllaasss s RReeffeerreenncce e 1111

Static Public Attributes

Static Public Attributes

• stristringng promptprompt = ’mininet= ’mininet>>’’

• tuptuplele helpStrhelpStr

5.1.1

5.1.1

Detail

Detail

ed

ed

Descri

Descri

ption

ption

Simple command-line interface to talk to nodes. Simple command-line interface to talk to nodes.

5.1.2

5.1.2

Member

Member

Funct

Funct

ion

ion

Docum

Docum

entat

entat

ion

ion

5.1.2.1

5.1.2.1 def def mininet.cli.Cmininet.cli.CLI.default LI.default (( seself, lf, linline e ))

Called on an input line when the command prefix is not recognized. Called on an input line when the command prefix is not recognized. Overridden to run shell commands when a node is the first

Overridden to run shell commands when a node is the first CLICLIargument. Past the firstargument. Past the first CLICLIargument, node names areargument, node names are automatically replaced with corresponding IP addrs.

automatically replaced with corresponding IP addrs.

5.1.

5.1.2.2 2.2 def def minimininet.cnet.cli.CLli.CLI.do dpctl I.do dpctl (( seself, lf, linline e ))

Run dpctl (or ovs-ofctl) command on all switches. Run dpctl (or ovs-ofctl) command on all switches.

5.1.

5.1.2.3 2.3 def def minimininet.cnet.cli.CLli.CLI.do dump I.do dump (( seselflf, , liline ne ))

Dump node info. Dump node info.

5.1.

5.1.2.4 2.4 def def minimininet.cnet.cli.CLli.CLI.do gterm I.do gterm (( seself, lf, linline e ))

Spawn gnome-terminal(s) for the given node(s). Spawn gnome-terminal(s) for the given node(s).

5.1.

5.1.2.5 2.5 def def minimininet.cnet.cli.CLli.CLI.do help I.do help (( seself, lf, linline e ))

Describe

Describe availabavailablele CLICLIcommands.commands.

5.1.

5.1.2.6 2.6 def def minimininet.cnet.cli.CLli.CLI.do intfs I.do intfs (( seselflf, , liline ne ))

List

List interfacesinterfaces..

5.1.

5.1.2.7 2.7 def def minimininet.cnet.cli.CLli.CLI.do iperf I.do iperf (( seself, lf, linline e ))

Simple iperf TCP test between two (optionally specified) hosts. Simple iperf TCP test between two (optionally specified) hosts.

5.1.2.8

5.1.2.8 def def mininet.cli.Cmininet.cli.CLI.do iperfuLI.do iperfudp dp (( selself, f, linline e ))

Simple iperf TCP test between two (optionally specified) hosts. Simple iperf TCP test between two (optionally specified) hosts.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

(22)

1

122 CCllaassssDDooccuummeennttaattiioonn

5.1.

5.1.2.9 2.9 def def minimininet.cnet.cli.CLli.CLI.do link I.do link (( seself, lf, linline e ))

Bring link(s) between two nodes up or down. Bring link(s) between two nodes up or down.

5.1.

5.1.2.10 2.10 def def minimininet.cnet.cli.CLli.CLI.do net I.do net (( seselflf, , liline ne ))

List network connections. List network connections.

5.1.2.11

5.1.2.11 def def mininet.cli.Cmininet.cli.CLI.do nodLI.do nodes es (( seselflf, , liline ne ))

List all nodes. List all nodes.

5.1.2.12

5.1.2.12 def def mininet.cli.Cmininet.cli.CLI.do noeLI.do noecho cho (( seself, lf, linline e ))

Run an interactive command with echoing turned off. Run an interactive command with echoing turned off.

5.1.2.13

5.1.2.13 def def mininet.cli.Cmininet.cli.CLI.do pingLI.do pingall all (( seselflf, , liline ne ))

Ping between all hosts. Ping between all hosts.

5.1.2.14

5.1.2.14 def def mininet.cli.Cmininet.cli.CLI.do pingLI.do pingallfull allfull (( seselflf, , liline ne ))

Ping between first two hosts, returns all ping results. Ping between first two hosts, returns all ping results.

5.1.2.15

5.1.2.15 def def mininet.cli.Cmininet.cli.CLI.do pingLI.do pingpair pair (( seselflf, , liline ne ))

Ping between first two hosts, useful for testing. Ping between first two hosts, useful for testing.

5.1.2.16

5.1.2.16 def def mininet.cli.Cmininet.cli.CLI.do pingLI.do pingpairfull pairfull (( seselflf, , linline e ))

Ping between first two hosts, returns all ping results. Ping between first two hosts, returns all ping results.

5.1.

5.1.2.17 2.17 def def minimininet.cnet.cli.CLli.CLI.do px I.do px (( seself, lf, linline e ))

Execute a Python statement. Execute a Python statement.

Node names may be used, e.g.: px print h1.cmd(’ls’) Node names may be used, e.g.: px print h1.cmd(’ls’)

5.1.

5.1.2.18 2.18 def def minimininet.cnet.cli.CLli.CLI.do py I.do py (( seself, lf, linline e ))

Evaluate a Python expression. Evaluate a Python expression.

Node names may be used, e.g.: py h1.cmd(’ls’) Node names may be used, e.g.: py h1.cmd(’ls’)

5.1.2.19

5.1.2.19 def def mininet.cli.Cmininet.cli.CLI.do souLI.do source rce (( selself, f, linline e ))

Read commands from an input file. Read commands from an input file.

(23)

5

5..2 2 mmiinniinneett..nnooddee..CCoonnttrroolllleer r CCllaasss s RReeffeerreenncce e 1133

5.1.

5.1.2.20 2.20 def def minimininet.cnet.cli.CLli.CLI.do time I.do time (( seself, lf, linline e ))

Measure time taken for any command in Mininet. Measure time taken for any command in Mininet.

5.1.

5.1.2.21 2.21 def def minimininet.cnet.cli.CLli.CLI.do x (I.do x ( seself, lf, linline e ))

Create an X11 tunnel to the given node, optionally starting a client. Create an X11 tunnel to the given node, optionally starting a client.

5.1.

5.1.2.22 2.22 def def minimininet.cnet.cli.CLli.CLI.do xterm I.do xterm (( seself, lf, linline, e, terterm m = = ’xterm’’xterm’ ))

Spawn xterm(s) for the given node(s). Spawn xterm(s) for the given node(s).

5.1.2.23

5.1.2.23 def def mininet.cli.Cmininet.cli.CLI.emptyline LI.emptyline (( self self ))

Don’t repeat last command when you hit return. Don’t repeat last command when you hit return.

5.1.2.24

5.1.2.24 def def mininet.cli.Cmininet.cli.CLI.waitForNoLI.waitForNode de (( selfself, , nodnode e ))

Wait for a node to finish, and print its output. Wait for a node to finish, and print its output.

5.1.3

5.1.3

Member

Member

Data

Data

Docum

Docum

entati

entati

on

on

5.1.3.1

5.1.3.1 tuple tuple mininet.cli.Cmininet.cli.CLI.helpStrLI.helpStr [static][static]

Initial value: Initial value: 1 1 = = (( 2 2 ’Y’You ou mamay y alalso so sesend nd a a cocommmmanand d to to a a nonode de ususining:g:\\n’n’ 3

3 ’ ’ <no<node> code> commammand {arnd {args}gs}\\n’n’ 4

4 ’For ’For exampexample:le:\\n’n’ 5

5 ’ ’ minminineinet> h1 it> h1 ifcofconfinfigg\\n’n’ 6

6 ’’\\n’n’ 7

7 ’The ’The interinterpreter automaticapreter automatically lly substsubstituteitutes s IP IP addresaddressesses\\n’n’ 8 8 ’f’for or nonode de nanamemes s whwhen en a a nonode de is is ththe e fifirsrst t ararg, g, so so cocommmmanandsds\\n’n’ 9 9 ’like’like\\n’n’ 10 10 ’ ’ miminininenet> h2 pint> h2 ping g h3h3\\n’n’ 11

11 ’shou’should ld work.work.\\n’n’ 12

12 ’’\\n’n’ 13

13 ’Some ’Some characharacter-cter-orienoriented ted interinteractivactive e commacommands nds requirrequiree\\n’n’ 14

14 ’noecho:’noecho:\\n’n’ 15

15 ’ ’ miminininenet> noet> noechcho o h2 vi h2 vi fofoo.o.pypy\\n’n’ 16

16 ’Howe’However, starting up ver, starting up an an xtermxterm/gter/gterm m is is genergenerally better:ally better:\\n’n’ 17

17 ’ ’ miminininenet> xtt> xtererm h2m h2\\nn\\n’n’ 18

18 ))

The documentation for this class was generated from the following file: The documentation for this class was generated from the following file:

• mininmininet/clet/cli.pi.pyy

5.2

5.2

minin

minin

et.nod

et.nod

e.Contr

e.Contr

oller

oller

Class

Class

Referen

Referen

ce

ce

A

A ControllerControlleris ais a NodeNodethat is running (or has execed?) an OpenFlow controller.that is running (or has execed?) an OpenFlow controller. Inheritance diagram for mininet.node.Controller:

Inheritance diagram for mininet.node.Controller:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

(24)

1

144 CCllaassssDDooccuummeennttaattiioonn

mininet.node.Controller mininet.node.Controller mininet.node.Node mininet.node.Node object object mi

minininenet.t.nonodede.NO.NOX X minimininenet.nt.nodode.e.OVOVSCSConontrtrololleler r miminininenet.nt.nodode.e.ReRemomoteteCoContntrorollllerer

Public Member Functions

Public Member Functions

• dedeff __init__ __init__  •

• dedeff checkListeningcheckListening

Make sure no controller

Make sure no controllers are s are running on our port.running on our port.

• dedeff startstart

Start 

Start <<controller controller >> <<args args >>on controller.on controller.

• dedeff stopstop

Stop controller. Stop controller.

• • dedeff IPIP

Return IP address of the 

Return IP address of the Controller Controller ..

• dedeff __repr__ __repr__ 

More informative string representation. More informative string representation.

Public Attributes

Public Attributes

•• commandcommand •• cargscargs •• cdircdir •• ipip •• portport •• execedexeced

Additional Inherited Members

Additional Inherited Members

5.2.1

5.2.1

Detail

Detail

ed

ed

Descri

Descri

ption

ption

A

A ControllerControlleris ais a NodeNodethat is running (or has execed?) an OpenFlow controller.that is running (or has execed?) an OpenFlow controller.

5.2.2

5.2.2

Member

Member

Funct

Funct

ion

ion

Docum

Docum

entat

entat

ion

ion

5.2.2.1

5.2.2.1 def def mininet.nodmininet.node.Controllere.Controller.start .start (( self self ))

Start

Start<<controllercontroller>> <<argsargs>>on controller.on controller. Log to /tmp/cN.log

(25)

5

5..3 3 mmiinniinneett..nnooddee..CCPPUULLiimmiitteeddHHoosst t CCllaasss s RReeffeerreenncce e 1155

5.2.2.2

5.2.2.2 def def mininet.nodmininet.node.Controllere.Controller.stop .stop (( self self ))

Stop

Stop controllercontroller..

The documentation for this class was generated from the following file: The documentation for this class was generated from the following file:

• mininet/node.pmininet/node.pyy

5.3

5.3

minin

minin

et.nod

et.nod

e.CPULi

e.CPULi

mitedHo

mitedHo

st

st

Class

Class

Referen

Referen

ce

ce

CPU limited host. CPU limited host. Inheritance diagram

Inheritance diagram for mininet.node.CPULimitedHostfor mininet.node.CPULimitedHost::

mininet.node.CPULimitedHost mininet.node.CPULimitedHost mininet.node.Host mininet.node.Host mininet.node.Node mininet.node.Node object object

Public Member Functions

Public Member Functions

• dedeff __init__ __init__  •

• dedeff cgroupSetcgroupSet

Set a cgroup parameter and return its value. Set a cgroup parameter and return its value.

• dedeff cgroupGetcgroupGet

Return value of cgroup parameter. Return value of cgroup parameter.

• dedeff cgroupDelcgroupDel

Clean up our cgroup. Clean up our cgroup.

• dedeff popenpopen

Return a Popen() object in node’s namespace. Return a Popen() object in node’s namespace.

• dedeff cleanupcleanup

Clean up 

Clean up Node Node ,, then clean up our cgroup.then clean up our cgroup.

• dedeff chrtchrt

Set RT scheduling priority. Set RT scheduling priority.

• dedeff rtInfortInfo

Internal method: return parameters for RT bandwidth. Internal method: return parameters for RT bandwidth.

• dedeff cfsInfocfsInfo

Internal method: return parameters for CFS bandwidth. Internal method: return parameters for CFS bandwidth.

• dedeff setCPUFracsetCPUFrac

Set overall CPU fraction for this host. Set overall CPU fraction for this host.

• dedeff setCPUssetCPUs

Specify (real) cores that our cgroup can run on. Specify (real) cores that our cgroup can run on.

• dedeff configconfig •

• dedeff initinit

Initialization for 

Initialization for CPULimitedHost CPULimitedHost class.class.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

(26)

1

166 CCllaassssDDooccuummeennttaattiioonn

Public Attributes

Public Attributes

•• cgroupcgroup •• period_usperiod_us •• schedsched •• rtpriortprio

Static Public Attributes

Static Public Attributes

•• initedinited = False= False

5.3.1

5.3.1

Detail

Detail

ed

ed

Descri

Descri

ption

ption

CPU limited host. CPU limited host.

5.3.2

5.3.2

Member

Member

Funct

Funct

ion

ion

Docum

Docum

entat

entat

ion

ion

5.3.2.1

5.3.2.1 def def mininet.nodmininet.node.CPULimitede.CPULimitedHost.confiHost.config g (( selself, f, cpu cpu = = NoneNone, , cocores res = = NoneNone, , paparamrams s ))

Parameters

Parameters

cpu 

cpu  desired overall system CPU fractiondesired overall system CPU fraction cores 

cores  (real) core(s) this host can run on(real) core(s) this host can run on params 

params  parameters forparameters for Node.config()Node.config()

5.3.2.2

5.3.2.2 def def mininet.nodmininet.node.CPULimitede.CPULimitedHost.popeHost.popen n (( selself, f, argargs, s, kwkwargargs s ))

Return a Popen() object in node’s namespace. Return a Popen() object in node’s namespace. Parameters

Parameters

args 

args  Popen() args, single list, or stringPopen() args, single list, or string kwargs 

kwargs  Popen() keyword argsPopen() keyword args

5.3.2.3

5.3.2.3 def def mininet.nodmininet.node.CPULimitede.CPULimitedHost.setCPHost.setCPUFrac UFrac (( seselflf, , f f = = -1-1, , scschehed d = = NoneNone ))

Set overall CPU fraction for this host. Set overall CPU fraction for this host. Parameters

Parameters

f f  CPU bandwidth limit (fraction)CPU bandwidth limit (fraction) sched 

sched  ’rt’ or ’cfs’ Note ’cfs’ requires CONFIG_CFS_BANDWIDTH’rt’ or ’cfs’ Note ’cfs’ requires CONFIG_CFS_BANDWIDTH

The documentation for this class was generated from the following file: The documentation for this class was generated from the following file:

(27)

5

5..4 4 mmiinniinneett..ttooppoo..GGrraapph h CCllaasss s RReeffeerreenncce e 1177

5.4

5.4

minin

minin

et.top

et.top

o.Grap

o.Grap

h

h

Class

Class

Referen

Referen

ce

ce

Utility class to track nodes and edges - replaces networkx.Graph. Utility class to track nodes and edges - replaces networkx.Graph. Inheritance diagram

Inheritance diagram for mininet.topo.Grafor mininet.topo.Graph:ph:

mininet.topo.Graph

mininet.topo.Graph

object

object

Public Member Functions

Public Member Functions

• dedeff __init__ __init__  •

• dedeff add_nodeadd_node

Add node to graph. Add node to graph.

• dedeff add_edgeadd_edge

Add edge to graph. Add edge to graph.

• dedeff nodesnodes

Return list of graph nodes. Return list of graph nodes.

• dedeff edgesedges

Iterator: return graph edges. Iterator: return graph edges.

• dedeff __getitem__ __getitem__ 

Return link dict for the given node. Return link dict for the given node.

Public Attributes

Public Attributes

•• datadata

5.4.1

5.4.1

Detail

Detail

ed

ed

Descri

Descri

ption

ption

Utility class to track nodes and edges - replaces networkx.Graph. Utility class to track nodes and edges - replaces networkx.Graph. The documentation for this class was generated from the following file: The documentation for this class was generated from the following file:

• mininet/topomininet/topo.py.py

5.5

5.5

minin

minin

et.nod

et.nod

e.Host

e.Host

Class

Class

Referen

Referen

ce

ce

A host is simply a A host is simply a NodeNode..

Inheritance diagram for mininet.node.Host: Inheritance diagram for mininet.node.Host:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

(28)

1

188 CCllaassssDDooccuummeennttaattiioonn

m mininet.node.Hostininet.node.Host mininet.node.Node mininet.node.Node object object mininet.node.CPULimitedHost mininet.node.CPULimitedHost

Additional Inherited Members

Additional Inherited Members

5.5.1

5.5.1

Detail

Detail

ed

ed

Descri

Descri

ption

ption

A host is simply a A host is simply a NodeNode..

The documentation for this class was generated from the following file: The documentation for this class was generated from the following file:

• mininet/node.pmininet/node.pyy

5.6

5.6

minin

minin

et.lin

et.lin

k.Int

k.Int

f

f

Class

Class

Referen

Referen

ce

ce

Basic interface object that can configure itself. Basic interface object that can configure itself. Inheritance diagram for mininet.link.Intf: Inheritance diagram for mininet.link.Intf:

mininet.link.Intf  mininet.link.Intf  object object mininet.link.TCIntf  mininet.link.TCIntf 

Public Member Functions

Public Member Functions

• dedeff __init__ __init__  •

• dedeff cmdcmd

Run a

Run a commacommand in nd in our owning node.our owning node.

• dedeff ifconfigifconfig

Configure ourselves using ifconfig. Configure ourselves using ifconfig.

• dedeff setIPsetIP

Set our IP address. Set our IP address.

• dedeff setMACsetMAC

Set the MAC address for an interface. Set the MAC address for an interface.

• dedeff updateIPupdateIP

Return updated IP address based on ifconfig. Return updated IP address based on ifconfig.

(29)

5

5..6 6 mmiinniinneett..lliinnkk..IInnttf f CCllaasss s RReeffeerreenncce e 1199

• dedeff updateMACupdateMAC

Return updated MAC address based on ifconfig. Return updated MAC address based on ifconfig.

• • dedeff IPIP

Return IP address. Return IP address.

• dedeff MACMAC

Return MAC address. Return MAC address.

• dedeff isUpisUp

Return whether interface is up. Return whether interface is up.

• dedeff renamerename

Rename interface. Rename interface.

• dedeff setParamsetParam

Internal. Internal.

• dedeff configconfig

Configure Node according to (optional) Configure Node according to (optional)

• dedeff deletedelete

Delete interface. Delete interface.

• dedeff __repr__ __repr__  • • dedeff __str__ __str__ 

Public Attributes

Public Attributes

•• nodenode •• namename •• linklink •• prefixLenprefixLen •• paramsparams •• macmac •• ipip

5.6.1

5.6.1

Detail

Detail

ed

ed

Descri

Descri

ption

ption

Basic interface object that can configure itself. Basic interface object that can configure itself.

5.6.2

5.6.2

Const

Const

ructo

ructo

r &

r &

Destru

Destru

ctor

ctor

Docum

Docum

entat

entat

ion

ion

5.6

5.6.2..2.1 1 dedef f minminineinet.lit.linknk.In.Intf. tf. iniinit t (( seself, lf, naname, me, nonode de = = NoneNone, , poport rt = = NoneNone, , lilink nk = = NoneNone, , paparamrams s ))

Parameters

Parameters

name 

name  interface name (e.g. h1-eth0)interface name (e.g. h1-eth0) node 

node  owning node (where this intf most likely lives)owning node (where this intf most likely lives) link 

link  parent link if we’re part of a link other arguments are passed toparent link if we’re part of a link other arguments are passed to config()config()

5.6.3

5.6.3

Member

Member

Funct

Funct

ion

ion

Docum

Docum

entat

entat

ion

ion

5.6.3.1

5.6.3.1 def def mininet.link.Inmininet.link.Intf.config tf.config (( seself, lf, mamac c = = NoneNone, , iip p = = NoneNone, , ifcifcononfig fig = = NoneNone, , uup p = = TrueTrue, , papararams ms ))

Configure Node according to (optional) Configure Node according to (optional)

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

(30)

2

200 CCllaassssDDooccuummeennttaattiioonn

Parameters

Parameters

parameters  parameters  mac 

mac  MAC addressMAC address ip 

ip  IP addressIP address ifconfig 

ifconfig  arbarbitritraryary intinterferfaceace conconfigufiguratrationion SubSubclaclassessess shoshoulduld ovoverrierridede thithiss metmethodhod andand calcalll thethe parparentent claclass’ss’ss config(

config(

∗∗

∗∗

params)params)

5.6.3.2

5.6.3.2 def def mininet.link.Inmininet.link.Intf.setMAC tf.setMAC (( selfself, , macmacstr str ))

Set the MAC address for an interface. Set the MAC address for an interface. Parameters

Parameters

macstr 

macstr  MAC address as stringMAC address as string

5.6.3.3

5.6.3.3 def def mininet.link.Inmininet.link.Intf.setParatf.setParam m (( seself, lf, resresultults, s, metmethohod, d, parparam am ))

Internal. Internal. Parameters

Parameters

method 

method  configure aconfigure a single single parameterparameter results 

results  dict of results to updatedict of results to update method 

method  config method nameconfig method name param 

param  arg=value (ignore if value=None) value may also be list or dictarg=value (ignore if value=None) value may also be list or dict

The documentation for this class was generated from the following file: The documentation for this class was generated from the following file:

• mininet/link.pmininet/link.pyy

5.7

5.7

minin

minin

et.top

et.top

o.Lin

o.Lin

earT

earT

opo

opo

Class

Class

Referen

Referen

ce

ce

Linear topology of k switches, with n hosts per switch. Linear topology of k switches, with n hosts per switch. Inheritance

Inheritance diagram diagram for for mininet.topomininet.topo.LinearT.LinearTopo:opo:

mininet.topo.LinearTopo mininet.topo.LinearTopo mininet.topo.Topo mininet.topo.Topo object object

Public Member Functions

Public Member Functions

• dedeff __init__ __init__ 

Init. Init.

(31)

5

5..8 8 mmiinniinneett..lliinnkk..LLiinnk k CCllaasss s RReeffeerreenncce e 2211

Public Attributes

Public Attributes

•• kk •• nn

Additional Inherited Members

Additional Inherited Members

5.7.1

5.7.1

Detail

Detail

ed

ed

Descri

Descri

ption

ption

Linear topology of k switches, with n hosts per switch. Linear topology of k switches, with n hosts per switch.

5.7.2

5.7.2

Const

Const

ructo

ructo

r &

r &

Destru

Destru

ctor

ctor

Docum

Docum

entat

entat

ion

ion

5.7.

5.7.2.1 2.1 def def minimininet.tnet.topoopo.Lin.LinearTearTopo. opo. init init (( seselflf, , k k = = 22, , n = n = 11, , opopts ts ))

Init. Init. Parameters

Parameters

k  number of switchesnumber of switches n 

n  number of hosts per switchnumber of hosts per switch hconf 

hconf  host configuration optionshost configuration options lconf 

lconf  link configuration optionslink configuration options

The documentation for this class was generated from the following file: The documentation for this class was generated from the following file:

• mininet/topomininet/topo.py.py

5.8

5.8

minin

minin

et.lin

et.lin

k.Lin

k.Lin

k

k

Class

Class

Referen

Referen

ce

ce

A basic link is just a veth pair. A basic link is just a veth pair.

Inheritance diagram for mininet.link.Link: Inheritance diagram for mininet.link.Link:

mininet.link.Link  mininet.link.Link  object object mininet.link.TCLink  mininet.link.TCLink 

Public Member Functions

Public Member Functions

• dedeff __init__ __init__ 

Create veth link to another node, making two new interfaces. Create veth link to another node, making two new interfaces.

• dedeff intfNameintfName

Construct a canonical interface name node-ethN for interface n. Construct a canonical interface name node-ethN for interface n.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

References

Related documents

Child’s introductory letter — Excited to have you as his/her sponsor, your child will write you the first letter 1 with the assistance of World Vision field staff?. The letter

WARNING: To reduce the risk of personal injury or damage to the equipment, consult the safety information and user documentation provided with the server before attempting

It explores the use of Indigenous African Communication Systems (IACS) in making conservation information meaningful for rural people and concludes that appreciating the

The function returns a boolean value, with TRUE indicating that read() should be called again because there’s more data to read, and FALSE indicating there’s no more data to read.

The Board does not agree with changing the threshold and reiterates its comments from the January Notice, namely that the current metering situation leaves some customers with

Cli message and the interactive brokers api reference guide documents the api components and receives a native python api is the return it.. Quite a position, brokers api

The evidence of a mutually reinforcing interplay of addiction, crime, mental illness, poor physical health and long-term and recurrent homelessness is longstanding (Kemp et

Whether rows in the api request in post, all call soap api request using python without extensive coding.. Settings should start this api request python in the given id