rapi_sender()--Identify a RAPI sender


  Syntax
 #include <rapi.h>
int rapi_sender ( rapi_sid_t SessID, int flags, rapi_addr_t *LocalAddr, rapi_filter_t *Filter, rapi_tspec_t *SndTspec, rapi_adspec_t *SndAdspec, rapi_policy_t *SndPol, int Ttl )

  Service program name: QSYS/QTOQRAPI

  Default public authority: *EXCLUDE

  Threadsafe: Yes

The rapi_sender() API identifies an RSVP sender to potential receivers of the data. This API causes an RSVP path message to be sent to the receiver defined by the SessID value obtained by a rapi_session call.


Parameters

SessID
(Input) Required
The session ID returned by a successful rapi_session() call. A session ID that is not valid will cause the API to fail.

flags
(Input) Required
Either a zero or the following flags may be used.

2 TC_QOS_POLICE Turn traffic policing on.
4 TC_QOS_NOPOLICE Turn traffic policing off.
8 TC_QOS_SHAPE Turn traffic shaping on.
16 TC_QOS_NOSHAPE Turn traffic shaping off.

LocalAddr
(Input) Optional
A pointer to a rapi_addr_t structure defining the IP source address and, if needed, the source port or flow label from which data will be sent. It is set to NULL if not used. The format of a rapi_addr_t is implementation-dependent.

Filter
(Input) Optional
A pointer to a RAPI filter spec structure defining the format of the data packets to be sent. It is set to NULL if not used. If this parameter is NULL, a sender template is created internally from the Dest and LocalAddr parameters. The Dest parameter was provided as part of the rapi_session() call. If the Filter parameter is present, the LocalAddr parameter is ignored.

If the session is using IPSEC, this parameter is required.

SndTspec
(Input) Required
A pointer to a Tspec that defines the traffic this sender will create.

SndAdspec
(Input) Optional
A pointer to a RAPI Adspec structure. It is set to NULL if not used.

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

Ttl
(Input) Required
The IP TTL (Time-to-Live) value for sending multicast data. It allows RSVP to send its control messages with the same TTL scope as the data packets. It is set to 0 if not used.

Authorities

None.


Return Value

Returns 0 if successful.

A RAPI error code is returned if it fails.


Error Conditions

[RAPI_ERR_INVAL]

A parameter that is not valid was passed to the API.

[RAPI_ERR_BADSID]

The session ID passed to the API was valid.

[RAPI_ERR_NOTSPEC]

No sender Tspec was defined for the API call.

[RAPI_ERR_NORSVP]

The RSVP server did not respond to the API request. Make sure the RSVP server is running.


Usage Notes

  1. The rapi_session() API must be called to establish a session ID to be used with the other RAPI API's.

  2. The RSVP server must be running before any of the RAPI APIs are called.

  3. The formats of the parameter structures are defined in the <rapi.h> header file.

Related Information

For a description of the RSVP protocol, see RFC 2205 on the RFC Pages for The Internet Engineering Task Force.Link outside Information Center

Complete documentation of the RAPI APIs can be found at The Open Group.Link outside Information Center



API introduced: V5R1
Top | UNIX-Type APIs | APIs by category