是否可以使用 OpenFlow 的 Pox 控制器删除与某个 cookie 编号匹配的流?我试过类似的东西:
def delete_flow(dpid,cookie):
msg = of.ofp_flow_mod()
msg.match=of.ofp_match()
msg.match.cookie=cookie
msg.match.cookie_mask=0xffffffff
msg.command=of.OFPFC_DELETE
msg.flags = of.OFPFF_SEND_FLOW_REM
sw = switches[dpid]
if sw.connection is None: return
sw.connection.send(msg)
log.info("Flow %i deleted from sw %i" %(cookie,dpid))
但看起来所有流量都从所有交换机中删除。