1 /**********************************************************************
5 * (C) Ashok Narayanan <ashokn@cisco.com>
7 * $Id: packet-rsvp.h,v 1.7 1999/11/18 01:45:02 guy Exp $
9 * For license details, see the COPYING file with this distribution
11 **********************************************************************/
20 RSVP_MSG_PATH=1, RSVP_MSG_RESV, RSVP_MSG_PERR, RSVP_MSG_RERR,
21 RSVP_MSG_PTEAR, RSVP_MSG_RTEAR, RSVP_MSG_CONFIRM,
22 RSVP_MSG_RTEAR_CONFIRM=10
25 static value_string message_type_vals[] = {
26 {RSVP_MSG_PATH, "PATH Message"},
27 {RSVP_MSG_RESV, "RESV Message"},
28 {RSVP_MSG_PERR, "PATH ERROR Message"},
29 {RSVP_MSG_RERR, "RESV ERROR Message"},
30 {RSVP_MSG_PTEAR, "PATH TEAR Message"},
31 {RSVP_MSG_RTEAR, "RESV TEAR Message"},
32 {RSVP_MSG_CONFIRM, "CONFIRM Message"},
33 {RSVP_MSG_RTEAR_CONFIRM, "RESV TEAR CONFIRM Message"}
39 #define MAX_RSVP_CLASS 15
46 RSVP_CLASS_TIME_VALUES,
51 RSVP_CLASS_FILTER_SPEC,
52 RSVP_CLASS_SENDER_TEMPLATE,
53 RSVP_CLASS_SENDER_TSPEC,
59 static value_string rsvp_class_vals[] = {
60 {RSVP_CLASS_NULL, "NULL object"},
61 {RSVP_CLASS_SESSION, "SESSION object"},
62 {RSVP_CLASS_HOP, "HOP object"},
63 {RSVP_CLASS_INTEGRITY, "INTEGRITY object"},
64 {RSVP_CLASS_TIME_VALUES, "TIME VALUES object"},
65 {RSVP_CLASS_ERROR, "ERROR object"},
66 {RSVP_CLASS_SCOPE, "SCOPE object"},
67 {RSVP_CLASS_STYLE, "STYLE object"},
68 {RSVP_CLASS_FLOWSPEC, "FLOWSPEC object"},
69 {RSVP_CLASS_FILTER_SPEC, "FILTER SPEC object"},
70 {RSVP_CLASS_SENDER_TEMPLATE, "SENDER TEMPLATE object"},
71 {RSVP_CLASS_SENDER_TSPEC, "SENDER TSPEC object"},
72 {RSVP_CLASS_ADSPEC, "ADSPEC object"},
73 {RSVP_CLASS_POLICY, "POLICY object"},
74 {RSVP_CLASS_CONFIRM, "CONFIRM object"}
80 enum rsvp_error_types {
81 RSVP_ERROR_CONFIRM = 0,
86 RSVP_ERROR_CONFLICT_RESV_STYLE,
87 RSVP_ERROR_UNKNOWN_RESV_STYLE,
88 RSVP_ERROR_CONFLICT_DEST_PORTS,
89 RSVP_ERROR_CONFLICT_SRC_PORTS,
90 RSVP_ERROR_PREEMPTED=12,
91 RSVP_ERROR_UNKNOWN_CLASS,
92 RSVP_ERROR_UNKNOWN_C_TYPE,
93 RSVP_ERROR_TRAFFIC = 21,
94 RSVP_ERROR_TRAFFIC_SYSTEM,
98 static value_string rsvp_error_vals[] = {
99 {RSVP_ERROR_CONFIRM, "Confirmation"},
100 {RSVP_ERROR_ADMISSION, "Admission Control Failure "},
101 {RSVP_ERROR_POLICY, "Policy Control Failure"},
102 {RSVP_ERROR_NO_PATH, "No PATH information for this RESV message"},
103 {RSVP_ERROR_NO_SENDER, "No sender information for this RESV message"},
104 {RSVP_ERROR_CONFLICT_RESV_STYLE, "Conflicting reservation styles"},
105 {RSVP_ERROR_UNKNOWN_RESV_STYLE, "Unknown reservation style"},
106 {RSVP_ERROR_CONFLICT_DEST_PORTS, "Conflicting destination ports"},
107 {RSVP_ERROR_CONFLICT_SRC_PORTS, "Conflicting source ports"},
108 {RSVP_ERROR_PREEMPTED, "Service preempted"},
109 {RSVP_ERROR_UNKNOWN_CLASS, "Unknown object class"},
110 {RSVP_ERROR_UNKNOWN_C_TYPE, "Unknown object C-type"},
111 {RSVP_ERROR_TRAFFIC, "Traffic Control Error"},
112 {RSVP_ERROR_TRAFFIC_SYSTEM, "Traffic Control System Error"}
116 * Defines the reservation style plus style-specific information that
117 * is not a FLOWSPEC or FILTER_SPEC object, in a RESV message.
119 #define RSVP_DISTINCT (1 << 3)
120 #define RSVP_SHARED (2 << 3)
121 #define RSVP_SHARING_MASK (RSVP_DISTINCT | RSVP_SHARED)
123 #define RSVP_SCOPE_WILD 1
124 #define RSVP_SCOPE_EXPLICIT 2
125 #define RSVP_SCOPE_MASK 0x07
127 #define RSVP_WF (RSVP_SHARED | RSVP_SCOPE_WILD)
128 #define RSVP_FF (RSVP_DISTINCT | RSVP_SCOPE_EXPLICIT)
129 #define RSVP_SE (RSVP_SHARED | RSVP_SCOPE_EXPLICIT)
131 static value_string style_vals[] = {
132 { RSVP_WF, "Wildcard Filter" },
133 { RSVP_FF, "Fixed Filter" },
134 { RSVP_SE, "Shared-Explicit" }
137 /*------------------------------*
139 *------------------------------*/
148 /* Data follows, as a sequence of bytes */
152 * RSVP message header
156 guint8 ver_flags; /* RSVP Version & flags */
157 guint8 message_type; /* type of message */
158 guint16 cksum; /* IP Checksum */
159 guint8 sending_ttl; /* ttl of message */
160 guint8 reserved_byte; /* reserved */
161 guint16 rsvp_length; /* length of RSVP data */
162 /* Objects follow, as a sequence of "rsvp_object"s */
185 struct e_in6_addr destination;
193 * Can be a PHOP or a NHOP
203 struct e_in6_addr neighbor;
228 struct e_in6_addr error_node;
244 struct e_in6_addr receiver;
252 /* Source follows, as a sequence of 32-bit integers */
260 guint32 reservation_type;
264 * Defines a subset of session data packets that should receive the
265 * desired QoS (specified by an FLOWSPEC object), in a RESV message.
269 guint32 source; /* source sending data */
271 guint16 udp_source_port; /* port number */
275 * Contains a sender IP address and perhaps some additional
276 * demultiplexing information to identify a sender, in a PATH
281 guint32 source; /* source sending data */
283 guint16 source_port; /* port number */
284 } rsvp_template_ipv4;
288 struct e_in6_addr source; /* source sending data */
290 guint16 source_port; /* port number */
291 } rsvp_template_ipv6;
294 * Defines a desired QoS, in a RESV message.
296 enum qos_service_type {
297 QOS_QUALITATIVE = 128, /* Qualitative service */
298 QOS_CONTROLLED_LOAD= 5, /* Controlled Load Service */
299 QOS_GUARANTEED = 2, /* Guaranteed service */
300 QOS_TSPEC = 1 /* Traffic specification */
303 static value_string qos_vals[] = {
304 { QOS_QUALITATIVE, "Qualitative QoS" },
305 { QOS_CONTROLLED_LOAD, "Controlled-load QoS" },
306 { QOS_GUARANTEED, "Guaranteed rate QoS" },
307 { QOS_TSPEC, "Traffic specification" },
310 static value_string svc_vals[] = {
311 { 127, "Token bucket TSpec" },
312 { 128, "Qualitative TSpec" },
313 { 130, "Guaranteed-rate RSpec" }
316 enum rsvp_spec_types { INTSRV = 2 };
318 enum intsrv_services {
322 INTSRV_QUALITATIVE = 128
325 static value_string intsrv_services_str[] = {
326 {INTSRV_GENERAL, "Default General Parameters"},
327 {INTSRV_GTD, "Guaranteed"},
328 {INTSRV_CLOAD, "Controlled Load"},
329 {INTSRV_QUALITATIVE, "Qualitative"},
332 enum intsrv_field_name {
333 INTSRV_NON_IS_HOPS = 1, INTSRV_COMPOSED_NON_IS_HOPS,
334 INTSRV_IS_HOPS, INTSRV_COMPOSED_IS_HOPS,
335 INTSRV_PATH_BANDWIDTH, INTSRV_MIN_PATH_BANDWIDTH,
336 INTSRV_IF_LATENCY, INTSRV_PATH_LATENCY,
337 INTSRV_MTU, INTSRV_COMPOSED_MTU,
339 INTSRV_TOKEN_BUCKET_TSPEC = 127,
340 INTSRV_QUALITATIVE_TSPEC = 128,
341 INTSRV_GTD_RSPEC = 130,
343 INTSRV_DELAY = 131, /* Gtd Parameter C - Max Delay Bound - bytes */
344 INTSRV_MAX_JITTER, /* Gtd Parameter D - Max Jitter */
345 INTSRV_E2E_DELAY, /* Gtd Parameter Ctot */
346 INTSRV_E2E_MAX_JITTER, /* Gtd Parameter Dtot */
347 INTSRV_SHP_DELAY, /* Gtd Parameter Csum */
348 INTSRV_SHP_MAX_JITTER /* Gtd Parameter Dsum */
352 * Subobjects for Integrated Services
366 guint16 parameter_length;
373 } IS_tspec; /* RFC2210 */
380 guint16 parameter_length;
383 } QUAL_tspec; /* Qualitative */
389 guint16 length_in_words;
391 /* Data follows, as a sequence of bytes */
397 guint16 param2_length;
398 guint32 requested_rate;
405 } IS_flowspec; /* RFC 2210 */
412 guint16 parameter_length;
415 } QUAL_flowspec; /* Qualitative */
422 guint16 length_in_words;
424 /* Data follows, as a sequence of bytes */
435 static value_string adspec_params[] = {
437 {6, "Path b/w estimate"},
438 {8, "Minimum path latency"},
439 {10, "Composed MTU"},
440 {133, "End-to-end composed value for C"},
441 {134, "End-to-end composed value for D"},
442 {135, "Since-last-reshaping point composed C"},
443 {136, "Since-last-reshaping point composed D"},