07/31/2013 3:04 AM
post103767
|
You need to readup on tcpip, it has nothing to do with QNX6. It also depends on your configuration, do you have a
DomainNameServer. You might need one if the address IP of that PC is changing all the time. You can hard code the ip
adresse/name in the file /etc/hosts but that will only work if the name of IP adresse of the PC never changes, if it
never changes than what is the point of using a name ;-)
If you do have a domain name server, check the doc on /etc/resolve.conf
-----Message d'origine-----
De : Thanushan Balakrishnan [mailto:community-noreply@qnx.com]
Envoyé : Wednesday, July 31, 2013 12:01 AM
À : general-community
Objet : Set remote hostname
Hello,
I'm using QNX 6.2.1 on an embedded board (I'll call it QNX box). The board is connected to a PC via Ethernet.
I've the network configured and the driver is working fine. I can confirm this by ping the PC from the QNX box with the
PC's IP address, it all works.
Now I want to write some software to run server-client application. The PC is the server and the QNX box is the client.
I think, I can use the `connect()` function to establish connection with the server. But this function needs know about
the server. I'm guessing I can use the `gethostbyname()` function to get the server info.
My question is how to find the name of the server? I only know the IP address of the server. May be there is a way to
assign a name to this IP address in QNX box.
Any help will be appreciated.
Many thanks,
Thanushan
_______________________________________________
General
http://community.qnx.com/sf/go/post103766
To cancel your subscription to this discussion, please e-mail general-community-unsubscribe@community.qnx.com
|
|
|