1scf_simple_walk_SienrsvtiacneceCso(n3fSiCgFu)ration Facility Lisbcrfa_rsyimFpulnec_twiaolnks_instances(3SCF)
2
3
4

NAME

6       scf_simple_walk_instances - observational interface for Service Config‐
7       uration Facility
8

SYNOPSIS

10       cc [ flag... ] file... -lscf [ library... ]
11       #include <libscf.h>
12
13       int scf_simple_walk_instances(uint_t flags, void *private,
14            int (*inst_callback)(scf_handle_t *, scf_instance_t *, void *));
15
16

DESCRIPTION

18       The scf_simple_walk_instances() function iterates  over  every  service
19       instance in a specified state and calls a callback function provided by
20       the user on each specified instance.
21
22
23       The function takes a flags argument to indicate which  instance  states
24       are  involved  in  the  iteration, an opaque buffer to be passed to the
25       callback function, and a callback function with three arguments, a han‐
26       dle,  an  instance pointer, and an opaque buffer. If the callback func‐
27       tion returns a value other than success, iteration is ended,  an  error
28       is set, and the function returns -1.
29
30
31       The  handle passed to the callback function is provided to the callback
32       function by the library. This handle is used by the  callback  function
33       for all low-level allocation involved in the function.
34
35
36       The  simplified  library provides defined constants for the flags argu‐
37       ment. The user can use a bitwise OR to apply more than  one  flag.  The
38       SCF_STATE_ALL  flag  is  a bitwise OR of all the other states.The flags
39       are:
40
41           o      SCF_STATE_UNINIT
42
43           o      SCF_STATE_MAINT
44
45           o      SCF_STATE_OFFLINE
46
47           o      SCF_STATE_DISABLED
48
49           o      SCF_STATE_ONLINE
50
51           o      SCF_STATE_DEGRADED
52
53           o      SCF_STATE_ALL
54

RETURN VALUES

56       Upon successful completion, scf_simple_walk_instances() returns 0. Oth‐
57       erwise, it returns -1.
58

ATTRIBUTES

60       See attributes(5) for descriptions of the following attributes:
61
62
63
64
65       ┌─────────────────────────────┬─────────────────────────────┐
66       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
67       ├─────────────────────────────┼─────────────────────────────┤
68       │Interface Stability          │Evolving                     │
69       ├─────────────────────────────┼─────────────────────────────┤
70       │MT-Level                     │MT-Safe                      │
71       └─────────────────────────────┴─────────────────────────────┘
72

SEE ALSO

74       libscf(3LIB), attributes(5)
75
76
77
78SunOS 5.11                        17 Aug 2004  scf_simple_walk_instances(3SCF)
Impressum