On Wed,  3 Oct 2012 17:44:24 +0900
HIYAMA Manabu <[email protected]> wrote:

> - add payload argument to init.
> - fix parser and serialize
> 
> Signed-off-by: HIYAMA Manabu <[email protected]>
> ---
>  ryu/lib/packet/tcp.py |   16 ++++++++++++----
>  ryu/lib/packet/udp.py |   25 ++++++++++++++++++-------
>  2 files changed, 30 insertions(+), 11 deletions(-)

With this, TCP/UDP serialize() doesn't use the passed payload so
we can't handle protocols after TCP/UDP like VXLAN:

p.add_protocol(ethernet.ethernet(...)
p.add_protocol(ipv4.ipv4(...)
p.add_protocol(udp.udp(...)
p.add_protocol(vxlan.vxlan(...)
p.add_protocol(ethernet.ethernet(...)
p.add_protocol(ipv4.ipv4(...)
p.serialize()


The current code can handle the payload in the following way:

p.add_protocol(ethernet.ethernet(...)
p.add_protocol(ipv4.ipv4(...)
p.add_protocol(udp.udp(...)
p.add_protocol(bytearray()
p.serialize()


It's not handy to handle the not-parsed data. I'll send a patch for
Packet class parse().

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to