OSF DCE Application Development Guide--Core Components

DCE Host Services
structure.
The server management data is stored in memory. The dced program uses UUIDs
(maintained in the entry lists by dced) to find an entry. The location of the data in
memory is indicated by the storage tag. The data returned for one entry is a structure of
server data (server_t). All data for the srvrconf and srvrexec entries are accessed from
memory for fast retrieval, but the srvrconf data is also stored on disk for use when a host
needs to reboot.
Each keytab entry stores its data in a file on disk. However, like the server management
entries, the keytab entries use server names and corresponding UUIDs (maintained by
dced) to identify each entry. The storage tag contains the name of the key table file. The
data returned for one entry is a list of keys of type dced_key_list_t.
The following example shows how to obtain and manage individual entries for the
hostdata, srvrconf, srvrexec,orkeytab services:
handle_t rpc_bh;
dced_binding_handle_t dced_bh;
dced_entry_list_t entries;
unsigned32 i;
dced_service_type_t service_type;
void *data;
error_status_t status;
.
.
.
dced_binding_from_rpc_binding(service_type, rpc_bh, &dced_bh, &status);
if(status != error_status_ok)
return;
dced_list_get(dced_bh, &entries, &status);
if(status == error_status_ok) {
for(i=0; i<entries.count; i++) {
if( select_entry(entries.list[i].name) ) {/* application specific */
dced_object_read(dced_bh, &(entries.list[i].id), &data, &status);
if(status == error_status_ok) {
display(service_type, 1, &data); /* application specific */
dced_objects_release(dced_bh, 1, data, &status);
}
}
}
dced_list_release(dced_bh, &entries, &status);
}
dced_binding_free(dced_bh, &status);
124245 Tandem Computers Incorporated 2 11