Revision 804c4bbf

View differences:

mininet/node.py
801 801

  
802 802
    dpidLen = 12
803 803

  
804
    def __init__( self, name, **kwargs ):
804
    def __init__( self, name, dpopts='', **kwargs ):
805 805
        """Init.
806 806
           name: name for the switch"""
807 807
        Switch.__init__( self, name, **kwargs )
......
810 810
                              '(openflow.org)' )
811 811
        if self.listenPort:
812 812
            self.opts += ' --listen=ptcp:%i ' % self.listenPort
813
        self.dpopts = dpopts
813 814

  
814 815
    @classmethod
815 816
    def setup( cls ):
......
840 841
        self.cmd( 'ifconfig lo up' )
841 842
        intfs = [ str( i ) for i in self.intfList() if not i.IP() ]
842 843
        self.cmd( 'ofdatapath -i ' + ','.join( intfs ) +
843
                  ' punix:/tmp/' + self.name + ' -d ' + self.dpid +
844
                  ' punix:/tmp/' + self.name + ' -d %s ' % self.dpid +
845
                  self.dpopts +
844 846
                  ' 1> ' + ofdlog + ' 2> ' + ofdlog + ' &' )
845 847
        self.cmd( 'ofprotocol unix:/tmp/' + self.name +
846 848
                  ' ' + clist +

Also available in: Unified diff