Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getnetgrent(3N) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       getnetgrent(3N)                                      getnetgrent(3N)


       NAME
             getnetgrent, setnetgrent, endnetgrent, innetgr - get network
             group entry

       SYNOPSIS
             cc [options] file -lsocket -lnsl
             #include <netdb.h>
             int getnetgrent(char **machinep, char **userp, char **domainp);
             int setnetgrent(char *netgroup);
             int endnetgrent();
             int innetgr(char *netgroup, char *machine, char *user, char *domain);

       DESCRIPTION
             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(3C) to
             allocate space for the name.  This space is released when an
             endnetgrent call is made.  getnetgrent returns 1 if it
             succeeded 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
             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, a
             endnetgrent call is implied.  endnetgrent frees the space
             allocated during the getnetgrent calls.  innetgr 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.

       FILES
             /etc/netgroup
             /var/yp/domainname/netgroup
             /var/yp/domainname/netgroup.byuser
             /var/yp/domainname/netgroup.byhost

       WARNINGS
             The Network Information Service (NIS) must be running when
             using getnetgrent, since it only inspects the NIS netgroup
             map, never the local files.



                           Copyright 1994 Novell, Inc.               Page 1













      getnetgrent(3N)                                      getnetgrent(3N)


      NOTES
            The Network Information Service (NIS) was formerly known as
            Sun Yellow Pages (YP). The functionality of the two remains
            the same; only the name has changed.












































                          Copyright 1994 Novell, Inc.               Page 2








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