1 .\" @(#)getnetpath.3n 1.26 93/05/07 SMI; from SVr4
2 .\" $NetBSD: getnetpath.3,v 1.6 2003/04/16 13:34:43 wiz Exp $
3 .\" Copyright 1989 AT&T
11 .Nd get /etc/netconfig entry corresponding to NETPATH component
16 .Ft struct netconfig *
17 .Fn getnetpath "void *handlep"
21 .Fn endnetpath "void *handlep"
23 The routines described in this page provide the application access to the system
24 network configuration database,
29 environment variable (see
33 for other routines that also access the
34 network configuration database directly.
35 The NETPATH variable is a list of colon-separated network identifiers.
38 returns a pointer to the
39 netconfig database entry corresponding to the first valid
41 The netconfig entry is formatted as a struct netconfig.
42 On each subsequent call,
44 returns a pointer to the netconfig entry that corresponds to the next
45 valid NETPATH component.
47 can thus be used to search the netconfig database for all networks
48 included in the NETPATH variable.
49 When NETPATH has been exhausted,
60 must be called before the first call to
62 and may be called at any other time.
63 It returns a handle that is used by
67 silently ignores invalid NETPATH
69 A NETPATH component is invalid if there is no corresponding
70 entry in the netconfig database.
72 If the NETPATH variable is unset,
75 were set to the sequence of
79 networks in the netconfig database, in the
80 order in which they are listed.
81 .\"This proviso holds also for this
88 when processing is complete, releasing resources for reuse.
89 Programmers should be aware, however, that
91 frees all memory allocated by
93 for the struct netconfig data structure.
96 returns a handle that is used by
103 returns 0 on success and -1 on failure
106 was not called previously).
110 can be used to print out the reason for failure.
116 returns a pointer to the netconfig database entry corresponding to the first
117 valid NETPATH component.
118 When NETPATH has been exhausted,