[erlang-questions] how to get the factual ip address?

litao cheng litaocheng@REDACTED
Sat Oct 25 14:25:05 CEST 2008


hi, everyone.
I want to get the factual  ip address of my host. when I use the
inet:gethostname earn my host name. and then use the inet:gethostbyname/1 or
inet:getaddrs/2 to get the ip address.  the results is : 127.0.1.1.
I can use the ifconfig to see the ip address of eth0 is 192.168.1.101, I
want to get this value. how can I do it?
btw, If it relate to the inetrc config of kernel app?
(my computer os is ubuntu 8.04, OTP R12B4)

BS!
litaocheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081025/ce957a72/attachment.htm>


More information about the erlang-questions mailing list