Hi Shivaram
  (and thanks Suresh!)

You mean you want to defined own stats message structure?

I think you can use OFPExperimenterMultipart (or inherit it) to describe your
own message, but also need to implement your switch to send that message.
https://github.com/osrg/ryu/blob/master/ryu/ofproto/ofproto_v1_3_parser.py#L5672

Then I don't recommend to use experimenter message way. As Suresh(knet solutions
<knetsolutio...@gmail.com>) said, how about running small "agent" application on
your switch and then calling its API (via REST, RPC or so) from your Ryu app?

Thanks,
Iwase


On 2018年03月08日 14:53, knet solutions wrote:
I think, you are trying to implement the openflow agent for the NIC card.    In my perspective ,its not related to Controller stuff.

On Thu, Mar 8, 2018 at 10:14 AM, Shivaram Mysore <shivaram.mys...@gmail.com <mailto:shivaram.mys...@gmail.com>> wrote:

    Hi Iwase,
    Let me clarify the use case a little bit more.

    Lets say, you run on Linux
    # ethtool -S enp1s0

    you will get a bunch of NIC stats.  I want to wrap the same in an openflow
    message and send it to a Ryu controller running my special Ryu App which
    will connect to this client and

      * ask for
        
http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ryu.ofproto.ofproto_v1_3_parser.OFPPortStatsRequest
        
<http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ryu.ofproto.ofproto_v1_3_parser.OFPPortStatsRequest>
      * and I want to wrap the NIC stats and send response via
        
http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ryu.ofproto.ofproto_v1_3_parser.OFPPortStatsReply
        
<http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ryu.ofproto.ofproto_v1_3_parser.OFPPortStatsReply>

    So, I want to use the Ryu Openflow API to do this.

    Does this help?

    Thanks

    /Shivaram


    On Wed, Mar 7, 2018 at 8:27 PM, Iwase Yusuke <iwase.yusu...@gmail.com
    <mailto:iwase.yusu...@gmail.com>> wrote:

        Hi Shivaram,

        You mean you need to send some (stats?) message from Ryu controller to
        another
        Ryu controller, right?

        Hmmmm... Ryu implements the OpenFlow parsers as "Controller side",
        parsers for
        "from switch" messages have no "serialize()" method (some of messages
        have both
        "serialize()" and "parser()" for unit tests though). So you need to
        implement
        "serialize()" method on the stats "reply" message parser class to send
        them to
        another controller.

        Thanks,
        Iwase



        On 2018年03月08日 13:02, Shivaram Mysore wrote:

            Hi,
            I am looking for example Ryu API usage where Ryu framework is used
            to construct a Openflow message sent to Ryu controller.

            Use case is that I just want to send say, network statistics to Ryu
            Openflow controller where I have a Ryu application that is listening
            to Openflow stats and meter messages.

            Any pointers?

            Thanks

            /Shivaram


            
------------------------------------------------------------------------------
            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
            Ryu-devel@lists.sourceforge.net 
<mailto:Ryu-devel@lists.sourceforge.net>
            https://lists.sourceforge.net/lists/listinfo/ryu-devel
            <https://lists.sourceforge.net/lists/listinfo/ryu-devel>



    
------------------------------------------------------------------------------
    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
    Ryu-devel@lists.sourceforge.net <mailto:Ryu-devel@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/ryu-devel
    <https://lists.sourceforge.net/lists/listinfo/ryu-devel>




--
*/Regards,
/*
*/Knet solutions./*

https://github.com/knetsolutions/KNet
http://knet-topology-builder.readthedocs.io/
http://knetsolutions.in/



------------------------------------------------------------------------------
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
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


------------------------------------------------------------------------------
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
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to