rapi_reserve()--Make, modify, or delete a RAPI reservation


  Syntax
 #include <rapi.h>
 int rapi_reserve(
                 rapi_sid_t      SessID, 
                 int             flags,
                 rapi_addr_t     *SessAddr,    
                 rapi_styleid_t  style,
                 rapi_stylex_t   *style_ext,
                 rapi_policy_t   *RcvPol,
                 int             numFilt,
                 rapi_filter_t   *FspecLst,
                 int             numFlow,
                 rapi_flowspec_t *Flowlst )


  Service program name: QSYS/QTOQRAPI

  Default public authority: *EXCLUDE

  Threadsafe: Yes

The RSVP receiver uses the the rapi_reserve() API to make, modify, or delete an RSVP reservation in the network. This call causes an RSVP RESERVE message to be sent to the sender through the network. This API should be called after a PATH message has been received from the sender.


Parameters

SessID
(Input) Required
Session ID returned by a successful rapi_session() call.

flags
(Input) Required
Set to 0 if not used.
RAPI_REQ_CONFIRM 32

SessAddr
(Input) Required
A pointer to a rapi_addr_t structure that defines the interface address to receive data for multicast flows. If omitted or the host address is INADDR_ANY, the default interface is assumed. It is set to 0 if not used.

style
(Input) Required
A reservation style ID (see table below).

style_ext
(Input) Optional
A pointer to a style-dependent extension to the parameter list if there is one. Otherwise, it is NULL.

RcvPol
(Input) Optional
A pointer to a policy data structure. It is set to NULL if not used.

NumFilt
(Input) Required
The number of filter specs. If the NumFilt parameter is 0, the FspecLst parameter is ignored.

FspecLst
(Input) Optional
A pointer to an area containing a sequential vector of RAPI filter spec objects. It is set to NULL if not used.

numFlow
(Input) Required
The number of flow specs. If numFlow is zero, the call removes the current reservations for the specified session and FSpecLst. The FlowLst parameter will be ignored.

FlowLst
(Input) Optional
A pointer to an area containing a sequential vector of RAPI flowspec objects. The number of objects is specified in the numFlow parameter. If the numFlow parameter is 0, this input is ignored and should be set to NULL.

RAPI Styles

Style Type Style ID Description
Wildcard Filter(WF) RAPI_RSTYLE_ WILDCARD The Flowspec_list parameter may be empty (to delete the reservation) or else point to a single flowspec. The FilterSpec_list parameter may be empty or it may point to a single filter spec containing appropriate wildcard(s).
Fixed Filter(FF) RAPI_RSTYLE_FIXED FilterSpecNo must equal FlowspecNo. Entries Flowspec_list and FilterSpedc_list parameters will correspond in pairs.
Shared Explicit(SE) _RSTYLE_SE The Flowspec_list parameter should point to a single flowspec. The FilterSpec_list parameter may point to a list of any length.


Authorities

None.


Return Value

Returns 0 if successful.

RAPI error code if it fails.


Error Conditions

[RAPI_ERR_INVAL]

One or more of the parameters that was passed to the API was not valid.

[RAPI_ERR_BADSID]

The session ID that was passed to the API did not correspond to an active RAPI session.

[RAPI_ERR_NORSVP]

The RSVP server was not detected. Make sure the RSVP server is running.


Usage Notes

If this call is successful, the application RAPI message-handling routine of type RAPI_RESV_ERROR or RAPI_RESV_CONFIRM may be generated. A rejection of the reservation request or other failure is reported by an RAPI message-handling routine of type API_RESV_ERROR. An error code of RSPV_Err_NO_PATH indicates that the RSVP state from one or more of the senders specified in filter_list has not yet propagated all the way to the receiver; it may also indicate that one or more of the specified senders has closed its API session and that its RSVP state has been deleted from the routers.


Related Information

For a description of the RSVP protocol, see RFC 2205 on the RFC PagesLink outside information center.

Complete documentation of the RAPI APIs can be found at The Open GroupLink outside information center.



API introduced: V5R1

[ Back to top | UNIX-Type APIs | APIs by category ]