getnetgrent(3C)
NAME
getnetgrent(), setnetgrent(), endnetgrent(), innetgr() − get network group entry
SYNOPSIS
int innetgr(
char *netgroup,
char *machine,
char *user,
char *domain
);
int setnetgrent(char *netgroup);
int endnetgrent();
int getnetgrent(
char **machinep,
char **userp,
char **domainp
);
DESCRIPTION
innetgr() Returns 1 if netgroup contains the machine, user, and domain triple as a member. Otherwise, it returns 0. If machine, user, or domain is NULL, innetgr interprets NULL to mean, any machine, user, or domain respectively. Refer to netgroup(4) for a description of netgroup membership criteria.
getnetgrent() Returns the next member of a network group. After the call, machinep contains a pointer to a string containing the name of the machine part of the network group member. Pointers userp and domainp behave in a manner similar to machinep. If any of these pointers are returned with a NULL value, they are interpreted as wild cards. getnetgrent() allocates space for the names. This space is released when an endnetgrent() call is made. getnetgrent() returns 1 if it succeeded in obtaining another network group member, 0 if it reached the end of the group.
setnetgrent() 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.
endnetgrent() Frees the space allocated during getnetgrent() calls.
AUTHOR
getnetgrent() was developed by Sun Microsystems, Inc.
FILES
/etc/netgroup
SEE ALSO
Hewlett-Packard Company — HP-UX Release 9.03: April 1994