MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                        getzoneid(3C)



NAME
     getzoneid, getzoneidbyname, getzonenamebyid -   map  between
     zone id and name

SYNOPSIS
     #include 

     zoneidt getzoneid(void);


     zoneidt getzoneidbyname(const char *name);


     ssizet getzonenamebyid(zoneidt id, char *buf, sizet buflen);


DESCRIPTION
     The getzoneid() function returns the zone ID of the  calling
     process.


     The  getzoneidbyname()  function   returns   the   zone   ID
     corresponding  to  the named zone, if that zone is currently
     active. If name is NUL, the function returns the zone ID of
     the calling process.


     The getzonenamebyid() function stores the name of  the  zone
     with  ID  specified  by id in the location specified by buf.
     The bufsize argument specifies the  size  in  bytes  of  the
     buffer.  If  the  buffer  is  too small to hold the complete
     null-terminated name, the first bufsize bytes  of  the  name
     are stored in the buffer. A buffer of size {ZONENAMEMAX} is
     sufficient to hold any zone name. If buf is NUL or  bufsize
     is 0, the name is not copied into the buffer.

RETURN VALUES
     On successful completion, getzoneid() and  getzoneidbyname()
     return  a non-negative zone ID. Otherwise, getzoneidbyname()
     returns -1 and sets errno to indicate the error.


     On successful  completion,  the  getzonenamebyid()  function
     returns  the  buffer  size  required  to hold the full null-
     terminated name. Otherwise, it returns -1 and sets errno  to
     indicate the error.

ERORS
     The getzoneidbyname() function will fail if:

     EFAULT          The name argument is non-null and points  to
                     an illegal address.



SunOS 5.11           Last change: 1 Nov 2004                    1






Standard C Library Functions                        getzoneid(3C)



     EINVAL          A  zone  with  the  indicated  name  is  not
                     active.


     ENAMETOLONG    The length  of  the  name  argument  exceeds
                     {ZONENAMEMAX}.



     The getzonenamebyid() function will fail if:

     EINVAL    A zone with the specified ID is not active.


     EFAULT    The buf argument points to an illegal address.


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



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Evolving                    
    
     MT-Level                     Safe                        
    


SEE ALSO
     Intro(2), chroot(2), malloc(3C), attributes(5), zones(5)





















SunOS 5.11           Last change: 1 Nov 2004                    2



OpenSolaris man pages main menu

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