HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)
n
nis_names(3N) nis_names(3N)
aticks The time spent in any ‘‘accelerators’’ or caches. This includes the time required to locate
the server needed to resolve the request.
cticks The total time spent in the request. This clock starts when you enter the client library
and stops when a result is returned. By subtracting the sum of the other ticks values
from this value, you can obtain the local overhead of generating a NIS+ request.
Subtracting the value in dticks from the value in zticks will yield the time spent in the service code itself.
Subtracting the sum of the values in zticks and aticks from the value in cticks will yield the time spent in
the client library itself. Note: all of the tick times are measured in microseconds.
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. These functions may be thread can-
cellation points because they invoke functions that are thread cancellation 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 support
asynchronous cancellation or asynchronous signals.
RETURN VALUES
The client library can return a variety of error returns and diagnostics. The more salient ones are docu-
mented below.
NIS_SUCCESS The request was successful.
NIS_S_SUCCESS The request was successful, however the object returned came from an object
cache and not directly from the server. If you do not wish to see objects from
object caches you must specify the flag NO_CACHE when you call the lookup
function.
NIS_NOTFOUND The named object does not exist in the namespace.
NIS_CACHEEXPIRED The object returned came from an object cache that has expired . The time to
live value has gone to zero and the object may have changed. If the flag
NO_CACHE was passed to the lookup function then the lookup function will
retry the operation to get an unexpired copy of the object.
NIS_NAMEUNREACHABLE
A server for the directory of the named object could not be reached. This can
occur when there is a network partition or all servers have crashed. See the
HARD_LOOKUP flag.
NIS_UNKNOWNOBJ The object returned is of an unknown type.
NIS_TRYAGAIN The server connected to was too busy to handle your request. For the add,
remove, and modify operations this is returned when either the master server
for a directory is unavailable or it is in the process of checkpointing its data-
base. It can also be returned when the server is updating its internal state.
And in the case of nis_list() if the client specifies a callback and the
server does not have enough resources to handle the callback.
NIS_SYSTEMERROR A generic system error occurred while attempting the request. Most commonly
the server has crashed or the database has become corrupted. Check the sys-
log record for error messages from the server.
NIS_NOT_ME A request was made to a server that does not serve the name in question.
Normally this will not occur, however if you are not using the built in location
mechanism for servers you may see this if your mechanism is broken.
NIS_NOMEMORY Generally a fatal result. It means that the service ran out of heap space.
NIS_NAMEEXISTS An attempt was made to add a name that already exists. To add the name,
first remove the existing name and then add the new object or modify the
existing named object.
Section 3−−666 Hewlett-Packard Company − 3 − HP-UX 11i Version 2: September 2004