ypclnt.3c (2010 09)

y
ypclnt(3C) ypclnt(3C)
indata Contents of the incallback -> data element passed to
yp_all(). The
data element of the callback structure can share state information
between
foreach() and the mainline code. Its use is optional, and no
part of the NIS client package inspects its contents. Cast it to something
useful or ignore it as appropriate.
The
foreach() function is Boolean. It should return zero to indicate it needs to
be called again for further received key-value pairs, or non-zero to stop the flow of
key-value pairs. If foreach() returns a non-zero value, it is not called again and
the functional value of yp_all() is then 0.
yp_order() Returns the order number for a map. This function is not supported if the ypbind
process on the client’s system is bound to an NIS+ server running in "YP-
compatibility mode."
yp_master() Returns the host name of the master NIS server for a map.
yperr_string()
Returns a pointer to an error message string that is null-terminated, but contains
no period or newline.
ypprot_err() Takes an NIS protocol error code as input and returns a
ypclnt layer error code
that can be used as input to
yperr_string()
MULTITHREAD USAGE
Thread Safe: Yes
Cancel Safe: No
Fork Safe: No
Async-cancel Safe: No
Async-signal Safe: No
These functions cannot 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 support
asynchronous cancellation or asynchronous signals.
WARNINGS
Starting with ONCplus version B.11.31.02, the NIS Version 1 protocol is no longer available.
RETURN VALUE
All functions in this package of type
int return 0 if the requested operation is successful or one of the
following errors if the operation fails.
[YPERR_ACCESS] database access violation
[YPERR_BADARGS] args to function are bad
[YPERR_BADDB] NIS map is defective
[YPERR_BUSY] database busy
[YPERR_DOMAIN] cannot bind to server on this NIS domain
[YPERR_KEY] no such key in map
[YPERR_MAP] no such map in server’s NIS domain
[YPERR_NODOM] local NIS domain name not set
[YPERR_NOMORE] no more records in map
[YPERR_PMAP] cannot communicate with portmap
[YPERR_RESRC] resource allocation failure
[YPERR_RPC] RPC failure - NIS domain has been unbound
[YPERR_VERS] NIS client/server version mismatch: the NIS server bound to uses Version
1 protocol, so it does not provide
yp_all() functionality.
[YPERR_YPBIND] cannot communicate with
ypbind
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010