1DPNS_LISTREPSET(3)          DPNS Library Functions          DPNS_LISTREPSET(3)
2
3
4

NAME

6       dpns_listrepset - list replica entries that belong to a given set
7

SYNOPSIS

9       #include <sys/types.h>
10       #include "dpns_api.h"
11
12       struct  dpns_filereplicax  *dpns_listrepset  (const  char *setname, int
13       flags, dpns_list *listp)
14

DESCRIPTION

16       dpns_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 dpns_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

RETURN VALUE

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

ERRORS

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

SEE ALSO

74       Castor_limits(4), dpns_addreplicax(3), dpns_modreplica(3)
75
76
77
78DPNS                     $Date: 2006/12/01 09:19:37 $       DPNS_LISTREPSET(3)
Impressum