1DPNS_GETREPLICAX(3) DPNS Library Functions DP‐
2NS_GETREPLICAX(3)
3
4
5
6[1mNAME[0m
7 dpns_getreplicax ‐ 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_getreplicax (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_filereplicax **[4m[22mrep_entries[24m[1m)[0m
19
20[1mDESCRIPTION[0m
21 [1mdpns_getreplicax [22mgets the replica entries associ‐
22ated with a DPNS file
23 in 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_filereplicax
45 structures allocated by the API. The client
46application is
47 responsible for freeing the array when not needed
48anymore.
49
50 struct dpns_filereplicax {
51 u_signed64 fileid;
52 u_signed64 nbaccesses;
53 time_t ctime; /* replica creation
54time */
55 time_t atime; /* last access to
56replica */
57 time_t ptime; /* replica pin time */
58 time_t ltime; /* replica lifetime */
59 char r_type; /* ’P’ for Primary, ’S’ for
60Secondary */
61 char status;
62 char f_type; /* ’V’ for Volatile, ’P’ for
63Permanent */
64 char setname[37];
65 char poolname[CA_MAXPOOLNAMELEN+1];
66 char host[CA_MAXHOSTNAMELEN+1];
67 char fs[80];
68 char sfn[CA_MAXSFNLEN+1];
69 };
70
71[1mRETURN VALUE[0m
72 This routine returns 0 if the operation was successful or
73‐1 if the
74 operation failed. In the latter case, [1mserrno [22mis set
75appropriately.
76
77[1mERRORS[0m
78 [1mENOENT [22mThe named file does not exist.
79
80 [1mEACCES [22mSearch permission is denied on a
81component of the [4mpath[0m
82 prefix.
83
84 [1mENOMEM [22mMemory could not be allocated for un‐
85marshalling the reply.
86
87 [1mEFAULT [4m[22mpath[24m and [4mguid[24m are
88NULL pointers or [4mnbentries[24m or
89 [4mrep_entries[24m is a NULL pointer.
90
91 [1mENOTDIR [22mA component of [4mpath[24m prefix is
92not a directory.
93
94 [1mEINVAL [22mThe length of [4mguid[24m exceeds
95[1mCA_MAXGUIDLEN [22mor the length of
96 [4mse[24m exceeds [1mCA_MAXHOSTNAMELEN [22mor
97path and guid are both
98 given and they point at a different file.
99
100 [1mENAMETOOLONG [22mThe length of [4mpath[24m exceeds
101[1mCA_MAXPATHLEN [22mor the length of
102 a [4mpath[24m component exceeds [1mCA_MAX‐
103NAMELEN[22m.
104
105 [1mSENOSHOST [22mHost unknown.
106
107 [1mSENOSSERV [22mService unknown.
108
109 [1mSECOMERR [22mCommunication error.
110
111 [1mENSNACT [22mName server is not running or is being
112shutdown.
113
114[1mSEE ALSO[0m
115 [1mCastor_limits(4)[22m, [1mdpns_chdir(3)[0m
116
117[1mAUTHOR[0m
118 [1mLCG Grid Deployment [22mTeam
119
120
121
122DPNS $Date: 2006/12/01 09:19:37 $ DP‐
123NS_GETREPLICAX(3)
124
125
126
127
128
129
130
131
132