MCPcopy Create free account
hub / github.com/mininet/mininet / setIP

Method setIP

mininet/node.py:563–569  ·  view source on GitHub ↗

Set the IP address for an interface. intf: intf or intf name ip: IP address as a string prefixLen: prefix length, e.g. 8 for /8 or 16M addrs kwargs: any additional arguments for intf.setIP

( self, ip, prefixLen=8, intf=None, **kwargs )

Source from the content-addressed store, hash-verified

561 return self.intf( intf ).setMAC( mac )
562
563 def setIP( self, ip, prefixLen=8, intf=None, **kwargs ):
564 """Set the IP address for an interface.
565 intf: intf or intf name
566 ip: IP address as a string
567 prefixLen: prefix length, e.g. 8 for /8 or 16M addrs
568 kwargs: any additional arguments for intf.setIP"""
569 return self.intf( intf ).setIP( ip, prefixLen, **kwargs )
570
571 def IP( self, intf=None ):
572 "Return IP address of a node or specific interface."

Callers 5

connectToRootNSFunction · 0.95
scratchNetFunction · 0.95
scratchNetUserFunction · 0.95
baresshd.pyFile · 0.45

Calls 1

intfMethod · 0.95

Tested by

no test coverage detected