GETNETGRENT(3N-BSd) RISC/os Reference Manual GETNETGRENT(3N-BSd)
NAME
getnetgrent, setnetgrent, endnetgrent, innetgr - get network
group entry
SYNOPSIS
Headers
For -systype svr3:
#include <bsd/sys/types.h>
Declarations
innetgr(netgroup, machine, user, domain)
char *netgroup, *machine, *user, *domain;
setnetgrent(netgroup)
char *netgroup
endnetgrent()
getnetgrent(machinep, userp, domainp)
char **machinep, **userp, **domainp;
DESCRIPTION
inngetgr returns 1 or 0, depending on whether netgroup con-
tains 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 will contain 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() will use malloc(3) to
allocate space for the name. This space is released when a
endnetgrent() call is made. getnetgrent() returns 1 if it
succeeding in obtaining another member of the network group,
0 if it has reached the end of the group.
getnetgrent() establishes the network group from which get-
netgrent() will obtain members, and also restarts calls to
getnetgrent() from the beginning of the list. If the previ-
ous 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.byuser
/etc/yp/domain/netgroup.byhost
Printed 11/19/92 Page 1
GETNETGRENT(3N-BSd) RISC/os Reference Manual GETNETGRENT(3N-BSd)
NOTE
When these routines are used in a program which is compiled
in -systype svr3, they are not resolved by libc.a. See
intro(3) for more information.
Page 2 Printed 11/19/92