getif/0 and getiflist/0 seem very useful, but shouldn't their output be in sync order-wise with each other?<br><br>getif/0 in my machine outputs...<br><br>{ok,[{{192,168,1,3},{192,168,1,255},{255,255,255,0}},<br>     {{127,0,0,1},{0,0,0,0},{255,0,0,0}}]}<br>
<br>, while getiflist/0 outputs...<br><br>{ok,["lo","eth0"]}<br><br><br>This might be a problem if you had several more interfaces available.  Knowing the output of both are always in sync might simplify things out.<br>
<br><br>Cheers, Alex<br><br><br><br><div id=":5j" class="ArwC7c ckChnd">>Computers have more than one IP address.  E.g., yours has both<br>
<a href="http://127.0.0.1/" target="_blank">>127.0.0.1</a> and <a href="http://192.168.1.101/" target="_blank">192.168.1.101</a>.  Other computers have even more.  The<br>
>inet module has undocumented functions getif/0 and getiflist/0 that<br>
>might do what you want.<br>
><br>
>Another possibility is to call inet:sockname/1 on an open socket to<br>
>find what address the operating system used.</div>