VMS Help DCE, dce_intro, dce_cf_intro, dce_cf_get_host_name *Conan The Librarian (sorry for the slow response - running on an old VAX) |
NAME dce_cf_get_host_name - Returns the hostname relative to the local cell root SYNOPSIS #include <dce/dce_cf.h> void dce_cf_get_host_name( char **hostname, error_status_t *status); PARAMETERS INPUT None. INPUT/OUTPUT hostname - The address of a string pointer. This pointer will be set by the function to point to a buffer that contains the hostname. OUTPUT 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. Possible status codes and their meanings are as follows: dce_cf_st_ok Operation successfully completed. 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. DESCRIPTION The dce_cf_get_host_name() routine searches the DCE configuration file for the local host's name relative to the local cell's root. If the name is found, dce_cf_get_host_name() allocates (by a call to malloc()) a buffer for it, copies the name into the buffer, and returns its address in the hostname input parameter. CAUTIONS The memory for a returned name string is allocated by malloc(), and must be freed by the caller of dce_cf_get_host_name(). The DCE 1.0 version of this routine is limited to processing lines of text whose length is less than 1024 characters. FILES DCE$LOCAL:[000000]dce_cf.db The machine's local DCE configuration file (where dcelocal is usually something like DIA0:[SYS0.DCELOCAL.]). RETURN VALUES No value is returned. RELATED INFORMATION FUNCTIONS: dce_cf_binding_entry_from_host dce_cf_find_name_by_key dce_cf_get_cell_name dce_cf_prin_name_from_host BOOKS: OSF DCE Administration Guide.
|