1DPNS_GETREPLICA(3)           DPNS  Library Functions          DP‐
2NS_GETREPLICA(3)
3
4
5
6[1mNAME[0m
7       dpns_getreplica  ‐  get  the  replica  entries  associated
8with a DPNS file
9       in the name server
10
11[1mSYNOPSIS[0m
12       [1m#include <sys/types.h>[0m
13       [1m#include "dpns_api.h"[0m
14
15       [1mint  dpns_getreplica  (const  char *[4m[22mpath[24m[1m,
16const  char  *[4m[22mguid[24m[1m,  const  char[0m
17       [1m*[4m[22mse[24m[1m, int *[4m[22mnbentries[24m[1m, struct
18dpns_filereplica **[4m[22mrep_entries[24m[1m)[0m
19
20[1mDESCRIPTION[0m
21       [1mdpns_getreplica [22mgets the replica entries associated
22with a DPNS file in
23       the name server.
24
25       The file can  be  specified  by  [4mpath[24m  name  or  by
26[4mguid[24m.  If both are  given,
27       they must point at the same file.
28
29       [4mpath[24m    specifies  the  logical  pathname  relative
30to the current DPNS
31              directory or the full DPNS pathname.
32
33       [4mguid[24m   specifies the Grid Unique IDentifier.
34
35       [4mse[24m     allows to restrict the replica entries to  a
36given SE.
37
38       [4mnbentries[0m
39              will  be  set to the number of entries in the array
40of replicas.
41
42       [4mrep_entries[0m
43              will be set to the  address  of  an  array  of  dp‐
44ns_filereplica
45              structures   allocated   by  the  API.  The  client
46application is
47              responsible for freeing the array when  not  needed
48anymore.
49
50       struct dpns_filereplica {
51            u_signed64     fileid;
52            u_signed64     nbaccesses;
53            time_t           atime;          /*  last  access  to
54replica */
55            time_t         ptime;         /* replica pin time */
56            char      status;
57            char      f_type;        /* ’V’ for Volatile, ’P’ for
58Permanent */
59            char      poolname[CA_MAXPOOLNAMELEN+1];
60            char      host[CA_MAXHOSTNAMELEN+1];
61            char      fs[80];
62            char      sfn[CA_MAXSFNLEN+1];
63       };
64
65[1mRETURN VALUE[0m
66       This routine returns 0 if the operation was successful  or
67‐1  if  the
68       operation failed. In the latter case, [1mserrno [22mis set
69appropriately.
70
71[1mERRORS[0m
72       [1mENOENT       [22mThe named file does not exist.
73
74       [1mEACCES        [22mSearch   permission  is  denied  on a
75component of the [4mpath[0m
76                    prefix.
77
78       [1mENOMEM       [22mMemory could not be allocated for  un‐
79marshalling the reply.
80
81       [1mEFAULT        [4m[22mpath[24m   and   [4mguid[24m   are
82NULL  pointers   or   [4mnbentries[24m   or
83                    [4mrep_entries[24m is a NULL pointer.
84
85       [1mENOTDIR      [22mA component of [4mpath[24m  prefix  is
86not a directory.
87
88       [1mEINVAL        [22mThe   length  of  [4mguid[24m exceeds
89[1mCA_MAXGUIDLEN [22mor the length of
90                    [4mse[24m exceeds [1mCA_MAXHOSTNAMELEN [22mor
91path  and  guid  are  both
92                    given and they point at a different file.
93
94       [1mENAMETOOLONG  [22mThe   length  of  [4mpath[24m exceeds
95[1mCA_MAXPATHLEN [22mor the length of
96                    a [4mpath[24m  component  exceeds  [1mCA_MAX‐
97NAMELEN[22m.
98
99       [1mSENOSHOST    [22mHost unknown.
100
101       [1mSENOSSERV    [22mService unknown.
102
103       [1mSECOMERR     [22mCommunication error.
104
105       [1mENSNACT      [22mName server is not running or is being
106shutdown.
107
108[1mSEE ALSO[0m
109       [1mCastor_limits(4)[22m, [1mdpns_chdir(3)[0m
110
111[1mAUTHOR[0m
112       [1mLCG Grid Deployment [22mTeam
113
114
115
116DPNS                     $Date: 2006/04/26 10:12:35  $        DP‐
117NS_GETREPLICA(3)
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum