On Wed, 12 Dec 2012 17:47:10 -0800
Shivaram Mysore <[email protected]> wrote:

> Thanks.  But, that did not help.  Here is the code
> 
> import logging
> import struct
> import array
> 
> from ryu.controller import handler
> from ryu.controller import ofp_event
> from ryu.ofproto import ofproto_v1_2
> from ryu.ofproto import ofproto_v1_2_parser
> from ryu.base import app_manager
> 
> LOG = logging.getLogger('ryu.app.packettest')
> 
> class PacketTest(app_manager.RyuApp):
>     OFP_VERSIONS = [ofproto_v1_2.OFP_VERSION]
> 
>     def __init__(self, *args, **kwargs):
>         pass

Hmm, there is nothing wrong here. You use the latest version of Ryu?


>     @handler.set_ev_cls(ofp_event.EventOFPPacketIn, handler.MAIN_DISPATCHER)
>     def packet_in_handler(self, ev):
>         msg = ev.msg
>         dp = msg.datapath
>         for f in msg.match.fields:
>             if f.header == ofproto_v1_2.OXM_OF_IN_PORT:
>                 in_port = f.value
> 
>         actions = [dp.ofproto_parser.OFPActionOutput(dp.ofproto.OFPP_ALL,
> 0)]
>         out = dp.ofproto_parser.OFPPacketOut(
>             datapath=dp, buffer_id=msg.buffer_id, in_port=in_port,
>             actions=actions)
>         LOG.debug("Sending message out %s", out)
>         dp.send_msg(out)
> 
> 
> On the switch side, I see:
> Connection to controller closed because of
> {"localhost",6633,0,{unsupported_version,4}}

I'm not sure what OF switch you use. But looks like Ryu asked OF v1.3
and the switch doesn't support it.

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to