PreviousNext

dced_hostdata_read(3dce)

Reads a hostdata item maintained by dced on a specific host

Synopsis

#include <dce/dced.h>

void dced_hostdata_read(

dced_binding_handle_t dced_bh,

uuid_t *entry_uuid,

uuid_t *attr_uuid,

sec_attr_t **data,

error_status_t *status);

Parameters

Input

dced_bh
Specifies the dced binding handle for the hostdata service on a specific host.

entry_uuid
Specifies the hostdata entry UUID associated with the data to read.

attr_uuid
Specifies the UUID associated with an attribute of the data. The attribute is either plain text (dced_g_uuid_fileattr) or binary (dced_g_uuid_binfileattr). Some vendors may allow other attributes.

Output

data
Returns the data for the item. See the sec_intro(3sec) reference page for details on the sec_attr_t data type.

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
The dced_hostdata_read( ) routine returns a hostdata item maintained by dced on a specific host. The standard data items include the cell name, a list of cell aliases, the host name, a list of UUID-program pairs (post_processors), and the DCE configuration database, among other items. For programming convenience, the following global variables are defined for the entry_uuid of some standard data items:

dced_g_uuid_cell_name
dced_g_uuid_cell_aliases
dced_g_uuid_host_name
dced_g_uuid_hostdata_post_proc
dced_g_uuid_dce_cf_db
dced_g_uuid_pe_site
dced_g_uuid_svc_routing

Other host-specific data items may also be maintained by the hostdata service. The UUIDs for these are established when the data item is created (See dced_hostdata_create(3dce)). After the applications reads host data and when it is done with the data, it should call the dced_objects_release( ) routine to release the resources allocated.

Each hostdata item for a specific host is stored in a local file. The name of an item's storage file is indicated in the storage tag field of each dced hostdata entry.

You can also use the dced_object_read( ) routine to read the text of a hostdata item. You might use this routine if your application needs to read data for other host services (srvrconf, srvrexec, or keytab) in addition to data for the hostdata service.

Prior to calling the dced_hostdata_read( ) routine, the application must have established a valid dced binding handle to the hostdata service by calling either the dced_binding_create( ) or dced_binding_from_rpc_binding( ) routine.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

error_status_ok

db_s_bad_index_type

db_s_key_not_found

dce_cf_e_file_open

dce_cf_e_no_match

dce_cf_e_no_mem

dced_s_bad_binding

dced_s_cant_open_storage_file

dced_s_invalid_attr_type

dced_s_no_memory

sec_acl_invalid_permission

uuid_s_bad_version

Related Information
Routines: dced_objects_release(3dce)

dced_object_read(3dce)

dced_binding_create(3dce)

dced_binding_from_rpc_binding(3dce)

Book: OSF DCE Application Development Guide - Core Components