Thank you for your answer!
I see these pages, but when i print the ipv4_src (if the packet have it) this
is ip of switch and not of host. This is correct, because the packet is
encapsulated with eth(ipv4/6(tcp/udp( packet_in()))). I need to read the ipv4
of host that generated the packet_in, not the switch that send it. Is it
possibile?
I read that i can ask at the switch what match field it must send at the
controller, with switch_features_handler but nothing happenz.
I have write a code like this:
mod = parser.OFPFlowMod(datapath=datapath,
priority=0,
#Requires eth_type: 0x0800 (IPv4) or eth_type:
0x86dd (IPv6) in match conditions
match=parser.OFPMatch(eth_type=0x0800),#ether_types.ETH_TYPE_IP),
instructions=inst)
datapath.send_msg(mod)
(in switch_features_handler)
Thank you for your time, Luca Spinazzè
________________________________
Da: Iwase Yusuke <[email protected]>
Inviato: lunedì 28 novembre 2016 00.47.27
A: Spinazze' Luca
Cc: [email protected]
Oggetto: Re: [Ryu-devel] Some question about how manage packet_in
Hi,
You can use "Packet Library" to analyze packet data in Packet-In messages.
Please refer to Ryu-Book:
http://osrg.github.io/ryu-book/en/html/packet_lib.html
or API reference of Ryu-Documentation:
http://ryu.readthedocs.io/en/latest/library_packet.html
Thanks,
Iwase
On 2016年11月28日 02:34, Spinazze' Luca wrote:
> Hello, i'm Luca Spinazzè an italian student from Udine. I study for my thesis
> Openflow and SDN.
>
> I'm trying to use the controller ryu for manage the packet_in in this method:
>
> if the controller have a packet_in i want see the ip source of the packet_in
> (not about switch) that generated the "problem".
>
> My problem is set how switch give me the fields on packet_in, now when i
> print the message i can see only port_in or mac_address. Can i set that i
> want a packet_in with the fields like :eth.src, eth.dst, ipv4.src, ipv4.dst
> ... ?
>
> I hope that my bad english explane enough my problem, thank you for a answer!
>
> Luca Spinazzè
>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel