title: Get IP address of an interface on Linux
body: <p>How can I get the <a href="http://en.wikipedia.org/wiki/IPv4" rel="noreferrer">IPv4</a> address of an interface on Linux from C code?</p>
  
  <p>For example, I'd like to get the IP address (if any) assigned to eth0.</p>