Sponsored Content
Full Discussion: getting computer name
Top Forums Programming getting computer name Post 47532 by coredump2003 on Thursday 12th of February 2004 05:48:57 AM
Old 02-12-2004
Got it: gethostbyaddr

Greetings!
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

xwindow on old computer

hello at first sorry for my english... i know it isn't good but i hope you can understand me i want to install xwindow on my old pentium133MHz, 49MB ram memory, graphic card - stb horizon64 1MB (with old monochromatic monitor - horizontal 30.6-36.0, vertical 50-90) all this under redhat6.1...... (1 Reply)
Discussion started by: pgas
1 Replies

2. UNIX for Advanced & Expert Users

who - PC Computer name

Does anyone know of a way of identifying the PC / client name rather than IP address via who or some other AIX command (5.3). (4 Replies)
Discussion started by: gefa
4 Replies

3. UNIX for Dummies Questions & Answers

Computer Does NOT Ping

Hi, I cannot ping my IP address on the following settings and was wondering if anyone knows a solution to make the computer pingable. Windows XP Media Centre Edition Service Pack 3 Wireless Router DLINK DSL-G604Tv2 Wireless Connection Windows Firewall - disabled completely by "stopped in... (2 Replies)
Discussion started by: timmc10
2 Replies

4. What is on Your Mind?

How Many hours on Computer?

How many hours you spend on Computer in a day??? (10 Replies)
Discussion started by: malcomex999
10 Replies

5. What is on Your Mind?

What was your first computer?

Hey, the What Do You Do for a Living thread got me thinking about this. My first "computer" was a Timex Sinclair that I built from a kit. I also spent many hours painstakingly programming a Commodore Vic20 to display graphics and sound (and save them on that slooooow tape drive). My first "real"... (26 Replies)
Discussion started by: dday
26 Replies

6. UNIX for Dummies Questions & Answers

Can't shutdown the computer

i cannot shutdown my computer through GUI or CLI when i put the command shutdown -P/-r nowor press the shutdown button it goes to the login prompt and stays like that afterwards, so i press CTRL+ALT+delete (which works) but that only restarts it and closes processes like winbind and apache ... (6 Replies)
Discussion started by: mi117
6 Replies

7. UNIX for Dummies Questions & Answers

Please help my computer has been compromised

Hi everyone, I hope I am posting in the right spot and I really need some help. I am going through a horrible divorce and I am afraid that my husband has compromised . He set up my mac computer and router and for my job set up remote access for me. I caught him cheating on me and I think he... (6 Replies)
Discussion started by: kk243665
6 Replies
gethostbyaddr(3)					     Library Functions Manual						  gethostbyaddr(3)

NAME
gethostbyaddr, gethostbyaddr_r - Gets a network host entry by address LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <netdb.h> struct hostent *gethostbyaddr( const void *addr, size_t len, int type) ; [Tru64 UNIX] The following obsolete routine is supported in order to maintain backward compatibility with previous versions of the operat- ing system. You should not use it in new designs. int *gethostbyaddr_r( const char *addr, int len, int type, struct hostent *hptr, struct hostent_data *hdptr); [Tru64 UNIX] The following definition of the gethostbyaddr() routine does not conform to current standards and is supported only for backward compatibility (see standards(5)): struct hostent *gethostbyaddr( const char *addr, int len, int type) ; STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: gethostbyaddr(): XNS4.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies an Internet address in network order. Specifies the number of bytes in an Internet address. Specifies the Internet domain address format (AF_INET). [Tru64 UNIX] Is data for the host database. The netdb.h header file defines the hostent_data structure. [Tru64 UNIX] Points to the hostent structure. The netdb.h header file defines the hostent structure. DESCRIPTION
The gethostbyaddr() routine returns a pointer to a structure of type hostent. Its members specify data obtained from either the local /etc/hosts file or one of the files distributed by DNS/BIND or NIS. To determine which file or files to search, and in which order, the system uses the switches in the /etc/svc.conf file. The netdb.h header file defines the hostent structure. The gethostbyaddr() routine searches the network host database sequentially until a match with the addr and type parameters occurs. The len parameter must specify the number of bytes in an Internet address. The addr parameter must specify the address in network order. The type parameter must be the constant AF_INET, which specifies the Internet Protocol Version 4 (IPv4) address format. When EOF (End-of-File) is reached without a match, an error value is returned. If using DNS/BIND, the information is obtained from a name server specified in the /etc/resolv.conf file. When the name server is not run- ning, the gethostbyaddr() routine searches the local hosts name file. Use the endhostent() routine to close the /etc/hosts file. NOTES
The gethostbyaddr() routine returns a pointer to thread-specific data. Subsequent calls to this or a related routine from the same thread overwrite this data. [Tru64 UNIX] The gethostbyaddr_r() routine is an obsolete reentrant version of the gethostbyaddr() routine. It is supported in order to maintain backward compatibility with previous versions of the operating system and should not be used in new designs. Note that you must zero-fill the hdptr structure before its first access by the gethostbyaddr_r() routine. RETURN VALUES
Upon successful completion, the gethostbyaddr() routine returns a pointer to a hostent structure. If it reaches the end of the network hostname database, it returns a null pointer. [Tru64 UNIX] Upon successful completion, the gethostbyaddr_r() routine stores the hostent structure in hptr, and returns a value of 0 (zero). Upon failure, it returns a value of -1. ERRORS
If the gethostbyaddr() or gethostbyaddr_r() routine call fails, h_errno is set to one of the following values: Host is unknown. The server recognized the request and the name, but no address is available for the name. Another type of name server request may be successful. An unexpected server failure occurred. This is a nonrecoverable error. A transient error occurred, for example, the server did not respond. A retry at some later time may be successful. [Tru64 UNIX] If any of the following conditions occurs, the gethostbyaddr_r() routine sets errno to the corresponding value: The name, hptr, or hdptr is invalid, or type is not AF_INET. FILES
This file is the Internet network hostname database. Each record in the file occupies a single line and has three fields consisting of the host address, official hostname, and aliases. The resolver configuration file. The database service selection configuration file. RELATED INFORMATION
routines: endhostent(3), gethostbyname(3), sethostent(3). Files: hosts(4), resolv.conf(4), svc.conf(4). Networks: bind_intro(7), nis_intro(7). Standards: standards(5) delim off gethostbyaddr(3)
All times are GMT -4. The time now is 06:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy