Re: How to get server name from server IP???
- From: "XPEnew" <new@xxxxxxx>
- Date: Thu, 4 May 2006 09:30:09 -0400
Thank you Paul.
Just want everybody to know,I fixed this problem by setting the WINS
server to the Router IP or the server IP, or any windows IP in the network.
Then after that, gethostbyaddr() does return NetBIOS host name.
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:Oh0zhZkaGHA.5108@xxxxxxxxxxxxxxxxxxxxxxx
Well, that's pretty confusing... If you know that google.com maps toget
64.233.187.99, which it does, sending that IP to gethostbyaddr() should
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 toCE
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
device has to have the IP of your *local* DNS server (or WINS server, ifable
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
YOURNEARBYXPBOX,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
tounless 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
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
beresolve from the IP to the hostname either, so what you want might
address?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
.
- Prev by Date: Re: Starting Embedded Visual C++
- Next by Date: Re: WCELOAD.EXE
- Previous by thread: Scrambled graphics with nested buffered components at custom GUI
- Next by thread: Timer et Sleep
- Index(es):
Relevant Pages
|