コード例 #1
0
    def __init__(self, *args, **kwargs):
        super(coupler, self).__init__(*args, **kwargs)
        #modules are added to the coupler as objects
        self.switch=SimpleSwitch()
        #created address for crafted packets
        self.hw_addr = 'aa:bb:cc:dd:ee:11'
        self.ip_addr = '10.0.0.25'
        ##############################################################
        #[2] Add Additional modules or object variables here or add
        #    definitions to the provided NFG_13.py file
        self.NFG = NFG()

	#######################################################################
	#[3]Insert proactive rules provided by NFG library, follow format below
	# Only offers drop and redirect options
	def get_proactive_rules(self,dp,parser,ofproto):
		pass
コード例 #2
0
 def __init__(self, *args, **kwargs):
     super(coupler, self).__init__(*args, **kwargs)
     
     #modules are added to the coupler as objects
     self.switch=SimpleSwitch()
コード例 #3
0
 def handl_port_stat(self, ev):
     switch=SimpleSwitch()
     switch.port_status_handler(ev)