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