Re: [nox-dev] More than one action

2009-10-29 Thread Chitra Muthukrishnan
Thanks, KK & Varghese. I will try that out. -Chitra On Thu, Oct 29, 2009 at 12:40 PM, Varghese Mathew wrote: > Hi Chitra, > > this is what I understand > (this code snippet is from the unmodified hub.cc file) > > ofp_flow_mod* ofm; > size_t size = sizeof *ofm + *sizeof(ofp_acti

Re: [nox-dev] More than one action

2009-10-29 Thread Varghese Mathew
Hi Chitra, this is what I understand (this code snippet is from the unmodified hub.cc file) ofp_flow_mod* ofm; size_t size = sizeof *ofm + *sizeof(ofp_action_output); *//* #1:* make this * sizeof(ofp_action_output) boost::shared_array raw_of(new char[size]); ofm =

Re: [nox-dev] More than one action

2009-10-29 Thread kk yap
Hi Chitra, The ofp_flow_mod struct has an array of actions (i.e., struct ofp_action_header actions[0]). So, you can append one action after another and send a single flow_mod. Hope I am being clear. Regards KK Warning: sending two separate flow_mod would be the wrong way. 2009/10/29 Chitra Mu

Re: [nox-dev] More than one action

2009-10-29 Thread Chitra Muthukrishnan
Hi, In most of the examples that I see, the controller sends an ofp_flow_mod instructing the switch to take 1 action for a rule. I am wondering how to specify 2 actions for a rule. Do we just send two messages- 1 for each action? Or is there some other message format to specify 2 actions for a matc

Re: [nox-dev] More than one action

2009-10-29 Thread kk yap
Hi Chitra, You have to construct a ofp_flow_mod message (specified in openflow.h) and send it to the switch. In NOX, I typically use a boost shared array to hold the message, then it is just a send_openflow_command. I cannot find a very clean segment of code, but you can look at routing.cc for t

[nox-dev] More than one action

2009-10-29 Thread Chitra Muthukrishnan
I believe the controller can specify many actions to be taken for a matching packet. I need a switch to send some packets to the controller and forward it to an output port. Can someone tell me how we can construct such rules with nox? -Chitra ___ nox-de