Service Configuration Facility Library Functions
scfsimplewalkinstances(3SCF)
NAME
scfsimplewalkinstances - observational interface for Ser-
vice Configuration Facility
SYNOPSIS
cc [ flag... ] file... -lscf [ library... ]
#include
int scfsimplewalkinstances(uintt flags, void *private,
int (*instcallback)(scfhandlet *, scfinstancet *, void *));
DESCRIPTION
The scfsimplewalkinstances() function iterates over every
service instance in a specified state and calls a callback
function provided by the user on each specified instance.
The function takes a flags argument to indicate which
instance states are involved in the iteration, an opaque
buffer to be passed to the callback function, and a callback
function with three arguments, a handle, an instance
pointer, and an opaque buffer. If the callback function
returns a value other than success, iteration is ended, an
error is set, and the function returns -1.
The handle passed to the callback function is provided to
the callback function by the library. This handle is used by
the callback function for all low-level allocation involved
in the function.
The simplified library provides defined constants for the
flags argument. The user can use a bitwise OR to apply more
than one flag. The SCFSTATEAL flag is a bitwise OR of all
the other states.The flags are:
o SCFSTATEUNINIT
o SCFSTATEMAINT
o SCFSTATEOFLINE
o SCFSTATEDISABLED
o SCFSTATEONLINE
o SCFSTATEDEGRADED
o SCFSTATEAL
SunOS 5.11 Last change: 17 Aug 2004 1
Service Configuration Facility Library Functions
scfsimplewalkinstances(3SCF)
RETURN VALUES
Upon successful completion, scfsimplewalkinstances()
returns 0. Otherwise, it returns -1.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO
libscf(3LIB), attributes(5)
SunOS 5.11 Last change: 17 Aug 2004 2
Service Configuration Facility Library Functions
scfsimplewalkinstances(3SCF)
SunOS 5.11 Last change: 17 Aug 2004 3
|