Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
XFN Interface Library Functionsfn_attr_bind(3XFN)


NAME

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

DESCRIPTION

 

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.

RETURN VALUES

 

fn_attr_bind() returns 1 upon success, 0 upon failure.

ERRORS

 

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.

USAGE

 

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.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

FN_composite_name_t(3XFN), FN_ctx_t(3XFN), FN_ref_t(3XFN), FN_status_t(3XFN), fn_ctx_bind(3XFN), fn_ctx_lookup(3XFN), fn_ctx_unbind(3XFN), xfn_attributes(3XFN), xfn_status_codes(3XFN), attributes(5)


SunOS 5.9Go To TopLast Changed 22 Nov 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.