MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Direct Access Transport Library Functions    datpspcreate(3DAT)



NAME
     datpspcreate - create a persistent Public Service Point

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

     DATRETURN
         datpspcreate(
         IN    DATIAHANDLE    iahandle,
         IN    DATCONQUAL    connqual,
         IN    DATEVDHANDLE   evdhandle,
         IN    DATPSPFLAGS    pspflags,
         OUT   DATPSPHANDLE   *psphandle
         )


PARAMETERS
     iahandle     Handle for an instance of DAT IA.


     connqual     Connection Qualifier of the IA  on  which  the
                   Public Service Point is listening.


     evdhandle    Event Dispatcher that provides the  Connection
                   Requested  Events to the Consumer. The size of
                   the event queue for the Event Dispatcher  con-
                   trols  the size of the backlog for the created
                   Public Service Point.


     pspflags     Flag that indicates whether  the  Provider  or
                   Consumer  creates an Endpoint per arrived Con-
                   nection Request. The value of DATPSPROVIDER
                   indicates  that  the  Consumer wants to get an
                   Endpoint  from  the  Provider;  a   value   of
                   DATPSPCONSUMER  means  the Consumer does not
                   want the Provider to provide an  Endpoint  for
                   each arrived Connection Request.


     psphandle    Handle to an opaque Public Service Point.


DESCRIPTION
     The datpspcreate() function creates  a  persistent  Public
     Service Point that can receive multiple requests for connec-
     tion and generate multiple Connection Request instances that
     are  delivered  through  the  specified  Event Dispatcher in
     Notification events.




SunOS 5.11          Last change: 16 Jul 2004                    1






Direct Access Transport Library Functions    datpspcreate(3DAT)



     The datpspcreate() function is blocking. When  the  Public
     Service  Point  is  created,  DATSUCES  is  returned  and
     psphandle contains a handle to  an  opaque  Public  Service
     Point Object.


     There is no explicit backlog for  a  Public  Service  Point.
     Instead,  Consumers  can control the size of backlog through
     the queue size of the associated Event Dispatcher.


     The pspflags parameter allows Consumers to request that the
     Provider  create an implicit Endpoint for each incoming Con-
     nection Request, or request that  the  Provider  should  not
     create  one  per  Connection Request. If the Provider cannot
     satisfy  the  request,  the   operation   shall   fail   and
     DATMODELNOTSUPORTED is returned.


     All Endpoints created by the Provider  have  DATHANDLENUL
     for  the Protection Zone and all Event Dispatchers. The Pro-
     vider sets up Endpoint attributes to match the  Active  side
     connection request. The Consumer can change Endpoint parame-
     ters. Consumers should  change  Endpoint  parameters,  espe-
     cially  PZ and EVD, and are advised to change parameters for
     local accesses prior to the  connection  request  acceptance
     with the Endpoint.

RETURN VALUES
     DATSUCES                   The operation was successful.


     DATINSUFICIENTRESOURCES    The operation  failed  due  to
                                   resource limitations.


     DATINVALIDHANDLE            The  iahandle  or  evdhandle
                                   parameter is invalid.


     DATINVALIDPARAMETER         The  connqual  or   pspflags
                                   parameter is invalid.


     DATCONQUALINUSE          The specified Connection Qual-
                                   ifier was in use.


     DATMODELNOTSUPORTED       The requested  Model  was  not
                                   supported by the Provider.





SunOS 5.11          Last change: 16 Jul 2004                    2






Direct Access Transport Library Functions    datpspcreate(3DAT)



