title: Get all ips in PCAP file
body: <p>I have a set of PCAP files and I need to retrieve all the ips. I found <a href="https://ask.wireshark.org/questions/4827/determining-unique-mac-and-ip-addresses-in-a-pcap" rel="nofollow">this link</a> and have currently been using this command.</p>
  
  <pre><code>tshark_path + " -r " + infile + " -T fields -e ip.dst | sort | uniq
  </code></pre>
  
  <p>The problem is this seems to be very slow and also occasionally returns something that looks like this: <code>128.219.232.12,10.78.0.131</code>. My question is if there is a better way to do this that will run quicker and be more accurate. </p>
  
  <p>Also noteworthy, my code is in python.</p>