Re: How to get server name from server IP???
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Thu, 27 Apr 2006 15:03:14 -0700
Well, that's pretty confusing... If you know that google.com maps to
64.233.187.99, which it does, sending that IP to gethostbyaddr() should get
you "google.com". However, the DNS server, which is located "out there" on
the Internet, and which does the mapping when you type www.google.com to
give the IP address, does *not* know about YOURNEARBYXPBOX or what its IP
address might me. Therefore you can't use the normal DNS system from the
Internet to find that out. If you have a DNS server on your local network
that *does* know about YOURNEARBYXPBOX and what it's IP address it,
gethostbyaddr() should be able to use it. In order for that to work, the CE
device has to have the IP of your *local* DNS server (or WINS server, if
that's what you use), configured into its network setup.
Paul T.
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:ONh2uyjaGHA.608@xxxxxxxxxxxxxxxxxxxxxxx
It most-probably happens because CE is using RDNS and there's no RDNS
server that knows about the machines that don't work. You should be able
to use RDNS to get a host name if you know what the host name for, say,
www.google.com maps to, for example, but probably not for YOURNEARBYXPBOX,
unless you're running a DNS server on a local machine.
Paul T.
"XPEnew" <new@xxxxxxx> wrote in message
news:eG73OujaGHA.4236@xxxxxxxxxxxxxxxxxxxxxxx
Hello, I use gethostbyaddr(), but I can't get other windows 2K/XP host
name,
BUT if I put CE own IP address, I CAN get it's name.
I don't know if because CE can't get other computer name at all???
"XPEnew" <new@xxxxxxx> wrote in message
news:OoG0fyHaGHA.4936@xxxxxxxxxxxxxxxxxxxxxxx
Thank you very much, just our customer insist not to provide serverenter
name,
just IP address.
We need to login and go to a shared folder to copy some files.
"Ulrich Eckhardt" <eckhardt@xxxxxxxxxxxxxx> wrote in message
news:qho1i3-62h.ln1@xxxxxxxxxxxxxxxxxxxxxxxxx
XPEnew wrote:
I need make a program login to a Win2K/XP server, and user just
address.server IP address, user name and password, NO server name(because
they
don't know).
How can I get server name from it's IP?
Typically, I'd start searching at the reverse case, which is
gethostbyname(). This then quickly leads to gethostbyaddr() which is
probably what you want.
BUT: users usually want to use the symbolic hostname, not the IP
address?If, e.g. because you have no nameserver, you can't resolve from the
symbolic name to the IP, then in most cases you also won't be able to
resolve from the IP to the hostname either, so what you want might be
impossible.
Just curious, why does the server have to be specified by its IP
Also, what protocol is the login procedure in? Maybe that supplies a
hostname as banner by itself when you contact the host.
Uli
.
- References:
- How to get server name from server IP???
- From: XPEnew
- Re: How to get server name from server IP???
- From: Ulrich Eckhardt
- Re: How to get server name from server IP???
- From: XPEnew
- Re: How to get server name from server IP???
- From: XPEnew
- Re: How to get server name from server IP???
- From: Paul G. Tobey [eMVP]
- How to get server name from server IP???
- Prev by Date: ev4 #defines
- Next by Date: Re: ev4 #defines
- Previous by thread: Re: How to get server name from server IP???
- Next by thread: WaveOutDevice
- Index(es):
Relevant Pages
|