Revision ccca871a mininet/node.py

View differences:

mininet/node.py
434 434

  
435 435
    portBase = SWITCH_PORT_BASE  # 0 for OF < 1.0, 1 for OF >= 1.0
436 436

  
437
    def __init__( self, name, opts='', **kwargs):
437
    def __init__( self, name, opts='', listenPort=None, **kwargs):
438 438
        Node.__init__( self, name, **kwargs )
439 439
        self.opts = opts
440
        self.listenPort = listenPort
441
        if self.listenPort:
442
            self.opts += ' --listen=ptcp:%i ' % self.listenPort
440 443

  
441 444
    def sendCmd( self, *cmd, **kwargs ):
442 445
        """Send command to Node.

Also available in: Unified diff