1LFC_GETREPLICASS(3) LFC Library Functions LFC_GETREPLICASS(3)
2
3
4
6 lfc_getreplicass - get the replica entries associated with a list of
7 sfns
8
10 #include <sys/types.h>
11 #include "lfc_api.h"
12
13 int lfc_getreplicass (int nbsfns, const char **sfns, int *nbentries,
14 struct lfc_filereplicas **rep_entries)
15
17 lfc_getreplicass gets the replica entries associated with a list of
18 sfns.
19
20 nbsfns specifies the number of path names in the array sfns.
21
22 sfns specifies the list of Site File Names.
23
24 nbentries
25 will be set to the number of entries in the array of replicas.
26
27 rep_entries
28 will be set to the address of an array of lfc_filereplicas
29 structures allocated by the API. The client application is
30 responsible for freeing the array when not needed anymore.
31
32 struct lfc_filereplicas {
33 char guid[CA_MAXGUIDLEN+1];
34 int errcode;
35 u_signed64 filesize;
36 time_t ctime; /* GUID creation time */
37 char csumtype[3];
38 char csumvalue[33];
39 time_t r_ctime; /* replica creation time */
40 time_t r_atime; /* last access to replica */
41 char status;
42 char host[CA_MAXHOSTNAMELEN+1];
43 char sfn[CA_MAXSFNLEN+1];
44 };
45
47 This routine returns 0 if the operation was successful or -1 if the
48 operation failed. In the latter case, serrno is set appropriately.
49
51 ENOENT The named file does not exist.
52
53 ENOMEM Memory could not be allocated for marshalling the request
54 or unmarshalling the reply.
55
56 EFAULT sfns, nbentries or rep_entries is a NULL pointer.
57
58 EINVAL nbsfns is not strictly positive.
59
60 ENAMETOOLONG The length of sfn exceeds CA_MAXSFNLEN.
61
62 SENOSHOST Host unknown.
63
64 SENOSSERV Service unknown.
65
66 SEINTERNAL Database error.
67
68 SECOMERR Communication error.
69
70 ENSNACT Name server is not running or is being shutdown.
71
73 Castor_limits(4), lfc_chdir(3)
74
76 LCG Grid Deployment Team
77
78
79
80LFC $Date: 2010-09-13 07:52:37 +0200 (Mon, 13 Sep 2L0F1C0_)GE$TREPLICASS(3)