MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                    doorgetparam(3C)



NAME
     doorgetparam, doorsetparam - retrieve and set door parame-
     ters

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

     int doorgetparam(int d, int param, sizet *out);


     int doorsetparam(int d, int param, sizet val);


DESCRIPTION
     The doorgetparam() function retrieves the  value  of  param
     for  the door descriptor d and writes it through the pointer
     out. The doorsetparam() function sets the  value  of  param
     for  the  door descriptor d to val. The param argument names
     the parameter to view or change and can be one of  the  fol-
     lowing values:

     DORPARAMDATAMAX    This parameter represents the maximum
                            amount  of data that can be passed to
                            the door routine. Any attempt to call
                            doorcall(3C)   on   a  door  with  a
                            datasize  value  larger   than   the
                            door's  DORPARAMDATAMAX parameter
                            will fail with ENOBUFS. At door crea-
                            tion time, this parameter is initial-
                            ized to SIZEMAX and can  be  set  to
                            any   value   from   0  to  SIZEMAX,
                            inclusive.  This  parameter  must  be
                            greater   than   or   equal   to  the
                            DORPARAMDATAMIN parameter.


     DORPARAMDATAMIN    This  parameter  represents  the  the
                            minimum  amount  of  data that can be
                            passed  to  the  door  routine.   Any
                            attempt  to  call  doorcall(3C) on a
                            door with a datasize  value  smaller
                            than  the  door's DORPARAMDATAMIN
                            parameter will fail with ENOBUFS.  At
                            door creation time, this parameter is
                            initialized to 0, and can be  set  to
                            any   value   from   0  to  SIZEMAX,
                            inclusive.  This  parameter  must  be
                            less    than    or   equal   to   the
                            DORPARAMDATAMAX parameter.





SunOS 5.11          Last change: 22 Mar 2005                    1






Standard C Library Functions                    doorgetparam(3C)



     DORPARAMDESCMAX    This  parameter  represents  the  the
                            maximum  number  of argument descrip-
                            tors that can be passed to  the  door
                            routine.    Any   attempt   to   call
                            doorcall(3C)  on  a  door   with   a
                            descnum value larger than the door's
                            DORPARAMDESCMAX  parameter   will
                            fail  with  ENFILE.  If  the door was
                            created  with  the   DOREFUSEDESC
                            flag,  this  parameter is initialized
                            to 0 and cannot  be  changed  to  any
                            other  value.  Otherwise,  it is ini-
                            tialized to INTMAX and can be set to
                            any   value   from   0   to  INTMAX,
                            inclusive.



     The doorsetparam() function can only affect doors that were
     created by the current process.

RETURN VALUES
     Upon successful completion, 0 is returned.  Otherwise, -1 is
     returned and errno is set to indicate the error.

ERORS
     The doorgetparam() function will fail if:

     EBADF        The d argument is not a door descriptor.


     EFAULT       The out argument is not a valid address.


     EINVAL       The param argument is not a recognized  parame-
                  ter.


     EOVERFLOW    The value of the parameter is larger  than  the
                  SIZEMAX.  This condition can occur only if the
                  calling process is 32-bit and the door  targets
                  a 64-bit process or the kernel.



     The doorsetparam() function will fail if:

     EBADF      The d argument is not a door  descriptor  or  has
                been revoked.






SunOS 5.11          Last change: 22 Mar 2005                    2






Standard C Library Functions                    doorgetparam(3C)



     EINVAL     The param argument is not a recognized parameter,
                or    the    requested    change    would    make
                DORPARAMDATAMIN         greater          than
                DORPARAMDATAMAX.


     ENOTSUP    The param argument is DORPARAMDESCMAX, d  was
                created  with  the DOREFUSEDESC flag, and val
                is not zero.


     EPERM      The d argument was not created by this process.


     ERANGE     The val argument is not  in  supported  range  of
                param.


EXAMPLES
     Example 1 Set up a door with a fixed request size.

       typedef struct myrequest {
            int request;
       ar buffer[4096];
       } myrequestt;

       fd = doorcreate(myhandler, DOREFUSEDESC);
       if (fd < 0)
            /* handle error */

       if (doorsetparam(fd, DORPARAMDATAMIN,
           sizeof (myrequestt)) < 0 
           doorsetparam(fd, DORPARAMDATAMAX,
           sizeof (myrequestt)) < 0)
        /* handle error */

       /*
        * the door will only accept doorcall(3DOR)s with a
        * datasize which is exactly sizeof (myrequestt).
        */


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










SunOS 5.11          Last change: 22 Mar 2005                    3






Standard C Library Functions                    doorgetparam(3C)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Stable                      
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     doorcall(3C), doorcreate(3C), attributes(5)

NOTES
     The parameters that can be  manipulated  by  doorsetparam()
     are  not the only limitation on the size of requests. If the
     door server thread's stack size is not large enough to  hold
     all  of  the  data  requested  plus  room for processing the
     request, the door call will fail with E2BIG.


     The   DORPARAMDATAMIN   parameter   will   not   prevent
     DORUNREFDATA notifications from being sent to the door.

































SunOS 5.11          Last change: 22 Mar 2005                    4



OpenSolaris man pages main menu

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