def launch(dpid, port, port_eth=None, name=None, __INSTANCE__=None):
 if (port_eth in (True, None)):
  pass
 else:
  port_eth = EthAddr(port_eth)
 dpid = str_to_dpid(dpid)
 try:
  port = int(port)
 except:
  pass
 def dhcpclient_init():
  n = name
  if (n is None):
   s = ''
   while True:
    if (not core.hasComponent(('DHCPClient' + s))):
     n = ('DHCPClient' + s)
     break
    s = str((int(('0' + s)) + 1))
  elif core.hasComponent(n):
   self.log.error('Already have component %s', n)
   return
  client = DHCPClient(port=port, dpid=dpid, name=n, port_eth=port_eth)
  core.register(n, client)
 core.call_when_ready(dhcpclient_init, ['openflow'])

def launch ( dpid , port , port_eth = None , name = None , __INSTANCE__ = None ) : if ( port_eth in ( True , None ) ) : pass else : port_eth = EthAddr ( port_eth ) dpid = str_to_dpid ( dpid ) try : port = int ( port ) except : pass def dhcpclient_init ( ) : n = name if ( n is None ) : s = '' while True : if ( not core . hasComponent ( ( 'DHCPClient' + s ) ) ) : n = ( 'DHCPClient' + s ) break s = str ( ( int ( ( '0' + s ) ) + 1 ) ) elif core . hasComponent ( n ) : self . log . error ( 'Already have component %s' , n ) return client = DHCPClient ( port = port , dpid = dpid , name = n , port_eth = port_eth ) core . register ( n , client ) core . call_when_ready ( dhcpclient_init , [ 'openflow' ] )
pxshark -- prints packets .