Previous section.

Resource ReSerVation Protocol API (RAPI)
Copyright © 1998 The Open Group


rapi_sender - specify sender parameters


#include <rapi.h>

int rapi_sender(
    rapi_sid_t       Sid,            /* Session ID         */
    unsigned int     Flags,          /* Flags              */
    rapi_addr_t     *LHost,          /* Local Host         */
    rapi_filter_t   *SenderTemplate, /* Sender template    */
    rapi_tspec_t    *SenderTspec,    /* Sender Tspec       */
    rapi_adspec_t   *SenderAdspec,   /* Sender Adspec      */
    rapi_policy_t   *SenderPolicy,   /* Sender policy data */
    int              TTL             /* Multicast data TTL */


An application must issue a rapi_sender() call if it intends to send a flow of data for which receivers may make reservations. This call defines, redefines, or deletes the parameters of that flow. A rapi_sender() call may be issued more than once for the same API session; the most recent one takes precedence.

Once a successful rapi_sender() call has been made, the application may receive upcalls of type RAPI_RESV_EVENT or RAPI_PATH_ERROR.



This parameter must be a session ID returned by a successful rapi_session() call.


No flags are currently defined for this call.


This parameter may point to a rapi_addr_t structure specifying the IP (v4 or v6) source address and, if applicable, the source port or flowlabel from which data will be sent, or it may be NULL. The format of a rapi_addr_t is implementation-dependent, see Header File .

If the IP source address is INADDR_ANY, the API will use the default IP address of the local host. This is sufficient unless the host is multi-homed. The port number may be zero if the protocol for the session does not have ports.

A NULL LHost parameter indicates that the application wishes to withdraw its registration as a sender. In this case, the following parameters will all be ignored.


This parameter may be a pointer to a RAPI filter specification structure (see RAPI Objects ) specifying the format of data packets to be sent, or it may be NULL.

If this parameter is NULL, a sender template will be created internally from the Dest and LHost parameters. The Dest parameter was supplied in an earlier rapi_session() call. If a SenderTemplate parameter is present, the (non-NULL) LHost parameter is ignored.

This parameter must be non-NULL in order to declare the sender template for a session using IPSEC, that is, a session created with the RAPI_GPI_SESSION flag set.


This parameter is a pointer to a Tspec that defines the traffic that this sender will create, and must not be NULL.


This parameter may point to a RAPI Adspec structure (see RAPI Objects ), or it may be NULL.


This parameter may be a pointer to a sender policy data structure, or it may be NULL.


This parameter specifies the IP TTL (Time-to-Live) value with which multicast data will be sent. It allows RSVP to send its control messages with the same TTL scope as the data packets.


If there is a synchronous error, rapi_sender() returns a RAPI error code; otherwise, it returns zero.

Contents Next section Index