Re: [Ryu-devel] extract IPV4 info

2018-10-29 Thread Moh'd Reza Abbasi
You should check if the incoming packet_in is a ipv4 packet or not. If it is not then you will get the above error. On Sat, Oct 27, 2018 at 7:18 PM Moh'd Reza Abbasi wrote: On Fri, Oct 26, 2018 at 7:12 PM Munim Shabir wrote: > okay. So can i print in in event_packet_handler like below? > > when

Re: [Ryu-devel] extract IPV4 info

2018-10-26 Thread Moh'd Reza Abbasi
Yes, you can. You can do something like this. from ryu.lib.packet import packet from ryu.lib.packet import ipv4 pkt = packet.Packet(msg.data) ip_pkt = pkt.get_protocol(ipv4.ipv4) src, dst = ip_pkt.src, ip_pkt.dst On Fri, Oct 26, 2018 at 5:52 PM Munim Shabir wrote: > Hi Guys, > > Can I extract

[Ryu-devel] extract IPV4 info

2018-10-26 Thread Munim Shabir
Hi Guys, Can I extract IPv4 addresses from incoming PacketIN like we do for Src dst mac addresses? I need src and dst IP addresses to take some decisions. Thanks Muneem Shabir +923215363267 ___ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net ht