1DPM_GET(3) DPM Library Functions
2DPM_GET(3)
3
4
5
6[1mNAME[0m
7 dpm_get ‐ 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_get (int [4m[22mnbreqfiles[24m[1m, struct
14dpm_getfilereq *[4m[22mreqfiles[24m[1m, int[0m
15 [4mnbprotocols[24m[1m, char **[4m[22mprotocols[24m[1m,
16char *[4m[22mu_token[24m[1m, time_t [4m[22mretrytime[24m[1m,
17char[0m
18 [1m*[4m[22mr_token[24m[1m, int *[4m[22mnbreplies[24m[1m,
19struct dpm_getfilestatus **[4m[22mfilestatuses[24m[1m)[0m
20
21[1mDESCRIPTION[0m
22 [1mdpm_get [22mmakes a set of existing files available for
23I/O.
24
25 The input arguments are:
26
27 [4mnbreqfiles[0m
28 specifies the number of files belonging to the re‐
29quest.
30
31 [4mreqfiles[0m
32 specifies the array of file requests (dpm_get‐
33filereq struc‐
34 tures).
35
36 struct dpm_getfilereq {
37 char *from_surl;
38 time_t lifetime;
39 char f_type;
40 char s_token[CA_MAXDPMTOKENLEN+1];
41 char ret_policy;
42 int flags;
43 };
44
45 [4mnbprotocols[0m
46 specifies the number of protocols.
47
48 [4mprotocols[0m
49 specifies the array of protocols.
50
51 [4mu_token[0m
52 specifies the user provided description associ‐
53ated with the
54 request.
55
56 [4mretrytime[0m
57 This field is currently ignored.
58
59 The output arguments are:
60
61 [4mr_token[0m
62 Address of a buffer to receive the system allocat‐
63ed token. The
64 buffer must be at least CA_MAXDPMTOKENLEN+1 charac‐
65ters long.
66
67 [4mnbreplies[0m
68 will be set to the number of replies in the array
69of file sta‐
70 tuses.
71
72 [4mfilestatuses[0m
73 will be set to the address of an array of
74dpm_getfilestatus
75 structures allocated by the API. The client
76application is
77 responsible for freeing the array when not needed
78anymore.
79
80 struct dpm_getfilestatus {
81 char *from_surl;
82 char *turl;
83 u_signed64 filesize;
84 int status;
85 char *errstring;
86 time_t pintime;
87 };
88
89[1mRETURN VALUE[0m
90 This routine returns 0 if the operation was successful
91or ‐1 if the
92 operation failed. In the latter case, [1mserrno [22mis set
93appropriately.
94
95[1mERRORS[0m
96 [1mEFAULT [4m[22mreqfiles[24m, [4mprotocols[24m,
97[4mr_token[24m, [4mnbreplies[24m or [4mfilestatuses[24m is
98 a NULL pointer.
99
100 [1mENOMEM [22mMemory could not be allocated for mar‐
101shalling the request.
102
103 [1mEINVAL [4m[22mnbreqfiles[24m or [4mnbproto‐
104cols[24m is not strictly positive, the
105 protocols are not supported, the length
106of the user
107 request description is greater than 255
108or all file
109 requests have errors.
110
111 [1mSENOSHOST [22mHost unknown.
112
113 [1mSEINTERNAL [22mDatabase error.
114
115 [1mSECOMERR [22mCommunication error.
116
117
118
119LCG $Date: 2006/12/20 15:21:57 $
120DPM_GET(3)
121
122
123
124
125
126
127
128
129
130
131
132