OSF DCE Application Development Guide--Core Components
DCE Host Services
the objects in an entry list. The output includes the address of an
allocated buffer of data and a count of the number of objects the buffer
contains. The data type in the buffer depends on the service used.
display() This is an application-specific routine that displays the data. Before the
data is displayed, it must be interpreted depending on the service. The
hostdata data is an array of sec_attr_t data structures, the srvrconf and
srvrexec data are arrays of server_t structures, and the keytab data is an
array of dced_key_list_t structures. The following code fragments show
the data type for each service:
void display(
dced_service_type_t service_type, /* dced service type */
int count, /* count of the number of data items */
void *data) /* obtained from dced_object_read{_all}() */
{
sec_attr_t *host_data;
server_t *servers;
dced_key_list_t *keytab_data;
.
.
.
switch(service_type) {
case dced_e_service_type_hostdata:
host_data = (sec_attr_t *)data;
...
case dced_e_service_type_srvrconf:
servers = (server_t *)data;
...
case dced_e_service_type_srvrexec:
servers = (server_t *)data;
...
case dced_e_service_type_keytab:
keytab_data = (dced_key_list_t *)data;
...
default:
/* No other dced service types have data to read. */
break;
}
return;
}
dced_objects_release()
Each call to the dced_object_read_all( ) routine requires a
corresponding call to dced_objects_release() to release the
resources allocated.
dced_binding_free()
Each call to the dced_binding_create() routine requires a
corresponding call to dced_binding_free() to release the
resources for the binding allocated.
124245 Tandem Computers Incorporated 2−9