PreviousNext

dce_cf_dced_entry_from_host(3dce)

Returns the dced entry name on a host

Synopsis

#include <stdio.h>

#include <dce/dce_cf.h>

void dce_cf_dced_entry_from_host(

char *hostname,

char **entry_name,

error_status_t *status);

Parameters

Input

hostname
Specifies the name of the host. Note that host names are case-sensitive. If this value is NULL, the value returned by dce_cf_get_host_name is used.

Output

entry_name
The dced entry name associated with the specified host. Storage for this name is dynamically allocated; release it with free( ) when you no longer need it.

status
Returns the status code from this operation. The status code is a value that indicates whether the routine completed successfully and if not, why not.

Description
The dce_cf_dced_entry_from_host( ) routine returns the name entered into the DCE namespace for a DCE host daemon (dced) on the host specified by the hostname parameter. If the hostname parameter is NULL, the dced name associated with the name returned by dce_cf_get_host_name( ) is returned. The string name is of the form /.:/hosts/hostname/config, and specifies the entry point into the dced namespace on the host. This is the location in the DCE namespace at which dced stores the objects associated with the host services it provides (the hostdata, srvrconf, srvrexec, secval, and keytab services, as well as ACL editing). It is also an actual name in the DCE namespace that you can import if you want to create your own RPC binding to dced.

You can use the dced entry name returned by this routine as input to the dced_binding_create( ) routine, input to sec_acl_* routines, or to rpc_ns_binding_import_* routines to establish a binding to a dced host service.

If using dced_binding_create( ), you append a service name to the entry returned by this routine. If using sec_acl_* routines, you append the service and the object name. If using rpc_ns_binding_import_*, you use only the entry returned by the routine.

You can also use the returned string to name objects that dced maintains, for example, when editing these objects' ACLs with dcecp. For example, the string name /.:/hosts/vineyard/config/srvrconf/dtsd names the server configuration data for the DTS server on the host vineyard.

Files

dcelocal/dce_cf.db
The machine's local DCE configuration file (where dcelocal is usually something like /opt/dcelocal).

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.

dce_cf_st_ok
Operation completed successfully.

dce_cf_e_file_open
File open error.

dce_cf_e_no_mem
No memory available.

dce_cf_e_no_match
No hostname entry in the DCE configuration file.

Related Information
Functions: dce_cf_binding_entry_from_host(3dce)

dce_cf_find_name_by_key(3dce)

dce_cf_get_cell_name(3dce)

dce_cf_get_host_name(3dce)

dce_cf_prin_name_from_host(3dce)

dced_binding_create(3dce)

Books:

OSF DCE Application Development Guide - Core Components

OSF DCE Command Reference.