innetgr(netgroup, machine, user, domain) char *netgroup, *machine, *user, *domain;
setnetgrent(netgroup) char *netgroup
getnetgrent(machinep, userp, domainp) char **machinep, **userp, **domainp;
getnetgrent returns the next member of a network group. After the call, machinep will contain a pointer to a string containing the name in the ``machine'' field of the network group member, and similarly for userp and domainp. If any of machinep, userp or domainp is returned as a NULL pointer, it signifies a wild card. getnetgrent will use malloc(S) to allocate space for the machine, user, and domain strings. This space is released when a endnetgrent call is made. getnetgrent returns 1 if it succeeds in obtaining another member of the network group, 0 if it has reached the end of the group.
setnetgrent establishes the network group from which getnetgrent will obtain members, and also restarts calls to getnetgrent from the beginning of the list. If the previous setnetgrent call was to a different network group, an endnetgrent call is implied.
endnetgrent frees the space allocated during the getnetgrent calls.
If the Network Information Service is not running, these routines will read /etc/netgroup to obtain the netgroups.