Closed GoogleCodeExporter closed 9 years ago
Maybe, test3.pcap contained ICMP packet.
You should ignore what exclude TCP packet.
code example:
for ts,buf in pcap:
eth = dpkt.ethernet.Ethernet(buf)
if type(eth.data) != dpkt.ip.IP:
print 'not ip packet.'
continue
ip = eth.data
if type(ip.data) != dpkt.tcp.TCP:
print 'not tcp packet.'
continue
tcp = ip.data
if tcp.dport == 80 and len(tcp.data) > 0:
http_req = dpkt.http.Request(tcp.data)
if tcp.sport == 80 and len(tcp.data) > 0:
http_res = dpkt.http.Response(tcp.data)
Original comment by ruy.su...@gmail.com
on 6 Jul 2012 at 7:31
Closing, as this is not actually a bug.
Original comment by timur.al...@gmail.com
on 24 Aug 2012 at 9:47
Original issue reported on code.google.com by
engn...@gmail.com
on 3 Jul 2012 at 2:27