Federated Naming Service Programming Guide

XFN Interface Overview

The XFN client interface consists of the base context interface, the base attribute interface, the extended attribute interface, and some supporting interfaces.

The base context interface provides the basic operations for naming, such as binding a name to a reference, looking up the reference bound to a name, and unbinding a name.

The base attribute interface provides operations to examine and modify attributes associated with named objects.

The extended attribute interface provides operations to search and create objects in the namespace with attributes.

The supporting interfaces contain:

API Usage Model summarizes how an application typically uses the programming interface.

Interface Conventions

The XFN interface is presented in ISO standard C, which is equivalent to ANSI standard C. The symbols defined by the interface are prefixed by fn or FN, for federated naming.

Usage

Include the XFN header file in your code.


#include <xfn/xfn.h>

Include the XFN library when you compile.


cc -o program_name file1.c file2.c -lxfn

Abstract Data Types

Except for FN_attrvalue_t and FN_identifier_t, the types defined in the interface hide their actual data representation from the client. The client performs every operation on an object of one of these types through a well-defined interface for that data type.

When the client accesses these objects, the client refers to the objects solely through a handle to an object. Operations are provided to create objects of each type and to destroy them. The creation operation returns a handle to the new object. The destroy operation releases all resources associated with the object.

The only information about this handle revealed to the client is that it is a pointer type. The client cannot assume what this handle points to. In particular, the handle might not point directly to the memory containing the object's actual state.

The value 0 is defined for all pointer types. The functions that return handles in the interface return the value 0 as an indication of failure. The values 0 and NULL are equivalent.

Memory–Management Policies

The following memory–management policies are used for all client interfaces described in this chapter: