title: Linux: retrieve per-interface sent/received packet counters (ethernet, ipv4, ipv6)
body: <p>On Linux, how can I (programmatically) retrieve the following counters <em>on a per-interface basis</em>:</p>
  
  <ul>
  <li>Sent/received ethernet frames,</li>
  <li>Sent/received IPv4 packets,</li>
  <li>Sent/received IPv6 packets.</li>
  </ul>