title: dpkt doesn't generate tcp object
body: <p>Try to use dpkt to parse a pcap. Got the following sample code but it gave errors:</p>
  
  <pre><code>Traceback (most recent call last):
    File "te.py", line 14, in &lt;module&gt;
      print tcp.sport
  AttributeError: 'str' object has no attribute 'sport'
  </code></pre>
  
  <p>Just installed Ubuntu 14.04 64bit, python 2.7.6.  Installed module "dpkt" using "pip", but not sure what's the version on dpkt.</p>
  
  <pre><code>#examples
  #   https://jon.oberheide.org/blog/2008/10/15/dpkt-tutorial-2-parsing-a-pcap-file/
  #   https://bytes.com/topic/python/answers/944167-dpkt-parsing-pcap-file
  import dpkt
  import sys
  
  f = open(sys.argv[1])
  pcap = dpkt.pcap.Reader(f)
  
  for ts, buf in pcap:
      eth = dpkt.ethernet.Ethernet(buf)
      ip = eth.data
      tcp = ip.data
      print tcp.sport
  f.close()
  </code></pre>