Hi Muraoka ,
I hope you're fine and well,

Thank you very much for reply, 

I will try to use it .


Best Regards
Munther Numan
Master Student
Faculty of Engineering
University Putra Malaysia

-----Original Message-----
From: Shinpei Muraoka [mailto:[email protected]] 
Sent: Tuesday, January 31, 2017 9:39 AM
To: [email protected]; [email protected]
Subject: Re: [Ryu-devel] TypeError: unpack_from ( ) argument 1 must be 
convertible to a buffer, not dhcp

Hi

I think probably pkt.protocols[-1] is fragmented dhcp packet.
For older files, fragmented dhcp packet is set with binary data.
For new files, fragmented dhcp packet is set with instance of dhcp.
By changing to a new file,, instance of dhcp was set in pkt.protocols[-1] and 
an error occurred.

When packet.Packet() is executed, parser of the packet has already been 
completed.
Do not execute parser against "pkt".
Please you get the packet of dhcp by the following method.

   dhcpPacket = pkt.get_protocols(dhcp.dhcp)[0]


Regards, Muraoka

On 2017年01月27日 17:10, Munther Numan wrote:
> Dear Colleague ,
>
> I hope you're fine and well,
>
>
>
> I am running DHCP app on ryu and I test it in old version of ryu ( but 
> actually I don't know which version but I download it before more than 
> 6 months ) everything goes fine and no problem occurs .
>
> And when I try it with new version of ryu I get below error :
>
>
>
> ARP_PROXY_13: Exception occurred during handler processing. Backtrace 
> from offending handler [_packet_in_handler] servicing event 
> [EventOFPPacketIn] follows.
>
> Traceback (most recent call last):
>
>   File 
> "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py",
> line 290, in _event_loop
>
>     handler(ev)
>
>   File "/home/mininet/ryu/ryu/app/SWITCHFSDMV8.py", line 126, in 
> _packet_in_handler
>
>     dhcpPacket = dhcp.dhcp.parser(pkt.protocols[-1])[0]
>
>  File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/dhcp.py",
> line 177, in parser
>
>     boot_file) = struct.unpack_from(cls._DHCP_PACK_STR, buf)
>
> TypeError: unpack_from() argument 1 must be convertible to a buffer, 
> not dhcp
>
>
>
> My temporary solution  just replace dhcp.py in new version with 
> dhcp.py with old version .
>
>
>
> In attached file we can find dhcp.py for old version I renamed to 
> dhco_o.py and dhcp.py for new version and also renamed it to dhcp_n.py
>
>
>
> Best Regards
>
> Munther Numan
> Master Student
> Faculty of Engineering
> University Putra Malaysia
>
>
>
>
>
> ----------------------------------------------------------------------
> -------- Check out the vibrant tech community on one of the world's 
> most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to