getnetpath(3N)getnetpath(3N)NAMEgetnetpath(), setnetpath(), endnetpath() - get /etc/netconfig entry
corresponding to NETPATH component
The routines described on this page are part of the Network Selection
component. They provide the application access to the system network
configuration database, as it is "filtered" by the environment variable
(see environ(5)). See getnetconfig(3N) for other routines that also
access the network configuration database directly. The variable is a
list of colon-separated network identifiers.
returns a pointer to the database entry corresponding to the first
valid component. The entry is formatted as a On each subsequent call,
returns a pointer to the entry that corresponds to the next valid com‐
ponent. can thus be used to search the database for all networks
included in the variable. When has been exhausted, returns NULL.
A call to "binds" to or "rewinds" must be called before the first call
to and may be called at any other time. It returns a handle that is
silently ignores invalid components. A component is invalid if there
is no corresponding entry in the database.
If the variable is unset, behaves as if were set to the sequence of
"default" or "visible" networks in the database, in the order in which
they are listed.
may be called to "unbind" from when processing is complete, releasing
resources for reuse. Programmers should be aware, however, that frees
all memory allocated by for the data structure.
Thread Safe: Yes
Cancel Safe: Yes
Fork Safe: No
Async-cancel Safe: No
Async-signal Safe: No
These functions can be called safely in a multithreaded environment.
They may be cancellation points in that they call functions that are
In a multithreaded environment, these functions are not safe to be
called by a child process after and before These functions should not
be called by a multithreaded application that supports asynchronous
cancellation or asynchronous signals.
returns a handle that is used by In case of an error, returns NULL. or
can be used to print out the reason for failure. See getnetconfig(3N).
When first called, returns a pointer to the database entry correspond‐
ing to the first valid component. When has been exhausted, returns
returns on success and on failure (for example, if was not called pre‐
SEE ALSOgetnetconfig(3N), netconfig(4), environ(5).