No, the opposite. When switch connects to the controller, the controller
gets the event message with some information, including datapath ID.
Let's say switch will *send *say not only his datapath id but also its
model name.
So the question is how can I modify the event message structure.

Thanks.

On Wed, Jan 11, 2017 at 1:34 PM, Garegin Grigoryan <[email protected]>
wrote:

>
> "some other parameters" mean parameters (modules, classes, static
> definitions or else)
> to send messages to switches, right?
> ----
>
> No, the opposite. When switch connects to the controller, the controller
> gets the event message with some information, including datapath ID.
> Let's say switch will say not only his datapath id but also its model name.
> So the question is how can I modify the event message structure.
>
> Thanks.
>
>
> On Tue, Jan 10, 2017 at 8:26 PM, Iwase Yusuke <[email protected]>
> wrote:
>
>> Hi,
>>
>>
>> On 2017年01月08日 03:25, Garegin Grigoryan wrote:
>> > Good afternoon and Happy New Year!
>> >
>> > I'm using RYU controller. When the OVS switch connects to the
>> controller, the controller gets a "switch enter" event message.
>> >
>> > I'm handling it with this function
>> >
>> > |@set_ev_cls(dpset.EventDP, dpset.DPSET_EV_DISPATCHER) def
>> _event_switch_enter_handler(self, ev): dp = ev.dp dpid = dp.id <
>> http://dp.id> ....... |
>> >
>> > Using this event I can get the switch ID (first two lines of the
>> function). But what if I want a switch to send some other parameters? How
>> can I modify the OVS switch event message and how can I read it on the
>> controller?
>>
>> "some other parameters" mean parameters (modules, classes, static
>> definitions or else)
>> to send messages to switches, right?
>>
>> You have already got "dp", which is an instance of Datapath, then you can
>> send messages
>> like:
>>     ofp = dp.ofproto
>>     ofp_parser = dp.ofproto_parser
>>     ...
>>     req = ofp_parser.OFPFlowMod(dp, ...)
>>     ...
>>     dp.send_msg(req)
>>
>> For more details, please refer to the Ryu Documentation.
>>   http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html
>> Note: "datapath" instance on this document is corresponding to "dp"
>> instance in your code.
>>
>> Thanks,
>> Iwase
>>
>> >
>> > Thanks a lot.
>> >
>> >
>> >
>> > --
>> > Sincerely,
>> > Garegin Grigoryan
>> >
>> >
>> > ------------------------------------------------------------
>> ------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> >
>> >
>> >
>> > _______________________________________________
>> > Ryu-devel mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/ryu-devel
>> >
>>
>
>
>
> --
> Sincerely,
> Garegin Grigoryan
>



-- 
Sincerely,
Garegin Grigoryan
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to