Lines Matching refs:netconfig
52 #include <netconfig.h>
71 * system network configuration database, /etc/netconfig. In addition to the
72 * netconfig database and the routines for accessing it, the environment
79 * netconfig errors
85 #define NC_BADFILE EBADF /* format for netconfig file is bad */
88 * semantics as strings (should be in netconfig.h)
96 * flags as characters (also should be in netconfig.h)
108 "Netconfig database not found",
111 "Netconfig database has invalid format"
122 char *linep; /* hold line read from netconfig */
123 struct netconfig *ncp;
131 /* pointer to the current netconfig entry */
140 static int parse_ncp(char *, struct netconfig *);
141 static struct netconfig *dup_ncp(struct netconfig *);
144 static FILE *nc_file; /* for netconfig db */
192 * A call to setnetconfig() establishes a /etc/netconfig "session". A session
194 * a call to setnetconfig()) searches through the /etc/netconfig database will
197 * current handle will process one subsequent entry in /etc/netconfig.
208 * the netconfig database is not present).
221 * handle without reopening the netconfig db.
224 if ((nc_file != NULL) || (nc_file = fopen(NETCONFIG, "re")) != NULL) {
239 * the netconfig database, formatted as a struct netconfig. On each subsequent
241 * getnetconfig() can thus be used to search the entire netconfig file.
245 struct netconfig *
251 struct netconfig *np;
268 * netconfig db.
308 * Read a line from netconfig file.
357 * endnetconfig() may be called to "unbind" or "close" the netconfig database
415 * getnetconfigent(netid) returns a pointer to the struct netconfig structure
417 * not name an entry in the netconfig database). It returns NULL and sets
418 * errno in case of failure (for example, if the netconfig database cannot be
422 struct netconfig *
425 FILE *file; /* NETCONFIG db's file pointer */
426 char *linep; /* holds current netconfig line */
428 struct netconfig *ncp = NULL; /* returned value */
438 * entries in the netconfig db that has not been read, we then read the
440 * If all the netconfig db has been read and placed into the list and
452 if ((file = fopen(NETCONFIG, "re")) == NULL)
495 * freenetconfigent(netconfigp) frees the netconfig structure pointed to by
500 freenetconfigent(struct netconfig *netconfigp)
512 * Parse line and stuff it in a struct netconfig
526 struct netconfig *ncp) /* where to put results */
646 * Duplicates the matched netconfig buffer.
648 static struct netconfig *
649 dup_ncp(struct netconfig *ncp)
651 struct netconfig *p;
664 * First we dup all the data from matched netconfig buffer. Then we
669 * of the netconfig char pointer member point to the right address