1CMAP_ITER_INIT(3) Corosync Cluster Engine Programmer's ManualCMAP_ITER_INIT(3)
2
3
4
6 cmap_iter_init - Initialize iterator for keys stored in CMAP
7
8
10 #include <corosync/cmap.h>
11
12
13 cs_error_t cmap_iter_init (cmap_handle_t handle, const char *prefix,
14 cmap_iter_handle_t *cmap_iter_handle);
15
16
18 The cmap_iter_init function is used to initialize iteration of all keys
19 with given prefix. The handle argument is connection to CMAP database
20 obtained by calling cmap_initialize(3) function. prefix is string, and
21 every returned key must have name with given prefix. This variable can
22 also be NULL (or empty string) and then all keys are iterated.
23
24 cmap_iter_init is used only for initialize context for future
25 cmap_iter_next(3) calls and handle needed for that function is returned
26 in cmap_iter_handle variable. When you have finished iteration over
27 objects, call cmap_iter_finalize(3) function to free up memory associā
28 ated with iteration.
29
30
32 This call returns the CS_OK value if successful. If there are no items
33 with given prefixes, CS_ERR_NO_SECTIONS is returned.
34
35
37 cmap_iter_next(3), cmap_iter_finalize(3), cmap_initialize(3),
38 cmap_overview(8)
39
40 CS_ERR_TRY_AGAIN Resource temporarily unavailable
41
42 CS_ERR_INVALID_PARAM Invalid argument
43
44 CS_ERR_ACCESS Permission denied
45
46 CS_ERR_LIBRARY The connection failed
47
48 CS_ERR_INTERRUPT System call interrupted by a signal
49
50 CS_ERR_NOT_SUPPORTED The requested protocol/functionality not supported
51
52 CS_ERR_MESSAGE_ERROR Incorrect auth message received
53
54 CS_ERR_NO_MEMORY Not enough memory to complete the requested task
55
56
57
58corosync Man Page 03/02/2012 CMAP_ITER_INIT(3)