On Tue, 3 Dec 2013 11:56:33 +0200
Savvas Zannettou <[email protected]> wrote:

> I am new to the Ryu framework and Openflow Protocol and i want to implement
> a custom switch that when it receives a packet i will make a rand() and if
> the number is greater than 0.5 then send from the first interface else the
> second. (the switch will always have 2 interfaces in my topology). I saw
> the code of simple_switch.py app and i assume that  i need to modify the
> method packet_in_handler. Also with the command "datapath.send_msg(out)" we
> redirect the packet to the appropriate interface right?  My real question
> is that to achieve the above scenario i must change this method
> datapath.ofproto_parser.OFPPacketOut or i must call it with different
> parameters to be able to send half packets to the one interface and the
> other to the other interface?

The latter. OFPPacketOut takes a parameter for an output port:

https://github.com/osrg/ryu/blob/master/ryu/app/simple_switch.py#L75

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to