1CPG_ITERATION_INITICAoLrIoZsEy(n3c)Cluster Engine ProgrammerC'PsG_MIaTnEuRaAlTION_INITIALIZE(3)
2
3
4

NAME

6       cpg_iteration_initialize - Initialize iterator for members of CPG
7
8

SYNOPSIS

10       #include <corosync/cpg.h>
11
12
13       cs_error_t  cpg_iteration_initialize  (cpg_handle_t  handle, cpg_itera‐
14       tion_type_t iteration_type, const struct  cpg_name  *group,  cpg_itera‐
15       tion_handle_t *cpg_iteration_handle);
16
17

DESCRIPTION

19       The  cpg_iteration_initialize  function is used to initialize iteration
20       of CPG members.  The handle argument  is  connection  to  CPG  database
21       obtained by calling cpg_initialize(3) function.  iteration_type is used
22       for limit number of returned items and can be one of:
23
24       CPG_ITERATION_NAME_ONLY - only name of used groups are returned
25
26       CPG_ITERATION_ONE_GROUP -  only  members  group  with  name  group  are
27       returned
28
29       CPG_ITERATION_ALL - all members are returned
30
31       The  group parameter is used only with CPG_ITERATION_ONE_GROUP and it's
32       name of group with members to iterate. For other  iteration_type,  this
33       parameter must be NULL.
34
35       cpg_iteration_initialize is used only for initialize context for future
36       cpg_iteration_next(3) calls and handle  needed  for  that  function  is
37       returned in cpg_iteration_handle variable. When you have finished iter‐
38       ation over objects, call cpg_iteration_finalize(3) function to free  up
39       memory associated with iteration.
40
41

RETURN VALUE

43       This  call returns the CS_OK value if successful. If cpg_iteration_han‐
44       dle is NULL, CS_ERR_INVALID_PARAM error  is  returned.  Same  error  is
45       returned  when  iteration_type is CPG_ITERATION_ONE_GROUP, but group is
46       NULL, or when group is not NULL and iteration_type  is  not  CPG_ITERA‐
47       TION_ONE_GROUP.  If  there  is  not enough memory for internal store of
48       data, CS_ERR_NO_MEMORY is returned. CS_ERR_BAD_HANDLE can be  returned,
49       if handle is not valid handle.
50
51

COMMON IPC ERRORS

53       CS_ERR_TRY_AGAIN Resource temporarily unavailable
54
55       CS_ERR_INVALID_PARAM Invalid argument
56
57       CS_ERR_ACCESS Permission denied
58
59       CS_ERR_LIBRARY The connection failed
60
61       CS_ERR_INTERRUPT System call interrupted by a signal
62
63       CS_ERR_NOT_SUPPORTED The requested protocol/functionality not supported
64
65       CS_ERR_MESSAGE_ERROR Incorrect auth message received
66
67       CS_ERR_NO_MEMORY Not enough memory to complete the requested task
68
69

SEE ALSO

71       cpg_iteration_next(3),   cpg_iteration_finalize(3),  cpg_initialize(3),
72       cpg_overview(3)
73
74
75
76corosync Man Page                 05/03/2012       CPG_ITERATION_INITIALIZE(3)
Impressum