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