gethostbyname()
Returns host information on the host with the specified host name.
host = gethostbyname(name)
host struct | *host; |
char | *name; |
host | Pointer to the hostent structure that contains host |
| information. |
| The hostent structure is defined in the include files |
| <netdb.h>, SOCKET.PASI, and SOCKET.FTNI, for C, |
| Pascal, and FORTRAN programs, respectively. |
name | Pointer to string that contains the name of the host about whom |
| you need to obtain information. Terminate the string with the |
| \0 character. |
gethostent()
Reads the next line of the /etc/hosts file and returns the host information.
host = gethostent()
struct hostent *host;
host | Pointer to a hostent structure containing host information. |
| The hostent structure is defined in the include files |
| <netdb.h>, SOCKET.PASI, and SOCKET.FTNI, for C, |
| Pascal, and FORTRAN programs, respectively. |
getlocalname()
Returns the name of the host/local system.
error = getlocalname(hostname)
character*(*) | hostname; |
integer*2 | error; |
error | Is an integer that returns 0 for success or nonzero if the |
| network is down. |
hostname | Returns a FORTRAN character string for the local node name. |
| The hostname string is limited to 50 characters. |
Berkeley Software Distribution Interprocess Communication 423