Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / doc / C / guides / man / m3_tt / h_netf_f.sgm
1 <!-- $XConsortium: h_netf_f.sgm /main/7 1996/09/08 20:12:52 rws $ -->
2 <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
3 <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
4 <!-- (c) Copyright 1995 International Business Machines Corp. -->
5 <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
6 <!-- (c) Copyright 1995 Novell, Inc. -->
7 <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
8 <!-- (c) Copyright 1995 Hitachi. -->
9
10 <![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCDI.MAN79.rsml.1">]]>
11 <![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN79.rsml.1">]]>
12 <RefMeta>
13 <RefEntryTitle>tt_host_netfile_file</RefEntryTitle>
14 <ManVolNum>library call</ManVolNum>
15 </RefMeta>
16 <RefNameDiv>
17 <RefName><Function>tt_host_netfile_file</Function></RefName>
18 <RefPurpose>map between canonical and local pathnames on a remote host
19 </RefPurpose>
20 </RefNameDiv>
21 <!-- $XConsortium: h_netf_f.sgm /main/7 1996/09/08 20:12:52 rws $-->
22 <!-- CDE Common Source Format, Version 1.0.0-->
23 <!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
24 <!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
25 <!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
26 <!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
27 <RefSynopsisDiv>
28 <FuncSynopsis Remap="ANSI">
29 <FuncSynopsisInfo>#include &lt;Tt/tt_c.h>
30 </FuncSynopsisInfo>
31 <FuncDef>char <Function>*tt_host_netfile_file</Function></FuncDef>
32 <ParamDef>const char *<Parameter>host</Parameter></ParamDef>
33 <ParamDef>const char *<Parameter>netfilename</Parameter></ParamDef>
34 </FuncSynopsis>
35 </RefSynopsisDiv>
36 <RefSect1>
37 <Title>DESCRIPTION</Title>
38 <Para>The
39 <Function>tt_host_netfile_file</Function> function performs a conversion equivalent to that of the
40 &cdeman.tt.netfile.file; function, but performs it on a remote host.
41 </Para>
42 <Para>The
43 <Symbol Role="Variable">host</Symbol> argument
44 is the host on which the file resides.
45 The
46 <Emphasis>netfilename</Emphasis> argument is a copy of a null-terminated string returned by
47 &cdeman.tt.netfile.file; or
48 &cdeman.tt.host.netfile.file;.</Para>
49 </RefSect1>
50 <RefSect1>
51 <Title>RETURN VALUE</Title>
52 <Para>Upon successful completion, the
53 <Function>tt_host_netfile_file</Function> function returns
54 a freshly allocated
55 null-terminated string of unspecified format, which can be passed to
56 &cdeman.tt.host.netfile.file;; otherwise, it returns an error pointer.
57 The application can use
58 &cdeman.tt.ptr.error; to extract one of the following
59 <StructName Role="typedef">Tt_status</StructName> values from the returned pointer:
60 </Para>
61 <VariableList>
62 <VarListEntry>
63 <Term>TT_ERR_DBAVAIL</Term>
64 <ListItem>
65 <Para>The ToolTalk database server
66 could not be reached on
67 <Symbol Role="Variable">host</Symbol>, perhaps because the host is unavailable or
68 cannot be reached through the network.
69 </Para>
70 </ListItem>
71 </VarListEntry>
72 <VarListEntry>
73 <Term>TT_ERR_DBEXIST</Term>
74 <ListItem>
75 <Para>The ToolTalk database server
76 is not properly installed on
77 <Symbol Role="Variable">host</Symbol>.</Para>
78 </ListItem>
79 </VarListEntry>
80 <VarListEntry>
81 <Term>TT_ERR_NETFILE</Term>
82 <ListItem>
83 <Para>The
84 <Emphasis>netfilename</Emphasis> is not a valid netfilename.
85 </Para>
86 </ListItem>
87 </VarListEntry>
88 <VarListEntry>
89 <Term>TT_ERR_UNIMP</Term>
90 <ListItem>
91 <Para>The ToolTalk database server
92 contacted is of a version that does not support
93 <Function>tt_host_netfile_file</Function>.</Para>
94 </ListItem>
95 </VarListEntry>
96 </VariableList>
97 </RefSect1>
98 <RefSect1>
99 <Title>APPLICATION USAGE</Title>
100 <Para>The
101 &cdeman.tt.file.netfile;, &cdeman.tt.netfile.file;, &cdeman.tt.host.file.netfile; and
102 &cdeman.tt.host.netfile.file; functions allow an
103 application to determine a path valid on remote hosts,
104 perhaps for purposes of constructing a command string valid for remote
105 execution on that host.
106 By composing the two calls, paths for files not accessible from the
107 current host can be constructed.
108 For example, if path
109 <Filename>/sample/file</Filename> is valid on host A, a program
110 running on host B can use
111 </Para>
112 <InformalExample Remap="indent">
113 <ProgramListing>tt_host_netfile_file("C", tt_host_file_netfile("A", "/sample/file"))
114 </ProgramListing>
115 </InformalExample>
116 <Para>to determine a path to the same file valid on host C, if such a
117 path is possible.
118 </Para>
119 <Para>Allocated strings should be freed using either
120 &cdeman.tt.free; or
121 &cdeman.tt.release;.</Para>
122 <Para>The
123 &cdeman.tt.open; function need not be called before
124 <Function>tt_host_netfile_file</Function>.</Para>
125 </RefSect1>
126 <RefSect1>
127 <Title>SEE ALSO</Title>
128 <Para>&cdeman.Tt.tt.c.h;, &cdeman.tt.file.netfile;, &cdeman.tt.netfile.file;, &cdeman.tt.host.file.netfile;, &cdeman.tt.open;, &cdeman.tt.free;, &cdeman.tt.release;.</Para>
129 </RefSect1>
130 </RefEntry>
131 <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->