I want to match the  ipv4_dst if it matches the change it to another one.
For example,
if ipv4_dst = 10.0.0.2 then change to 10.0.0.4 , in other cases just don't
change anything.
The code I use is,
        match1 = parser.OFPMatch(ipv4_src="10.0.0.1")
        action1 = [parser.OFPActionSetField(ipv4_dst="10.0.0.3")]
        self.add_flow(datapath, 1, match1, action1)
        match = parser.OFPMatch()
        actions = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,
                                         ofproto.OFPCML_NO_BUFFER)]
        self.add_flow(datapath, 0, match, actions)


First of all,  I use correctly the method OFPActionSetField ?
And is the logic right? How a match works, if a match to match1 then it
does action1 , otherwise match to ..match and it does actions?
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to