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

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

Inheritance diagram for mininet.link.Intf:
mininet.link.OVSIntf mininet.link.TCIntf

Public Member Functions

def __init__
 
def cmd
 Run a command in our owning node.
 
def ifconfig
 Configure ourselves using ifconfig.
 
def setIP
 Set our IP address.
 
def setMAC
 Set the MAC address for an interface. More...
 
def updateIP
 Return updated IP address based on ifconfig.
 
def updateMAC
 Return updated MAC address based on ifconfig.
 
def updateAddr
 Return IP address and MAC address based on ifconfig. More...
 
def IP
 Return IP address.
 
def MAC
 Return MAC address.
 
def isUp
 Return whether interface is up.
 
def rename
 Rename interface.
 
def setParam
 Internal. More...
 
def config
 Configure Node according to (optional) More...
 
def delete
 Delete interface.
 
def status
 Return intf status as a string.
 
def __repr__
 
def __str__
 

Public Attributes

 node
 
 name
 
 link
 
 mac
 
 prefixLen
 
 ip
 
 params
 

Detailed Description

Basic interface object that can configure itself.

Constructor & Destructor Documentation

def mininet.link.Intf.__init__ (   self,
  name,
  node = None,
  port = None,
  link = None,
  mac = None,
  params 
)
Parameters
nameinterface name (e.g. h1-eth0)
nodeowning node (where this intf most likely lives)
linkparent link if we're part of a link other arguments are passed to config()

Member Function Documentation

def mininet.link.Intf.config (   self,
  mac = None,
  ip = None,
  ifconfig = None,
  up = True,
  _params 
)

Configure Node according to (optional)

Parameters
parameters
macMAC address
ipIP address
ifconfigarbitrary interface configuration Subclasses should override this method and call the parent class's config(**params)
def mininet.link.Intf.setMAC (   self,
  macstr 
)

Set the MAC address for an interface.

Parameters
macstrMAC address as string
def mininet.link.Intf.setParam (   self,
  results,
  method,
  param 
)

Internal.

Parameters
methodconfigure a single parameter
resultsdict of results to update
methodconfig method name
paramarg=value (ignore if value=None) value may also be list or dict
def mininet.link.Intf.updateAddr (   self)

Return IP address and MAC address based on ifconfig.


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