📄 rsvpapi.txt
字号:
the size is too small. void rapi_fmt_tspec( rapi_tspec_t *tspecp, /* Addr of RAPI Tspec */ char *buffer, /* Addr of buffer */ int length /* Length of buffer */ )Braden, Hoffman Expiration: February 1999 [Page 19]Internet Draft RAPI v.5 August 1998 C. Format an Adspec The rapi_fmt_adspec() call formats a given RAPI Adspec into a buffer of given address and size. The output is truncated if the size is too small. void rapi_fmt_adspec( rapi_adspec_t *adspecp, /* Addr of RAPI Adspec */ char *buffer, /* Addr of buffer */ int length /* Length of buffer */ ) D. Format a Filter Spec The rapi_fmt_filtspec() call formats a given RAPI Filter Spec into a buffer of given address and size. The output is truncated if the size is too small. void rapi_fmt_filtspec( rapi_filter_t *filtp, /* Addr of RAPI Filt Spec*/ char *buffer, /* Addr of buffer */ int length /* Length of buffer */ )Braden, Hoffman Expiration: February 1999 [Page 20]Internet Draft RAPI v.5 August 19984. RAPI OBJECTS Flowspecs, filter specs, sender templates, and sender Tspecs are encoded as variable-length RAPI objects. Every RAPI object begins with a header consisting of two words, the total length of the object in bytes and the type, respectively. An empty object consists only of a header, with type zero and length 8 bytes. Integrated services data structures are defined in: draft-ietf- intserv-rsvp-01.txt. o Flowspecs There are two formats for RAPI flowspecs. For more details, see "rapi_lib.h" and "rsvp_intserv.h". - RAPI_FLOWSTYPE_Simplified This is a "simplified" format. It consists of a simple list of parameters needed for either Guaranteed or Controlled Load service, using the service type QOS_GUARANTEED or QOS_CNTR_LOAD, respectively. The RAPI client library routines will map this format to/from an appropriate Integrated Services data structure. - RAPI_FLOWSTYPE_Intserv This flowspec must be a fully formatted Integrated Services flowspec data structure. o Sender Tspecs There are two formats for RAPI Sender Tspecs. For more details, see "rapi_lib.h" and "rsvp_intserv.h". - RAPI_TSPECTYPE_Simplified This is a "simplified" format, consisting of a simple list of parameters with the service type QOS_TSPEC. The RAPI client library routines will map this format to/from an appropriate Integrated Services data structure. - RAPI_TSPECTYPE_Intserv This flowspec must be a fully formatted Integrated Services Tspec data structure.Braden, Hoffman Expiration: February 1999 [Page 21]Internet Draft RAPI v.5 August 1998 o Adspecs There are two formats for RAPI Adspecs. For more details, see "rapi_lib.h" and "rsvp_intserv.h". - RAPI_ADSTYPE_Simplified This is a "simplified" format, consisting of a list of Adspec parameters for all possible services. The RAPI client library routines will map this format to/from an appropriate Integrated Services data structure. - RAPI_ADSTYPE_Intserv This flowspec must be a fully formatted Integrated Services Tspec data structure. In an upcall, a flowspec, sender Tspec, or Adspec is by default delivered in simplified format; however, if the RAPI_USE_INTSERV flag is set in the rapi_session call, then the IntServ format is used in upcalls. o Filter Specs and Sender Templates There are two formats for these objects. - RAPI_FILTERFORM_BASE (RAPI_FILTERFORM_BASE6) This object consists of only a socket address structure, defining the IP (V4 or V6) address and port. - RAPI_FILTERFORM_GPI (RAPI_FILTERFORM_GPI6) This object consists of only an address structure, defining the IP (V4 or V6) address and a 32-bit Generalized Port Identifier. It is recommended for all IPSEC applications. Other non-TCP/non-UDP transports may also utilize this format in the future. o Policy Data Objects (Not yet supported)Braden, Hoffman Expiration: February 1999 [Page 22]Internet Draft RAPI v.5 August 1998APPENDIX A. Implementation This section contains some general remarks on the implementation of this API that is distributed with the ISI release of RSVP code. A.1 Protocols There are three protocol interfaces involved in invoking RSVP via the API. 1. Procedure Call Interface to Application The term "RAPI" (RSVP API) is used for the procedure call interface to applications, and for the data structures ("objects") used in that interface. This document is primarily concerned with the RAPI interface. This interface is realized by procedures included in the library routine librsvp.a, which is compiled from rapi_lib.c and rapi_fmt.c. 2. Application - Daemon Protocol The term "API" is used in the code for the local protocol across the Unix socket between the librsvp.a routines and the RSVP daemon rsvpd. This protocol generally use RSVP object bodies but RAPI object framing. 3. RSVP Protocol The RSVP protocol is used in the Internet between RSVP daemon programs. The code is organized to make these three interfaces logically independent, so they can be changed independently. Each of these three protocol interfaces has an independent version number, defined in rapi_lib.h, rsvp_api.h, and rsvp.h for RAPI, API, and RSVP, respectively. The RAPI call library librsvp.a includes routines that convert objects between RAPI and API formats. Similarly, the file rsvp_api.c included in the RSVP daemon includes routines that convert between the API representation and the RSVP representation. In some cases, these conversion procedures are identity transformations (i.e., pure copies); however, they provide the structure to allow any of the three interfaces to be changed in the future. There are two different object framing conventions. RAPI and API objects have a two-word header -- a total length in bytes and aBraden, Hoffman Expiration: February 1999 [Page 23]Internet Draft RAPI v.5 August 1998 format code -- and a body. RSVP objects have a one-word header. In general, objects in the API interface (i.e., across the Unix socket) carry the two-word RAPI object header, but their body is that of the corresponding RSVP object. Therefore, the API<->RSVP conversion in rsvp_api.c simply maps the framing convention. In the RAPI interface, the application is given some choice of data formats. For example, QoS control objects (i.e., flowspecs, Tspecs, and Adspecs) can be represented in either the RSVP (really Int-Serv) format, which has complex packing, or in the more convenient Simplified format. The RAPI library routines map between Simplified format and Int-Serv format, which is used across the API. A.2 RAPI Sessions Each instance of the RAPI library routines keeps a local (to the application process) table of open RAPI sessions; the index into this table is the session handle (a_sid) used locally. The RSVP daemon keeps its own table of RAPI sessions. From the daemon's viewpoint, a RAPI session is defined by the triple: (fd, pid, a_sid), where fd is the file descriptor for the Unix socket, pid is the Unix process id, and a_sid is an application session id received over fd from pid.APPENDIX B. Implementation Restrictions This Appendix summarizes the features of the interface that have not been implemented in the latest (4.1a6) release of the ISI reference implementation of RSVP. o The RAPI_FILTERFORM_GPI and RAPI_FILTERFORM_GPI objects and the session flag RAPI_GPI_SESSION are implemented in RAPI and the API, but the IPSEC extensions are not yet fully implemented in RSVP. o The "SenderAdspec", and "SenderPolicy" parameters in a rapi_sender call are not implemented. o The "Style_Ext" and "Rcvr_Policy" parameters in a rapi_reserve call are not implemented.Braden, Hoffman Expiration: February 1999 [Page 24]Internet Draft RAPI v.5 August 1998APPENDIX C. CHANGES This document describes major version 5 of RAPI. This version has the following differences from previous versions: o The "Legacy" format has been removed. o The rapi_fmt_filtspec() routine has been added. o The two session flags RAPI_GPI_SESSION and RAPI_USE_INTSERV have been defined. o The ErrorNode parameter in an upcall has been changed from a sockaddr to a pointer to a sockaddr structure, to accommodate IPv6. o IPv4-specific Socket structures sockaddr_in have been changed to the more general form sockaddr, to accomodate IPv6. The calling application should supply the appropriate form, sockaddr_in or sockaddr_in6, and cast it into a sockaddr for the call. o The Event_rtn parameter to rapi_session call is now required.Braden, Hoffman Expiration: February 1999 [Page 25]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -