1DPM_PUTX(3) DPM Library Functions
2DPM_PUTX(3)
3
4
5
6[1mNAME[0m
7 dpm_putx ‐ make a set of existing files available for I/O
8
9[1mSYNOPSIS[0m
10 [1m#include <sys/types.h>[0m
11 [1m#include "dpm_api.h"[0m
12
13 [1mint dpm_putx (int [4m[22mnbreqfiles[24m[1m, struct
14dpm_putfilereqx *[4m[22mreqfiles[24m[1m, int[0m
15 [4mnbprotocols[24m[1m, char **[4m[22mprotocols[24m[1m,
16char *[4m[22mu_token[24m[1m, int [4m[22moverwrite[24m[1m,
17time_t[0m
18 [4mretrytime[24m[1m, char *[4m[22mr_token[24m[1m, int
19*[4m[22mnbreplies[24m[1m, struct dpm_putfilestatus[0m
20 [1m**[4m[22mfilestatuses[24m[1m)[0m
21
22[1mDESCRIPTION[0m
23 [1mdpm_putx [22mmakes a set of existing files available
24for I/O. Compared to
25 dpm_put there is control over the destination within the
26DPM available.
27
28 The input arguments are:
29
30 [4mnbreqfiles[0m
31 specifies the number of files belonging to the re‐
32quest.
33
34 [4mreqfiles[0m
35 specifies the array of file requests (dpm_put‐
36filereqx struc‐
37 tures).
38
39 struct dpm_putfilereqx {
40 char *to_surl;
41 time_t lifetime;
42 time_t f_lifetime;
43 char f_type;
44 char s_token[CA_MAXDPMTOKENLEN+1];
45 char ret_policy;
46 char ac_latency;
47 u_signed64 requested_size;
48 int reserved; /* must be zero */
49 char server[CA_MAXHOSTNAMELEN+1];
50 char pfnhint[CA_MAXSFNLEN+1];
51 };
52
53 [4mnbprotocols[0m
54 specifies the number of protocols.
55
56 [4mprotocols[0m
57 specifies the array of protocols.
58
59 [4mu_token[0m
60 specifies the user provided description associ‐
61ated with the
62 request.
63
64 [4moverwrite[0m
65 if set to 1, it allows to overwrite an existing
66file.
67
68 [4mretrytime[0m
69 This field is currently ignored.
70
71 The output arguments are:
72
73 [4mr_token[0m
74 Address of a buffer to receive the system allocat‐
75ed token. The
76 buffer must be at least CA_MAXDPMTOKENLEN+1 charac‐
77ters long.
78
79 [4mnbreplies[0m
80 will be set to the number of replies in the array
81of file sta‐
82 tuses.
83
84 [4mfilestatuses[0m
85 will be set to the address of an array of
86dpm_putfilestatus
87 structures allocated by the API. The client
88application is
89 responsible for freeing the array when not needed
90anymore.
91
92 struct dpm_putfilestatus {
93 char *to_surl;
94 char *turl;
95 u_signed64 filesize;
96 int status;
97 char *errstring;
98 time_t pintime;
99 time_t f_lifetime;
100 };
101
102[1mRETURN VALUE[0m
103 This routine returns 0 if the operation was successful
104or ‐1 if the
105 operation failed. In the latter case, [1mserrno [22mis set
106appropriately.
107
108[1mERRORS[0m
109 [1mEFAULT [4m[22mreqfiles[24m, [4mprotocols[24m,
110[4mr_token[24m, [4mnbreplies[24m or [4mfilestatuses[24m is
111 a NULL pointer.
112
113 [1mENOMEM [22mMemory could not be allocated for mar‐
114shalling the request.
115
116 [1mEINVAL [4m[22mnbreqfiles[24m or [4mnbproto‐
117cols[24m is not strictly positive, the
118 protocols are not supported, the length
119of the user
120 request description is greater than 255,
121reserved is not
122 zero or all file requests have errors.
123
124 [1mSENOSHOST [22mHost unknown.
125
126 [1mSEINTERNAL [22mDatabase error.
127
128 [1mSECOMERR [22mCommunication error.
129
130
131
132LCG $Date: 2013/11/27 10:00:00 $
133DPM_PUTX(3)
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198