The buffer_id isn't required.  Set it to -1 on the switches that aren't the one 
that it originated from.  This could be clearer in the spec, but it's in there.

Also, you might want to take a look at the routing components in NOX (e.g., 
sprouting), since installing flows along an optimal path is what they do (where 
optimal in this case means a minimal hop count).

-- Murphy

On Oct 5, 2011, at 1:34 AM, Sergio Jiménez Feijóo wrote:

> Hi,
> 
> I'm developping an Openflow app which calculates the optimal path between two 
> Openflow switches. Once my app knows the path to use it needs to set up a 
> flowmod in all the switches involved in the path. The code of my app is 
> triggered everytime a Packet_in_event happens.
> 
> I've been taking a look at the learning switch example code in coreapps and 
> seems that in order to create a fowmod you need acces to the buffer of the 
> switch which triggered the event.
> 
> If you are setting a flowmod in the switch which triggered the event that's 
> not a problem because you can get the buffer from the Packet_in_event.
> 
> const Packet_in_event& pi = assert_cast<const Packet_in_event&>(e);
> uint32_t buffer_id = pi.buffer_id;
> 
> ofm->buffer_id = htonl(buffer_id);
> 
> But my problem is that I also need to set flowmods in the other switches 
> which haven't received a Packet_in_event (therefore I can't acces their 
> buffers).
> 
> The acces to the buffer is really necesary to set up a flowmod in a switch? 
> Is there any way to do this?
> 
> Thank you.
> _______________________________________________
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev

_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to