Hi

Could you try the patch I sent now?

[Ryu-devel] [PATCH] ospf: fix serialize() to work with packet.Packet()


> On Jul 30, 2015, at 8:28 PM, Vinllen Chen <cvinl...@gmail.com> wrote:
> 
> Hi, Dear all,
> 
> I can serialize an icmp packet like this:
> pkt = packet.Packet()
> pkt.add_protocol(ethernet.ethernet(ethertype=...,
>                                    dst=...,
>                                    src=...))
> pkt.add_protocol(ipv4.ipv4(dst=...,
>                            src=...,
>                            proto=...))
> pkt.add_protocol(icmp.icmp(type_=...,
>                            code=...,
>                            csum=...,
>                            data=...))
> pkt.serialize()
> bin_packet = pkt.data
> 
> but i found it's not ok to serialize ospf packet:
> pkt = packet.Packet()
> pkt.add_protocol(ethernet.ethernet(ethertype=...,
>                                    dst=...,
>                                    src=...))
> pkt.add_protocol(ipv4.ipv4(dst=...,
>                            src=...,
>                            proto=...))
> pkt.add_protocol(ospf.OSPFMessage(....))
> pkt.serialize()
> 
> when i execute the "pkt.serialize()", it'll throw an error because the 
> serialize() function in the arp/ipv4/icmp is not same with ospf . So how to 
> solve this problem ?
> 
> -- 
> Best Regards,
> Vinllen
> ------------------------------------------------------------------------------
> _______________________________________________
> Ryu-devel mailing list
> Ryu-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to