title: Tshark - Export packet info from pcap to cvs
body: <p>I am trying to programmatically capture a stream of packets by using <code>Tshark</code>. The simplified terminal command I am using is:</p>
  
  <pre><code>tshark -i 2 -w output.pcap
  </code></pre>
  
  <p>This is pretty straightforward, but I then need to get a <code>.csv</code> file in order to easily analyze the information captured.
  By opening the <code>.pcap</code> file in Wireshark and exporting it in .csv what I get is a file structured as follows:</p>
  
  <pre><code>"No.","Time","Source","Destination","Protocol","Length","Info"
  </code></pre>
  
  <p>but,again, I need to do this in an automatic way. So I tried using the command:</p>
  
  <pre><code>tshark -r output.pcap -T fields -e frame.number -e ip.src -e ip.dst -e frame.len -e frame.time -e frame.time_relative -E header=y -E separator=, &gt; output.csv
  </code></pre>
  
  <p>but I can not find anywhere the name of the <code>"Info"</code> field I get when manually exporting the .csv.
  Any ideas? Thanks!</p>