Common Desktop Environment: ToolTalk Messaging Overview

tt_host_file_netfile

char * tt_host_file_netfile(
   const char *   host,     
   const char *    filename
);

The tt_host_file_netfile() function maps between local and canonical path names on a remote host. It converts the file specified in host to a netfilename that can be passed to other hosts on the network. The filename is an absolute or relative path name that is valid on the remote host. The last component of filename is not required; however, every other component of filename must exist.


Note -

You do not need to call the tt_open function before you use this function.


This function returns either an error pointer or, if successful, a newly-allocated null-terminated string of an unspecified format, which may be passed to the tt_netfile_file function.

Use tt_ptr_error to extract a status from an error pointer. Possible errors are described in Table C-2.

Table C-2 Possible Errors Returned by tt_host_file_netfile

Error 

Description 

TT_ERR_PATH

filename is a path that is not valid on the remote host

TT_ERR_DBAVAIL

rpc.ttdbserverd could not be reached on host

TT_ERR_DBEXIST

rpc.ttdbserverd does not appear to be properly installed on host

TT_ERR_UNIMP

rpc.ttdbserverd version does not support the tt_host_file_netfile() function

To convert the file back to a local file name for the same file, use the tt_host_netfile_file() function.