214 lines
5.9 KiB
HTML
214 lines
5.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>rapi_session()--Create a RAPI session</title>
|
|
<!-- Begin Header Records -->
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<!-- Created by John Hall for V5R1-->
|
|
<!-- Change history: -->
|
|
<!-- 030522 LESMITH: D3255.1 public authority should be *EXCLUDE-->
|
|
<!-- Edited by Kersten Feb 02 -->
|
|
<!-- End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<a name="Top_Of_Page"></a>
|
|
<!--Java sync-link-->
|
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
|
</script>
|
|
|
|
<h2>rapi_session()--Create a RAPI session</h2>
|
|
|
|
<div class="box" style="width: 60%;">
|
|
<br>
|
|
Syntax<br>
|
|
<pre>
|
|
#include <rapi.h>
|
|
rapi_sid_t rapi_session(
|
|
rapi_addr_t *Dest,
|
|
int Protid,
|
|
int flags,
|
|
rapi_event_rtn_t Event_rtn,
|
|
void *Event_arg,
|
|
int *errnop )
|
|
|
|
</pre>
|
|
|
|
<br>
|
|
Service program name: QSYS/QTOQRAPI<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Default public authority: *EXCLUDE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The <strong>rapi_session()</strong> API returns an API session ID that is
|
|
unique to this request. This ID is used in calling the other RAPI APIs to
|
|
identify which RSVP session is being requested.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
|
|
<dl>
|
|
<dt><strong><em>Dest</em></strong></dt>
|
|
|
|
<dd>(Input) Required<br>
|
|
A pointer to a rapi_addr_t structure defining the destination IP address and a
|
|
port number that is the target of the data. The <em>dest</em> and
|
|
<em>protid</em> parameters are used to identify an RSVP session. If the
|
|
<em>protid</em> specifies UDP or TCP transport, the port value identifies the
|
|
appropriate transport port number. The format of the rapi_addr_t structure is
|
|
implementation-dependent.<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong><em>Protid</em></strong></dt>
|
|
|
|
<dd>(Input) Required<br>
|
|
The IP protocol ID for the session. This value can be either 17(UDP) or 6(TCP).
|
|
If is is zero, then 17(UDP) is assumed.<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong><em>flags</em></strong></dt>
|
|
|
|
<dd>(Input) Required<br>
|
|
The flags value is set as follows:<br>
|
|
<br>
|
|
|
|
|
|
<table cellpadding="5">
|
|
<!-- cols="5 20 75" -->
|
|
<tr>
|
|
<td align="left" valign="top">1</td>
|
|
<td align="left" valign="top">RAPI_USE_INTSERV</td>
|
|
<td align="left" valign="top">Currently, the only flag supported. If this flag
|
|
is set, IntServ formats are used in the RAPI message-handling routines. I f
|
|
this flag is not set, the simplified format is used.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong><em>Event_rtn</em></strong></dt>
|
|
|
|
<dd>(Input) Required<br>
|
|
A pointer to a RAPI message-handling routine that is called to communicate RSVP
|
|
errors and state change events to the calling application. The RAPI
|
|
message-handling routine is called when the <strong>rapi_dispatch()</strong>
|
|
API is called as the result of events. This pointer is used with select() or
|
|
poll(). This routine must be supplied by the application calling the API.<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong><em>Event_arg</em></strong></dt>
|
|
|
|
<dd>(Input/Output) Optional<br>
|
|
An argument data that is passed to the RAPI message-handling routine function
|
|
when it is called. It is set to NULL if not used.<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong><em>errnop</em></strong></dt>
|
|
|
|
<dd>(Input/Output) Required<br>
|
|
A pointer to an integer in which a RAPI error code will be returned.</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Authorities</h3>
|
|
|
|
<p>None</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Return Value</h3>
|
|
|
|
<p>Successful completion of this function returns a nonzero session handle that
|
|
can be used in further RAPI calls for this session. If the call fails, it
|
|
returns zero (RAPI_NULL_SID) and stores a RAPI error code in the integer errnop
|
|
parameter.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Error Conditions</h3>
|
|
<dl>
|
|
|
|
<dt><em>[RAPI_ERR_NORSVP]</em></dt>
|
|
<dd><p>The RSVP server did not respond to the API
|
|
request. Make sure the RSVP server is running.</p></dd>
|
|
<dt><em>[RAPI_ERR_UNSUPPORTED]</em></dt>
|
|
<dd><p>The flags parameter was set to an unsupported
|
|
value.</p></dd>
|
|
<dt><em>[RAPI_ERR_SYSCALL]</em></dt>
|
|
<dd><p>There was a problem calling a system function.
|
|
Check the system errno for further information.</p></dd>
|
|
<dt><em>[RAPI_ERR_INVAL]</em></dt>
|
|
<dd><p>A parameter that is not valid was used in the API
|
|
call.</p></dd>
|
|
<dt><em>[RAPI_ERR_MAXSESS]</em></dt>
|
|
<dd><p>The maximum number of available RAPI sessions has
|
|
been exceeded.</p></dd>
|
|
</dl>
|
|
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Usage Notes</h3>
|
|
|
|
<ol>
|
|
<li>The <strong>rapi_session()</strong> API must be called to establish a
|
|
session ID to be used with the other RAPI APIs.<br><br></li>
|
|
|
|
<li>The RSVP server must be running before any of the RAPI APIs are
|
|
called.</li>
|
|
</ol>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Related Information</h3>
|
|
|
|
<p>For a description of the RSVP protocol, see RFC 2205 on the RFC Pages for <a
|
|
href="http://www.ietf.org/rfc.html">The Internet Engineering Task
|
|
Force</a>.<img src="www.gif" alt="Link outside Information Center"></p>
|
|
|
|
<p>Complete documentation of the RAPI APIs can be found at <a href=
|
|
"http://www.opengroup.org/publications/catalog/c809.htm">The Open
|
|
Group</a>.<img src="www.gif" alt="Link outside Information Center"></p>
|
|
|
|
<br>
|
|
|
|
|
|
<hr>
|
|
API introduced: V5R1
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a> </td>
|
|
</tr>
|
|
</table></center>
|
|
</body>
|
|
</html>
|
|
|