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

Reply via email to