4 /**********************************************************************
8 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
9 +---------------+---------------+---------------+---------------+
10 | Vers | Flags | Msg Type | RSVP Checksum |
11 +---------------+---------------+---------------+---------------+
12 | Send_TTL | (Reserved) | RSVP Length |
13 +---------------+---------------+---------------+---------------+
16 The fields in the common header are as follows:
20 Protocol version number. This is version 1.
26 No flag bits are defined yet.
44 RSVP Checksum: 16 bits
46 The one's complement of the one's complement sum of the
47 message, with the checksum field replaced by zero for the
48 purpose of computing the checksum. An all-zero value
49 means that no checksum was transmitted.
53 The IP TTL value with which the message was sent. See
58 The total length of this RSVP message in bytes, including
59 the common header and the variable-length objects that
62 **********************************************************************/
64 typedef struct rsvpHeaderFlag_s
{
65 BITFIELDS_ASCENDING_4(u_char version
:4,
69 typedef struct rsvpHeader_s
{
72 struct rsvpHeaderFlag_s flag
;
81 /**********************************************************************
84 Every object consists of one or more 32-bit words with a one-
85 word header, with the following format:
88 +-------------+-------------+-------------+-------------+
89 | Length (bytes) | Class-Num | C-Type |
90 +-------------+-------------+-------------+-------------+
92 // (Object contents) //
94 +-------------+-------------+-------------+-------------+
96 An object header has the following fields:
100 A 16-bit field containing the total object length in
101 bytes. Must always be a multiple of 4, and at least 4.
105 Identifies the object class; values of this field are
106 defined in Appendix A. Each object class has a name,
107 which is always capitalized in this document. An RSVP
108 implementation must recognize the following classes:
112 A NULL object has a Class-Num of zero, and its C-Type
113 is ignored. Its length must be at least 4, but can
114 be any multiple of 4. A NULL object may appear
115 anywhere in a sequence of objects, and its contents
116 will be ignored by the receiver.
120 Contains the IP destination address (DestAddress),
121 the IP protocol id, and some form of generalized
122 destination port, to define a specific session for
123 the other objects that follow. Required in every
128 Carries the IP address of the RSVP-capable node that
129 sent this message and a logical outgoing interface
130 handle (LIH; see Section 3.3). This document refers
131 to a RSVP_HOP object as a PHOP ("previous hop")
132 object for downstream messages or as a NHOP (" next
133 hop") object for upstream messages.
137 Contains the value for the refresh period R used by
138 the creator of the message; see Section 3.7.
139 Required in every Path and Resv message.
143 Defines the reservation style plus style-specific
144 information that is not in FLOWSPEC or FILTER_SPEC
145 objects. Required in every Resv message.
149 Defines a desired QoS, in a Resv message.
153 Defines a subset of session data packets that should
154 receive the desired QoS (specified by a FLOWSPEC
155 object), in a Resv message.
159 Contains a sender IP address and perhaps some
160 additional demultiplexing information to identify a
161 sender. Required in a Path message.
165 Defines the traffic characteristics of a sender's
166 data flow. Required in a Path message.
170 Carries OPWA data, in a Path message.
174 Specifies an error in a PathErr, ResvErr, or a
175 confirmation in a ResvConf message.
179 Carries information that will allow a local policy
180 module to decide whether an associated reservation is
181 administratively permitted. May appear in Path,
182 Resv, PathErr, or ResvErr message.
184 The use of POLICY_DATA objects is not fully specified
185 at this time; a future document will fill this gap.
189 Carries cryptographic data to authenticate the
190 originating node and to verify the contents of this
191 RSVP message. The use of the INTEGRITY object is
192 described in [Baker96].
196 Carries an explicit list of sender hosts towards
197 which the information in the message is to be
198 forwarded. May appear in a Resv, ResvErr, or
199 ResvTear message. See Section 3.4.
203 Carries the IP address of a receiver that requested a
204 confirmation. May appear in a Resv or ResvConf
211 The format of a Path message is as follows:
213 <Path Message> ::= <Common Header> [ <INTEGRITY> ]
214 <SESSION> <RSVP_HOP> <TIME_VALUES>
215 [ <EXPLICIT_ROUTE> ] <LABEL_REQUEST>
216 [ <SESSION_ATTRIBUTE> ]
217 [ <POLICY_DATA> ... ]
220 <sender descriptor> ::= <SENDER_TEMPLATE> <SENDER_TSPEC>
221 [ <ADSPEC> ] [ <RECORD_ROUTE> ]
223 The Resv message format is as follows:
225 <Resv Message> ::= <Common Header> [ <INTEGRITY> ]
226 <SESSION> <RSVP_HOP> <TIME_VALUES>
227 [ <RESV_CONFIRM> ] [ <SCOPE> ]
228 [ <POLICY_DATA> ... ]
229 <STYLE> <flow descriptor list>
231 <flow descriptor list> ::= <FF flow descriptor list> | <SE flow descriptor>
233 <FF flow descriptor list> ::= <FLOWSPEC> <FILTER_SPEC> <LABEL>
234 [ <RECORD_ROUTE> ] | <FF flow descriptor list>
237 <FF flow descriptor> ::= [ <FLOWSPEC> ] <FILTER_SPEC> <LABEL>
240 <SE flow descriptor> ::= <FLOWSPEC> <SE filter spec list>
242 <SE filter spec list> ::= <SE filter spec> |
243 <SE filter spec list> <SE filter spec>
245 <SE filter spec> ::= <FILTER_SPEC> <LABEL> [ <RECORD_ROUTE> ]
247 Note: LABEL and RECORD_ROUTE (if present), are bound to the
248 preceding FILTER_SPEC. No more than one LABEL and/or
249 RECORD_ROUTE may follow each FILTER_SPEC.
251 The Path Tear message format is as follows:
253 <PathTear Message> ::= <Common Header> [ <INTEGRITY> ]
255 [ <sender descriptor> ]
257 <sender descriptor> ::= (see earlier definition)
260 The Resv Tear message format is as follows:
262 <ResvTear Message> ::= <Common Header> [<INTEGRITY>]
263 <SESSION> <RSVP_HOP> [ <SCOPE> ] <STYLE>
264 <flow descriptor list>
266 <flow descriptor list> ::= (see earlier definition)
270 The Path Error message format is as follows:
272 <PathErr message> ::= <Common Header> [ <INTEGRITY> ]
273 <SESSION> <ERROR_SPEC> [ <POLICY_DATA> ...]
274 [ <sender descriptor> ]
276 <sender descriptor> ::= (see earlier definition)
279 The Resv Error message format is as follows:
281 <ResvErr Message> ::= <Common Header> [ <INTEGRITY> ]
282 <SESSION> <RSVP_HOP> <ERROR_SPEC> [ <SCOPE> ]
283 [ <POLICY_DATA> ...] <STYLE>
284 [ <error flow descriptor> ]
287 <error flow descriptor> ::= <WF flow descriptor>
290 <error flow descriptor> ::= <FF flow descriptor>
293 <error flow descriptor> ::= <SE flow descriptor>
297 The Resv Conf message format is as follows:
299 <ResvConf message> ::= <Common Header> [ <INTEGRITY> ]
300 <SESSION> <ERROR_SPEC> <RESV_CONFIRM>
301 <STYLE> <flow descriptor list>
303 <flow descriptor list> ::= (see earlier definition)
305 **********************************************************************/
307 #define RSVP_SESSION_CLASS 1
308 #define RSVP_SESSION_CTYPE_IPV4 1
309 #define RSVP_SESSION_CTYPE_IPV6 2
311 /**********************************************************************
314 o IPv4/UDP SESSION object: Class = 1, C-Type = 1
317 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
318 +---------------+---------------+---------------+---------------+
319 | IPv4 DestAddress (4 bytes) |
320 +---------------+---------------+---------------+---------------+
321 | Protocol Id | Flags | DstPort |
322 +---------------+---------------+---------------+---------------+
324 o IPv6/UDP SESSION object: Class = 1, C-Type = 2
327 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
328 +---------------+---------------+---------------+---------------+
332 + IPv6 DestAddress (16 bytes) +
336 +---------------+---------------+---------------+---------------+
337 | Protocol Id | Flags | DstPort |
338 +---------------+---------------+---------------+---------------+
342 The IP unicast or multicast destination address of the
343 session. This field must be non-zero.
347 The IP Protocol Identifier for the data flow. This field
353 The E_Police flag is used in Path messages to determine
354 the effective "edge" of the network, to control traffic
355 policing. If the sender host is not itself capable of
356 traffic policing, it will set this bit on in Path
357 messages it sends. The first node whose RSVP is capable
358 of traffic policing will do so (if appropriate to the
359 service) and turn the flag off.
363 The UDP/TCP destination port for the session. Zero may be
364 used to indicate `none'.
366 Other SESSION C-Types could be defined in the future to
367 support other demultiplexing conventions in the transport-
368 layer or application layer.
370 **********************************************************************/
372 typedef struct rsvpSession4_s
{
379 typedef struct rsvpSession6_s
{
387 #define RSVP_HOP_CLASS 3
388 #define RSVP_HOP_CTYPE_IPV4 1
389 #define RSVP_HOP_CTYPE_IPV6 2
391 /**********************************************************************
394 o IPv4 RSVP_HOP object: Class = 3, C-Type = 1
397 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
399 +---------------+---------------+---------------+---------------+
400 | IPv4 Next/Previous Hop Address |
401 +---------------+---------------+---------------+---------------+
402 | Logical Interface Handle |
403 +---------------+---------------+---------------+---------------+
405 o IPv6 RSVP_HOP object: Class = 3, C-Type = 2
408 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
410 +---------------+---------------+---------------+---------------+
414 + IPv6 Next/Previous Hop Address +
418 +---------------+---------------+---------------+---------------+
419 | Logical Interface Handle |
420 +---------------+---------------+---------------+---------------+
422 This object carries the IP address of the interface through which
423 the last RSVP-knowledgeable hop forwarded this message. The
424 Logical Interface Handle (LIH) is used to distinguish logical
425 outgoing interfaces, as discussed in Sections 3.3 and 3.9. A node
426 receiving an LIH in a Path message saves its value and returns it
427 in the HOP objects of subsequent Resv messages sent to the node
428 that originated the LIH. The LIH should be identically zero if
429 there is no logical interface handle.
431 **********************************************************************/
433 typedef struct rsvpHop4_s
{
435 u_int logicalIfHandle
;
438 typedef struct rsvpHop6_s
{
440 u_int logicalIfHandle
;
443 #define RSVP_TIME_CLASS 5
444 #define RSVP_TIME_CTYPE 1
446 /**********************************************************************
449 o TIME_VALUES Object: Class = 5, C-Type = 1
452 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
453 +---------------+---------------+---------------+---------------+
455 +---------------+---------------+---------------+---------------+
459 The refresh timeout period R used to generate this message;
462 **********************************************************************/
464 typedef struct rsvpTime_s
{
468 #define RSVP_ERROR_SPEC_CLASS 6
469 #define RSVP_ERROR_SPEC_CTYPE_IPV4 1
470 #define RSVP_ERROR_SPEC_CTYPE_IPV6 2
472 /**********************************************************************
473 RSVP ERROR_SPEC Object
475 o IPv4 ERROR_SPEC object: Class = 6, C-Type = 1
478 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
479 +---------------+---------------+---------------+---------------+
480 | IPv4 Error Node Address (4 bytes) |
481 +---------------+---------------+---------------+---------------+
482 | Flags | Error Code | Error Value |
483 +---------------+---------------+---------------+---------------+
486 o IPv6 ERROR_SPEC object: Class = 6, C-Type = 2
489 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
490 +---------------+---------------+---------------+---------------+
494 + IPv6 Error Node Address (16 bytes) +
498 +---------------+---------------+---------------+---------------+
499 | Flags | Error Code | Error Value |
500 +---------------+---------------+---------------+---------------+
504 The IP address of the node in which the error was detected.
510 This flag is used only for an ERROR_SPEC object in a
511 ResvErr message. If it on, this flag indicates that
512 there was, and still is, a reservation in place at the
517 This flag is used only for an ERROR_SPEC object in a
518 ResvErr message, and it is only set in the interface to
519 the receiver application. If it on, this flag indicates
520 that the FLOWSPEC that failed was strictly greater than
521 the FLOWSPEC requested by this receiver.
525 A one-octet error description.
529 A two-octet field containing additional information about the
530 error. Its contents depend upon the Error Type.
532 The values for Error Code and Error Value are defined in Appendix
535 ***********************************************************************/
537 typedef struct rsvpErrorSpec4_s
{
544 typedef struct rsvpErrorSpec6_s
{
551 #define RSVP_SCOPE_LIST_CLASS 7
552 #define RSVP_SCOPE_LIST_CTYPE_IPV4 1
553 #define RSVP_SCOPE_LIST_CTYPE_IPV6 2
555 /***********************************************************************
557 RSVP SCOPE LIST Object
559 This object contains a list of IP addresses, used for routing
560 messages with wildcard scope without loops. The addresses must be
561 listed in ascending numerical order.
563 o IPv4 SCOPE List object: Class = 7, C-Type = 1
566 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
567 +-------------+-------------+-------------+-------------+
568 | IPv4 Src Address (4 bytes) |
569 +-------------+-------------+-------------+-------------+
571 +-------------+-------------+-------------+-------------+
572 | IPv4 Src Address (4 bytes) |
573 +-------------+-------------+-------------+-------------+
576 o IPv6 SCOPE list object: Class = 7, C-Type = 2
579 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
580 +-------------+-------------+-------------+-------------+
584 + IPv6 Src Address (16 bytes) +
588 +-------------+-------------+-------------+-------------+
590 +-------------+-------------+-------------+-------------+
594 + IPv6 Src Address (16 bytes) +
598 +-------------+-------------+-------------+-------------+
600 ***********************************************************************/
602 typedef struct rsvpScopeList4_s
{
606 typedef struct rsvpScopeList6_s
{
607 u_char hopAddr
[16][16];
610 #define RSVP_STYLE_CLASS 8
611 #define RSVP_STYLE_CTYPE 1
613 /***********************************************************************
617 o STYLE object: Class = 8, C-Type = 1
620 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
621 +-------------+-------------+-------------+-------------+
622 | Flags | Option Vector |
623 +-------------+-------------+-------------+-------------+
631 Option Vector: 24 bits
633 A set of bit fields giving values for the reservation
634 options. If new options are added in the future,
635 corresponding fields in the option vector will be assigned
636 from the least-significant end. If a node does not recognize
637 a style ID, it may interpret as much of the option vector as
638 it can, ignoring new fields that may have been defined.
640 The option vector bits are assigned (from the left) as
645 2 bits: Sharing control
649 01b: Distinct reservations
651 10b: Shared reservations
655 3 bits: Sender selection control
663 011b - 111b: Reserved
665 The low order bits of the option vector are determined by the
672 ***********************************************************************/
674 typedef struct rsvpStyleOptions_s
{
675 BITFIELDS_ASCENDING_4(u_int flag
:8, /* flags */
676 u_short reserved
:19, /* reserved */
677 u_short shareControl
:2, /* sharing control */
678 u_short senderSelectionControlres
:3 /* sender selection control */
679 } rsvpStyleOptions_t
;
681 typedef struct rsvpStyle_s
{
684 struct rsvpStyleOptions_s options
;
688 #define RSVP_FILTER_SPEC_CLASS 10
689 #define RSVP_FILTER_SPEC_CTYPE_IPV4 1
690 #define RSVP_FILTER_SPEC_CTYPE_IPV6 2
691 #define RSVP_FILTER_SPEC_CTYPE_FLOWLABEL 3
693 /***********************************************************************
695 FILTER_SPEC class = 10.
697 o IPv4 FILTER_SPEC object: Class = 10, C-Type = 1
700 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
701 +---------------+---------------+---------------+---------------+
702 | IPv4 SrcAddress (4 bytes) |
703 +---------------+---------------+---------------+---------------+
704 | ////// | ////// | SrcPort |
705 +---------------+---------------+---------------+---------------+
708 o IPv6 FILTER_SPEC object: Class = 10, C-Type = 2
711 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
712 +---------------+---------------+---------------+---------------+
716 + IPv6 SrcAddress (16 bytes) +
720 +---------------+---------------+---------------+---------------+
721 | ////// | ////// | SrcPort |
722 +---------------+---------------+---------------+---------------+
725 o IPv6 Flow-label FILTER_SPEC object: Class = 10, C-Type = 3
728 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
729 +---------------+---------------+---------------+---------------+
733 + IPv6 SrcAddress (16 bytes) +
737 +---------------+---------------+---------------+---------------+
738 | /////// | Flow Label (24 bits) |
739 +---------------+---------------+---------------+---------------+
743 The IP source address for a sender host. Must be non-zero.
747 The UDP/TCP source port for a sender, or zero to indicate
752 A 24-bit Flow Label, defined in IPv6. This value may be used
753 by the packet classifier to efficiently identify the packets
754 belonging to a particular (sender->destination) data flow.
756 ***********************************************************************/
758 typedef struct rsvpFilterSpec4_s
{
765 typedef struct rsvpFilterSpec6_s
{
772 typedef struct rsvpFilterSpecFlags_s
{
773 BITFIELDS_ASCENDING_4(u_int reserved
:8,
775 } rsvpFilterSpecFlags_t
;
777 typedef struct rsvpFilterSpecLabel_s
{
781 struct rsvpFilterSpecFlags_s flowLabel
;
783 } rsvpFilterSpecLabel_t
;
785 #endif /* _RSVP_MPLS_H_ */