VMS Help
TCPIP Services, Programming Interfaces, Sockets API, getnetbyname()
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
Searches the networks database sequentially from the beginning
for a network record with a given name or alias.
The $QIO equivalent is the IO$_ACPCONTROL function with the
INETACP_FUNC$C_GETNETBYNAME subfunction code.
Format
#include <netdb.h>
struct netent *getnetbyname ( char *name );
name
A pointer to a null-terminated character string containing either
the network name or an alias for the network name.
This function finds the first network record in the networks
database with the given name or alias.
The getnetbyaddr() and getnetbyname() functions use a common
static area for their return values. Subsequent calls to any of
these functions overwrite previously returned network entries.
You must make a copy of the network entry if you want to save it.
NULL Indicates end of file or an error.
x A pointer to an object having the netent
structure.
EFAULT The buffer described by name is not a valid,
writable part of the user address space.
EINVAL The net or net_data argument is invalid.
ESRCH The search failed.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.