rapi_reserve()
The rapi_reserve() call makes a reservation to be a receiver.
Syntax
#include <rsvprapi.h>
int  rapi_reserve(
       rapi_sid_t         sid,
       int                flag,
       struct sockaddr   *phost,
       rapi_sytleid_t     style,
       rapi_stylex_t     *pstyle,
       rapi_policy_t     *ppolicy,
       int                numFilters,
       rapi_filter_t     *pfilter,
       int                numFlows,
       rapi_flowspec_t   *pflow);
Parameters
sid
 flag
Only the optional RAPI_REQ_CONFIRM flag can
be used, or a zero.  Using this flag requests a RAPI_RESV_CONFIRM event
be provided to the callback function when the reservation is complete.  This
indicates merely a high probability that the reservation was completed,
not that it is certain.
 phost
 Receive
host address and port, or NULL. For this implementation, this is a pointer
to a sockaddr_in structure. If the address is INADDR_ANY, or if phost
is NULL, the default interface will be used.
style
 The reservation
style may be RAPI_RSTYLE_WILDCARD, RAPI_RSTYLE_FIXED, or RAPI_RSTYLE_SE.
pstyle
 Style extension
(not supported).
 ppolicy
 Receiver
policy (not supported).
 numFilters
 Number
of filterspecs pointed to by pfilter.
 pfilter
 numFlows
The number of flowspecs pointed to by pflow.
 If 0, the current  reservation for the session is removed, if there is
one.
 pflow
Description
The rapi_reserve() call establishes the user of the session as a receiver.
It specifies a reservation style and a filterspec array and flowspec array.
If there is a previous reservation still in effect, and the rapi_reserve()
call specifies a different one, the new reservation replaces the previous
one.  If the number of flowspecs is 0, the current reservation is deleted
but no new reservation is made.
After successfully calling rapi_reserve(), the application callback function
can be called with RAPI_RESV_ERROR or RAPI_RESV_CONFIRM events.
There are three reservation styles:
- Fixed filter (RAPI_RSTYLE_FIXED) specifies one or
more senders in the array of filterspecs, and an equal number of flowspecs.
The i-th flowspec is associated with the i-th filterspec.
 - Shared explicit filter (RAPI_RSTYLE_SE) specifies
one or more senders in the array of filterspecs, and one flowspec. All the
senders are expected to match the flowspec.
 - Wildcard filter (RAPI_RSTYLE_WILDCARD) specifies a
single flowspec, and either no filterspec, or a single filterspec with appropriate
wildcard(s).  If no sender is specified with a filterspec, any sender that
matches the flowspec is a valid sender.
 
Filterspecs have two formats:
- RAPI_FILTERFORM_1 allows for a wildcard specification
of allowable senders.  This format is not supported in this implementation
of the RSVP API.
 - RAPI_FILTERFORM_BASE has a sockaddr_in structure that
specifies a sender IP address and port.
 
Flowspecs have the following formats:
- RAPI_FORMAT_IS_CL specifies a controlled load flowspec.
 - RAPI_FORMAT_IS_GUAR specifies a guarenteed flowspec.
 
The flowspec data fields relate
to rapi_reserve().
Return Values and Descriptions
RAPI_ERR_BADSID
 The session identifier is not valid,
or the session is not open.
 RAPI_ERR_INVAL
 The
argument is not valid.
 RAPI_ERR_OK
 The
daemon accepted the reservation. Asynchronous callbacks may report further
status.
Related Calls
[Back: rapi_release()] 
[Next: rapi_sender()]