HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)

n
netdir(3N) netdir(3N)
char c_uaddr; /* client’s universal addr */
char
m_uaddr; /* the result */
If s_uaddr is an address such as 0.0.0.0.1.12
, and the call is suc-
cessful,
m_uaddr is set to an address such as
192.11.109.89.1.12
. For most transports, m_uaddr
is identical
to
s_uaddr.
MULTITHREAD USAGE
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 cancel points.
In a multithreaded environment, these functions are not safe to be called by a child process after
fork()
and before exec(). These functions should not be called by a multithreaded application that supports
asynchronous cancellation or asynchronous signals.
RETURN VALUE
The netdir_perror() routine prints an error message on the standard output stating why one of the
name-to-address mapping routines failed. The error message is preceded by the string given as an argu-
ment.
The
netdir_sperror()
returns a pointer to a buffer which contains an error message string stating
why one of the name-to-address mapping routines failed. This buffer is overwritten on each call. In mul-
tithreaded applications, this buffer is implemented as thread-specific data.
The
netdir_getbyaddr()
function returns 0 on success and a non-zero value on failure.
SEE ALSO
gethostname(2), getnetconfig(3N), getnetpath(3N), netconfig(4).
74 Hewlett-Packard Company 3 HP-UX 11i Version 3: February 2007