GETNETGRENT(3C) — Series 300 Only
NAME
getnetgrent, setnetgrent, endnetgrent, innetgr − get network group entry
SYNOPSIS
innetgr(netgroup, machine, user, domain)
char *netgroup, *machine, *user, *domain;
setnetgrent(netgroup)
char *netgroup
endnetgrent()
getnetgrent(machinep, userp, domainp)
char **machinep, **userp, **domainp;
DESCRIPTION
The innetgr function returns 1 or 0, depending on whether netgroup contains the machine, user, and domain triple as a member. Any of the three strings (machine, user, or domain) can be NULL to signify a wild card.
The getnetgrent function returns the next member of a network group. After the call, machinep will contain a pointer to a string containing the name of the machine part of the network group member. The userp and domainp pointers behave in a similar manner as machinep . If any of these pointers are returned with a NULL value, they are interpreted as wild cards. The getnetgrent function allocates space for the names. This space is released when an endnetgrent call is made. The getnetgrent function returns 1 if it succeeded in obtaining another network group member, 0 if it reached the end of the group.
The setnetgrent function establishes the network group from which getnetgrent obtains members, and also restarts calls to getnetgrent from the beginning of the list. If the previous setnetgrent call was to a different network group, a endnetgrent call is implied. The endnetgrent call frees the space allocated during the getnetgrent calls.
AUTHOR
Sun Microsystems, Inc.
FILES
/etc/netgroup
SEE ALSO
INTERNATIONAL SUPPORT
8-bit data, 16-bit data, messages
Hewlett-Packard Company — May 11, 2021