title: Solaris: Programmatic interface to ifconfig?
body: <p>I'm looking for a programmatic interface to the Solaris <a href="http://docs.oracle.com/cd/E23824_01/html/821-1462/ifconfig-1m.html#scrolltoc" rel="nofollow noreferrer">ifconfig(1M)</a> command.</p>
  
  <p>Apparently Linux has the <a href="http://www.kernel.org/doc/man-pages/online/pages/man3/getifaddrs.3.html" rel="nofollow noreferrer">getifaddrs(3)</a> command, but as far as I can tell this has <a href="http://markmail.org/message/t74kvl63savhzrzp" rel="nofollow noreferrer">not been ported to Solaris</a>.</p>
  
  <p>Short of attempting to use the code at the <a href="http://markmail.org/message/t74kvl63savhzrzp" rel="nofollow noreferrer">link above</a>, is there any way to determine <a href="http://docs.oracle.com/cd/E23824_01/html/821-1462/ifconfig-1m.html#scrolltoc" rel="nofollow noreferrer">ifconfig(1M)</a>-type data (network interface presence, state, etc.) without forking the system command and <a href="https://stackoverflow.com/questions/1328678/parse-numeric-ifconfig-flags">parsing the output</a>?</p>