title: getting error while using tcp.dport in dpkt
body: <p>Im trying to parse the recorded PCAP file using dpkt of python. when i tried to filter tcp connections which is having http(on port 80) requests, I'm getting error as follows ::`</p>
  
  <pre><code>import dpkt
  import socket
  counter=0
  ipcounter=0
  tcpcounter=0
  udpcounter=0
  httpcounter=0
  
  filename='sampledata.pcap'
  
  for ts, pkt in dpkt.pcap.Reader(file(filename, "rb")):
  
      counter+=1
      eth=dpkt.ethernet.Ethernet(pkt) 
      if eth.type!=dpkt.ethernet.ETH_TYPE_IP:
         continue
  
      ip=eth.data
      tcp=ip.data
      ipcounter+=1
  
      if ip.p==dpkt.ip.IP_PROTO_TCP: 
         tcpcounter+=1
  
      if ip.p==dpkt.ip.IP_PROTO_UDP:
         udpcounter+=1
  
      if tcp.dport == 80 and tcp.flags &amp; tcp.TH_SYN == 1 and tcp.flags &amp; tcp.TH_SYN == 1 and tcp.flags &amp; tcp.TH_ACK == 1 :
          src = socket.inet_ntoa(ip.src)
          dst = socket.inet_ntoa(ip.dst)
          print "%s -&gt; %s" %(src,dst)`
  </code></pre>
  
  <p>error:: I am getting some OSPF error as follows</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 72, in &lt;module&gt;
      if tcp.dport == 80 and tcp.flags &amp; tcp.TH_SYN == 1 and tcp.flags &amp; tcp.TH_SYN == 1 and tcp.flags &amp; tcp.TH_ACK == 1 :
  AttributeError: 'OSPF' object has no attribute 'dport'
  </code></pre>