Federated Naming Service Programming Guide

Extended Search

This set of operations is used to list names of objects whose attributes satisfy the filter expression filter. The control argument encapsulates the option settings for the search.


FN_ext_searchlist_t *fn_attr_ext_search(
    FN_ctx_t *ctx,
    const FN_composite_name_t *name,,
    const FN_search_control_t *control
    FN_status_t *status);
 
FN_composite_name_t *fn_ext_searchlist_next(
    FN_ext_searchlist_t *esl,
    FN_ref_t **returned_ref,
    FN_attrset_t **returned_attrs,
    FN_status_t *status);
 
void fn_ext_searchlist_destroy(
    FN_ext_searchlist_t *esl);

These options are:

  1. The scope of the search. This can be any of the following:

    • Search the named object

    • Search the context named by name

    • Search the entire subtree rooted at the context named by name

    • Search the context implementation-defined subtree rooted at the context named by name.

  2. Whether XFN links are followed during the search

  3. A limit on the number of names returned

  4. Whether the reference associated with the named object is returned

  5. Which attributes associated with the named object are returned

The filter expression is evaluated against the attributes of the objects bound in the scope of the search. The filter evaluates to either true or false.

The call to fn_attr_ext_search() initiates the search and, if successful, returns a handle to an FN_ext_searchlist_t object, esl, that is used to enumerate the names of the objects that satisfy the filter.

fn_ext_searchlist_next() returns the next name, and optionally, its reference and attributes, in the enumeration identified by esl. The name returned is a composite name, to be resolved relative to the starting context for the search. The starting context is the context named name relative to ctx, unless the scope of the search is only the named object. If the scope of the search is only the named object, the terminal atomic name is returned. Successive calls to fn_ext_searchlist_next() using esl return successive names, and optionally, references and attributes, in the enumeration and further update the state of the enumeration.

fn_ext_searchlist_destroy() releases resources used during the search and enumeration. It can be called at any time to terminate the enumeration.