python from pox.core import core import pox.openflow.libopenflow_01 as of class MyController(object): def __init__(self): core.openflow.addListeners(self) def _handle_ConnectionUp(self, event): msg = of.ofp_flow_mod() msg.actions.append(of.ofp_action_output(port = of.OFPP_FLOOD)) event.connection.send(msg) def launch(): core.registerNew(MyController) 1. `pox.lib.util.dpidToStr(dpid)` 2. `pox.openflow.of_01.parse_mac(mac)` 3. `pox.lib.addresses.IPAddr(ip)` 4. `pox.openflow.of_01.parse_flow_stats(body, limit = None)` 5. `pox.lib.packet.ethernet`


上一篇:
下一篇:
切换中文