|
XFN Interface Library Functions | fn_ctx_bind(3XFN) |
| fn_ctx_bind - bind a reference to a name |
SYNOPSIS
|
cc [ flag ... ] file ... -lxfn [ library ... ]
#include <xfn/xfn.h>
int fn_ctx_bind(FN_ctx_t *ctx, const FN_composite_name_t *name, const FN_ref_t *ref, unsigned int exclusive, FN_status_t *status); |
|
This operation binds the supplied reference ref to the supplied composite name name relative to ctx. The binding is
made in the target context, that is, the context named by all but the terminal atomic part of name. The operation binds the terminal atomic name to the supplied reference in
the target context. The target context must already exist.
The value of exclusive determines what happens if the terminal atomic part of the name is already bound in the target context. If exclusive is
nonzero and name is already bound, the operation fails. If exclusive is 0, the new binding replaces any existing binding.
|
|
When the bind operation is successful it returns 1; on error it returns 0.
|
|
fn_ctx_bind sets status as described in FN_status_t(3XFN) and xfn_status_codes. Of special relevance for this operation is the status code FN_E_NAME_IN_USE, which indicates that
the supplied name is already in use.
|
|
The value of ref cannot be NULL. If the intent is to reserve a name using fn_ctx_bind(), a reference containing no address
should be supplied. This reference may be name service-specific or it may be the conventional NULL reference defined in the X/Open registry (see fns_references(5)).
If multiple sources are updating a reference, they must synchronize amongst each other when adding, modifying, or removing from the address list of a bound reference.
|
|
See attributes(5) for descriptions of the following
attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
MT-Level | MT-Safe |
|
|
The implementation of XFN in this Solaris release is based on the X/Open preliminary specification. It is likely that there will be minor changes to these interfaces
to reflect changes in the final version of this specification. The next minor release of Solaris will offer binary compatibility for applications developed using the current interfaces. As the interfaces
evolve toward standardization, it is possible that future releases of Solaris will require minor source code changes to applications that have been developed against the preliminary specification.
|
| |