V
Vladimir Fekete
Hi *,
Could you pleas help me with following problem ?
I need to get FQDN of host as well as it's IP. So I need same result as
"host" command gives me in *nix OSes. I found out these (suitable) functions:
Socket.getaddrinfo
IPSocket.getaddress
TCPSocket.gethostbyname
which can do the job (partialy). My problem is that non of them gives me
back FQDN. Eg. let's say that I have myserver.mydomain.com which is FQDN and
it's alias is myserver.
My problem is that when I use any of those functions with "myserver"
attribiute I always get as set of aliases ["myserver"] array only (e.g. no
myserver.mydomain.com).
Is there any way how to find out FQDN via some ruby function ? Thanks!
Regards,
V.
Could you pleas help me with following problem ?
I need to get FQDN of host as well as it's IP. So I need same result as
"host" command gives me in *nix OSes. I found out these (suitable) functions:
Socket.getaddrinfo
IPSocket.getaddress
TCPSocket.gethostbyname
which can do the job (partialy). My problem is that non of them gives me
back FQDN. Eg. let's say that I have myserver.mydomain.com which is FQDN and
it's alias is myserver.
My problem is that when I use any of those functions with "myserver"
attribiute I always get as set of aliases ["myserver"] array only (e.g. no
myserver.mydomain.com).
Is there any way how to find out FQDN via some ruby function ? Thanks!
Regards,
V.