title: dpkt invalid tcpdump header error
body: <p>I am getting ValueError: Invalid tcpdump header error for below code. Any help appreciated</p>
  
  <pre><code>import dpkt
  
  f = open('a.pcap')
  pcap = dpkt.pcap.Reader(f)
  
  for ts, buf in pcap:
      eth = dpkt.ethernet.Ethernet(buf)
      ip = eth.data
      tcp = ip.data
  
  if tcp.dport == 80 and len(tcp.data) &gt; 0:
      http = dpkt.http.Request(tcp.data)
      print http.uri
  
  f.close()
  </code></pre>
  
  <p>The Error is shown below</p>
  
  <pre><code>Traceback (most recent call last):
  File "malcap.py", line 6, in &lt;module&gt;
  pcap = dpkt.pcap.Reader(f)
  File "/usr/lib/python2.7/site-packages/dpkt/pcap.py", line 104, in __init__
  raise ValueError, 'invalid tcpdump header'
  ValueError: invalid tcpdump header
  </code></pre>