title: Obtaining local IP address using getaddrinfo() C function?
body: <p>I'm trying to obtain my local (not the external) IP address using the getaddrinfo() function, but I saw the examples provided <a href="http://beej.us/guide/bgnet/output/html/multipage/getaddrinfoman.html" rel="noreferrer">here</a>, and they where too complex for my needs. Also saw other posts and most of them really wanted to get the external IP, not the local one.</p>
  
  <p>Could anyone provide a link to a simple example (or a simple example) about how to obtain my own local IP address using this function ?</p>
  
  <p>Just to be clear when I say local, if a router is <code>192.168.0.1</code> , my local IP address could be something like <code>192.168.0.x</code> ( just an example ).</p>