Hello, I am sorry , while using the controller ryu emerged following 
situation:when running standard applications such as ryu simple_switch, 
ofp_event.EventOFPPacketIn event is triggered and the result is displayed , for 
example:

packet in 1 00:00:00:00:00:01 ff:ff:ff:ff:ff:ff 1
packet in 1 00:00:00:00:00:02 00:00:00:00:00:01 2
packet in 1 00:00:00:00:00:01 00:00:00:00:00:02 1


but when I try to run a custom application for ryu, event 
ofp_event.EventOFPPacketIn why it does not work and the console does not output 
anything. What could be the reason? Tried to reinstall ryu, but without success.

Application code that I used:

import array
from  ryu.base  import  app_manager 
from  ryu.controller  import  ofp_event
from  ryu.controller.handler  import  MAIN_DISPATCHER 
from  ryu.controller.handler  import  set_ev_cls
from ryu.lib.packet import packet

class  L2Switch (app_manager.RyuApp): 
    def  __init__ ( self , *args , **kwargs): 
        super ( L2Switch,self) . __init__ ( *args ,** kwargs )

        
    @set_ev_cls(ofp_event.EventOFPPacketIn,MAIN_DISPATCHER)
    def packet_parsing(self, ev):
        datapath = ev.msg.datapath
        parser = datapath.ofproto_parser
        pkt = packet.Packet(array.array('B', ev.msg.data))
        for p in pkt:
             print p.protocol_name



------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to