MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Service Configuration Facility Library Functions
                                       scfsnaplevelcreate(3SCF)



NAME
     scfsnaplevelcreate,                  scfsnaplevelhandle,
     scfsnapleveldestroy,             scfsnaplevelgetparent,
     scfsnaplevelgetscopename,
     scfsnaplevelgetservicename,
     scfsnaplevelgetinstancename,
     scfsnapshotgetbasesnaplevel,
     scfsnaplevelgetnextsnaplevel  -  create  and  manipulate
     snaplevel handles in the Service Configuration Facility

SYNOPSIS
     cc [ flag... ] file... -lscf [ library... ]
     #include 

     scfsnaplevelt *scfsnaplevelcreate(scfhandlet *handle);


     scfhandlet *scfsnaplevelhandle(scfsnaplevelt *level);


     void scfsnapleveldestroy(scfsnaplevelt *level);


     int scfsnaplevelgetparent(const scfsnaplevelt *level,
          const scfsnapshott *snap);


     ssizet scfsnaplevelgetscopename(const scfsnaplevelt *level,
          char *buf, sizet size);


     ssizet scfsnaplevelgetservicename(const scfsnaplevelt *level,
          char *buf, sizet size);


     ssizet scfsnaplevelgetinstancename(const scfsnaplevelt *level,
          char *buf, sizet size);


     int scfsnapshotgetbasesnaplevel(const scfsnapshott *snap,
          scfsnaplevelt *level);


     int scfsnaplevelgetnextsnaplevel(scfsnaplevelt *in,
          scfsnaplevelt *out);


DESCRIPTION
     A snaplevel holds all of the property groups associated with
     either  a  service  or  an  instance.  Each  snapshot has an
     ordered list of snaplevels. Snaplevels contain the names  of



SunOS 5.11          Last change: 27 Aug 2007                    1






Service Configuration Facility Library Functions
                                       scfsnaplevelcreate(3SCF)



     the instance or service from which they are derived.


     An scfsnaplevelt is an opaque handle that can be set to  a
     single   snaplevel   at   any  given  time.  When  set,  the
     scfsnaplevelt  inherits  the  point  in  time   from   the
     scfsnapshott from which it comes.


     The scfsnaplevelcreate() function allocates  and  initial-
     izes   a   new   scfsnaplevelt   bound   to   handle.  The
     scfsnapleveldestroy() function destroys and frees level.


     The scfsnaplevelhandle() function retrieves the handle  to
     which level is bound.


     The scfsnaplevelgetparent() function  sets  snap  to  the
     parent snapshot of the snaplevel to which level is set.  The
     snapshot specified by snap is attached to the same point  in
     time as level.


     The                          scfsnaplevelgetscopename(),
     scfsnaplevelgetservicename(),                        and
     scfsnaplevelgetinstancename()  functions  retrieve   the
     name of the scope, service, and instance for the snapshot to
     which snap is set. If the snaplevel is from an instance, all
     three   succeed.   If  the  snaplevel  is  from  a  service,
     scfsnaplevelgetinstancename() fails.


     The scfsnapshotgetbasesnaplevel() function sets level to
     the  first  snaplevel  in the snapshot to which snap is set.
     The scfsnaplevelgetnextsnaplevel() function sets out  to
     the  next  snaplevel after the snaplevel to which in is set.
     Both the  in  and  out  arguments  can  point  to  the  same
     scfsnaplevelt.


     To retrieve the property groups associated with a snaplevel,
     see                            scfitersnaplevelpgs(3SCF),
     scfitersnaplevelpgstyped(3SCF),                      and
     scfsnaplevelgetpg(3SCF).

RETURN VALUES
     Upon successful completion, scfsnaplevelcreate() returns a
     new scfsnaplevelt. Otherwise, it returns NUL.





SunOS 5.11          Last change: 27 Aug 2007                    2






Service Configuration Facility Library Functions
                                       scfsnaplevelcreate(3SCF)



     Upon successful completion,  scfsnaplevelgetscopename(),
     scfsnaplevelgetservicename(),                        and
     scfsnaplevelgetinstancename() return the length  of  the
     string  written,  not  including  the terminating null byte.
     Otherwise, they return -1.


     Upon  successful   completion,   scfsnaplevelgetparent(),
     scfsnapshotgetbasesnaplevel(),                       and
     scfsnaplevelgetnextsnaplevel() return.  Otherwise,  they
     return -1.

ERORS
     The scfsnaplevelcreate() function will fail if:

     SCFERORINVALIDARGUMENT    The handle argument is NUL.


     SCFERORNOMEMORY           There is not enough memory  to
                                   allocate an scfsnaplevelt.


     SCFERORNORESOURCES        The server does not have  ade-
                                   quate   resources  for  a  new
                                   snapshot handle.



     The                          scfsnaplevelgetscopename(),
     scfsnaplevelgetservicename(),
     scfsnaplevelgetinstancename(),                       and
     scfsnaplevelgetparent() functions will fail if:

     SCFERORDELETED

         The object referred to by level has been deleted.


     SCFERORNOTSET

         The snaplevel is not set.


     SCFERORNOTBOUND

         The handle is not bound.


     SCFERORCONECTIONBROKEN

         The connection to the repository was lost.



SunOS 5.11          Last change: 27 Aug 2007                    3






Service Configuration Facility Library Functions
                                       scfsnaplevelcreate(3SCF)



     The scfsnaplevelgetinstancename() function will fail if:

     SCFERORCONSTRAINTVIOLATED

         The snaplevel is derived from a service.



     The scfsnapshotgetbasesnaplevel() function will fail if:

     SCFERORCONECTIONBROKEN

         The connection to the repository was lost.


     SCFERORDELETED

         The snapshot has been deleted.


     SCFERORHANDLEMISMATCH

         The snapshot and snaplevel are not derived from the same
         handle.


     SCFERORNORESOURCES

         The server does not have the resources to  complete  the
         request.


     SCFERORNOTBOUND

         The handle is not bound.


     SCFERORNOTFOUND

         There are no snaplevels in this snapshot.


     SCFERORNOTSET

         The snapshot is not set.



     The scfsnaplevelgetnextsnaplevel()  function  will  fail
     if:




SunOS 5.11          Last change: 27 Aug 2007                    4






Service Configuration Facility Library Functions
                                       scfsnaplevelcreate(3SCF)



     SCFERORDELETED

         The snaplevel has been deleted.


     SCFERORNOTSET

         The snaplevel is not set.


     SCFERORHANDLEMISMATCH

         The in and out arguments are not derived from  the  same
         handle.


     SCFERORNOTBOUND

         The handle is not bound.


     SCFERORCONECTIONBROKEN

         The connection to the repository was lost.


     SCFERORNOTFOUND

         There are no more snaplevels in this snapshot.



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

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:
















SunOS 5.11          Last change: 27 Aug 2007                    5






Service Configuration Facility Library Functions
                                       scfsnaplevelcreate(3SCF)




           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    
     MT-Level                     Safe                        
    


SEE ALSO
     libscf(3LIB), scferror(3SCF), scfitersnaplevelpgs(3SCF),
     scfitersnaplevelpgstyped(3SCF),
     scfsnaplevelgetpg(3SCF), attributes(5)









































SunOS 5.11          Last change: 27 Aug 2007                    6






Service Configuration Facility Library Functions
                                       scfsnaplevelcreate(3SCF)






















































SunOS 5.11          Last change: 27 Aug 2007                    7






OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™