PreviousNext

Binding to dced Services

When you write a program that uses a host service, you begin by creating a dced binding to the service on a particular host. Bindings are relationships between clients and servers that allow them to communicate. A dced binding is a specific kind of binding that not only gives your application a binding to the dced server but also associates the binding with a specific host service on that server.

Note: Applications must establish a binding to each host service used. However, the endpoint mapper service uses a different binding mechanism and API from the other host services. This is due to the fact that the endpoint mapper service already existed within the very large RPC API in earlier versions of DCE, prior to the development of dced.

In general, an application follows these basic steps to use a host service:

1. Establish a binding to the service on the desired host. For example, your application can establish a binding to the host data management service on another host.

2. Obtain one or more dced entries for that service. For example, your application can obtain the hostdata entry that identifies the host's cell name, among other things. This step is valid for the following services:

· hostdata management

· server management

· key table management

Depending on the service and function desired, this step may or may not be necessary. For example, the security validation service does not store data, so dced maintains no entries for this service.

3. Access (read or write) the actual data for the entries obtained or perform other functions appropriate for the service. For example, if your application reads the hostdata management service's cell name entry, the API accesses dced which may actually read the data from a file. For another example, if your application established a binding to the security validation service, it could validate the security daemon.

4. Release the resources obtained in step 2.

5. Free the binding established in step 1.

Applications bind to a host service by using the dced_binding_create( ) or dced_binding_from_rpc_binding( ) routine. The first routine establishes a dced binding to a service on a host specified in a service name, and the second routine establishes a dced binding to a service on a host for which the application already has a binding. Both of the routines return a dced binding handle of type dced_binding_handle_t, which is used as an input parameter to all other dced API routines.

More:

Host Service Naming in Applications

The dced Programs Maintains Entry Lists

Reading All of a Host Service's Data

Managing Individual dced Entries