PreviousNext

dced_inq_name(3dce)

Obtains the entry name that dced associates with a UUID

Synopsis

#include <dce/dced.h>

void dced_inq_name(

dced_binding_handle_t dced_bh,

uuid_t *uuid,

dced_string_t *name,

error_status_t *status);

Parameters

Input

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

uuid
Specifies the UUID for which to obtain the name.

Output

name
Returns the name associated with the uuid input.

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_inq_name( ) routine obtains the name associated with a UUID in a service of a specific host's dced.

A name is a label for each data entry to help applications and administrators identify all data maintained by dced. The dced requires UUIDs to keep track of the data it maintains. But it also maintains a mapping of UUIDs to names so that other applications and administrators can more easily access the data by using a recognizable name rather than a cumbersome UUID. A name is a label for hostdata items, srvrconf and srvrexec servers, and keytab tables.

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

Examples
The following example establishes a dced binding handle to the local host data service, reads an entry, and uses dced_inq_name( ) to get the name associated with the attribute ID.

dced_binding_handle_t dced_bh;
uuid_t entry_uuid;
sec_attr_t *data_ptr;
error_status_t status;
.
.
.
dced_binding_create(dced_c_service_hostdata,
dced_c_binding_syntax_default,
&dced_bh,
&status);
dced_hostdata_read(dced_bh,
&entry_uuid,
&dced_g_uuid_fileattr,
&data_ptr,
&status);
dced_inq_name(dced_bh, data_ptr->sec_attr.attr_id, &name, &status);
.
.
.

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_iter_not_allowed

db_s_key_not_found

dced_s_not_found

sec_acl_invalid_permission

uuid_s_bad_version

Related Information
Routines: dced_inq_id(3dce)

dced_binding_create(3dce)

dced_binding_from_rpc_binding(3dce)

Book: OSF DCE Application Development Guide - Core Components