Have you tried to put some debug prints in the parsing function of dhcp.py?
Le ven. 16 déc. 2016 à 12:28, Munther Numan <[email protected]> a écrit :
> Dear all , Greeting ..
>
>
>
> I get error when I run simple dhcp server , I capture the packet in
> wireshark and I see the packet is content 4 protocols ( Ethernet , ipv4 ,
> udp , dhcp discover ) but in Ryu framework I see only 3 protocols such as
> below :
>
>
>
> msg = ev.msg
>
> pkt = packet.Packet(msg.data)
>
> print pkt.protocols
>
> """ outputs:
>
>
> [ethernet(dst='ff:ff:ff:ff:ff:ff',ethertype=2048,src='a0:36:9f:2d:a7:f9'),
>
>
>
> ipv4(csum=14742,dst='255.255.255.255',flags=0,header_length=5,identification=0,offset=0,
>
>
> option=None,proto=17,src='0.0.0.0',tos=16,total_length=328,ttl=128,version=4),
>
> udp(csum=39669,dst_port=67,src_port=68,total_length=308),
>
>
>
> '\x01\x01\x06\x00F\x08\x9f\x06\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
>
>
> \x00\xa06\x9f-\xa7\xf9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
>
>
> \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
>
> \x00\x00\x00\x00\x00\x04\n\x00\xaa\x00\x00\x00\x00']
>
> """
>
> I know this packet is dhcp discover becoues as you see in udp src_port is
> 68 and dst_port is 67 but how can I parsing this packet when I write the
> code below I did nt get any thing :
>
>
>
> dhcpPacket = pkt.get_protocol(dhcp.dhcp)
>
> print dhcppacket
>
>
>
> ''' output :
>
> None
>
> '''
>
>
>
> Please if you can help me to solve this issue .
>
>
>
>
>
> 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