Federated Naming Service Programming Guide

Create Subcontext

This operation creates a new context of the same type as the target context--that named by all but the terminal atomic part of name--and binds it to the composite name name resolved relative to the context ctx, and returns a reference to the newly created context.


FN_ref_t *fn_ctx_create_subcontext(
    FN_ctx_t *ctx,
    const   FN_composite_name_t *name,
    FN_status_t *status);

As with the bind operation, the target context must already exist. The new context is created and bound in the target context using the terminal atomic name in name. The operation fails if the terminal atomic name already exists in the target context.

The new subcontext exports the context interface and is created in the same naming system as the target context. XFN does not specify any further properties of the new subcontext. Other properties of the subcontext are determined by the target context and its naming system.