def _initialize(self): dp = self._get_dp() if not dp: return ofproto = dp.ofproto ofproto_parser = dp.ofproto_parser match = self._ofp_match(ofproto_parser) utils.dp_flow_mod(dp, self._TABLE, ofproto.OFPFC_DELETE_STRICT, self._PRIORITY, match, [], out_port=ofproto.OFPP_CONTROLLER) match = self._ofp_match(ofproto_parser) actions = [ ofproto_parser.OFPActionOutput(ofproto.OFPP_CONTROLLER, ofproto.OFPCML_NO_BUFFER) ] instructions = [ ofproto_parser.OFPInstructionActions(ofproto.OFPIT_APPLY_ACTIONS, actions) ] utils.dp_flow_mod(dp, self._TABLE, ofproto.OFPFC_ADD, self._PRIORITY, match, instructions)
def _shutdown(self): dp = self._get_dp() if not dp: return ofproto = dp.ofproto match = self._ofp_match(dp.ofproto_parser) utils.dp_flow_mod(dp, self._TABLE, ofproto.OFPFC_DELETE_STRICT, self._PRIORITY, match, [], out_port=ofproto.OFPP_CONTROLLER)
def _install_arp_rule(self, dp): ofproto = dp.ofproto ofproto_parser = dp.ofproto_parser match = self._arp_match(dp) actions = [ofproto_parser.OFPActionOutput(ofproto.OFPP_CONTROLLER, ofproto.OFPCML_NO_BUFFER)] instructions = [ofproto_parser.OFPInstructionActions( ofproto.OFPIT_APPLY_ACTIONS, actions)] utils.dp_flow_mod(dp, self._ARP_TABLE, dp.fproto.OFPFC_ADD, self._ARP_PRIORITY, match, instructions)
def _install_arp_rule(self, dp): ofproto = dp.ofproto ofproto_parser = dp.ofproto_parser match = self._arp_match(dp) actions = [ ofproto_parser.OFPActionOutput(ofproto.OFPP_CONTROLLER, ofproto.OFPCML_NO_BUFFER) ] instructions = [ ofproto_parser.OFPInstructionActions(ofproto.OFPIT_APPLY_ACTIONS, actions) ] utils.dp_flow_mod(dp, self._ARP_TABLE, dp.fproto.OFPFC_ADD, self._ARP_PRIORITY, match, instructions)
def _initialize(self): dp = self._get_dp() if not dp: return ofproto = dp.ofproto ofproto_parser = dp.ofproto_parser match = self._ofp_match(ofproto_parser) utils.dp_flow_mod(dp, self._TABLE, ofproto.OFPFC_DELETE_STRICT, self._PRIORITY, match, [], out_port=ofproto.OFPP_CONTROLLER) match = self._ofp_match(ofproto_parser) actions = [ofproto_parser.OFPActionOutput(ofproto.OFPP_CONTROLLER, ofproto.OFPCML_NO_BUFFER)] instructions = [ofproto_parser.OFPInstructionActions( ofproto.OFPIT_APPLY_ACTIONS, actions)] utils.dp_flow_mod(dp, self._TABLE, ofproto.OFPFC_ADD, self._PRIORITY, match, instructions)
def _uninstall_arp_rule(self, dp): match = self._arp_match(dp) utils.dp_flow_mod(dp, self._ARP_TABLE, dp.fproto.OFPFC_DELETE_STRICT, self._ARP_PRIORITY, match, [])
def _install_drop_rule(self, dp): match = self._drop_match(dp) utils.dp_flow_mod(dp, self._DROP_TABLE, dp.ofproto.OFPFC_ADD, self._DROP_PRIORITY, match, [])