[ovs-discuss] change ovs source code
Ben Pfaff
blp at ovn.org
Sat Jul 2 14:56:43 UTC 2016
Please don't drop the mailing list.
I don't know much about mininet or even what controller you mean, so
you'll have to get help from someone else.
On Sat, Jul 02, 2016 at 11:19:55AM +0430, Mehrshad Shahmohammadi wrote:
> Dear Ben
>
> i found this code for send ofp_flow_stats request to switch. is it right?
> can you help me how write this code in controller?
> can i put this code in forwarding_l2.learning file in mininet?
>
> msg = of.ofp_packet_out() # Create packet out message
> msg.buffer_id = event.ofp.buffer_id # Use the incoming
> packet as the data for the packet out
> msg.in_port = packet_in.in_port # Set the in_port so
> that the switch knows
> msg.match = of.ofp_match.from_packet(packet)
>
> # Add an action to send to the specified port
> action = of.ofp_action_output(port = of.OFPP_FLOOD)
> msg.actions.append(action)
>
> # Send message to switch
> self.connection.send(msg)
>
> Thank you
>
>
> On Sat, Jul 2, 2016 at 5:11 AM, Ben Pfaff <blp at ovn.org> wrote:
>
> > On Tue, Jun 28, 2016 at 10:42:38AM +0430, Mehrshad Shahmohammadi wrote:
> > > i want to send (ofp_flow_stats) packet to controller every 5 second.
> > >
> > > i want to change source code of ovs .
> > >
> > > i don't know where is this packet in the source code of ovs?
> >
> > Instead of changing OVS, it's probably easier to have the controller
> > send an ofp_flow_stats request every 5 seconds.
> >
More information about the discuss
mailing list