1pool_walk_componPeonotls(C3oPnOfOiLg)uration Manipulation LibraproyolF_uwnacltki_ocnosmponents(3POOL)
2
3
4
6 pool_walk_components, pool_walk_pools, pool_walk_resources - walk
7 objects within resource pool configurations
8
10 cc [ flag... ] file... -lpool [ library... ]
11 #include <pool.h>
12
13 int pool_walk_components(pool_conf_t *conf,
14 pool_resource_t *resource, void *arg,
15 int (*callback)(pool_conf_t *, pool_resource_t *, void *));
16
17
18 int pool_walk_pools(pool_conf_t *conf, void *arg,
19 int (*callback)(pool_conf_t *, pool_component_t *, void *));
20
21
22 int pool_walk_resources(pool_conf_t *conf, pool_t *pool,
23 void *arg, int (*callback)(pool_conf_t *,
24 pool_component_t *, void *));
25
26
28 The walker functions provided with libpool(3LIB) visit each associated
29 entity of the given type, and call the caller-provided callback func‐
30 tion with a user-provided additional opaque argument. There is no
31 implied order of visiting nodes in the walk. If the callback function
32 returns a non-zero value at any of the nodes, the walk is terminated,
33 and an error value of -1 returned. The conf argument for each function
34 refers to the target configuration to which the operation applies.
35
36
37 The pool_walk_components() function invokes callback on all components
38 contained in the resource.
39
40
41 The pool_walk_pools() function invokes callback on all pools defined in
42 the configuration.
43
44
45 The pool_walk_resources() function invokes callback function on all
46 resources associated with pool.
47
49 Upon successful completion of the walk, these functions return 0. Oth‐
50 erwise -1 is returned and pool_error(3POOL) returns the pool-specific
51 error value.
52
54 These functions will fail if:
55
56 POE_BADPARAM The supplied configuration's status is not
57 POF_VALID.
58
59
60 POE_INVALID_CONF The configuration is invalid.
61
62
63 POE_SYSTEM A system error has occurred. Check the system error
64 code for more details.
65
66
68 See attributes(5) for descriptions of the following attributes:
69
70
71
72
73 ┌─────────────────────────────┬─────────────────────────────┐
74 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │CSI │Enabled │
77 ├─────────────────────────────┼─────────────────────────────┤
78 │Interface Stability │Unstable │
79 ├─────────────────────────────┼─────────────────────────────┤
80 │MT-Level │Safe │
81 └─────────────────────────────┴─────────────────────────────┘
82
84 libpool(3LIB), pool_error(3POOL), attributes(5)
85
86
87
88SunOS 5.11 18 Jul 2005 pool_walk_components(3POOL)