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

Method start

mininet/node.py:1057–1080  ·  view source on GitHub ↗

Start OpenFlow reference user datapath. Log to /tmp/sN-{ofd,ofp}.log. controllers: list of controller objects

( self, controllers )

Source from the content-addressed store, hash-verified

1055 "htb rate " + str(minspeed) + " ceil " + str(ifspeed) )
1056
1057 def start( self, controllers ):
1058 """Start OpenFlow reference user datapath.
1059 Log to /tmp/sN-{ofd,ofp}.log.
1060 controllers: list of controller objects"""
1061 # Add controllers
1062 clist = ','.join( [ 'tcp:%s:%d' % ( c.IP(), c.port )
1063 for c in controllers ] )
1064 ofdlog = '/tmp/' + self.name + '-ofd.log'
1065 ofplog = '/tmp/' + self.name + '-ofp.log'
1066 intfs = [ str( i ) for i in self.intfList() if not i.IP() ]
1067 self.cmd( 'ofdatapath -i ' + ','.join( intfs ) +
1068 ' punix:/tmp/' + self.name + ' -d %s ' % self.dpid +
1069 self.dpopts +
1070 ' 1> ' + ofdlog + ' 2> ' + ofdlog + ' &' )
1071 self.cmd( 'ofprotocol unix:/tmp/' + self.name +
1072 ' ' + clist +
1073 ' --fail=closed ' + self.opts +
1074 ' 1> ' + ofplog + ' 2>' + ofplog + ' &' )
1075 if "no-slicing" not in self.dpopts:
1076 # Only TCReapply if slicing is enable
1077 sleep(1) # Allow ofdatapath to start before re-arranging qdisc's
1078 for intf in self.intfList():
1079 if not intf.IP():
1080 self.TCReapply( intf )
1081
1082 def stop( self, deleteIntfs=True ):
1083 """Stop OpenFlow reference user datapath.

Callers

nothing calls this directly

Calls 4

TCReapplyMethod · 0.95
intfListMethod · 0.80
IPMethod · 0.45
cmdMethod · 0.45

Tested by

no test coverage detected