1DPM_GET(3) DPM Library Functions DPM_GET(3)
2
3
4
6 dpm_get - make a set of existing files available for I/O
7
9 #include <sys/types.h>
10 #include "dpm_api.h"
11
12 int dpm_get (int nbreqfiles, struct dpm_getfilereq *reqfiles, int
13 nbprotocols, char **protocols, char *u_token, time_t retrytime, char
14 *r_token, int *nbreplies, struct dpm_getfilestatus **filestatuses)
15
17 dpm_get makes a set of existing files available for I/O.
18
19 The input arguments are:
20
21 nbreqfiles
22 specifies the number of files belonging to the request.
23
24 reqfiles
25 specifies the array of file requests (dpm_getfilereq struc‐
26 tures).
27
28 struct dpm_getfilereq {
29 char *from_surl;
30 time_t lifetime;
31 char f_type;
32 char s_token[CA_MAXDPMTOKENLEN+1];
33 char ret_policy;
34 int flags;
35 };
36
37 nbprotocols
38 specifies the number of protocols.
39
40 protocols
41 specifies the array of protocols.
42
43 u_token
44 specifies the user provided description associated with the
45 request.
46
47 retrytime
48 This field is currently ignored.
49
50 The output arguments are:
51
52 r_token
53 Address of a buffer to receive the system allocated token. The
54 buffer must be at least CA_MAXDPMTOKENLEN+1 characters long.
55
56 nbreplies
57 will be set to the number of replies in the array of file sta‐
58 tuses.
59
60 filestatuses
61 will be set to the address of an array of dpm_getfilestatus
62 structures allocated by the API. The client application is
63 responsible for freeing the array when not needed anymore.
64
65 struct dpm_getfilestatus {
66 char *from_surl;
67 char *turl;
68 u_signed64 filesize;
69 int status;
70 char *errstring;
71 time_t pintime;
72 };
73
75 This routine returns 0 if the operation was successful or -1 if the
76 operation failed. In the latter case, serrno is set appropriately.
77
79 EFAULT reqfiles, protocols, r_token, nbreplies or filestatuses is
80 a NULL pointer.
81
82 ENOMEM Memory could not be allocated for marshalling the request.
83
84 EINVAL nbreqfiles or nbprotocols is not strictly positive, the
85 protocols are not supported, the length of the user
86 request description is greater than 255 or all file
87 requests have errors.
88
89 SENOSHOST Host unknown.
90
91 SEINTERNAL Database error.
92
93 SECOMERR Communication error.
94
95
96
97LCG $Date: 2006/12/20 15:21:57 $ DPM_GET(3)