title: Linux getting all network interface names
body: <p>I need to collect all the interface names, even the ones that aren't up at the moment. Like <code>ifconfig -a</code>.</p>
  
  <p><code>getifaddrs()</code> is iterating through same interface name multiple times. How can I collect all the interface names just once using <code>getifaddrs()</code>?</p>