Hi Nirav,
you can get the sample exercise here.
https://github.com/knetsolutions/learn-sdn-with-ryu/blob/master/ryu-exercises/ex2_L3Match_switch.py
Thanks
suresh
On Mon, Jun 18, 2018 at 1:37 PM, Nirav Patel <niravkpate...@gmail.com>
wrote:
> Hello,
>
> For my application I am trying to retrieve source and destination IP
> address from an IP packet.
>
> msg=ev.msg
> pkt = packet.Packet(ev.msg.data)
> ip= pkt.get_protocol(ipv4.ipv4)
>
> --- creates an object ip with type *<class 'ryu.lib.packet.ipv4.ipv4'>*
>
> but the moment I add the next two lines ...
>
>
> source_address = ip.src
> destination_address=ip.dst
>
> the application gives
> *AttributeError: 'NoneType' object has no attribute 'src'*
>
> Can someone please help me in resolving this issue.
>
>
>
>
>
>
>
> ------------------------------------------------------------
> ------------------
> 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
>
>
--
*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