scf_scope_create(3scf) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

scf_scope_create(3scf)

sc...te(3SCF)  Service Configuration Facility Library Functions  sc...te(3SCF)

NAME
       scf_scope_create,          scf_scope_handle,         scf_scope_destroy,
       scf_scope_get_name, scf_handle_get_scope - create and manipulate  scope
       handles in the Service Configuration Facility

SYNOPSIS
       cc [ flag... ] file... -lscf [ library... ]
       #include <libscf.h>

       scf_scope_t *scf_scope_create(scf_handle_t *handle);


       scf_handle_t *scf_scope_handle(scf_scope_t *sc);


       void scf_scope_destroy(scf_scope_t *sc);


       ssize_t  scf_scope_get_name(scf_scope_t *sc, char *buf, size_t size);


       int scf_handle_get_scope(scf_handle_t *handle, const char *name,
            scf_scope_t *out);

DESCRIPTION
       Scopes are the top level of the Service Configuration Facility's repos‐
       itory  tree. The children of a scope are services (see scf_service_cre‐
       ate(3SCF)) and can be walked using scf_iter_scope_services(3SCF).


       There is a distinguished scope with the name  SCF_SCOPE_LOCAL  that  is
       the  root  for all available services on the local machine. In the cur‐
       rent implementation, there are no other scopes.


       An scf_scope_t is an opaque handle that can be set to a single scope at
       any  given  time.  The  scf_scope_create()  function  allocates  a  new
       scf_scope_t  bound to handle. The scf_scope_destroy() function destroys
       and frees sc. The scf_error() function is not modified by this call.


       The scf_scope_handle() function retrieves the handle  to  which  sc  is
       bound.


       The  scf_scope_get_name()  function  retrieves the name of the scope to
       which sc is set.


       The scf_handle_get_scope() function sets out to the scope specified  by
       name  for  the repository handle specified by handle. The scf_iter_han‐
       dle_scopes(3SCF) and scf_iter_next_scope(3SCF) calls can be used to it‐
       erate through all available scopes.

RETURN VALUES
       Upon  successful   completion,   scf_scope_create()   returns   a   new
       scf_scope_t. Otherwise, it returns NULL.


       Upon  successful  completion,  scf_scope_handle() returns the handle to
       which sc is bound. Otherwise, it returns NULL.


       Upon successful completion, scf_scope_get_name() returns the length  of
       the string written, not including the terminating null byte. Otherwise,
       it returns -1.


       Upon  successful  completion,  scf_handle_get_scope() returns 0. Other‐
       wise, it returns -1.

ERRORS
       The scf_scope_create() function will fail if:

       SCF_ERROR_INVALID_ARGUMENT    The value of the handle argument is NULL.


       SCF_ERROR_NO_MEMORY           There is not enough memory to allocate an
                                     scf_scope_t.


       SCF_ERROR_NO_RESOURCES        The server does  not  have  adequate  re‐
                                     sources for a new scope handle.



       The scf_scope_handle() function will fail if:

       SCF_ERROR_HANDLE_DESTROYED    The  handle  associated  with sc has been
                                     destroyed.



       The scf_scope_get_name() function will fail if:

       SCF_ERROR_NOT_SET

           The scope is not set.


       SCF_ERROR_NOT_BOUND

           The handle is not bound.


       SCF_ERROR_CONNECTION_BROKEN

           The connection to the repository was lost.



       The scf_handle_get_scope() function will fail if:

       SCF_ERROR_NOT_FOUND

           No scope named name was found.


       SCF_ERROR_INVALID_ARGUMENT

           The name argument is not a valid scope name.


       SCF_ERROR_NOT_BOUND

           The handle is not bound.


       SCF_ERROR_CONNECTION_BROKEN

           The connection to the repository was lost.


       SCF_ERROR_HANDLE_MISMATCH

           The value of the out argument is not derived from handle.



       The scf_error(3SCF) function can be used to retrieve the error value.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelSafe


SEE ALSO
       libscf(3LIB),       scf_error(3SCF),      scf_handle_decode_fmri(3SCF),
       scf_iter_handle_scopes(3SCF),                scf_iter_next_scope(3SCF),
       scf_iter_scope_services(3SCF),     scf_scope_to_fmri(3SCF),    scf_ser‐
       vice_create(3SCF), attributes(7)

Oracle Solaris 11.4               14 Aug 2017                    sc...te(3SCF)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3