[pox-dev] To remove flow_entries and keep specific ones (wildcards)
William Emmanuel S. Yu
wyu at ateneo.edu
Fri Sep 28 14:25:02 PDT 2012
Not exactly what you want but you can delete all flow and just add that one you mentioned? :-)
"Sent on the move."
-----Original Message-----
From: Weiyang Mo <moweiyang1988 at gmail.com>
Sender: pox-dev-bounces at lists.noxrepo.orgDate: Fri, 28 Sep 2012 10:46:01
To: <pox-dev at lists.noxrepo.org>
Subject: [pox-dev] To remove flow_entries and keep specific ones (wildcards)
Hi,all,
I try to programme a function which deletes TCP flow entires except for
tp_src=80,tp_dst = 25521 and tp_src=1234,tp_dst=8765 I try the following
approches:
(1) clear1 =
of.ofp_flow_mod(match=of.ofp_match(),command=of.OFPFC_DELETE_STRICT)
clear2 =
of.ofp_flow_mod(match=of.ofp_match(),command=of.OFPFC_DELETE_STRICT)
clear1.match.tp_src = 80
clear1.match.tp_dst = 25521
clear2.match.tp_src = 1234
clear2.match.tp_src = 8765
for switch in core.openflow._connections.values():
switch.send(clear1)
switch.send(clear2)
I know that's the other way around, it only deletes these two sepcific TCP
flow entries and keeps others. However I need keep specific ones and
delete others.
(2) I also try OFPFC_DELETE because I don't quite understand what this will
exactly do.
clear1 = of.ofp_flow_mod(match=of.ofp_match(),command=of.OFPFC_DELETE)
clear2 = of.ofp_flow_mod(match=of.ofp_match(),command=of.OFPFC_DELETE)
clear1.match.tp_src =80
clear1.match.tp_dst = 25521
clear2.match.tp_src = 1234
clear2.match.tp_src = 8765
for switch in core.openflow._connections.values():
switch.send(clear1)
switch.send(clear2)
In this case all flow entries are deleted disregarding my match
fields( even delete ARP flow entry..). Does this mean that if I use
OFPFC_DELETE, it will remove all existent entries disregarding match fields?
Do you have any advice that only keeps specific TCP entries and delete
others ( e.g in my instance, only keep tp_src=80,tp_dst = 25521 and
tp_src=1234,tp_dst=8765)
Thanks very much.
Weiyang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20120928/2c7b4b2a/attachment-0001.htm>
More information about the pox-dev
mailing list