[pox-dev] To remove flow_entries and keep specific ones (wildcards)

Weiyang Mo moweiyang1988 at gmail.com
Fri Sep 28 10:46:01 PDT 2012


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/private.cgi/pox-dev-noxrepo.org/attachments/20120928/b0d29012/attachment.htm>


More information about the pox-dev mailing list