@@ -0,0 +1,1360 @@
+%22%22%22%0APackage: nodelib%0A%0ANode Library for Mininet%0A%0AThis contains additional node types which you may find to be useful%0A%22%22%22%0A%0Afrom mininet.net import Mininet%0Afrom mininet.topo import Topo%0Afrom mininet.node import Switch%0Afrom mininet.log import setLogLevel, info%0A%0Aclass LinuxBridge( Switch ):%0A    %22Linux Bridge (with optional spanning tree)%22%0A%0A    nextPrio = 100  # next bridge priority for spanning tree%0A%0A    def __init__( self, name, stp=False, prio=None, **kwargs ):%0A        %22%22%22stp: use spanning tree protocol? (default False)%0A           prio: optional explicit bridge priority for STP%22%22%22%0A        self.stp = stp%0A        if prio:%0A            self.prio = prio%0A        else:%0A            self.prio = LinuxBridge.nextPrio%0A            LinuxBridge.nextPrio += 1%0A        Switch.__init__( self, name, **kwargs )%0A%0A    def start( self, controllers ):%0A        self.cmd( 'ifconfig', self, 'down' )%0A        self.cmd( 'brctl delbr', self )%0A        self.cmd( 'brctl addbr', self )%0A        if self.stp:%0A            self.cmd( 'brctl setbridgeprio', self.prio )%0A            self.cmd( 'brctl stp', self, 'on' )%0A        for i in self.intfList():%0A            if self.name in i.name:%0A                self.cmd( 'brctl addif', self, i )%0A        self.cmd( 'ifconfig', self, 'up' )%0A%0A    def stop( self ):%0A        self.cmd( 'ifconfig', self, 'down' )%0A        self.cmd( 'brctl delbr', self )%0A%0A

Add nodelib.py, a library of new node types