Good afternoon everyone,

I am experimenting with handling custom protocols with Ryu, but am unable
to parse the new protocols at the switch or controller.

I have created a custom protocol with Scapy that simple holds 3 IntFields
(4 bytes each) and 2 ShortFields (2 bytes each). I create a packet with
Scapy that has several standard protocols (ethernet, ipv4, tcp, etc.) as
well as our custom created protocol.

I modified the Ryu switch to print out all the protocols of each packet
received during a "Packet_In" event. The standard protocols get printed
naturally:

ethernet(dst='ea:b1:d3:52:39:b5',ethertype=2048,src='2e:3a:92:b5:df:c0')
ipv4(csum=25275,dst='10.0.2.3',flags=0,header_length=5,identification=1,offset=0,option=None,proto=6,src='10.0.2.2',tos=0,total_length=56,ttl=64,version=4)
tcp(ack=0,bits=2,csum=48080,dst_port=14450,offset=5,option=None,seq=0,src_port=33666,urgent=0,window_size=8192),

but the custom protocol gets printed as:

'\x00\x00\x00\x05\x00\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00\x00'

Where 5, 3, 1, 0, 0 are the values set for the fields in the custom
protocol.


In the Ryu code base, I defined my custom protocol class  (in a new file
saved in the packet subfolder), using the other protocols as a guide.

Any help you could provide in this regard would be greatly appreciated.

Sam
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to