rapi_session(3)rapi_session(3)NAMErapi_session - Create an Resource ReSerVation Protocol (RSVP) API ses‐
sion
SYNOPSIS
#include <rapi.h>
rapi_sid_t rapi_session(
rapi_addr_t *Dest,
int Protid,
unsigned int flags,
rapi_event_return_t *Event_rtn,
void *Event_arg,
int *errnop );
LIBRARY
RAPI Library (librsvp.so, librsvp.a)
PARAMETERS
Points to a rapi_addr_t structure that contains the destination IP
address (IPv4 or IPv6) and port number to which data is sent. The Dest
and Protid parameters together define an RSVP session. If the Protid
specifies the UDP or TCP transport, the port corresponds to the appro‐
priate transport port number. See RSVP(7) for the format of the
rapi_addr_t structure. Specifies the IP protocol identifier for the
session. If you do not set this parameter, the API defaults to the UDP
protocol (value 17). Specifies one of the following flags: If this
option is set, this indicates that IntServ formats are used on upcalls;
otherwise, Simplified formats are used. See RSVP(7) for a description
of RAPI objects and formats. Points to an upcall routine that is
invoked to notify the application of RSVP errors and state change
events. Pending events cause the invocation of the upcall function. If
no such upcall routine exists, set the parameter to NULL. See
rapi_event_rtn_t(3) for more information. Points to an argument to be
passed to the upcall routine when it is invoked. This is an optional
parameter. Points to an integer into which a RSVP API (RAPI) error
code is returned.
DESCRIPTION
The rapi_session() routine creates an RSVP API session.
If the call to rapi_session() succeeds, the application might receive
upcalls of type RAPI_PATH_EVENT for the API session.
NOTES
An application can have multiple API sessions registered for the same
RSVP session or different RSVP sessions at the same time. Each API ses‐
sion can have only one sender associated with it. Therefore, in order
to announce multiple senders for a given RSVP session, an application
must announce each sender in a separate API session.
If two API sessions for the same RSVP session are receiving data, they
are assumed to have joined the same multicast group and will receive
the same data packets. At present, if two or more such sessions issue
calls to the rapi_reserve() routine, their reservation parameters must
agree or unpredictable results occur; reservation parameter conflicts
are not checked.
RETURN VALUES
Upon successful completion, the rapi_session() routine returns a non-
zero session handle for use in subsequent calls related to this RSVP
API session.
Upon failure, it returns a session handle with a value of zero
(RAPI_NULL_SID) and sets an integer variable pointed to by errnop to an
RAPI error code.
SEE ALSO
Functions: rapi_dispatch(3), rapi_event_rtn_t(3), rapi_getfd(3),
rapi_release(3), rapi_reserve(3), rapi_sender(3), rapi_strerror(3),
rapi_version(3).
Network: RSVP(7).
rapi_session(3)