home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_q_t / draft-ietf-rsvp-rapi-00.txt < prev    next >
Text File  |  1997-10-15  |  51KB  |  1,476 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Internet Draft                                                 R. Braden
  8. Expiration: December 1997                                            ISI
  9. File: draft-ietf-rsvp-rapi-00.txt                             D. Hoffman
  10.                                                         Sun Microsystems
  11.  
  12.  
  13.  
  14.            RAPI -- An RSVP Application Programming Interface
  15.  
  16.                                Version 5
  17.  
  18.  
  19.  
  20.                              June 16, 1997
  21.  
  22. Status of Memo
  23.  
  24.    This document is an Internet-Draft.  Internet-Drafts are working
  25.    documents of the Internet Engineering Task Force (IETF), its areas,
  26.    and its working groups.  Note that other groups may also distribute
  27.    working documents as Internet-Drafts.
  28.  
  29.    Internet-Drafts are draft documents valid for a maximum of six months
  30.    and may be updated, replaced, or obsoleted by other documents at any
  31.    time.  It is inappropriate to use Internet-Drafts as reference
  32.    material or to cite them other than as "work in progress."
  33.  
  34.    To learn the current status of any Internet-Draft, please check the
  35.    "1id-abstracts.txt" listing contained in the Internet- Drafts Shadow
  36.    Directories on ds.internic.net (US East Coast), nic.nordu.net
  37.    (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific
  38.    Rim).
  39.  
  40. Abstract
  41.  
  42.    This memo describes version 5 of RAPI, a specific API (application
  43.    programming interface) for RSVP.  The RAPI interface is one
  44.    realization of the generic API contained in the RSVP Functional
  45.    Specification document, and it is being published for information
  46.    only.  The RAPI interface is based upon a client library, whose calls
  47.    are described here.
  48.  
  49. 1. Introduction
  50.  
  51.    An Internet application uses some "API" ( Application Programming
  52.    Interface) in order to request enhanced quality-of-service (QoS).  A
  53.    local RSVP control program will then use the RSVP protocol to
  54.    propagate the QoS request through the routers along path(s) for the
  55.  
  56.  
  57.  
  58. Braden, Hoffman        Expiration: December 1997                [Page 1]
  59.  
  60.  
  61.  
  62.  
  63. Internet Draft                  RAPI v.5                       June 1997
  64.  
  65.  
  66.    data flow.  Each router may accept or deny the request, depending
  67.    upon its available resources.  In the case of failure, the local RSVP
  68.    control program will return the decision to the requesting
  69.    application via the API.
  70.  
  71.    This document describes a particular RSVP API implementation known as
  72.    "RAPI".  RAPI is based on a client library linked with the
  73.    application.  This document describes the calls to that library.
  74.    There is at least one other documented API for RSVP, based on
  75.    sockets.
  76.  
  77.    The following diagram shows RAPI's implementation model.  RSVP is
  78.    implemented on a host by a user-level daemon program.  The procedures
  79.    of the RSVP client library module interact with the local RSVP daemon
  80.    program through a Unix-domain socket.  RAPI refers to the interface
  81.    between the application and the RSVP client library.
  82.  
  83.  
  84.                             H O S T           .      R O U T E R
  85.                 (RAPI)                        .
  86.                   v                           .
  87.      _____________v                           .
  88.     |             |_______                    .
  89.     |             x RSVP  |                   .
  90.     |             x Client|                   .
  91.     | Application x Lib   |   ____________    .      _____________
  92.     |             x  rtns |  |            |   .     |             |
  93.     |             x_______|  |    RSVP    |   .     |    RSVP     |
  94.     |             |   |      |   Daemon   |   .     |   Daemon    |
  95.     |_____________|   |      |____________|   .     |_____________|
  96.                |      |        |   .    |     .       |    |    |
  97.       USER     |      |        |   .    |     .       |    |    |
  98.     ===========|======|========|===V====|=====.       |    |    |
  99.       KERNEL   |      |_<____>_|   .    |___<_____>___|    |    |__>
  100.                |       UNIX Pipe   .      RSVP messages    |    RSVP
  101.                |                   .          .            |
  102.                |              _____V______    .       _____V______
  103.                |             |            |   .      |            |
  104.                |             | Packet     |   .      |  Packet    |
  105.                += DATA====>  | Classifier | =DATA==> | Classifier | ==>
  106.                              |& Scheduler |   .      |& Scheduler |
  107.                              |  (if any)  |   .      |            |
  108.                              |____________|   .      |____________|
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. Braden, Hoffman        Expiration: December 1997                [Page 2]
  118.  
  119.  
  120.  
  121.  
  122. Internet Draft                  RAPI v.5                       June 1997
  123.  
  124.  
  125.    1.1 Reservation Model
  126.  
  127.       RSVP performs the signaling necessary to make a resource
  128.       reservation for a simplex data flow sent to a unicast or multicast
  129.       destination address.  Although RSVP distinguishes senders from
  130.       receivers, the same application may act in both roles.
  131.  
  132.       RSVP assigns QoS to an specific multipoint-to-multipoint data flow
  133.       known as a "session".  A session is defined by a particular
  134.       transport protocol, IP destination address, and destination port.
  135.       In order to receive data packets for a particular multicast
  136.       session, a host must have joined the corresponding IP multicast
  137.       group using the setsockopt call IP_ADD_MEMBERSHIP.
  138.  
  139.       A data source, or "sender", is defined by an IP source address and
  140.       a source port.  A given session may have multiple senders S1, S2,
  141.       ... Sn, and if the destination is a multicast address, multiple
  142.       "receivers" R1, R2, ... Rm.  In the current version of RSVP, the
  143.       ports used by RSVP for defining sessions and senders are
  144.       restricted to be TCP/UDP port numbers.
  145.  
  146.       Under RSVP, QoS requests are made by the data receivers.  A QoS
  147.       request contains a "flowspec" together with a "filter spec".  The
  148.       flowspec includes an "Rspec", which defines the desired QoS and is
  149.       used to control the packet scheduling mechanism in the router or
  150.       host, and also a "Tspec", which defines the traffic expected by
  151.       the receiver.  The filter spec controls packet classification to
  152.       determine which sender(s)' data packets receive the corresponding
  153.       QoS.
  154.  
  155.       The detailed manner in which reservations from different receivers
  156.       are shared in the Internet is controlled by a reservation
  157.       parameter known as the "reservation style".  The RSVP Functional
  158.       Specification contains a definition and explanation of the
  159.       different reservation styles.
  160.  
  161.  
  162.    1.2 API Outline
  163.  
  164.       Using the RAPI interface, an application uses the txt _session()
  165.       call to define an "API session" for sending a single simplex data
  166.       flow and/or receiving such a data flow.  The txt _sender() call
  167.       may then be used to register as a data sender, and/or the
  168.       txt _reserve() call may be used to make a QoS reservation as a
  169.       data receiver.The txt _sender and/or txt _reserve calls may be
  170.       repeated with different parameters to dynamically modify the state
  171.       at any time or they can be issued in null forms that retract the
  172.       corresponding registration.  The application can call
  173.  
  174.  
  175.  
  176. Braden, Hoffman        Expiration: December 1997                [Page 3]
  177.  
  178.  
  179.  
  180.  
  181. Internet Draft                  RAPI v.5                       June 1997
  182.  
  183.  
  184.       txt _release() to close the session and delete all of its resource
  185.       reservations.  The relationship among the RAPI library calls is
  186.       summarized by the RAPI state diagram shown below.  Rapi_sender(0)
  187.       and txt _reserve(0) represent null calls in that diagram.
  188.  
  189.       Note that a single API session, defined by a single txt _session
  190.       call, can define only one sender at a time.  More than one API
  191.       session may be established for the same RSVP session.  For
  192.       example, suppose an application sends multiple UDP data flows,
  193.       distinguished by source port.  It will call txt _session and
  194.       txt _sender separately for each of these flows.
  195.  
  196.       The txt _session call allows the application to specify an "
  197.       upcall" (or "callback") routine that will be invoked to signal
  198.       RSVP state change and error events.  There are five types of
  199.       upcalls.
  200.  
  201.       o    PATH_EVENT and RESV_EVENT upcalls signal the arrival or
  202.            change of path state and reservation state, respectively, and
  203.            deliver the relevant state information to the application.
  204.  
  205.       o    PATH_ERROR and RESV_ERROR upcalls signal the corresponding
  206.            errors.
  207.  
  208.       o    PATH_CONFIRM upcalls signal the arrival of a CONFIRM message.
  209.  
  210.  
  211.       The upcall routine is invoked indirectly (and synchronously) by
  212.       the application, using the following mechanism.
  213.  
  214.       o    The application issues the RAPI library call txt _getfd() to
  215.            learn the file descriptor of the Unix socket used by the API.
  216.  
  217.       o    The application detects read events on this file descriptor,
  218.            either passing it directly in a select call or passing it to
  219.            the notifier of another library (such as XLib, tk/tcl, RPC,
  220.            etc.).
  221.  
  222.       o    When a read event on the file descriptor is signaled, the
  223.            application calls txt _dispatch().  This drives the API to
  224.            execute the upcall routine if appropriate.
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235. Braden, Hoffman        Expiration: December 1997                [Page 4]
  236.  
  237.  
  238.  
  239.  
  240. Internet Draft                  RAPI v.5                       June 1997
  241.  
  242.  
  243.                               RAPI State Diagram
  244.  
  245.                                   +---------+
  246.                                   | Closed  |<-----+
  247.                                   +---------+      |
  248.                                        |           |
  249.                                  txt _session      |
  250.                                        |           |
  251.                               +----+   |      txt _release
  252.                    PATH_EVENT |    V   V           |
  253.                               |   +---------+      |
  254.                               +---|         |------+
  255.                                   | Session |
  256.                        +----------|         |----------+
  257.                  txt _sender      +---------+    txt _reserve
  258.                        |           ^       ^           |
  259.       txt _sender or   |           |       |           |   txt _reserve or
  260.       PATH_EVENT or    | rapi_sender(0)    |           |   PATH_EVENT or
  261.       RESV_EVENT or    |           |       |           |   CONFIRM_EVENT
  262.       PATH_ERROR       |           |       |           |   or RESV_ERROR
  263.               +----+   |           |  rapi_reserve(0)  |   +----+
  264.               |    V   V           |       |           V   V    |
  265.               |   +---------+      |       |      +---------+   |
  266.               +---|         |------+       +------|         |---+
  267.                   |  Send   |                     |   Rcv   |
  268.           +-------|         |<-----+       +----->|         |-------+
  269.           |       +---------+      |       |      +---------+       |
  270.           |            |           |       |           |            |
  271.           |            | rapi_reserve(0)   |           |            |
  272.           |            |           |       |           |            |
  273.           |            |           |  rapi_sender(0)   |            |
  274.           |            |           |       |           |            |
  275.           |     rapi_reserve       |       |      rapi_sender       |
  276.           |            |          +---------+          |            |
  277.           |            +--------->|         |<---------+            |
  278.           |                       | SendRcv |                       |
  279.           |    rapi_sender or +---|         |                       |
  280.           |   rapi_reserve or |   +---------+                       |
  281.           |     PATH_EVENT or |    ^   |                            |
  282.           |     RESV_EVENT or +----+   |                            |
  283.           |     CONFIRM_EVENT          |                            |
  284.           |     or PATH_ERROR          |                            |
  285.           |     or RESV_ERROR          |                            |
  286.           |                      rapi_release              rapi_release
  287.         rapi_release                   V                            |
  288.           |                        +--------+                       |
  289.           +----------------------->| Closed |<----------------------+
  290.                                    +--------+
  291.  
  292.  
  293.  
  294. Braden, Hoffman        Expiration: December 1997                [Page 5]
  295.  
  296.  
  297.  
  298.  
  299. Internet Draft                  RAPI v.5                       June 1997
  300.  
  301.  
  302.       A synchronous error in a RAPI library routine returns an
  303.       appropriate error code.  Asynchronous RSVP errors are delivered to
  304.       the application via the RAPI upcall routine.  Text messages for
  305.       synchronous and asynchronous error codes will be found in the file
  306.       "rapi_err.h".
  307.  
  308.       The first rapi_session() call in a particular instance of the RAPI
  309.       library opens a Unix-domain RAPI socket to the RSVP daemon and
  310.       passes the session registration request across it.  If the
  311.       application (or the daemon) crashes without properly closing the
  312.       RAPI socket, the other side will be notified to perform a cleanup.
  313.       In particular, if the user process terminates without explicitly
  314.       closing the RAPI session, the daemon will delete the corresponding
  315.       reservation state from the routers.
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353. Braden, Hoffman        Expiration: December 1997                [Page 6]
  354.  
  355.  
  356.  
  357.  
  358. Internet Draft                  RAPI v.5                       June 1997
  359.  
  360.  
  361. 2. CLIENT LIBRARY SERVICES
  362.  
  363.    The RSVP API provides the client library calls defined in this
  364.    section.  To use these calls, the application should include the file
  365.    "rapi_lib.h" and "rsvp_intserv.h".
  366.  
  367.    A.   Create a Session
  368.  
  369.         The rapi_session call creates an API session.  If it succeeds,
  370.         the call returns an opaque but non-zero session handle for use
  371.         in subsequent calls related to this API session.  If the call
  372.         fails synchronously, it returns zero (NULL_SID) and stores a
  373.         RAPI error code into an integer variable pointed to by the
  374.         "errnop" parameter.
  375.  
  376.         After a successful rapi_session call has been made, the
  377.         application may receive upcalls of type RAPI_PATH_EVENT for the
  378.         API session.
  379.  
  380.         unsigned int rapi_session(
  381.  
  382.              struct sockaddr *Dest,      /* Session: (Dst addr, port) */
  383.              int         Protid,         /* Protocol Id               */
  384.              int         flags,          /* flags                     */
  385.              int         (*Event_rtn)(), /* Address of upcall routine */
  386.              void        *Event_arg,     /* App argument to upcall    */
  387.              int         *errnop         /* Place to return error code*/
  388.              )
  389.  
  390.  
  391.         The parameters are as follows.
  392.  
  393.         o    "Dest"
  394.  
  395.              This required parameter points to a sockaddr structure
  396.              defining the destination IP (V4 or V6) address and a port
  397.              number to which data will be sent.  The "Dest" and "Protid"
  398.              parameters define an RSVP session.  If the "Protid"
  399.              specifies UDP or TCP transport, the port corresponds to the
  400.              appropriate transport port number.
  401.  
  402.         o    "Protid"
  403.  
  404.              The IP protocol ID for the session.  If it is omitted
  405.              (i.e., zero), 17 (UDP) is assumed.
  406.  
  407.         o    "flags"
  408.  
  409.  
  410.  
  411.  
  412. Braden, Hoffman        Expiration: December 1997                [Page 7]
  413.  
  414.  
  415.  
  416.  
  417. Internet Draft                  RAPI v.5                       June 1997
  418.  
  419.  
  420.              RAPI_GPI_SESSION (0x40) -- If set, this flag requests that
  421.              this API session be defined in the GPI format used by the
  422.              IPSEC extension of RSVP.  If this flag is set, the port
  423.              number included in "Dest" is considered "virtual" (see the
  424.              IPSEC specification for details), and any sender template
  425.              and filter specifications must be in GPI format.
  426.  
  427.              RAPI_USE_INTSERV (0X10)  -- If set, IntServ formats are
  428.              used in upcalls; otherwise, the Simplified format is used
  429.              (see Section 4 below).
  430.  
  431.         o    "Event_rtn"
  432.  
  433.              This parameter is a pointer to an upcall routine that will
  434.              be invoked to notify the application of RSVP errors and
  435.              state change events.  The parameter may be NULL if there is
  436.              no such routine.
  437.  
  438.         o    "Event_arg"
  439.  
  440.              This optional parameter points to an argument that will be
  441.              passed in any invocation of the upcall routine.
  442.  
  443.         o    "errnop"
  444.  
  445.              The address of an integer into which a RAPI error code will
  446.              be returned.
  447.  
  448.         An application can have multiple API sessions registered for the
  449.         same or different RSVP sessions at the same time.  There can be
  450.         at most one sender associated with each API session; however, an
  451.         application can announce multiple senders for a given RSVP
  452.         session by announcing each sender in a separate API session.
  453.  
  454.         Two API sessions for the same RSVP session, if they are
  455.         receiving data, are assumed to have joined the same multicast
  456.         group and will receive the same data packets.  At present, if
  457.         two or more such sessions issue "rapi_reserve" calls, their
  458.         reservation parameters must agree or the results will be
  459.         undefined.   There is no check for such a conflict.
  460.         Furthermore, the code does not disallow multiple API sessions
  461.         for the same sender (defined by the host interface and the local
  462.         UDP port) within the same RSVP session, i.e., for the same data
  463.         flow.  If these API sessions are created by different
  464.         application processes on the local host, the data packets they
  465.         send will be merged but their sender declarations will not be.
  466.  
  467.    B.   Specify Sender Parameters
  468.  
  469.  
  470.  
  471. Braden, Hoffman        Expiration: December 1997                [Page 8]
  472.  
  473.  
  474.  
  475.  
  476. Internet Draft                  RAPI v.5                       June 1997
  477.  
  478.  
  479.         An application must issue a rapi_sender call if it intends to
  480.         send a flow of data for which receivers may make reservations.
  481.         This call defines, redefines, or deletes the parameters of that
  482.         flow.  A rapi_sender call may be issued more than once for the
  483.         same API session; the most recent one takes precedence.
  484.  
  485.         If there is a synchronous error, rapi_sender() returns a RAPI
  486.         error code; otherwise, it returns zero.  Once a successful
  487.         rapi_sender call has been made, the application may receive
  488.         upcalls of type RAPI_RESV_EVENT or RAPI_PATH_ERROR.
  489.  
  490.         int rapi_sender(
  491.                int              Sid,            /* Session ID         */
  492.                int              flags,          /* Flags              */
  493.                struct sockaddr *LHost,          /* Local Host         */
  494.                rapi_filter_t   *SenderTemplate, /* Sender template    */
  495.                rapi_tspec_t    *SenderTspec,    /* Sender Tspec       */
  496.                rapi_adspec_t   *SenderAdspec,   /* Sender Adspec      */
  497.                rapi_policy_t   *SenderPolicy,   /* Sender policy data */
  498.                int              TTL;            /* Multicast data TTL */
  499.              )
  500.  
  501.  
  502.         The parameters are as follows.
  503.  
  504.         o    "Sid"
  505.  
  506.              This required parameter must be a session ID returned by a
  507.              successful rapi_session call.
  508.  
  509.         o    "flags"
  510.  
  511.              No flags are currently defined for this call.
  512.  
  513.         o    "LHost"
  514.  
  515.              This optional parameter may point to a sockaddr structure
  516.              specifying the IP source address and the UDP source port
  517.              from which data will be sent, or it may be NULL.
  518.  
  519.              If the IP source address is INADDR_ANY, the API will use
  520.              the default IP (V4 or V6) address of the local host.  This
  521.              is sufficient unless the host is multihomed.  The port
  522.              number may be zero if the protocol for the session does not
  523.              have ports.
  524.  
  525.              A NULL "LHost" parameter indicates that the application
  526.              wishes to withdraw its registration as a sender.  In this
  527.  
  528.  
  529.  
  530. Braden, Hoffman        Expiration: December 1997                [Page 9]
  531.  
  532.  
  533.  
  534.  
  535. Internet Draft                  RAPI v.5                       June 1997
  536.  
  537.  
  538.              case, the following parameters will all be ignored.
  539.  
  540.         o    "SenderTemplate"
  541.  
  542.              This optional parameter may be a pointer to a RAPI filter
  543.              spec structure (see Section 4) specifying the format of
  544.              data packets to be sent, or it may be NULL.
  545.  
  546.              If this parameter is omitted (NULL), a sender template will
  547.              be created internally from the "Dest" and "LHost"
  548.              parameters.  If a "SenderTemplate" parameter is present,
  549.              the "LHost" parameter will be ignored.
  550.  
  551.              This parameter is required in order to declare the sender
  552.              template for a session using IPSEC, i.e., a session created
  553.              with the RAP_GPI_SESSION flag set.
  554.  
  555.         o    "SenderTspec"
  556.  
  557.              This required parameter is a pointer to a Tspec that
  558.              defines the traffic that this sender will create.
  559.  
  560.         o    "SenderAdspec"
  561.  
  562.              This optional parameter may point to a  RAPI Adspec
  563.              structure (see Section 4), or it may be NULL.
  564.  
  565.         o    "SenderPolicy"
  566.  
  567.              This optional parameter may be a pointer to a sender policy
  568.              data structure, or it may be NULL.
  569.  
  570.         o    "TTL"
  571.  
  572.              This parameter specifies the IP TTL (Time-to-Live) value
  573.              with which multicast data will be sent.  It allows RSVP to
  574.              send its control messages with the same TTL scope as the
  575.              data packets.
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589. Braden, Hoffman        Expiration: December 1997               [Page 10]
  590.  
  591.  
  592.  
  593.  
  594. Internet Draft                  RAPI v.5                       June 1997
  595.  
  596.  
  597.    C.   Make, Modify, or Delete a Reservation
  598.  
  599.         The rapi_reserve procedure is called to make, modify, or delete
  600.         a resource reservation for a session.  The call may be repeated
  601.         with different parameters, allowing the application to modify or
  602.         remove the reservation; the latest call will take precedence.
  603.         Depending upon the parameters, each call may or may not result
  604.         in new Admission Control calls, which could fail asynchronously.
  605.  
  606.         If there is a synchronous error in this call, rapi_reserve()
  607.         returns a RAPI error code; otherwise, it returns zero.  Once
  608.         this call has been successful, the application may receive an
  609.         upcall of type RAPI_RESV_ERROR or RAPI_RESV_CONFIRM.
  610.  
  611.         An admission control failure (e.g., refusal of the QoS request)
  612.         will be reported asynchronously by an upcall of type
  613.         RAPI_RESV_ERROR.  A " No Path State" error code indicates that
  614.         RSVP state from one or more of the senders specified in
  615.         "filter_list" has not (yet) propagated all the way to the
  616.         receiver; it may also indicate that one or more of the specified
  617.         senders has closed its API and that its RSVP state has been
  618.         deleted from the routers.
  619.  
  620.         int rapi_reserve(
  621.  
  622.                int              Sid,           /* Session ID       */
  623.                int              flags,
  624.                struct sockaddr *RHost,         /* Receive host addr*/
  625.                int              StyleId,       /* Style ID         */
  626.                rapi_stylex_t   *Style_Ext,     /* Style extension  */
  627.                rapi_policy_t   *Rcvr_Policy,   /* Receiver policy  */
  628.  
  629.                int              FilterSpecNo,    /* # of filter specs */
  630.                rapi_filter_t   *FilterSpec_list, /* List of filt specs*/
  631.                int              FlowspecNo,      /* # of flowspecs   */
  632.                rapi_flowspec_t *Flowspec_list    /* List of flowspecs*/
  633.                )
  634.  
  635.  
  636.         The parameters are as follows:
  637.  
  638.         o    "Sid"
  639.  
  640.              This required parameter must be a session ID returned by a
  641.              successful rapi_session call.
  642.  
  643.         o    "flags"
  644.  
  645.  
  646.  
  647.  
  648. Braden, Hoffman        Expiration: December 1997               [Page 11]
  649.  
  650.  
  651.  
  652.  
  653. Internet Draft                  RAPI v.5                       June 1997
  654.  
  655.  
  656.              Setting the RAPI_REQ_CONFIRM flag will request confirmation
  657.              of the reservation, by means of a confirmation upcall (type
  658.              RAPI_RESV_CONFIRM).
  659.  
  660.         o    "RHost"
  661.  
  662.              This optional parameter may be used to define the interface
  663.              address on which data will be received.  It is useful for a
  664.              multi-homed host.  If it is omitted or the host address is
  665.              INADDR_ANY, the default interface will be assumed.
  666.  
  667.         o    "StyleId"
  668.  
  669.              This required parameter specifies the reservation style id
  670.              (values defined below).
  671.  
  672.         o    "Style_Ext"
  673.  
  674.              This optional parameter is a pointer to a style-dependent
  675.              extension to the parameter list, if any.
  676.  
  677.         o    "Rcvr_Policy"
  678.  
  679.              This optional parameter is a pointer to a policy data
  680.              structure, or it is NULL.
  681.  
  682.         o    "FilterSpec_list", "FilterSpecNo"
  683.  
  684.              The "FilterSpec_list" parameter is a pointer to an area
  685.              containing a sequential vector of RAPI filter spec objects.
  686.              The number of objexts in this vector is specified in
  687.              "FilterSpecNo".  If "FilterSpecNo" is zero, the
  688.              "FilterSpec_list" parameter will be ignored.
  689.  
  690.         o    "Flowspec_list", "FlowspecNo"
  691.  
  692.              The "Flowspec_list" parameter is a pointer to an area
  693.              containing a sequential vector of RAPI flow spec objects.
  694.              The number of objects in this vector is specified in
  695.              "FlowspecNo".  If "FlowspecNo" is zero, the "Flowspec_list"
  696.              parameter will be ignored.
  697.  
  698.         If FlowspecNo is zero, the rapi_reserve call will remove the
  699.         current reservation(s) for the specified session, and
  700.         FilterSpec_list and Flowspec_list will be ignored.  Otherwise,
  701.         the parameters depend upon the style, as follows.
  702.  
  703.         o    Wildcard Filter (WF)
  704.  
  705.  
  706.  
  707. Braden, Hoffman        Expiration: December 1997               [Page 12]
  708.  
  709.  
  710.  
  711.  
  712. Internet Draft                  RAPI v.5                       June 1997
  713.  
  714.  
  715.              Use "StyleId" = RAPI_RSTYLE_WILDCARD.  The "Flowspec_list"
  716.              parameter may be empty (to delete the reservation) or else
  717.              point to a single flowspec.  The "FilterSpec_list"
  718.              parameter may be empty or it may point to a single filter
  719.              spec containing appropriate wildcard(s).
  720.  
  721.         o    Fixed Filter (FF)
  722.  
  723.              Use "StyleId" = RAPI_RSTYLE_FIXED.  "FilterSpecNo" must
  724.              equal "FlowspecNo".  Entries in "Flowspec_list" and
  725.              "FilterSpec_list" parameters will correspond in pairs.
  726.  
  727.         o    Shared Explicit (SE)
  728.  
  729.              Use "StyleId" = RAPI_RSTYLE_SE.  The "Flowspec_list"
  730.              parameter should point to a single flowspec.  The "
  731.              FilterSpec_list" parameter may point to a list of any
  732.              length.
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766. Braden, Hoffman        Expiration: December 1997               [Page 13]
  767.  
  768.  
  769.  
  770.  
  771. Internet Draft                  RAPI v.5                       June 1997
  772.  
  773.  
  774.    D.   Remove a Session
  775.  
  776.         The rapi_release call removes the reservation, if any, and the
  777.         state corresponding to a given session handle.  This call will
  778.         be made implicitly if the application terminates without closing
  779.         its RSVP sessions.  If the session handle is invalid, the call
  780.         returns a corresponding RAPI error code; otherwise, it returns
  781.         zero.
  782.  
  783.            int {
  784.         rapi_release}(unsignedintSid).fi
  785.  
  786.    E.   Get File Descriptor
  787.  
  788.         The rapi_getfd call may be used by the application to obtain the
  789.         file descriptor associated with the Unix socket connected to the
  790.         RSVP daemon, after a rapi_session() call has completed
  791.         successfully and before rapi_release() is called.  When a socket
  792.         read event is signaled on this file descriptor, the application
  793.         should call rapi_dispatch(), described below.
  794.  
  795.            int {rapi_getd} ( unsigned int Sid )
  796.  
  797.         If Sid is illegal or undefined, this call returns -1; otherwise,
  798.         it returns the file descriptor.
  799.  
  800.    F.   Dispatch API Event
  801.  
  802.         The application should call this routine whenever a read event
  803.         is signaled on the file descriptor returned by rapi_getfd().
  804.         Rapi_dispatch() may be called at any time, but it will generally
  805.         have no effect unless there is a pending event associated with
  806.         the Unix pipe.  Calling this routine may result in one or more
  807.         upcalls to the application from any of the open API sessions
  808.         known to this instance of the library.
  809.  
  810.         int rapi_dispatch( )
  811.  
  812.         If this call encounters an error, rapi_dispatch() returns a RAPI
  813.         error code; otherwise, it returns zero,
  814.  
  815.    G.   RAPI Version
  816.  
  817.         int rapi_version( )
  818.  
  819.         This call returns a single integer that defines the version of
  820.         the interface.  The returned value is composed of a major number
  821.         and a minor number, encoded as 100*major + minor.  This call may
  822.  
  823.  
  824.  
  825. Braden, Hoffman        Expiration: December 1997               [Page 14]
  826.  
  827.  
  828.  
  829.  
  830. Internet Draft                  RAPI v.5                       June 1997
  831.  
  832.  
  833.         be used by an application to adapt to different versions.
  834.  
  835.         The API described in this document has major version number 5.
  836.  
  837.    H.   Upcalls
  838.  
  839.         An upcall (invoked by a call to rapi_dispatch()) executes the
  840.         procedure whose address was specified by the "Event_rtn" in the
  841.         rapi_register call.
  842.  
  843.         event_upcall(
  844.  
  845.              unsigned int   Sid,           /* Session ID  */
  846.              int            EventType,     /* Event type  */
  847.  
  848.              int            Style,         /* Resv style  */
  849.              int            ErrorCode,     /* (error event): err code */
  850.              int            ErrorValue,    /* (error event): err value*/
  851.              struct sockaddr *ErrorNode,   /* Node that detected error*/
  852.              unsigned char  ErrorFlags,
  853.  
  854.              int            FilterSpecNo,  /* # of filter specs in list*/
  855.              rapi_filter_t *FilterSpec_list,
  856.              int            FlowspecNo,    /* # of flowspecs in list  */
  857.              rapi_spec_t   *Flowspec_list,
  858.              int            AdspecNo,      /* # of ADSPECs in list    */
  859.              rapi_adspec_t *Adspec_list,
  860.              void          *Event_arg      /* Supplied by application */
  861.  
  862.  
  863.         The following parameters are used in the upcall:
  864.  
  865.         o    "Sid"
  866.  
  867.              This parameter must be a session ID returned by a
  868.              successful rapi_register call.
  869.  
  870.         o    "EventType"
  871.  
  872.              Upcall event types.
  873.  
  874.         o    "Style"
  875.  
  876.              This parameter contains the style of the reservation; it is
  877.              non-zero only for a RAPI_RESV_EVENT or RAPI_RESV_ERROR
  878.              upcall.
  879.  
  880.         o    "ErrorCode, ErrorValue"
  881.  
  882.  
  883.  
  884. Braden, Hoffman        Expiration: December 1997               [Page 15]
  885.  
  886.  
  887.  
  888.  
  889. Internet Draft                  RAPI v.5                       June 1997
  890.  
  891.  
  892.              These values encode the error cause, and they are set only
  893.              for a RAPI_PATH_ERROR or RAPI_RESV_ERROR event.  ErrorCode
  894.              values are defined in "rapi_lib.h" and corresponding text
  895.              strings are defined in "rapi_err.h".
  896.  
  897.         o    "ErrorNode"
  898.  
  899.              This is the IP (V4 or V6) address of the node that detected
  900.              the error, and it is set only for a RAPI_PATH_ERROR or
  901.              RAPI_RESV_ERROR event.
  902.  
  903.         o    "ErrorFlags"
  904.  
  905.              These error flags are set only for a RAPI_PATH_ERROR or
  906.              RAPI_RESV_ERROR event.
  907.  
  908.              RAPI_ERRF_InPlace (0x01) -- The reservation failed, but
  909.              another reservation (presumably smaller) reservation is
  910.              still in place on the same interface.
  911.  
  912.              RAPI_ERRF_NotGuilty (0x02) --  The reservation failed, but
  913.              the request from this client was merged with a larger
  914.              reservation upstream, so this client's reservation might
  915.              not have caused the failure.
  916.  
  917.         o    "FilterSpec_list", "FilterSpecNo"
  918.  
  919.              The "FilterSpec_list" parameter is a pointer to a malloc'd
  920.              area containing a sequential vector of RAPI filter spec or
  921.              sender template objects.  The number of objexts in this
  922.              vector is specified in "FilterSpecNo".  If "FilterSpecNo"
  923.              is zero, the "FilterSpec_list" parameter will be NULL.
  924.  
  925.         o    "Flowspec_list", "FlowspecNo"
  926.  
  927.              The "Flowspec_list" parameter is a pointer to an area
  928.              containing a sequential vector of RAPI flowspec or Tspec
  929.              objects.  The number of objects in this vector is specified
  930.              in "FlowspecNo".  If "FlowspecNo" is zero, the
  931.              "Flowspec_list" parameter will be NULL.
  932.  
  933.         o    "Adspec_list", "AdspecNo"
  934.  
  935.              The "Adspec_list" parameter is a pointer to an area
  936.              containing a sequential vector of RAPI adspec objects.  The
  937.              number of objects in this vector is specified in
  938.              "AdspecNo".  If "AdspecNo" is zero, the "Adspec_list"
  939.              parameter will be NULL.
  940.  
  941.  
  942.  
  943. Braden, Hoffman        Expiration: December 1997               [Page 16]
  944.  
  945.  
  946.  
  947.  
  948. Internet Draft                  RAPI v.5                       June 1997
  949.  
  950.  
  951.         o    "Event_arg"
  952.  
  953.              This is the value supplied in the rapi_register call.
  954.  
  955.         When the application's upcall procedure returns, the API will
  956.         free any areas pointed to by "Flowspec_list" or
  957.         "FilterSpec_list"; the application must copy any values it wants
  958.         to save.
  959.  
  960.         The specific parameters depend upon "EventType", which may have
  961.         one of the following values.
  962.  
  963.         o    RAPI_PATH_EVENT
  964.  
  965.              A path event indicates that RSVP sender ("Path") state from
  966.              a remote node has arrived or changed at the local node.  A
  967.              RAPI_PATH_EVENT upcall containing the complete current list
  968.              of senders (or possibly no senders, after a path teardown)
  969.              in the path state for the specified session will be
  970.              triggered whenever the path state changes.
  971.  
  972.              "FilterSpec_list", "Flowspec_list", and "Adspec_list" will
  973.              be of equal length, and corresponding entries will contain
  974.              sender templates, sender Tspecs, and Adspecs, respectively,
  975.              for all senders known at this node.  In general, a missing
  976.              object will be indicated by an empty RAPI object.
  977.  
  978.              RAPI_PATH_EVENT upcalls are enabled by the initial
  979.              rapi_session call.
  980.  
  981.         o    RAPI_RESV_EVENT
  982.  
  983.              A reservation event upcall indicates that reservation state
  984.              has arrived or changed at the node, implying (but not
  985.              assuring) that reservations have been established or
  986.              deleted along the entire data path to one or more
  987.              receivers.  RAPI_RESV_EVENT upcalls containing the current
  988.              reservation state for the API session will be triggered
  989.              whenever the reservation state changes.
  990.  
  991.              "Flowspec_list" will either contain one flowspec object or
  992.              be empty (if the state has been torn down), and
  993.              "FilterSpec_list" will contain zero or more corresponding
  994.              filter spec objects. "Adspec_list" will be empty.
  995.  
  996.              RAPI_RESV_EVENT upcalls are enabled by a rapi_sender call;
  997.              the sender template from the latter call will match the
  998.              filter spec returned in a reservation event upcall.
  999.  
  1000.  
  1001.  
  1002. Braden, Hoffman        Expiration: December 1997               [Page 17]
  1003.  
  1004.  
  1005.  
  1006.  
  1007. Internet Draft                  RAPI v.5                       June 1997
  1008.  
  1009.  
  1010.         o    RAPI_PATH_ERROR
  1011.  
  1012.              A path error upcall indicates that an asynchronous error
  1013.              has been found in the sender information specified in a
  1014.              rapi_sender call.
  1015.  
  1016.              The "ErrorCode" and "ErrorValue" parameters will specify
  1017.              the error.  "FilterSpec_list" and "Flowspec_list" will each
  1018.              contain one object, the sender template and corresponding
  1019.              sender Tspec (if any) in error, while "Adspec_list" will be
  1020.              empty.  If there is no sender Tspec, the object in
  1021.              "Flowspec_list" will be an empty RAPI object.  The
  1022.              "Adspec_list" will be empty.
  1023.  
  1024.              Path Error upcalls are enabled by a rapi_sender call, and
  1025.              the sender Tspec in that call will match the sender Tspec
  1026.              returned in a subsequent path error upcall.
  1027.  
  1028.         o    RAPI_RESV_ERROR
  1029.  
  1030.              A reservation error upcall indicates that an asynchronous
  1031.              reservation error has occurred.
  1032.  
  1033.              The "ErrorCode" and "ErrorValue" parameters will specify
  1034.              the error.  "Flowspec_list" will contain one flowspec,
  1035.              while "FilterSpec_list" may contain zero or more
  1036.              corresponding filter specs.  "Adspec_list" will be empty.
  1037.  
  1038.         o    RAPI_RESV_CONFIRM
  1039.  
  1040.              A confirmation upcall indicates that a reservation has been
  1041.              made at least up to an intermediate merge point, and
  1042.              probably (but not necessarily) all the way to at least one
  1043.              sender.  A confirmation upcall is enabled by a rapi_reserve
  1044.              call with the RAPI_REQ_CONFIRM flag set, and at most one
  1045.              confirmation upcall will result from each such call.
  1046.  
  1047.              The parameters of a confirmation upcall are the same as
  1048.              those for a reservation event upcall.
  1049.  
  1050.         The accompanying table summarizes the upcalls; here n is a non-
  1051.         negative integer.
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061. Braden, Hoffman        Expiration: December 1997               [Page 18]
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Internet Draft                  RAPI v.5                       June 1997
  1067.  
  1068.  
  1069.         Upcall           Enabled by    FilterSpecNo  FlowspecNo   AdspecNo
  1070.  
  1071.         Path event       rapi_session       n             n           n
  1072.  
  1073.         Path error       rapi_sender        1             1           0
  1074.  
  1075.         Resv event       rapi_sender      1 or 0        1 or 0        0
  1076.  
  1077.         Resv error       rapi_reserve       n             1           0
  1078.  
  1079.         Confirm          rapi_reserve       1             1           0
  1080.  
  1081.                         Table 1: Summary of Upcall Types
  1082.  
  1083.  
  1084. 3. RAPI FORMATTING ROUTINES
  1085.  
  1086.    For convenience of applications, RAPI includes standard routines for
  1087.    displaying the contents of a RAPI flowspec object or Tspec object.
  1088.    To use these routines, include the file "rapi_lib.h".
  1089.  
  1090.    A.   Format a Flowspec
  1091.  
  1092.         The rapi_fmt_flowspec() call formats a given RAPI flowspec into
  1093.         a buffer of given address and size.  The output is truncated if
  1094.         the size is too small.
  1095.  
  1096.         void rapi_fmt_flowspec(
  1097.  
  1098.              rapi_flowspec_t  *specp,   /* Addr of RAPI flowspec*/
  1099.              char             *buffer,  /* Addr of buffer       */
  1100.              int               length   /* Length of buffer     */
  1101.              )
  1102.  
  1103.  
  1104.    B.   Format a Tspec
  1105.  
  1106.         The rapi_fmt_tspec() call formats a given RAPI Tspec into a
  1107.         buffer of given address and size.  The output is truncated if
  1108.         the size is too small.
  1109.  
  1110.         void rapi_fmt_tspec(
  1111.  
  1112.              rapi_tspec_t    *tspecp,  /* Addr of RAPI Tspec  */
  1113.              char            *buffer,  /* Addr of buffer      */
  1114.              int              length   /* Length of buffer    */
  1115.              )
  1116.  
  1117.  
  1118.  
  1119.  
  1120. Braden, Hoffman        Expiration: December 1997               [Page 19]
  1121.  
  1122.  
  1123.  
  1124.  
  1125. Internet Draft                  RAPI v.5                       June 1997
  1126.  
  1127.  
  1128.    C.   Format an Adspec
  1129.  
  1130.         The rapi_fmt_adspec() call formats a given RAPI Adspec into a
  1131.         buffer of given address and size.  The output is truncated if
  1132.         the size is too small.
  1133.  
  1134.         void rapi_fmt_adspec(
  1135.  
  1136.              rapi_adspec_t    *adspecp,  /* Addr of RAPI Adspec */
  1137.              char             *buffer,   /* Addr of buffer      */
  1138.              int               length    /* Length of buffer    */
  1139.              )
  1140.  
  1141.  
  1142.    D.   Format a Filter Spec
  1143.  
  1144.         The rapi_fmt_filtspec() call formats a given RAPI Filter Spec
  1145.         into a buffer of given address and size.  The output is
  1146.         truncated if the size is too small.
  1147.  
  1148.         void rapi_fmt_filtspec(
  1149.  
  1150.              rapi_filter_t    *filtp,    /* Addr of RAPI Filt Spec*/
  1151.              char             *buffer,   /* Addr of buffer        */
  1152.              int               length    /* Length of buffer      */
  1153.              )
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179. Braden, Hoffman        Expiration: December 1997               [Page 20]
  1180.  
  1181.  
  1182.  
  1183.  
  1184. Internet Draft                  RAPI v.5                       June 1997
  1185.  
  1186.  
  1187. 4. RAPI OBJECTS
  1188.  
  1189.    Flowspecs, filter specs, sender templates, and sender Tspecs are
  1190.    encoded as variable-length RAPI objects.
  1191.  
  1192.    Every RAPI object begins with a header consisting of two words, the
  1193.    total length of the object in bytes and the type, respectively.  An
  1194.    empty object consists only of a header, with type zero and length 8
  1195.    bytes.
  1196.  
  1197.    Integrated services data structures are defined in: draft-ietf-
  1198.    intserv-rsvp-01.txt.
  1199.  
  1200.    o    Flowspecs
  1201.  
  1202.         There are two formats for RAPI flowspecs.  For more details, see
  1203.         "rapi_lib.h" and "rsvp_intserv.h".
  1204.  
  1205.         -    RAPI_FLOWSTYPE_Simplified
  1206.  
  1207.              This is a "simplified" format.  It consists of a simple
  1208.              list of parameters needed for either Guaranteed or
  1209.              Controlled Load service, using the service type
  1210.              QOS_GUARANTEED or QOS_CNTR_LOAD, respectively.  The RAPI
  1211.              client library routines will map this format to/from an
  1212.              appropriate Integrated Services data structure.
  1213.  
  1214.         -    RAPI_FLOWSTYPE_Intserv
  1215.  
  1216.              This flowspec must be a fully formatted Integrated Services
  1217.              flowspec data structure.
  1218.  
  1219.    o    Sender Tspecs
  1220.  
  1221.         There are two formats for RAPI Sender Tspecs.  For more details,
  1222.         see "rapi_lib.h" and "rsvp_intserv.h".
  1223.  
  1224.         -    RAPI_TSPECTYPE_Simplified
  1225.  
  1226.              This is a "simplified" format, consisting of a simple list
  1227.              of parameters with the service type QOS_TSPEC.  The RAPI
  1228.              client library routines will map this format to/from an
  1229.              appropriate Integrated Services data structure.
  1230.  
  1231.         -    RAPI_TSPECTYPE_Intserv
  1232.  
  1233.              This flowspec must be a fully formatted Integrated Services
  1234.              Tspec data structure.
  1235.  
  1236.  
  1237.  
  1238. Braden, Hoffman        Expiration: December 1997               [Page 21]
  1239.  
  1240.  
  1241.  
  1242.  
  1243. Internet Draft                  RAPI v.5                       June 1997
  1244.  
  1245.  
  1246.    o    Adspecs
  1247.  
  1248.         There are two formats for RAPI Adspecs.  For more details, see
  1249.         "rapi_lib.h" and "rsvp_intserv.h".
  1250.  
  1251.         -    RAPI_ADSTYPE_Simplified
  1252.  
  1253.              This is a "simplified" format, consisting of a list of
  1254.              Adspec parameters for all possible services.  The RAPI
  1255.              client library routines will map this format to/from an
  1256.              appropriate Integrated Services data structure.
  1257.  
  1258.         -    RAPI_ADSTYPE_Intserv
  1259.  
  1260.              This flowspec must be a fully formatted Integrated Services
  1261.              Tspec data structure.
  1262.  
  1263.         In an upcall, a flowspec, sender Tspec, or Adspec is by default
  1264.         delivered in simplified format; however, if the RAPI_USE_INTSERV
  1265.         flag is set in the rapi_session call, then the IntServ format is
  1266.         used in upcalls.
  1267.  
  1268.    o    Filter Specs and Sender Templates
  1269.  
  1270.         There are two formats for these objects.
  1271.  
  1272.         -    RAPI_FILTERFORM_BASE (RAPI_FILTERFORM_BASE6)
  1273.  
  1274.              This object consists of only a socket address structure,
  1275.              defining the IP (V4 or V6) address and port.
  1276.  
  1277.         -    RAPI_FILTERFORM_GPI (RAPI_FILTERFORM_GPI6)
  1278.  
  1279.              This object consists of only an address structure, defining
  1280.              the IP (V4 or V6) address and a 32-bit Generalized Port
  1281.              Identifier.  It is recommended for all IPSEC applications.
  1282.              Other non-TCP/non-UDP transports may also utilize this
  1283.              format in the future.
  1284.  
  1285.    o    Policy Data Objects
  1286.  
  1287.         (Not yet supported)
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297. Braden, Hoffman        Expiration: December 1997               [Page 22]
  1298.  
  1299.  
  1300.  
  1301.  
  1302. Internet Draft                  RAPI v.5                       June 1997
  1303.  
  1304.  
  1305. APPENDIX A. Implementation
  1306.  
  1307.    This section contains some general remarks on the implementation of
  1308.    this API that is distributed with the ISI release of RSVP code.
  1309.  
  1310.    A.1 Protocols
  1311.  
  1312.       There are three protocol interfaces involved in invoking RSVP via
  1313.       the API.
  1314.  
  1315.       1.   Procedure Call Interface to Application
  1316.  
  1317.            The term "RAPI" (RSVP API) is used for the procedure call
  1318.            interface to applications, and for the data structures
  1319.            ("objects") used in that interface.  This document is
  1320.            primarily concerned with the RAPI interface.  This interface
  1321.            is realized by procedures included in the library routine
  1322.            librsvp.a, which is compiled from rapi_lib.c and rapi_fmt.c.
  1323.  
  1324.       2.   Application - Daemon Protocol
  1325.  
  1326.            The term "API" is used in the code for the local protocol
  1327.            across the Unix socket between the librsvp.a routines and the
  1328.            RSVP daemon rsvpd.  This protocol generally use RSVP object
  1329.            bodies but RAPI object framing.
  1330.  
  1331.       3.   RSVP Protocol
  1332.  
  1333.            The RSVP protocol is used in the Internet between RSVP daemon
  1334.            programs.
  1335.  
  1336.       The code is organized to make these three interfaces logically
  1337.       independent, so they can be changed independently.  Each of these
  1338.       three protocol interfaces has an independent version number,
  1339.       defined in rapi_lib.h, rsvp_api.h, and rsvp.h for RAPI, API, and
  1340.       RSVP, respectively.
  1341.  
  1342.       The RAPI call library librsvp.a includes routines that convert
  1343.       objects between RAPI and API formats.  Similarly, the file
  1344.       rsvp_api.c included in the RSVP daemon includes routines that
  1345.       convert between the API representation and the RSVP
  1346.       representation.  In some cases, these conversion procedures are
  1347.       identity transformations (i.e., pure copies); however, they
  1348.       provide the structure to allow any of the three interfaces to be
  1349.       changed in the future.
  1350.  
  1351.       There are two different object framing conventions.  RAPI and API
  1352.       objects have a two-word header -- a total length in bytes and a
  1353.  
  1354.  
  1355.  
  1356. Braden, Hoffman        Expiration: December 1997               [Page 23]
  1357.  
  1358.  
  1359.  
  1360.  
  1361. Internet Draft                  RAPI v.5                       June 1997
  1362.  
  1363.  
  1364.       format code -- and a body.  RSVP objects have a one-word header.
  1365.       In general, objects in the API interface (i.e., across the Unix
  1366.       socket) carry the two-word RAPI object header, but their body is
  1367.       that of the corresponding RSVP object.  Therefore, the API<->RSVP
  1368.       conversion in rsvp_api.c simply maps the framing convention.
  1369.  
  1370.       In the RAPI interface, the application is given some choice of
  1371.       data formats.  For example, QoS control objects (i.e., flowspecs,
  1372.       Tspecs, and Adspecs) can be represented in either the RSVP (really
  1373.       Int-Serv) format, which has complex packing, or in the more
  1374.       convenient Simplified format.  The RAPI library routines map
  1375.       between Simplified format and Int-Serv format, which is used
  1376.       across the API.
  1377.  
  1378.    A.2 RAPI Sessions
  1379.  
  1380.       Each instance of the RAPI library routines keeps a local (to the
  1381.       application process) table of open RAPI sessions; the index into
  1382.       this table is the session handle (a_sid) used locally.   The RSVP
  1383.       daemon keeps its own table of RAPI sessions.  From the daemon's
  1384.       viewpoint, a RAPI session is defined by the triple: (fd, pid,
  1385.       a_sid), where fd is the file descriptor for the Unix socket, pid
  1386.       is the Unix process id, and a_sid is an application session id
  1387.       received over fd from pid.
  1388.  
  1389. APPENDIX B. Implementation Restrictions
  1390.  
  1391.    This Appendix summarizes the features of the interface that have not
  1392.    been implemented in the latest (4.1a6) release of the ISI reference
  1393.    implementation of RSVP.
  1394.  
  1395.    o    The RAPI_FILTERFORM_GPI and RAPI_FILTERFORM_GPI objects and the
  1396.         session flag RAPI_GPI_SESSION are implemented in RAPI and the
  1397.         API, but the IPSEC extensions are not yet fully implemented in
  1398.         RSVP.
  1399.  
  1400.    o    The "SenderAdspec", and "SenderPolicy" parameters in a
  1401.         rapi_sender call are not implemented.
  1402.  
  1403.    o    The "Style_Ext" and "Rcvr_Policy" parameters in a rapi_reserve
  1404.         call are not implemented.
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415. Braden, Hoffman        Expiration: December 1997               [Page 24]
  1416.  
  1417.  
  1418.  
  1419.  
  1420. Internet Draft                  RAPI v.5                       June 1997
  1421.  
  1422.  
  1423. APPENDIX C. CHANGES
  1424.  
  1425.    This document describes major version 5 of RAPI.  This version has
  1426.    the following differences from previous versions:
  1427.  
  1428.    o    The "Legacy" format has been removed.
  1429.  
  1430.    o    The rapi_fmt_filtspec() routine has been added.
  1431.  
  1432.    o    The two session flags RAPI_GPI_SESSION and RAPI_USE_INTSERV have
  1433.         been defined.
  1434.  
  1435.    o    The ErrorNode parameter in an upcall has been changed from a
  1436.         sockaddr to a pointer to a sockaddr structure, to accommodate
  1437.         IPv6.
  1438.  
  1439.    o    IPv4-specific Socket structures sockaddr_in have been changed to
  1440.         the more general form sockaddr, to accomodate IPv6.  The calling
  1441.         application should supply the appropriate form, sockaddr_in or
  1442.         sockaddr_in6, and cast it into a sockaddr for the call.
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474. Braden, Hoffman        Expiration: December 1997               [Page 25]
  1475.  
  1476.