1LFC_GETREPLICAS(3)           LFC Library Functions          LFC_GETREPLICAS(3)
2
3
4

NAME

6       lfc_getreplicas  -  get  the  replica entries associated with a list of
7       GUIDs
8

SYNOPSIS

10       #include <sys/types.h>
11       #include "lfc_api.h"
12
13       int lfc_getreplicas (int nbguids, const char **guids, const  char  *se,
14       int *nbentries, struct lfc_filereplicas **rep_entries)
15

DESCRIPTION

17       lfc_getreplicas  gets  the  replica  entries  associated with a list of
18       GUIDs.
19
20       nbguids
21              specifies the number of guids in the array guids.
22
23       guids  specifies the list of Grid Unique IDentifiers.
24
25       se     allows to restrict the replica entries to a given SE.
26
27       nbentries
28              will be set to the number of entries in the array of replicas.
29
30       rep_entries
31              will be set to the  address  of  an  array  of  lfc_filereplicas
32              structures  allocated  by  the  API.  The  client application is
33              responsible for freeing the array when not needed anymore.
34
35       struct lfc_filereplicas {
36            char      guid[CA_MAXGUIDLEN+1];
37            int       errcode;
38            u_signed64     filesize;
39            time_t         ctime;         /* GUID creation time */
40            char      csumtype[3];
41            char      csumvalue[33];
42            time_t         r_ctime;  /* replica creation time */
43            time_t         r_atime;  /* last access to replica */
44            char      status;
45            char      host[CA_MAXHOSTNAMELEN+1];
46            char      sfn[CA_MAXSFNLEN+1];
47       };
48

RETURN VALUE

50       This routine returns 0 if the operation was successful  or  -1  if  the
51       operation failed. In the latter case, serrno is set appropriately.
52

ERRORS

54       ENOENT       The named guid does not exist.
55
56       ENOMEM       Memory  could not be allocated for marshalling the request
57                    or unmarshalling the reply.
58
59       EFAULT       guids, nbentries or rep_entries is a NULL pointer.
60
61       EINVAL       nbguids is not strictly positive, the length of one of the
62                    guids  exceeds  CA_MAXGUIDLEN  or the length of se exceeds
63                    CA_MAXHOSTNAMELEN.
64
65       SENOSHOST    Host unknown.
66
67       SENOSSERV    Service unknown.
68
69       SEINTERNAL   Database error.
70
71       SECOMERR     Communication error.
72
73       ENSNACT      Name server is not running or is being shutdown.
74

SEE ALSO

76       Castor_limits(4), lfc_chdir(3)
77

AUTHOR

79       LCG Grid Deployment Team
80
81
82
83LFC          $Date: 2010-09-13 07:52:37 +0200 (Mon, 13 Sep 20L1F0C)_G$ETREPLICAS(3)
Impressum