On Thu, 24 Sep 2015 21:54:26 +0800 Vinllen Chen <[email protected]> wrote:
> Hi, All: > > I use the following code to traversing packet header: > > for p in pkt.protocols: > print p.protocol_name > > The error show: > AttributeError: 'str' object has no attribute 'protocol_name' > > So i debug this pakcet: > to quagga pkt: > ethernet(dst='e6:59:e2:8f:87:f3',ethertype=33024,src='04:8d:7b:fc:16:11'), > vlan(cfi=0,ethertype=2054,pcp=0,vid=101), > arp(dst_ip='20.1.1.2',dst_mac='e6:59:e2:8f:87:f3',hlen=6,hwtype=1,opcode=2,plen=4,proto=2048,src_ip='20.1.1.1',src_mac='04:8d:7b:fc:16:11'), > '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > > p:ethernet(dst='e6:59:e2:8f:87:f2',ethertype=33024,src='04:7d:7b:fc:16:11') > p:vlan(cfi=0,ethertype=2054,pcp=0,vid=101) > p:arp(dst_ip='20.1.1.2',dst_mac='e6:59:e2:8f:87:f2',hlen=6,hwtype=1,opcode=2,plen=4,proto=2048,src_ip='20.1.1.1',src_mac='04:7d:7b:fc:16:11') > p:'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > > The error happend when the 'p' point to > '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > which is the data but not head in the packet. p could be byte if p can't be parsed. > I think it maybe a bug in the ryu3.23, but if not, what is the correct way > to traversing packet header ------------------------------------------------------------------------------ _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
