Hello everyone
I am new in python. I wanted to develop a ryu-app that will calculate shortest 
path and push those flows to the switch. While doing this i faced the following 
problem-
I wanted to match the ipv4 destination network to add flows. For that i made 
the packet_in_handler as follows-(from ryu.lib.packet import ipv4)   # 
importing ipv4 protocol
    def _packet_in_handler(self, ev):
        msg = ev.msg
        datapath = msg.datapath
        ofproto = datapath.ofproto

        pkt = packet.Packet(msg.data)
        ipv4 = pkt.get_protocol(ipv4.ipv4)

        dst = ipv4.dst
        src = ipv4.src
This gives the following error-    UnboundLocalError: local variable 'ipv4' 
referenced before assignment
Also for destination network matching what should be my match condition 
destination network in
     match = datapath.ofproto_parser.OFPMatch("destination_network")


Thank you in advance for your help.
Thanking you 
sakib

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to