HP-UX Reference (11i v2 04/09) - 3 Library Functions A-M (vol 6)
g
getnetconfig(3N) getnetconfig(3N)
RETURN VALUES
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 40 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).
HP-UX 11i Version 2: September 2004 − 2 − Hewlett-Packard Company Section 3−−401