Mininet Python API Reference Manual
Public Member Functions | Public Attributes | List of all members
mininet.link.Link Class Reference

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

Inheritance diagram for mininet.link.Link:
mininet.link.OVSLink mininet.link.TCLink mininet.link.TCULink

Public Member Functions

def __init__
 Create veth link to another node, making two new interfaces. More...
 
def intfName
 Construct a canonical interface name node-ethN for interface n. More...
 
def makeIntfPair
 Create pair of interfaces. More...
 
def delete
 Delete this link.
 
def stop
 Override to stop and clean up link as needed.
 
def status
 Return link status as a string.
 
def __str__
 

Public Attributes

 fast
 
 intf2
 
 intf1
 

Detailed Description

A basic link is just a veth pair.

Other types of links could be tunnels, link emulators, etc..

Constructor & Destructor Documentation

def mininet.link.Link.__init__ (   self,
  node1,
  node2,
  port1 = None,
  port2 = None,
  intfName1 = None,
  intfName2 = None,
  addr1 = None,
  addr2 = None,
  intf = Intf,
  cls1 = None,
  cls2 = None,
  params1 = None,
  params2 = None,
  fast = True 
)

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

Parameters
node1first node
node2second node
port1node1 port number (optional)
port2node2 port number (optional)
intfdefault interface class/constructor cls1,
cls2optional interface-specific constructors
intfName1node1 interface name (optional)
intfName2node2 interface name (optional)
params1parameters for interface 1
params2parameters for interface 2

Member Function Documentation

def mininet.link.Link.intfName (   self,
  node,
  n 
)

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

def mininet.link.Link.makeIntfPair (   cls,
  intfname1,
  intfname2,
  addr1 = None,
  addr2 = None,
  node1 = None,
  node2 = None,
  deleteIntfs = True 
)

Create pair of interfaces.

Parameters
intfname1name for interface 1
intfname2name for interface 2
addr1MAC address for interface 1 (optional)
addr2MAC address for interface 2 (optional)
node1home node for interface 1 (optional)
node2home node for interface 2 (optional) (override this method [and possibly delete()] to change link type)

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