Manpages - getnetconfig.3t

The library routines described on this page provide the application access to the system network configuration database,

The

function returns a pointer to the current entry in the netconfig database, formatted as a

Successive calls will return successive netconfig entries in the netconfig database. The

function can be used to search the entire netconfig file. The

function returns

at the end of the file. The

argument is the handle obtained through

A call to

has the effect of

to or

the netconfig database. The

function must be called before the first call to

and may be called at any other time. The

function need not be called before a call to

The

function returns a unique handle to be used by

The

function should be called when processing is complete to release resources for reuse. The

argument is the handle obtained through

Programmers should be aware, however, that the last call to

frees all memory allocated by

for the

data structure. The

function may not be called before

The

function returns a pointer to the netconfig structure corresponding to

It returns

if

is invalid (that is, does not name an entry in the netconfig database).

The

function frees the netconfig structure pointed to by

(previously returned by

The

function prints a message to the standard error indicating why any of the above routines failed. The message is prepended with the string

and a colon. A newline character is appended at the end of the message.

The

function is similar to

but instead of sending the message to the standard error, will return a pointer to a string that contains the error message.

The

and

functions can also be used with the

access routines defined in

The

function returns a unique handle to be used by

In the case of an error,

returns

and

or

can be used to print the reason for failure.

The

function returns a pointer to the current entry in the netconfig database, formatted as a

The

function returns

at the end of the file, or upon failure.

The

function returns 0 on success and -1 on failure (for example, if

was not called previously).

On success,

returns a pointer to the

structure corresponding to

otherwise it returns

The

function 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.

These functions are part of libtirpc.

Author: dt

Created: 2022-02-20 Sun 16:02