USAGE
     Two uses of a Public Service Point are as follows:

     Model 1    For this model, the Provider manipulates  a  pool
                of Endpoints for a Public Service Point. The Pro-
                vider can use the same pool  for  more  than  one
                Public Service Point.

                    o    The DAT Consumer creates a  Public  Ser-
                         vice   Point   with   a   flag   set  to
                         DATPSPROVIDER.

                    o    The Public Service Point does  the  fol-
                         lowing:

                        o    Collects native  transport  informa-
                             tion  reflecting  a received Connec-
                             tion Reques

                        o    Creates an  instance  of  Connection
                             Reques

                        o    Creates a Connection Request  Notice
                             (event) that includes the Connection
                             Request     instance      (thatwhich
                             includes,  among others, Public Ser-
                             vice Point, its  Connection  Qualif-
                             ier,  Provider-generated  Local End-
                             point, and information about  remote
                             Endpoint)

                        o    Delivers  the   Connection   Request
                             Notice   to  the  Consumer-specified
                             target (CNO)  evdhandle

                             The Public  Service  Point  is  per-
                             sistent  and continues to listen for
                             incoming requests for connection.

                    o    Upon receiving a connection request,  or
                         at some time subsequent to that, the DAT
                         Consumer can modify the  provided  local
                         Endpoint to match the Connection Request
                         and must either accept() or reject() the
                         pending Connection Request.

                    o    If accepted, the provided Local Endpoint
                         is  now  in  a  "connected" state and is
                         fully usable for this connection,  pend-
                         ing  only  any native transport mandated
                         RTU   (ready-to-use)   messages.    This
                         includes  binding  it  to the IA port if



SunOS 5.11          Last change: 16 Jul 2004                    3






Direct Access Transport Library Functions    datpspcreate(3DAT)



                         that was not done previously. The Consu-
                         mer  is notified that the Endpoint is in
                         Connected state by  a  Connection  Esta-
                         blished    Event    on    the   Endpoint
                         connectevdhandle.

                    o    If rejected, control of the  Local  End-
                         point point is returned back to the Pro-
                         vider and its  ephandle  is  no  longer
                         usable by the Consumer.


     Model 2    For this model, the Consumer manipulates  a  pool
                of Endpoints. Consumers can use the same pool for
                more than one Service Point.

                    o    DAT Consumer creates  a  Public  Service
                         Point     with    a    flag    set    to
                         DATPSPCONSUMER.

                    o    Public Service Point:

                        o    Collects native  transport  informa-
                             tion  reflecting  a received Connec-
                             tion Request

                        o    Creates an  instance  of  Connection
                             Request

                        o    Creates a Connection Request  Notice
                             (event) that includes the Connection
                             Request  instance  (which  includes,
                             among  others, Public Service Point,
                             its Connection Qualifier,  Provider-
                             generated  Local Endpoint and infor-
                             mation about remote Endpoint)

                        o    Delivers  the   Connection   Request
                             Notice   to  the  Consumer-specified
                             target (CNO) evdhandle

                             The Public  Service  Point  is  per-
                             sistent  and continues to listen for
                             incoming requests for connection.

                    o    The Consumer creates a pool of Endpoints
                         that  it  uses  for accepting Connection
                         Requests. Endpoints can be  created  and
                         modified  at any time prior to accepting
                         a Connection Request with that Endpoint.

                    o    Upon receiving a connection  request  or



SunOS 5.11          Last change: 16 Jul 2004                    4






Direct Access Transport Library Functions    datpspcreate(3DAT)



                         at some time subsequent to that, the DAT
                         Consumer can modify its  local  Endpoint
                         to match the Connection Request and must
                         either accept() or reject() the  pending
                         Connection Request.

                    o    If accepted, the provided Local Endpoint
                         is  now  in  a  "connected" state and is
                         fully usable for this connection,  pend-
                         ing  only  any native transport mandated
                         RTU messages. This includes  binding  it
                         to the IA port if that was not done pre-
                         viously. The Consumer is  notified  that
                         the  Endpoint is in Connected state by a
                         Connection Established Event on the End-
                         point connectevdhandle.

                    o    If rejected, the Consumer does not  have
                         to     provide    any    Endpoint    for
                         datcrreject(3DAT).


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



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Standard: uDAPL, 1.1, 1.2   
    
     MT-Level                     Safe                        
    


SEE ALSO
     datcrreject(3DAT), libdat(3LIB), attributes(5)
















SunOS 5.11          Last change: 16 Jul 2004                    5



OpenSolaris man pages main menu

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