title: Ip list from captured pcap python
body: <p>I'm trying to sort a previously-captured Pcap file, I want to build a list of ip source and destinations, so I can run calculation against them.</p>
  
  <p>I have attempted to search the pcap file using a search function but this fails with ip addresses, any ideas?</p>
  
  <p>Eventually I want the code to sniff live using the folowing code then build a list if the ip addresses.</p>
  
  <pre><code>newpkt = sniff(count = 100, prn=lambda x:x.sprintf("{IP:%IP.src% -&gt; %IP.dst%\n}     {Raw:%Raw.load%\n}"))
  </code></pre>