getnetconfig.3n (2010 09)

g
getnetconfig(3N) getnetconfig(3N)
RETURN VALUE
setnetconfig()
returns a unique handle to be used by getnetconfig()
. In the case of an error,
setnetconfig()
returns NULL and nc_perror() or nc_sperror() can be used to print the rea-
son for failure.
getnetconfig()
returns a pointer to the current entry in the netconfig() database, formatted as
a
struct netconfig. getnetconfig()
returns NULL at the end of the file, or upon failure.
endnetconfig()
returns 0 on success and -1 on failure (for example, if
setnetconfig() was not
called previously).
On success,
getnetconfigent()
returns a pointer to the struct netconfig
structure
corresponding to netid ; otherwise it returns NULL.
nc_sperror() returns a pointer to a buffer which contains the error message string. This buffer is
overwritten on each call. In multithreaded applications, this buffer is implemented as thread-specific
data.
SEE ALSO
getnetpath(3N), netconfig(4), environ(5).
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010