VMS Help
TCPIP Services, Programming Interfaces, Sockets API, gethostname()
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
Returns the fully qualified name of the local host.
Format
#include <types.h>
#include <socket.h>
int gethostname ( char *name, int namelen) ;
name
The address of a buffer where the name should be returned. The
returned name is null terminated unless sufficient space is not
provided.
namelen
The size of the buffer pointed to by name.
This function returns the translation of the logical names
TCPIP$INET_HOST and TCPIP$INET_DOMAIN when used with the TCP/IP
Services software.
0 Successful completion.
-1 Error; errno is set to indicate the error.
EFAULT The buffer described by name and namelen is
not a valid, writable part of the user address
space.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.