Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

GETNETGRENT(3N)  —  UNIX Programmer’s Manual

NAME

endnetgrent, getnetgrent, innetgr, setnetgrent − get network group entry

SYNOPSIS

endnetgrent()
getnetgrent(machinep, userp, domainp)
char ∗∗machinep, ∗∗userp, ∗∗domainp;
innetgr(netgroup, machine, user, domain)
char ∗netgroup, ∗machine, ∗user, ∗domain;
setnetgrent(netgroup)
char ∗netgroup;

DESCRIPTION

Inngetgr returns 1 or 0, depending on whether netgroup contains the machine, user, domain triple as a member.  Any of the three strings machine, user, or domain can be NULL, in which case it signifies a wild card. 

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, 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 mallocs space for the name.  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 obtains members and 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 the getnetgrent calls. 

FILES

/etc/netgroup
/etc/yp/domain/netgroup
/etc/yp/domain/netgroup.byhost
/etc/yp/domain/netgroup.byuser

4BSD

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026