|
XFN Interface Library Functions | fn_attr_bind(3XFN) |
| fn_attr_bind - bind a reference to a name and associate attributes with named object |
SYNOPSIS
|
#include <xfn/xfn.h>
int fn_attr_bind(FN_ctx_t *ctx, const FN_composite_name_t *name, const FN_ref_t *ref, const FN_attrset_t *attrs, unsigned int exclusive, FN_status_t *status); |
|
This operation binds the supplied reference ref to the supplied composite name name relative to ctx, and associates
the attributes specified in attrs with the named object. The binding is made in the target context, that is, that 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, and, if attrs is not NULL, attrs replaces any existing attributes associated with the named object. If attrs is NULL and exclusive is 0, any existing attributes associated with the named object are left unchanged.
|
|
fn_attr_bind() returns 1 upon success, 0 upon failure.
|
|
fn_attr_bind() sets status as described in FN_status_t(3XFN) and xfn_status_codes(3XFN). Of special relevance for this
operation is the following status code:
-
FN_E_NAME_IN_USE
- The supplied name is already in use.
|
|
The value of ref cannot be NULL. If the intent is to reserve a name using fn_attr_bind(), a reference containing no address
should be supplied. This reference may be name service-specific or it may be the conventional NULL reference.
If multiple sources are updating a reference or attributes associated with a named object, they must synchronize amongst each other when adding, modifying, or removing from the address list of a bound
reference, or manipulating attributes associated with the named object.
|
|
See attributes(5) for descriptions of the following
attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
MT-Level | MT-Safe |
|
| |