title: How to differentiate ethernet from the others?
body: <p>It was suggested in an answer here, <a href="https://stackoverflow.com/questions/212528/linux-c-get-the-ip-address-of-local-computer">Get the IP address of the machine</a>, one could use <code>getifaddrs()</code> to obtain the IP address of the machine the program was running on, which worked great :D:D</p>
  
  <p>However, running the same program on two different systems, one displayed</p>
  
  <pre><code>SERVER_ADDRESS lo 127.0.0.1
  SERVER_ADDRESS eth0 129.xxx.xxx.xxx
  SERVER_ADDRESS virbr0 192.zzz.zzz.1
  </code></pre>
  
  <p>while the other displayed</p>
  
  <pre><code>SERVER_ADDRESS lo0 127.0.0.1
  SERVER_ADDRESS en0 192.yyy.yyy.yyy
  </code></pre>
  
  <p>I was going to use <code>strcmp</code> to differentiate ethernet, but now I realized it doesn't work across systems since different strings may be printed out.</p>
  
  <p>Is there a function (or better way) to check whether or not an <code>ifa_name</code> is ethernet or not?</p>