[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    fn_ctx_bind(3N) manual page Table of Contents

Name

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);

MT-Level

MT-Safe

Description

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.

Return Values

When the bind operation is successful it returns 1; on error it returns 0.

Errors

fn_ctx_bind sets status as described in FN_status_t(3N) and xfn_status_codes. Of special relevance for this operation is the following status code:
FN_E_NAME_IN_USE
The supplied name is already in use.

Usage

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 Also

FN_composite_name_t(3N) , FN_ctx_t(3N) , FN_ref_t(3N) , FN_status_t(3N) , fn_ctx_lookup(3N) , fn_ctx_unbind(3N) , xfn(3N) , xfn_status_codes(3N) , fns_references(5)

Notes

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.


Table of Contents