Federated Naming Service Programming Guide

Construct an Equivalent Name (Preliminary Specification)

Given the name of an object name relative to the context ctx, the operation returns an equivalent name for that object, relative to the same context ctx, that has leading_name as its initial atomic name. Two names are said to be equivalent if they have prefixes that resolve to the same context, and the parts of the names immediately following the prefixes are identical. For example, for user jsmith, the names "myself/service/calendar" is equivalent to "user/jsmith/service/calendar" when resolved relative to the Initial Context.


FN_composite_name_t *fn_ctx_equivalent_name(
    FN_ctx_t *ctx,
    const FN_composite_name_t *name,
    const FN_string_t *leading_name,
    FN_status_t *status);

If an equivalent name cannot be constructed, the value 0 is returned and the status argument set appropriately.