HELP getting host names

HELP getting host names

Post by Stephen Sco » Fri, 25 Jun 1993 12:28:06



How can I access the host name of a machine from within a user`s
C program.  I want the entire network name such as nimitz.mcs.kent.edu

I tried using the gethostname() command but can`t seem to get it to
work properly.  I get a name_length of size 0 and of course nothing for
the name.

Any direction or code segment would be greatly appreciated.

Please reply via email to my address below.


 
 
 

1. HELP getting host names

How can I access the host name of a machine from within a user`s
C program.  I want the entire network name such as nimitz.mcs.kent.edu

I tried using the gethostname() command but can`t seem to get it to
work properly.  I get a name_length of size 0 and of course nothing for
the name.

Any direction or code segment would be greatly appreciated.

Please reply via email to my address below.


2. 'clean-up script'

3. DAT tape drives, can DDS-2 write the old uncompressed format?

4. Help! getting host name is impossible!

5. second hard disk

6. Help: getting error "httpd: cannot determine local host name"

7. Matrox's position on Linux

8. Can't ping the host name or host IP address from host.

9. /etc/hosts (or NIS host map): official-host-name vs nicknames

10. help: named trouble with named.hosts

11. Host name, primary name, domain name...?

12. getting entire host name or ip address