1LFC_LISTREPSET(3) LFC Library Functions LFC_LISTREPSET(3)
2
3
4
6 lfc_listrepset - list replica entries that belong to a given set
7
9 #include <sys/types.h>
10 #include "lfc_api.h"
11
12 struct lfc_filereplicax *lfc_listrepset (const char *setname, int
13 flags, lfc_list *listp)
14
16 lfc_listrepset lists replica entries that belong to a given set. This
17 routine returns a pointer to a structure containing the current replica
18 entry.
19
20 struct lfc_filereplicax {
21 u_signed64 fileid;
22 u_signed64 nbaccesses;
23 time_t ctime; /* replica creation time */
24 time_t atime; /* last access to replica */
25 time_t ptime; /* replica pin time */
26 time_t ltime; /* replica lifetime */
27 char r_type; /* 'P' for Primary, 'S' for Secondary */
28 char status;
29 char f_type; /* 'V' for Volatile, 'P' for Permanent */
30 char setname[37];
31 char poolname[CA_MAXPOOLNAMELEN+1];
32 char host[CA_MAXHOSTNAMELEN+1];
33 char fs[80];
34 char sfn[CA_MAXSFNLEN+1];
35 };
36
37 setname
38 is either the replica set name or the space token.
39
40 flags may be one of the following constant:
41
42 CNS_LIST_BEGIN
43 the first call must have this flag set to allocate buf‐
44 fers and initialize pointers.
45
46 CNS_LIST_CONTINUE
47 all the following calls must have this flag set.
48
49 CNS_LIST_END
50 final call to terminate the list and free resources.
51
53 This routine returns a pointer to a structure containing the current
54 replica entry if the operation was successful or NULL if all entries
55 have been returned or if the operation failed. In the latter case, ser‐
56 rno is set appropriately.
57
59 ENOMEM Memory could not be allocated for the output buffer.
60
61 EFAULT setname or listp is a NULL pointer.
62
63 EINVAL The length of setname exceeds 36.
64
65 SENOSHOST Host unknown.
66
67 SENOSSERV Service unknown.
68
69 SECOMERR Communication error.
70
71 ENSNACT Name server is not running or is being shutdown.
72
74 Castor_limits(4), lfc_addreplicax(3), lfc_modreplica(3)
75
76
77
78LFC $Date: 2006/12/01 09:19:37 $ LFC_LISTREPSET(3)