2 * Routines for RSVP packet disassembly
4 * (c) Copyright Ashok Narayanan <ashokn@cisco.com>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 * This module defines routines to disassemble RSVP packets, as defined in
31 * RFC 2205. All objects from RFC2205 are supported, in IPv4 and IPv6 mode.
32 * In addition, the Integrated Services traffic specification objects
33 * defined in RFC2210 are also supported.
35 * IPv6 support is not completely tested
37 * Mar 3, 2000: Added support for MPLS/TE objects, as defined in
38 * <draft-ietf-mpls-rsvp-lsp-tunnel-04.txt>
40 * May 6, 2004: Added support for E-NNI objects, as defined in
41 * <OIF-E-NNI-01.0> (Roberto Morro)
42 * <roberto.morro[AT]tilab.com>
44 * May 6, 2004: Modified some UNI objects, as defined in
45 * <OIF2003.249.09> (Roberto Morro)
46 * <roberto.morro[AT]tilab.com>
48 * June 2, 2005: Modified more UNI objects to show correct TNA
49 * addresses; Fixed LSP interface ID subobject (Richard Rabbat)
50 * <richard[AT]us.fujitsu.com>
52 * July 25, 2005: improved ERROR and LABEL_SET objects dissector;
53 * new ASSOCIATION object dissector (Roberto Morro)
54 * <roberto.morro[AT]tilab.com>
56 * August 22, 2005: added support for tapping and conversations.
57 * (Manu Pathak) <mapathak[AT]cisco.com>
59 * July 4, 2006: added support for RFC4124; new CLASSTYPE object dissector
60 * (FF) <francesco.fondelli[AT]gmail.com>
62 * June 9, 2007: added support for draft-ietf-ccamp-ethernet-traffic-parameters-02
63 * and draft-ietf-ccamp-lsp-hierarchy-bis-02; added support for NOTIFY_REQUEST
64 * and RECOVERY_LABEL objects (Roberto Morro) * <roberto.morro[AT]tilab.com>
66 * Oct 21, 2009: add support for RFC4328, new G.709 traffic parameters,
67 * update gpid, switching and encoding type values to actual IANA numbers.
68 * (FF) <francesco.fondelli[AT]gmail.com>
70 * Gen 20, 2010: add support for ERROR_STRING IF_ID TLV (see RFC 4783)
71 * (FF) <francesco.fondelli[AT]gmail.com>
73 * Feb 12, 2010: add support for generalized label interpretation: SUKLM
74 * format for SONET/SDH label (RFC 4606), t3t2t1 format for G.709 ODUk label
75 * (RFC 4328), G.694 format for lambda label (draft-ietf-ccamp-gmpls-g-694-lamb
76 * da-labels-05). Add related user preference option.
77 * (FF) <francesco.fondelli[AT]gmail.com>
79 * Dec 3, 2010: add support for vendor private class object and ERO/RRO
80 * sub-object (see RFC 3936).
81 * (FF) <francesco.fondelli[AT]gmail.com>
83 * Dec 21, 2010: add new PROTECTION obj c-type 2 (RFC4872),
84 * new TLVs for IF_ID (RFC4920), Path Key subobj in ERO (RFC5520),
85 * new ASSOCIATION obj c-type 4 (oif2008.389), new LSP_ATTRIBUTES and
86 * LSP_REQUIRED_ATTRIBUTES objects (RFC5420), improved ERROR object dissection,
87 * new ADMIN_STATUS flags and fix to conversation (not applied to ACK, SREFRESH
88 * and HELLO messages).
89 * (Roberto Morro) <roberto.morro[AT]telecomitalia.it>
102 #include <epan/packet.h>
104 #include <epan/in_cksum.h>
105 #include <epan/etypes.h>
106 #include <epan/ipproto.h>
107 #include <epan/conversation.h>
108 #include <epan/tap.h>
109 #include <epan/emem.h>
110 #include <epan/sminmpec.h>
112 #include "packet-rsvp.h"
113 #include "packet-ip.h"
114 #include "packet-diffserv-mpls-common.h"
115 #include "packet-osi.h"
117 /* RSVP over UDP encapsulation */
118 #define UDP_PORT_PRSVP 3455
120 static int proto_rsvp = -1;
122 static int hf_rsvp_error_flags = -1;
123 static int hf_rsvp_error_flags_path_state_removed = -1;
124 static int hf_rsvp_error_flags_not_guilty = -1;
125 static int hf_rsvp_error_flags_in_place = -1;
126 static int hf_rsvp_eth_tspec_tlv_color_mode = -1;
127 static int hf_rsvp_eth_tspec_tlv_coupling_flag = -1;
128 static int hf_rsvp_sender_tspec_standard_contiguous_concatenation = -1;
129 static int hf_rsvp_sender_tspec_arbitrary_contiguous_concatenation = -1;
130 static int hf_rsvp_sender_tspec_regenerator_section = -1;
131 static int hf_rsvp_sender_tspec_multiplex_section = -1;
132 static int hf_rsvp_sender_tspec_J0_transparency = -1;
133 static int hf_rsvp_sender_tspec_SOH_RSOH_DCC_transparency = -1;
134 static int hf_rsvp_sender_tspec_LOH_MSOH_DCC_transparency = -1;
135 static int hf_rsvp_sender_tspec_LOH_MSOH_extended_DCC_transparency = -1;
136 static int hf_rsvp_sender_tspec_K1_K2_transparency = -1;
137 static int hf_rsvp_sender_tspec_E1_transparency = -1;
138 static int hf_rsvp_sender_tspec_F1_transparency = -1;
139 static int hf_rsvp_sender_tspec_E2_transparency = -1;
140 static int hf_rsvp_sender_tspec_B1_transparency = -1;
141 static int hf_rsvp_sender_tspec_B2_transparency = -1;
142 static int hf_rsvp_sender_tspec_M0_transparency = -1;
143 static int hf_rsvp_sender_tspec_M1_transparency = -1;
144 static int hf_rsvp_flowspec_standard_contiguous_concatenation = -1;
145 static int hf_rsvp_flowspec_arbitrary_contiguous_concatenation = -1;
146 static int hf_rsvp_flowspec_regenerator_section = -1;
147 static int hf_rsvp_flowspec_multiplex_section = -1;
148 static int hf_rsvp_flowspec_J0_transparency = -1;
149 static int hf_rsvp_flowspec_SOH_RSOH_DCC_transparency = -1;
150 static int hf_rsvp_flowspec_LOH_MSOH_DCC_transparency = -1;
151 static int hf_rsvp_flowspec_LOH_MSOH_extended_DCC_transparency = -1;
152 static int hf_rsvp_flowspec_K1_K2_transparency = -1;
153 static int hf_rsvp_flowspec_E1_transparency = -1;
154 static int hf_rsvp_flowspec_F1_transparency = -1;
155 static int hf_rsvp_flowspec_E2_transparency = -1;
156 static int hf_rsvp_flowspec_B1_transparency = -1;
157 static int hf_rsvp_flowspec_B2_transparency = -1;
158 static int hf_rsvp_flowspec_M0_transparency = -1;
159 static int hf_rsvp_flowspec_M1_transparency = -1;
160 static int hf_rsvp_integrity_flags_handshake = -1;
161 static int hf_rsvp_sa_flags_local = -1;
162 static int hf_rsvp_sa_flags_label = -1;
163 static int hf_rsvp_sa_flags_se_style = -1;
164 static int hf_rsvp_sa_flags_bandwidth = -1;
165 static int hf_rsvp_sa_flags_node = -1;
166 static int hf_rsvp_rro_flags_local_avail = -1;
167 static int hf_rsvp_rro_flags_local_in_use = -1;
168 static int hf_rsvp_rro_flags_bandwidth = -1;
169 static int hf_rsvp_rro_flags_node = -1;
170 static int hf_rsvp_rro_flags_node_address = -1;
171 static int hf_rsvp_rro_flags_backup_tunnel_bandwidth = -1;
172 static int hf_rsvp_rro_flags_backup_tunnel_hop = -1;
173 static int hf_rsvp_rro_flags_global_label = -1;
174 static int hf_rsvp_lsp_attr_e2e = -1;
175 static int hf_rsvp_lsp_attr_boundary = -1;
176 static int hf_rsvp_lsp_attr_segment = -1;
177 static int hf_rsvp_gen_uni_direction = -1;
178 static int hf_rsvp_protection_info_flags_secondary_lsp = -1;
179 static int hf_rsvp_pi_link_flags_extra_traffic = -1;
180 static int hf_rsvp_pi_link_flags_unprotected = -1;
181 static int hf_rsvp_pi_link_flags_shared = -1;
182 static int hf_rsvp_pi_link_flags_dedicated1_1 = -1;
183 static int hf_rsvp_pi_link_flags_dedicated1plus1 = -1;
184 static int hf_rsvp_pi_link_flags_enhanced = -1;
185 static int hf_rsvp_pi_link_flags_extra = -1;
186 static int hf_rsvp_pi_link_flags_dedicated_1_1 = -1;
187 static int hf_rsvp_pi_link_flags_dedicated_1plus1 = -1;
188 static int hf_rsvp_rfc4872_secondary = -1;
189 static int hf_rsvp_rfc4872_protecting = -1;
190 static int hf_rsvp_rfc4872_notification_msg = -1;
191 static int hf_rsvp_rfc4872_operational = -1;
192 static int hf_rsvp_pi_lsp_flags_full_rerouting = -1;
193 static int hf_rsvp_pi_lsp_flags_rerouting_extra = -1;
194 static int hf_rsvp_pi_lsp_flags_1_n_protection = -1;
195 static int hf_rsvp_pi_lsp_flags_1plus1_unidirectional = -1;
196 static int hf_rsvp_pi_lsp_flags_1plus1_bidirectional = -1;
197 static int hf_rsvp_protection_info_in_place = -1;
198 static int hf_rsvp_protection_info_required = -1;
199 static int hf_rsvp_pi_seg_flags_full_rerouting = -1;
200 static int hf_rsvp_pi_seg_flags_rerouting_extra = -1;
201 static int hf_rsvp_pi_seg_flags_1_n_protection = -1;
202 static int hf_rsvp_pi_seg_flags_1plus1_unidirectional = -1;
203 static int hf_rsvp_pi_seg_flags_1plus1_bidirectional = -1;
204 static int hf_rsvp_frr_flags_one2one_backup = -1;
205 static int hf_rsvp_frr_flags_facility_backup = -1;
206 static int hf_rsvp_c_type = -1;
207 static int hf_rsvp_3gpp_obj_tid = -1;
208 static int hf_rsvp_3gpp_obj_ie_len = -1;
209 static int hf_rsvp_3gpp_obj_ie_type = -1;
211 static dissector_table_t rsvp_dissector_table;
213 static int rsvp_tap = -1;
216 * All RSVP packets belonging to a particular flow belong to the same
217 * conversation. The following structure definitions are for auxillary
218 * structures which have all the relevant flow information to make up the
219 * RSVP five-tuple. Note that the values of the five-tuple are determined
220 * from the session object and sender template/filter spec for PATH/RESV
222 * Update rsvp_request_equal() when you add stuff here. You might also
223 * have to update rsvp_request_hash().
224 * TODO: Support for IPv6 conversations.
227 typedef struct rsvp_session_ipv4_info {
230 guint16 udp_dest_port;
231 } rsvp_session_ipv4_info;
233 typedef struct rsvp_session_ipv6_info {
234 /* not supported yet */
237 } rsvp_session_ipv6_info;
239 typedef struct rsvp_session_ipv4_lsp_info {
241 guint16 udp_dest_port;
242 guint32 ext_tunnel_id;
243 } rsvp_session_ipv4_lsp_info;
245 typedef struct rsvp_session_agg_ipv4_info {
248 } rsvp_session_agg_ipv4_info;
250 typedef struct rsvp_session_ipv4_uni_info {
252 guint16 udp_dest_port;
253 guint32 ext_tunnel_id;
254 } rsvp_session_ipv4_uni_info;
256 typedef struct rsvp_session_ipv4_enni_info {
258 guint16 udp_dest_port;
259 guint32 ext_tunnel_id;
260 } rsvp_session_ipv4_enni_info;
262 typedef struct rsvp_template_filter_info {
264 guint16 udp_source_port;
265 } rsvp_template_filter_info;
268 * The actual request key consists of a union of the various session objects
269 * (which are uniquely identified based on the session type), and the
270 * source_info structure, which has the information derived from the sender
271 * template or the filter spec.
272 * The request key is populated by copying the information from the
273 * rsvp_conversation_info structure (rsvph), which in turn is populated when
274 * the session, filter and sender template objects are dissected.
276 struct rsvp_request_key {
277 guint32 session_type;
279 union { /* differentiated by session_type field */
280 rsvp_session_ipv4_info session_ipv4;
281 rsvp_session_ipv6_info session_ipv6;
282 rsvp_session_ipv4_lsp_info session_ipv4_lsp;
283 rsvp_session_agg_ipv4_info session_agg_ipv4;
284 rsvp_session_ipv4_uni_info session_ipv4_uni;
285 rsvp_session_ipv4_enni_info session_ipv4_enni;
288 rsvp_template_filter_info source_info;
289 guint32 conversation;
293 * At present, there is nothing particularly important that we need to
294 * store for the request value for each rsvp_request_key, so we just
295 * store the unique 32-bit identifier internally allocated for the key
296 * (and stored in the conversation attribute of rsvp_request_key above.
297 * If this changes in the future, then other stuff can be added here.
299 struct rsvp_request_val {
304 * Initialize the conversation related data structures.
306 static GHashTable *rsvp_request_hash = NULL;
309 * The list of tree types
337 TT_LSP_TUNNEL_IF_ID_SUBTREE,
345 TT_SESSION_ATTRIBUTE,
346 TT_SESSION_ATTRIBUTE_FLAGS,
349 TT_EXPLICIT_ROUTE_SUBOBJ,
351 TT_RECORD_ROUTE_SUBOBJ,
352 TT_RECORD_ROUTE_SUBOBJ_FLAGS,
354 TT_ADMIN_STATUS_FLAGS,
356 TT_LSP_ATTRIBUTES_FLAGS,
365 TT_PROTECTION_INFO_LINK,
366 TT_PROTECTION_INFO_LSP,
367 TT_PROTECTION_INFO_SEG,
369 TT_FAST_REROUTE_FLAGS,
373 TT_DIFFSERV_MAP_PHBID,
380 static gint ett_treelist[TT_MAX];
381 #define TREE(X) ett_treelist[(X)]
383 /* Should we dissect bundle messages? */
384 static gboolean rsvp_bundle_dissect = TRUE;
386 /* FF: How should we dissect generalized label? */
387 static const enum_val_t rsvp_generalized_label_options[] = {
388 /* see RFC 3471 Section 3.2.1.2 */
389 { "data", "data (no interpretation)", 1 },
390 /* see RFC 4606 Section 3 */
391 { "SUKLM", "SONET/SDH (\"S, U, K, L, M\" scheme)", 2 },
392 /* see I-D draft-ietf-ccamp-gmpls-g-694-lambda-labels-05 */
393 { "G694", "Wavelength Label (G.694 frequency grid)", 3 },
394 /* see RFC 4328 Section 4.1 */
395 { "G709", "ODUk Label", 4 },
399 static guint rsvp_generalized_label_option = 1;
402 * RSVP message types.
405 * http://www.iana.org/assignments/rsvp-parameters
408 RSVP_MSG_PATH = 1, /* RFC 2205 */
409 RSVP_MSG_RESV, /* RFC 2205 */
410 RSVP_MSG_PERR, /* RFC 2205 */
411 RSVP_MSG_RERR, /* RFC 2205 */
412 RSVP_MSG_PTEAR, /* RFC 2205 */
413 RSVP_MSG_RTEAR, /* RFC 2205 */
414 RSVP_MSG_CONFIRM, /* XXX - DREQ, RFC 2745? */
415 /* 9 is DREP, RFC 2745 */
416 RSVP_MSG_RTEAR_CONFIRM = 10, /* from Fred Baker at Cisco */
417 /* 11 is unassigned */
418 RSVP_MSG_BUNDLE = 12, /* RFC 2961 */
419 RSVP_MSG_ACK, /* RFC 2961 */
421 RSVP_MSG_SREFRESH = 15, /* RFC 2961 */
422 /* 16, 17, 18, 19 not listed */
423 RSVP_MSG_HELLO = 20, /* RFC 3209 */
424 RSVP_MSG_NOTIFY /* [RFC3473] */
425 /* 25 is Integrity Challenge RFC 2747, RFC 3097 */
426 /* 26 is Integrity Response RFC 2747, RFC 3097 */
427 /* 66 is DSBM_willing [SBM] */
428 /* 67 is I_AM_DSBM [SBM] */
429 /* [SBM] is Subnet Bandwidth Manager ID from July 1997 */
430 } rsvp_message_types;
432 static const value_string message_type_vals[] = {
433 { RSVP_MSG_PATH, "PATH Message. "},
434 { RSVP_MSG_RESV, "RESV Message. "},
435 { RSVP_MSG_PERR, "PATH ERROR Message. "},
436 { RSVP_MSG_RERR, "RESV ERROR Message. "},
437 { RSVP_MSG_PTEAR, "PATH TEAR Message. "},
438 { RSVP_MSG_RTEAR, "RESV TEAR Message. "},
439 { RSVP_MSG_CONFIRM, "CONFIRM Message. "},
440 { RSVP_MSG_RTEAR_CONFIRM, "RESV TEAR CONFIRM Message. "},
441 { RSVP_MSG_BUNDLE, "BUNDLE Message. "},
442 { RSVP_MSG_ACK, "ACK Message. "},
443 { RSVP_MSG_SREFRESH, "SREFRESH Message. "},
444 { RSVP_MSG_HELLO, "HELLO Message. "},
445 { RSVP_MSG_NOTIFY, "NOTIFY Message. "},
448 static value_string_ext message_type_vals_ext = VALUE_STRING_EXT_INIT(message_type_vals);
451 * FF: please keep this list in sync with
452 * http://www.iana.org/assignments/rsvp-parameters
453 * Registry Name: 'Class'
460 RSVP_CLASS_INTEGRITY,
461 RSVP_CLASS_TIME_VALUES,
466 RSVP_CLASS_FILTER_SPEC,
467 RSVP_CLASS_SENDER_TEMPLATE,
468 RSVP_CLASS_SENDER_TSPEC,
473 RSVP_CLASS_HOP_COUNT,
474 RSVP_CLASS_STRICT_SOURCE_ROUTE,
475 RSVP_CLASS_LABEL_REQUEST = 19,
476 RSVP_CLASS_EXPLICIT_ROUTE,
477 RSVP_CLASS_RECORD_ROUTE,
481 RSVP_CLASS_MESSAGE_ID,
482 RSVP_CLASS_MESSAGE_ID_ACK,
483 RSVP_CLASS_MESSAGE_ID_LIST,
485 /* 26-29 Unassigned */
487 RSVP_CLASS_DIAGNOSTIC = 30,
489 RSVP_CLASS_DIAG_RESPONSE,
490 RSVP_CLASS_DIAG_SELECT,
491 RSVP_CLASS_RECOVERY_LABEL,
492 RSVP_CLASS_UPSTREAM_LABEL,
493 RSVP_CLASS_LABEL_SET,
494 RSVP_CLASS_PROTECTION,
496 /* 38-41 Unassigned */
497 RSVP_CLASS_DSBM_IP_ADDRESS = 42,
498 RSVP_CLASS_SBM_PRIORITY,
499 RSVP_CLASS_DSBM_TIMER_INTERVALS,
502 /* 46-62 Unassigned */
504 RSVP_CLASS_DETOUR = 63,
505 RSVP_CLASS_CHALLENGE,
507 RSVP_CLASS_CLASSTYPE, /* FF: RFC4124 */
508 RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES,
510 /* 68-123 Unassigned */
512 RSVP_CLASS_VENDOR_PRIVATE_1 = 124,
513 RSVP_CLASS_VENDOR_PRIVATE_2 = 125,
514 RSVP_CLASS_VENDOR_PRIVATE_3 = 126,
515 RSVP_CLASS_VENDOR_PRIVATE_4 = 127,
517 RSVP_CLASS_NODE_CHAR = 128,
518 RSVP_CLASS_SUGGESTED_LABEL,
519 RSVP_CLASS_ACCEPTABLE_LABEL_SET,
520 RSVP_CLASS_RESTART_CAP,
522 /* 132-160 Unassigned */
524 /* 166-187 Unassigned */
526 RSVP_CLASS_VENDOR_PRIVATE_5 = 188,
527 RSVP_CLASS_VENDOR_PRIVATE_6 = 189,
528 RSVP_CLASS_VENDOR_PRIVATE_7 = 190,
529 RSVP_CLASS_VENDOR_PRIVATE_8 = 191,
531 RSVP_CLASS_SESSION_ASSOC = 192,
532 RSVP_CLASS_LSP_TUNNEL_IF_ID,
534 RSVP_CLASS_NOTIFY_REQUEST = 195,
535 RSVP_CLASS_ADMIN_STATUS,
536 RSVP_CLASS_LSP_ATTRIBUTES,
537 RSVP_CLASS_ALARM_SPEC,
538 RSVP_CLASS_ASSOCIATION,
540 /* 203-204 Unassigned */
541 RSVP_CLASS_FAST_REROUTE = 205,
543 RSVP_CLASS_SESSION_ATTRIBUTE = 207,
544 /* 208-223 Unassigned */
546 Class Numbers 224-255 are assigned by IANA using FCFS allocation.
547 RSVP will silently ignore, but FORWARD an object with a Class Number
548 in this range that it does not understand.
551 RSVP_CLASS_DCLASS = 225,
552 RSVP_CLASS_PACKETCABLE_EXTENSIONS,
553 RSVP_CLASS_ATM_SERVICECLASS,
555 RSVP_CLASS_GENERALIZED_UNI,
557 RSVP_CLASS_3GPP2_OBJECT,
559 /* 232-251 Unassigned */
561 RSVP_CLASS_VENDOR_PRIVATE_9 = 252,
562 RSVP_CLASS_VENDOR_PRIVATE_10 = 253,
563 RSVP_CLASS_VENDOR_PRIVATE_11 = 254,
564 RSVP_CLASS_VENDOR_PRIVATE_12 = 255
567 /* XXX: are any/all of the "missing" values below supposed to have value-strings */
568 static const value_string rsvp_class_vals[] = {
569 { RSVP_CLASS_NULL, "NULL object"},
570 { RSVP_CLASS_SESSION, "SESSION object"},
572 { RSVP_CLASS_HOP, "HOP object"},
573 { RSVP_CLASS_INTEGRITY, "INTEGRITY object"},
574 { RSVP_CLASS_TIME_VALUES, "TIME VALUES object"},
575 { RSVP_CLASS_ERROR, "ERROR object"},
576 { RSVP_CLASS_SCOPE, "SCOPE object"},
577 { RSVP_CLASS_STYLE, "STYLE object"},
578 { RSVP_CLASS_FLOWSPEC, "FLOWSPEC object"},
579 { RSVP_CLASS_FILTER_SPEC, "FILTER SPEC object"},
580 { RSVP_CLASS_SENDER_TEMPLATE, "SENDER TEMPLATE object"},
581 { RSVP_CLASS_SENDER_TSPEC, "SENDER TSPEC object"},
582 { RSVP_CLASS_ADSPEC, "ADSPEC object"},
583 { RSVP_CLASS_POLICY, "POLICY object"},
584 { RSVP_CLASS_CONFIRM, "CONFIRM object"},
585 { RSVP_CLASS_LABEL, "LABEL object"},
586 { RSVP_CLASS_HOP_COUNT, "HOP_COUNT object"},
587 { RSVP_CLASS_STRICT_SOURCE_ROUTE, "STRICT_SOURCE_ROUTE object"},
588 { RSVP_CLASS_LABEL_REQUEST, "LABEL REQUEST object"},
589 { RSVP_CLASS_EXPLICIT_ROUTE, "EXPLICIT ROUTE object"},
590 { RSVP_CLASS_RECORD_ROUTE, "RECORD ROUTE object"},
592 { RSVP_CLASS_HELLO, "HELLO object"},
594 { RSVP_CLASS_MESSAGE_ID, "MESSAGE-ID object"},
595 { RSVP_CLASS_MESSAGE_ID_ACK, "MESSAGE-ID ACK/NACK object"},
596 { RSVP_CLASS_MESSAGE_ID_LIST, "MESSAGE-ID LIST object"},
599 RSVP_CLASS_DIAGNOSTIC
601 RSVP_CLASS_DIAG_RESPONSE,
602 RSVP_CLASS_DIAG_SELECT,
605 { RSVP_CLASS_RECOVERY_LABEL, "RECOVERY-LABEL object"},
606 { RSVP_CLASS_UPSTREAM_LABEL, "UPSTREAM-LABEL object"},
607 { RSVP_CLASS_LABEL_SET, "LABEL-SET object"},
608 { RSVP_CLASS_PROTECTION, "PROTECTION object"},
611 RSVP_CLASS_DSBM_IP_ADDRESS
612 RSVP_CLASS_SBM_PRIORITY,
613 RSVP_CLASS_DSBM_TIMER_INTERVALS,
617 { RSVP_CLASS_DETOUR, "DETOUR object"},
619 RSVP_CLASS_CHALLENGE,
621 { RSVP_CLASS_DIFFSERV, "DIFFSERV object"},
622 { RSVP_CLASS_CLASSTYPE, "CLASSTYPE object"},
624 RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES,
627 { RSVP_CLASS_VENDOR_PRIVATE_1, "VENDOR PRIVATE object (0bbbbbbb: "
628 "reject if unknown)"},
629 { RSVP_CLASS_VENDOR_PRIVATE_2, "VENDOR PRIVATE object (0bbbbbbb: "
630 "reject if unknown)"},
631 { RSVP_CLASS_VENDOR_PRIVATE_3, "VENDOR PRIVATE object (0bbbbbbb: "
632 "reject if unknown)"},
633 { RSVP_CLASS_VENDOR_PRIVATE_4, "VENDOR PRIVATE object (0bbbbbbb: "
634 "reject if unknown)"},
639 { RSVP_CLASS_SUGGESTED_LABEL, "SUGGESTED-LABEL object"},
640 { RSVP_CLASS_ACCEPTABLE_LABEL_SET, "ACCEPTABLE-LABEL-SET object"},
641 { RSVP_CLASS_RESTART_CAP, "RESTART-CAPABILITY object"},
643 { RSVP_CLASS_VENDOR_PRIVATE_5, "VENDOR PRIVATE object (10bbbbbb: "
644 "ignore if unknown)"},
645 { RSVP_CLASS_VENDOR_PRIVATE_6, "VENDOR PRIVATE object (10bbbbbb: "
646 "ignore if unknown)"},
647 { RSVP_CLASS_VENDOR_PRIVATE_7, "VENDOR PRIVATE object (10bbbbbb: "
648 "ignore if unknown)"},
649 { RSVP_CLASS_VENDOR_PRIVATE_8, "VENDOR PRIVATE object (10bbbbbb: "
650 "ignore if unknown)"},
652 RSVP_CLASS_SESSION_ASSOC
654 { RSVP_CLASS_LSP_TUNNEL_IF_ID, "LSP-TUNNEL INTERFACE-ID object"},
656 { RSVP_CLASS_NOTIFY_REQUEST, "NOTIFY-REQUEST object"},
657 { RSVP_CLASS_ADMIN_STATUS, "ADMIN-STATUS object"},
658 { RSVP_CLASS_LSP_ATTRIBUTES, "LSP ATTRIBUTES object"},
660 RSVP_CLASS_ALARM_SPEC,
662 { RSVP_CLASS_ASSOCIATION, "ASSOCIATION object"},
664 { RSVP_CLASS_FAST_REROUTE, "FAST-REROUTE object"},
666 { RSVP_CLASS_SESSION_ATTRIBUTE, "SESSION ATTRIBUTE object"},
668 { RSVP_CLASS_DCLASS, "DCLASS object"},
670 RSVP_CLASS_PACKETCABLE_EXTENSIONS,
671 RSVP_CLASS_ATM_SERVICECLASS,
674 { RSVP_CLASS_GENERALIZED_UNI, "GENERALIZED-UNI object"},
675 { RSVP_CLASS_CALL_ID, "CALL-ID object"},
676 { RSVP_CLASS_3GPP2_OBJECT, "3GPP2 object"},
678 { RSVP_CLASS_VENDOR_PRIVATE_9, "VENDOR PRIVATE object (11bbbbbb: "
679 "forward if unknown)"},
680 { RSVP_CLASS_VENDOR_PRIVATE_10, "VENDOR PRIVATE object (11bbbbbb: "
681 "forward if unknown)"},
682 { RSVP_CLASS_VENDOR_PRIVATE_11, "VENDOR PRIVATE object (11bbbbbb: "
683 "forward if unknown)"},
684 { RSVP_CLASS_VENDOR_PRIVATE_12, "VENDOR PRIVATE object (11bbbbbb: "
685 "forward if unknown)"},
688 static value_string_ext rsvp_class_vals_ext = VALUE_STRING_EXT_INIT(rsvp_class_vals);
693 enum rsvp_error_types {
694 RSVP_ERROR_CONFIRM = 0,
695 RSVP_ERROR_ADMISSION,
698 RSVP_ERROR_NO_SENDER,
699 RSVP_ERROR_CONFLICT_RESV_STYLE,
700 RSVP_ERROR_UNKNOWN_RESV_STYLE,
701 RSVP_ERROR_CONFLICT_DEST_PORTS,
702 RSVP_ERROR_CONFLICT_SRC_PORTS,
703 RSVP_ERROR_PREEMPTED =12,
704 RSVP_ERROR_UNKNOWN_CLASS,
705 RSVP_ERROR_UNKNOWN_C_TYPE,
706 RSVP_ERROR_TRAFFIC = 21,
707 RSVP_ERROR_TRAFFIC_SYSTEM,
711 RSVP_ERROR_NEW_AGGR, /* RFC3175 */
713 RSVP_ERROR_DSTE, /* FF: RFC4124 */
714 RSVP_ERROR_UNKNOWN_ATTR_TLV, /* RFC5420 */
715 RSVP_ERROR_UNKNOWN_ATTR_BIT, /* RFC5420 */
716 RSVP_ERROR_ALARMS, /* RFC4783 */
717 RSVP_ERROR_CALL_MGMT, /* RFC4974 */
718 RSVP_ERROR_USER_ERROR_SPEC /* RFC5284 */
721 static const value_string rsvp_error_codes[] = {
722 { RSVP_ERROR_CONFIRM, "Confirmation"},
723 { RSVP_ERROR_ADMISSION, "Admission Control Failure "},
724 { RSVP_ERROR_POLICY, "Policy Control Failure"},
725 { RSVP_ERROR_NO_PATH, "No PATH information for this RESV message"},
726 { RSVP_ERROR_NO_SENDER, "No sender information for this RESV message"},
727 { RSVP_ERROR_CONFLICT_RESV_STYLE, "Conflicting reservation styles"},
728 { RSVP_ERROR_UNKNOWN_RESV_STYLE, "Unknown reservation style"},
729 { RSVP_ERROR_CONFLICT_DEST_PORTS, "Conflicting destination ports"},
730 { RSVP_ERROR_CONFLICT_SRC_PORTS, "Conflicting source ports"},
731 { RSVP_ERROR_PREEMPTED, "Service preempted"},
732 { RSVP_ERROR_UNKNOWN_CLASS, "Unknown object class"},
733 { RSVP_ERROR_UNKNOWN_C_TYPE, "Unknown object C-type"},
734 { RSVP_ERROR_TRAFFIC, "Traffic Control Error"},
735 { RSVP_ERROR_TRAFFIC_SYSTEM, "Traffic Control System Error"},
736 { RSVP_ERROR_SYSTEM, "RSVP System Error"},
737 { RSVP_ERROR_ROUTING, "Routing Error"},
738 { RSVP_ERROR_NOTIFY, "RSVP Notify Error"},
739 { RSVP_ERROR_NEW_AGGR, "New aggregate needed"},
740 { RSVP_ERROR_DIFFSERV, "RSVP Diff-Serv Error"},
741 { RSVP_ERROR_DSTE, "RSVP DiffServ-aware TE Error"},
742 { RSVP_ERROR_UNKNOWN_ATTR_TLV, "Unknown attributes TLV"},
743 { RSVP_ERROR_UNKNOWN_ATTR_BIT, "Unknown attributes bit"},
744 { RSVP_ERROR_ALARMS, "Alarms"},
745 { RSVP_ERROR_CALL_MGMT, "Call management"},
746 { RSVP_ERROR_USER_ERROR_SPEC, "User error spec"},
749 static value_string_ext rsvp_error_codes_ext = VALUE_STRING_EXT_INIT(rsvp_error_codes);
751 static const value_string rsvp_admission_control_error_vals[] = {
752 { 1, "Delay bound cannot be met"},
753 { 2, "Requested bandwidth unavailable"},
754 { 3, "MTU in flowspec larger than interface MTU"},
755 { 4, "LSP Admission Failure"},
756 { 5, "Bad Association Type"},
759 static value_string_ext rsvp_admission_control_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_admission_control_error_vals);
761 static const value_string rsvp_policy_control_error_vals[] = {
762 { 0, "Information reporting"},
764 { 2, "Reason unknown"},
765 { 3, "Generic Policy Rejection"},
766 { 4, "Quota or Accounting violation"},
767 { 5, "Flow was preempted"},
768 { 6, "Previously installed policy expired (not refreshed)"},
769 { 7, "Previous policy data was replaced & caused rejection"},
770 { 8, "Policies could not be merged (multicast)"},
771 { 9, "PDP down or non functioning"},
772 { 10, "Third Party Server (e.g., Kerberos) unavailable"},
773 { 11, "POLICY_DATA object has bad syntax"},
774 { 12, "POLICY_DATA object failed Integrity Check"},
775 { 13, "POLICY_ELEMENT object has bad syntax"},
776 { 14, "Mandatory PE Missing (Empty PE is in the PD object)"},
777 { 15, "PEP Out of resources to handle policies."},
778 { 16, "PDP encountered bad RSVP objects or syntax"},
779 { 17, "Service type was rejected"},
780 { 18, "Reservation Style was rejected"},
781 { 19, "FlowSpec was rejected (too large)"},
782 { 20, "Hard Pre-empted"},
783 { 100, "Unauthorized sender"},
784 { 101, "Unauthorized receiver"},
785 { 102, "ERR_PARTIAL_PREEMPT"},
786 { 103, "Inter-domain policy failure"},
787 { 104, "Inter-domain explicit route rejected"},
790 static value_string_ext rsvp_policy_control_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_policy_control_error_vals);
792 static const value_string rsvp_traffic_control_error_vals[] = {
793 { 1, "Service conflict"},
794 { 2, "Service unsupported"},
795 { 3, "Bad Flowspec value"},
796 { 4, "Bad Tspec value"},
797 { 5, "Bad Adspec value"},
800 static value_string_ext rsvp_traffic_control_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_traffic_control_error_vals);
802 static const value_string rsvp_routing_error_vals[] = {
803 { 1, "Bad EXPLICIT_ROUTE object"},
804 { 2, "Bad strict node"},
805 { 3, "Bad loose node"},
806 { 4, "Bad initial subobject"},
807 { 5, "No route available toward destination"},
808 { 6, "Unacceptable label value"},
809 { 7, "RRO indicated routing loops"},
810 { 8, "non-RSVP-capable router stands in the path"},
811 { 9, "MPLS label allocation failure"},
812 { 10, "Unsupported L3PID"},
814 { 12, "Switching Type"},
816 { 14, "Unsupported Encoding"},
817 { 15, "Unsupported Link Protection"},
818 { 16, "Unknown Interface Index"},
819 { 17, "Unsupported LSP Protection"},
820 { 18, "PROTECTION object not applicable"},
821 { 19, "Bad PRIMARY_PATH_ROUTE object"},
822 { 20, "PRIMARY_PATH_ROUTE object not applicable"},
823 { 21, "LSP Segment Protection Failed"},
824 { 22, "Re-routing limit exceeded"},
825 { 23, "Unable to Branch"},
826 { 24, "Unsupported LSP Integrity"},
827 { 25, "P2MP Re-Merge Detected"},
828 { 26, "P2MP Re-Merge Parameter Mismatch"},
829 { 27, "ERO Resulted in Re-Merge"},
830 { 28, "Contiguous LSP type not supported"},
831 { 29, "ERO conflicts with inter-domain signaling method"},
832 { 30, "Stitching unsupported"},
833 { 31, "Unknown PCE-ID for PKS expansion"},
834 { 32, "Unreachable PCE for PKS expansion"},
835 { 33, "Unknown Path Key for PKS expansion"},
836 { 34, "ERO too large for MTU"},
837 { 64, "Unsupported Exclude Route Subobject Type"},
838 { 65, "Inconsistent Subobject"},
839 { 66, "Local Node in Exclude Route"},
840 { 67, "Route Blocked by Exclude Route"},
841 { 68, "XRO Too Complex"},
842 { 69, "EXRS Too Complex"},
843 { 100, "Diversity not available"},
844 { 101, "Service level not available"},
845 { 102, "Invalid/Unknown connection ID"},
846 { 103, "No route available toward source (ASON)"},
847 { 104, "Unacceptable interface ID (ASON)"},
848 { 105, "Invalid/unknown call ID (ASON)"},
849 { 106, "Invalid SPC interface ID/label (ASON)"},
852 static value_string_ext rsvp_routing_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_routing_error_vals);
854 static const value_string rsvp_notify_error_vals[] = {
855 { 1, "RRO too large for MTU"},
856 { 2, "RRO Notification"},
857 { 3, "Tunnel locally repaired"},
858 { 4, "Control Channel Active State"},
859 { 5, "Control Channel Degraded State"},
860 { 6, "Preferable path exists"},
861 { 7, "Link maintenance required"},
862 { 8, "Node maintenance required"},
864 { 10, "LSP recovered"},
865 { 11, "LSP Local Failure"},
868 static value_string_ext rsvp_notify_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_notify_error_vals);
870 static const value_string rsvp_diffserv_error_vals[] = {
871 { 1, "Unexpected DIFFSERV object"},
872 { 2, "Unsupported PHB"},
873 { 3, "Invalid `EXP<->PHB mapping'"},
874 { 4, "Unsupported PSC"},
875 { 5, "Per-LSP context allocation failure"},
878 static value_string_ext rsvp_diffserv_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_diffserv_error_vals);
881 static const value_string rsvp_diffserv_aware_te_error_vals[] = {
882 { 1, "Unexpected CLASSTYPE object"},
883 { 2, "Unsupported Class-Type"},
884 { 3, "Invalid Class-Type value"},
885 { 4, "CT and setup priority do not form a configured TE-Class"},
886 { 5, "CT and holding priority do not form a configured TE-Class"},
887 { 6, "CT and setup priority do not form a configured TE-Class AND CT and holding priority do not form a configured TE-Class"},
888 { 7, "Inconsistency between signaled PSC and signaled CT"},
889 { 8, "Inconsistency between signaled PHBs and signaled CT"},
892 static value_string_ext rsvp_diffserv_aware_te_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_diffserv_aware_te_error_vals);
894 static const value_string rsvp_call_mgmt_error_vals[] = {
895 { 1, "Call ID Contention"},
896 { 2, "Connections still Exist"},
897 { 3, "Unknown Call ID"},
898 { 4, "Duplicate Call"},
901 static value_string_ext rsvp_call_mgmt_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_call_mgmt_error_vals);
904 * Defines the reservation style plus style-specific information that
905 * is not a FLOWSPEC or FILTER_SPEC object, in a RESV message.
907 #define RSVP_DISTINCT (1 << 3)
908 #define RSVP_SHARED (2 << 3)
909 #define RSVP_SHARING_MASK (RSVP_DISTINCT | RSVP_SHARED)
911 #define RSVP_SCOPE_WILD 1
912 #define RSVP_SCOPE_EXPLICIT 2
913 #define RSVP_SCOPE_MASK 0x07
915 #define RSVP_WF (RSVP_SHARED | RSVP_SCOPE_WILD)
916 #define RSVP_FF (RSVP_DISTINCT | RSVP_SCOPE_EXPLICIT)
917 #define RSVP_SE (RSVP_SHARED | RSVP_SCOPE_EXPLICIT)
919 static const value_string style_vals[] = {
920 { RSVP_WF, "Wildcard Filter" },
921 { RSVP_FF, "Fixed Filter" },
922 { RSVP_SE, "Shared-Explicit" },
927 RSVP_SESSION_TYPE_IPV4 = 1,
928 RSVP_SESSION_TYPE_IPV6,
930 RSVP_SESSION_TYPE_IPV4_LSP = 7,
931 RSVP_SESSION_TYPE_IPV6_LSP,
933 RSVP_SESSION_TYPE_AGGREGATE_IPV4 = 9,
934 RSVP_SESSION_TYPE_AGGREGATE_IPV6,
936 RSVP_SESSION_TYPE_IPV4_UNI = 11,
937 RSVP_SESSION_TYPE_IPV4_E_NNI = 15
941 * Defines a desired QoS, in a RESV message.
943 enum qos_service_type {
944 QOS_QUALITATIVE = 128, /* Qualitative service */
945 QOS_NULL = 6, /* Null service (RFC2997) */
946 QOS_CONTROLLED_LOAD= 5, /* Controlled Load Service */
947 QOS_GUARANTEED = 2, /* Guaranteed service */
948 QOS_TSPEC = 1 /* Traffic specification */
951 static const value_string qos_vals[] = {
952 { QOS_QUALITATIVE, "Qualitative QoS" },
953 { QOS_NULL, "Null-Service QoS" },
954 { QOS_CONTROLLED_LOAD, "Controlled-load QoS" },
955 { QOS_GUARANTEED, "Guaranteed rate QoS" },
956 { QOS_TSPEC, "Traffic specification" },
960 static const value_string svc_vals[] = {
961 { 126, "Compression Hint" },
962 { 127, "Token bucket" },
963 { 128, "Null Service" },
964 { 130, "Guaranteed-rate RSpec" },
967 static value_string_ext svc_vals_ext = VALUE_STRING_EXT_INIT(svc_vals);
969 enum rsvp_spec_types { INTSRV = 2 };
971 enum intsrv_services {
976 INTSRV_QUALITATIVE = 128
979 static const value_string intsrv_services_str[] = {
980 { INTSRV_GENERAL, "Default General Parameters"},
981 { INTSRV_GTD, "Guaranteed Rate"},
982 { INTSRV_CLOAD, "Controlled Load"},
983 { INTSRV_NULL, "Null Service"},
984 { INTSRV_QUALITATIVE, "Null Service"},
987 static value_string_ext intsrv_services_str_ext = VALUE_STRING_EXT_INIT(intsrv_services_str);
990 enum intsrv_field_name {
991 INTSRV_NON_IS_HOPS = 1,
992 INTSRV_COMPOSED_NON_IS_HOPS,
994 INTSRV_COMPOSED_IS_HOPS,
995 INTSRV_PATH_BANDWIDTH,
996 INTSRV_MIN_PATH_BANDWIDTH,
1000 INTSRV_COMPOSED_MTU,
1002 INTSRV_TOKEN_BUCKET_TSPEC = 127,
1003 INTSRV_QUALITATIVE_TSPEC = 128,
1004 INTSRV_GTD_RSPEC = 130,
1006 INTSRV_DELAY = 131, /* Gtd Parameter C - Max Delay Bound - bytes */
1007 INTSRV_MAX_JITTER, /* Gtd Parameter D - Max Jitter */
1008 INTSRV_E2E_DELAY, /* Gtd Parameter Ctot */
1009 INTSRV_E2E_MAX_JITTER, /* Gtd Parameter Dtot */
1010 INTSRV_SHP_DELAY, /* Gtd Parameter Csum */
1011 INTSRV_SHP_MAX_JITTER /* Gtd Parameter Dsum */
1015 static const value_string adspec_params[] = {
1016 { 4, "IS Hop Count"},
1017 { 6, "Path b/w estimate"},
1018 { 8, "Minimum path latency"},
1019 { 10, "Composed MTU"},
1020 { 133, "End-to-end composed value for C"},
1021 { 134, "End-to-end composed value for D"},
1022 { 135, "Since-last-reshaping point composed C"},
1023 { 136, "Since-last-reshaping point composed D"},
1026 static value_string_ext adspec_params_ext = VALUE_STRING_EXT_INIT(adspec_params);
1029 * FF: please keep this list in sync with
1030 * http://www.iana.org/assignments/gmpls-sig-parameters
1031 * Registry Name: 'LSP Encoding Types'
1033 const range_string gmpls_lsp_enc_rvals[] = {
1035 { 2, 2, "Ethernet" },
1036 { 3, 3, "ANSI/ETSI PDH" },
1037 { 4, 4, "Reserved" },
1038 { 5, 5, "SDH ITU-T G.707 / SONET ANSI T1.105" },
1039 { 6, 6, "Reserved" },
1040 { 7, 7, "Digital Wrapper" },
1041 { 8, 8, "Lambda (photonic)" },
1043 { 10, 10, "Reserved" },
1044 { 11, 11, "FiberChannel" },
1045 { 12, 12, "G.709 ODUk (Digital Path)" },
1046 { 13, 13, "G.709 Optical Channel" },
1047 { 14, 239, "Unassigned" },
1048 { 240, 255, "Experimental Usage/temporarily" },
1053 * FF: please keep this list in sync with
1054 * http://www.iana.org/assignments/gmpls-sig-parameters
1055 * Registry Name: 'Switching Types'
1057 const range_string gmpls_switching_type_rvals[] = {
1058 { 1, 1, "Packet-Switch Capable-1 (PSC-1)" },
1059 { 2, 2, "Packet-Switch Capable-2 (PSC-2)" },
1060 { 3, 3, "Packet-Switch Capable-3 (PSC-3)" },
1061 { 4, 4, "Packet-Switch Capable-4 (PSC-4)" },
1062 { 5, 29, "Unassigned" },
1063 { 30, 30, "Ethernet Virtual Private Line (EVPL)" },
1064 { 31, 39, "Unassigned" },
1065 { 40, 40, "802.1 PBB-TE" },
1066 { 41, 50, "Unassigned" },
1067 { 51, 51, "Layer-2 Switch Capable (L2SC)" },
1068 { 52, 99, "Unassigned" },
1069 { 100, 100, "Time-Division-Multiplex Capable (TDM)" },
1070 { 101, 124, "Unassigned" },
1071 { 125, 125, "Data Channel Switching Capable (DCSC)" },
1072 { 126, 149, "Unassigned" },
1073 { 150, 150, "Lambda-Switch Capable (LSC)" },
1074 { 151, 169, "Unassigned" },
1075 { 200, 200, "Fiber-Switch Capable (FSC)" },
1076 { 201, 255, "Unassigned" },
1081 * FF: please keep this list in sync with
1082 * http://www.iana.org/assignments/gmpls-sig-parameters
1083 * Registry Name: 'Generalized PID (G-PID)'
1085 static const range_string gmpls_gpid_rvals[] = {
1086 { 0, 0, "Unknown" },
1087 { 1, 4, "Reserved" },
1088 { 5, 5, "Asynchronous mapping of E4" },
1089 { 6, 6, "Asynchronous mapping of DS3/T3" },
1090 { 7, 7, "Asynchronous mapping of E3" },
1091 { 8, 8, "Bit synchronous mapping of E3" },
1092 { 9, 9, "Byte synchronous mapping of E3" },
1093 { 10, 10, "Asynchronous mapping of DS2/T2" },
1094 { 11, 11, "Bit synchronous mapping of DS2/T2" },
1095 { 12, 12, "Reserved" },
1096 { 13, 13, "Asynchronous mapping of E1" },
1097 { 14, 14, "Byte synchronous mapping of E1" },
1098 { 15, 15, "Byte synchronous mapping of 31 * DS0" },
1099 { 16, 16, "Asynchronous mapping of DS1/T1" },
1100 { 17, 17, "Bit synchronous mapping of DS1/T1" },
1101 { 18, 18, "Byte synchronous mapping of DS1/T1" },
1102 { 19, 19, "VC-11 in VC-12" },
1103 { 20, 21, "Reserved" },
1104 { 22, 22, "DS1 SF Asynchronous" },
1105 { 23, 23, "DS1 ESF Asynchronous" },
1106 { 24, 24, "DS3 M23 Asynchronous" },
1107 { 25, 25, "DS3 C-Bit Parity Asynchronous" },
1108 { 26, 26, "VT/LOVC" },
1109 { 27, 27, "STS SPE/HOVC" },
1110 { 28, 28, "POS - No Scrambling, 16 bit CRC" },
1111 { 29, 29, "POS - No Scrambling, 32 bit CRC" },
1112 { 30, 30, "POS - Scrambling, 16 bit CRC" },
1113 { 31, 31, "POS - Scrambling, 32 bit CRC" },
1114 { 32, 32, "ATM mapping" },
1115 { 33, 33, "Ethernet PHY" },
1116 { 34, 34, "SONET/SDH" },
1117 { 35, 35, "Reserved (SONET deprecated)" },
1118 { 36, 36, "Digital Wrapper" },
1119 { 37, 37, "Lambda" },
1120 { 38, 38, "ANSI/ETSI PDH" },
1121 { 39, 39, "Reserved" },
1122 { 40, 40, "Link Access Protocol SDH (LAPS - X.85 and X.86)" },
1124 { 42, 42, "DQDB (ETSI ETS 300 216)" },
1125 { 43, 43, "FiberChannel-3 (Services)" },
1127 { 45, 45, "Ethernet V2/DIX (only)" },
1128 { 46, 46, "Ethernet 802.3 (only)" },
1129 { 47, 47, "G.709 ODUj" },
1130 { 48, 48, "G.709 OTUk(v)" },
1131 { 49, 49, "CBR/CBRa" },
1135 { 53, 53, "IP/PPP (GFP)" },
1136 { 54, 54, "Ethernet MAC (framed GFP)" },
1137 { 55, 55, "Ethernet PHY (transparent GFP" },
1138 { 56, 56, "ESCON" },
1139 { 57, 57, "FICON" },
1140 { 58, 58, "Fiber Channel" },
1141 { 59, 31743, "Unassigned" },
1142 { 31744, 32767, "Experimental Usage/temporarily" },
1143 { 32768, 65535, "Reserved" },
1147 const value_string gmpls_protection_cap_str[] = {
1148 { 1, "Extra Traffic"},
1149 { 2, "Unprotected"},
1151 { 8, "Dedicated 1:1"},
1152 { 16, "Dedicated 1+1"},
1159 static const value_string gmpls_sonet_signal_type_str[] = {
1160 { 1, "VT1.5 SPE / VC-11"},
1161 { 2, "VT2 SPE / VC-12"},
1163 { 4, "VT6 SPE / VC-2"},
1164 { 5, "STS-1 SPE / VC-3"},
1165 { 6, "STS-3c SPE / VC-4"},
1166 { 7, "STS-1 / STM-0 (transp)"},
1167 { 8, "STS-3 / STM-1 (transp)"},
1168 { 9, "STS-12 / STM-4 (transp)"},
1169 { 10, "STS-48 / STM-16 (transp)"},
1170 { 11, "STS-192 / STM-64 (transp)"},
1171 { 12, "STS-768 / STM-256 (transp)"},
1173 /* Extended non-SONET signal types */
1174 { 13, "VTG / TUG-2"},
1176 { 15, "STSG-3 / AUG-1"},
1177 { 16, "STSG-12 / AUG-4"},
1178 { 17, "STSG-48 / AUG-16"},
1179 { 18, "STSG-192 / AUG-64"},
1180 { 19, "STSG-768 / AUG-256"},
1182 /* Other SONEt signal types */
1183 { 21, "STS-12c SPE / VC-4-4c"},
1184 { 22, "STS-48c SPE / VC-4-16c"},
1185 { 23, "STS-192c SPE / VC-4-64c"},
1188 value_string_ext gmpls_sonet_signal_type_str_ext = VALUE_STRING_EXT_INIT(gmpls_sonet_signal_type_str);
1190 static const value_string ouni_guni_diversity_str[] = {
1191 { 1, "Node Diverse"},
1192 { 2, "Link Diverse"},
1193 { 3, "Shared-Risk Link Group Diverse"},
1194 { 4, "Shared Path"},
1198 /* FF: RFC 4328 G.709 signal type */
1199 static const range_string gmpls_g709_signal_type_rvals[] = {
1200 { 0, 0, "Not significant"},
1201 { 1, 1, "ODU1 (i.e., 2.5 Gbps)"},
1202 { 2, 2, "ODU2 (i.e., 10 Gbps)"},
1203 { 3, 3, "ODU3 (i.e., 40 Gbps)"},
1204 { 4, 5, "Reserved (for future use)"},
1205 { 6, 6, "OCh at 2.5 Gbps"},
1206 { 7, 7, "OCh at 10 Gbps"},
1207 { 8, 8, "OCh at 40 Gbps"},
1208 { 9, 255, "Reserved (for future use)"},
1212 /* -------------------- Stuff for MPLS/TE objects -------------------- */
1214 static const value_string proto_vals[] = {
1215 { IP_PROTO_ICMP, "ICMP"},
1216 { IP_PROTO_IGMP, "IGMP"},
1217 { IP_PROTO_TCP, "TCP" },
1218 { IP_PROTO_UDP, "UDP" },
1219 { IP_PROTO_OSPF, "OSPF"},
1224 enum hf_rsvp_filter_keys {
1227 RSVPF_MSG, /* Message type */
1228 /* Shorthand for message types */
1250 /* Does the message contain an object of this type? */
1252 /* Object present shorthands */
1271 RSVPF_LABEL_REQUEST,
1272 RSVPF_EXPLICIT_ROUTE,
1276 RSVPF_MESSAGE_ID_ACK,
1277 RSVPF_MESSAGE_ID_LIST,
1278 RSVPF_RECOVERY_LABEL,
1279 RSVPF_UPSTREAM_LABEL,
1285 RSVPF_SUGGESTED_LABEL,
1286 RSVPF_ACCEPTABLE_LABEL_SET,
1289 RSVPF_SESSION_ATTRIBUTE,
1291 RSVPF_LSP_TUNNEL_IF_ID,
1292 RSVPF_NOTIFY_REQUEST,
1294 RSVPF_ADMIN_STATUS_REFLECT,
1295 RSVPF_ADMIN_STATUS_HANDOVER,
1296 RSVPF_ADMIN_STATUS_LOCKOUT,
1297 RSVPF_ADMIN_STATUS_INHIBIT,
1298 RSVPF_ADMIN_STATUS_CALL_MGMT,
1299 RSVPF_ADMIN_STATUS_TESTING,
1300 RSVPF_ADMIN_STATUS_DOWN,
1301 RSVPF_ADMIN_STATUS_DELETE,
1302 RSVPF_LSP_ATTRIBUTES,
1304 RSVPF_GENERALIZED_UNI,
1309 /* Session object */
1311 RSVPF_SESSION_PROTO,
1313 RSVPF_SESSION_TUNNEL_ID,
1314 RSVPF_SESSION_EXT_TUNNEL_ID,
1316 /* Sender template */
1319 RSVPF_SENDER_LSP_ID,
1321 /* Diffserv object */
1322 RSVPF_DIFFSERV_MAPNB,
1324 RSVPF_DIFFSERV_MAP_EXP,
1325 RSVPF_DIFFSERV_PHBID,
1326 RSVPF_DIFFSERV_PHBID_DSCP,
1327 RSVPF_DIFFSERV_PHBID_CODE,
1328 RSVPF_DIFFSERV_PHBID_BIT14,
1329 RSVPF_DIFFSERV_PHBID_BIT15,
1331 /* Diffserv-aware TE object */
1332 RSVPF_DSTE_CLASSTYPE,
1334 /* Generalized UNI object */
1335 RSVPF_GUNI_SRC_IPV4,
1336 RSVPF_GUNI_DST_IPV4,
1337 RSVPF_GUNI_SRC_IPV6,
1338 RSVPF_GUNI_DST_IPV6,
1340 /* CALL ID object */
1341 RSVPF_CALL_ID_SRC_ADDR_IPV4,
1342 RSVPF_CALL_ID_SRC_ADDR_IPV6,
1344 /* Vendor Private objects */
1352 static const true_false_string tfs_desired_not_desired = { "Desired", "Not Desired" };
1353 static const true_false_string tfs_next_next_hop_next_hop = { "Next-Next-Hop", "Next-Hop" };
1354 static const true_false_string tfs_gen_uni_direction = { "U: 1 - Upstream label/port ID", "U: 0 - Downstream label/port ID" };
1356 static int hf_rsvp_filter[RSVPF_MAX] = { -1 };
1358 /* RSVP Conversation related Hash functions */
1361 * Compare two RSVP request keys to see if they are equal. Return 1 if they
1363 * Two RSVP request keys are equal if and only if they have the exactly the
1364 * same internal conversation identifier, session type, and matching values in
1365 * the session info and source info structures.
1368 rsvp_equal(gconstpointer k1, gconstpointer k2)
1370 const struct rsvp_request_key *key1 = (const struct rsvp_request_key*) k1;
1371 const struct rsvp_request_key *key2 = (const struct rsvp_request_key*) k2;
1373 if (key1->conversation != key2->conversation) {
1377 if (key1->session_type != key2->session_type) {
1381 switch (key1->session_type) {
1382 case RSVP_SESSION_TYPE_IPV4:
1383 if (ADDRESSES_EQUAL(&key1->u.session_ipv4.destination,
1384 &key2->u.session_ipv4.destination) == FALSE)
1387 if (key1->u.session_ipv4.protocol != key2->u.session_ipv4.protocol)
1390 if (key1->u.session_ipv4.udp_dest_port != key2->u.session_ipv4.udp_dest_port)
1395 case RSVP_SESSION_TYPE_IPV6:
1396 /* this is not supported yet for conversations */
1399 case RSVP_SESSION_TYPE_IPV4_LSP:
1400 if (ADDRESSES_EQUAL(&key1->u.session_ipv4_lsp.destination,
1401 &key2->u.session_ipv4_lsp.destination) == FALSE)
1404 if (key1->u.session_ipv4_lsp.udp_dest_port !=
1405 key2->u.session_ipv4_lsp.udp_dest_port)
1409 if (key1->u.session_ipv4_lsp.ext_tunnel_id !=
1410 key2->u.session_ipv4_lsp.ext_tunnel_id)
1415 case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
1416 if (ADDRESSES_EQUAL(&key1->u.session_agg_ipv4.destination,
1417 &key2->u.session_agg_ipv4.destination) == FALSE)
1420 if (key1->u.session_agg_ipv4.dscp != key2->u.session_agg_ipv4.dscp)
1425 case RSVP_SESSION_TYPE_AGGREGATE_IPV6:
1426 /* this is not supported yet for conversations */
1429 case RSVP_SESSION_TYPE_IPV4_UNI:
1430 if (ADDRESSES_EQUAL(&key1->u.session_ipv4_uni.destination,
1431 &key2->u.session_ipv4_uni.destination) == FALSE)
1434 if (key1->u.session_ipv4_uni.udp_dest_port !=
1435 key2->u.session_ipv4_uni.udp_dest_port)
1439 if (key1->u.session_ipv4_uni.ext_tunnel_id !=
1440 key2->u.session_ipv4_uni.ext_tunnel_id)
1445 case RSVP_SESSION_TYPE_IPV4_E_NNI:
1446 if (ADDRESSES_EQUAL(&key1->u.session_ipv4_enni.destination,
1447 &key2->u.session_ipv4_enni.destination) == FALSE)
1450 if (key1->u.session_ipv4_enni.udp_dest_port !=
1451 key2->u.session_ipv4_enni.udp_dest_port)
1455 if (key1->u.session_ipv4_enni.ext_tunnel_id !=
1456 key2->u.session_ipv4_enni.ext_tunnel_id)
1462 /* This should never happen. */
1466 if (ADDRESSES_EQUAL(&key1->source_info.source,
1467 &key2->source_info.source) == FALSE)
1470 if (key1->source_info.udp_source_port != key2->source_info.udp_source_port)
1473 /* If we get here, the two keys are equal. */
1478 * Calculate a hash key for the supplied RSVP request. The internally allocated
1479 * conversation-id is unique, so we just use that.
1482 rsvp_hash(gconstpointer k)
1484 const struct rsvp_request_key *key = (const struct rsvp_request_key*) k;
1485 return key->conversation;
1489 * Conversation specific initialization code that deletes any unused memory that
1490 * might need to be freed, and allocates the memory for the various conversation
1494 rsvp_init_protocol(void)
1496 if (rsvp_request_hash)
1497 g_hash_table_destroy(rsvp_request_hash);
1499 rsvp_request_hash = g_hash_table_new(rsvp_hash, rsvp_equal);
1503 rsvp_class_to_filter_num(int classnum)
1506 case RSVP_CLASS_SESSION :
1507 case RSVP_CLASS_HOP :
1508 case RSVP_CLASS_INTEGRITY :
1509 case RSVP_CLASS_TIME_VALUES :
1510 case RSVP_CLASS_ERROR :
1511 case RSVP_CLASS_SCOPE :
1512 case RSVP_CLASS_STYLE :
1513 case RSVP_CLASS_FLOWSPEC :
1514 case RSVP_CLASS_FILTER_SPEC :
1515 case RSVP_CLASS_SENDER_TEMPLATE :
1516 case RSVP_CLASS_SENDER_TSPEC :
1517 case RSVP_CLASS_ADSPEC :
1518 case RSVP_CLASS_POLICY :
1519 case RSVP_CLASS_CONFIRM :
1520 case RSVP_CLASS_LABEL :
1521 case RSVP_CLASS_LABEL_REQUEST :
1522 case RSVP_CLASS_HELLO :
1523 case RSVP_CLASS_EXPLICIT_ROUTE :
1524 case RSVP_CLASS_RECORD_ROUTE :
1525 case RSVP_CLASS_MESSAGE_ID :
1526 case RSVP_CLASS_MESSAGE_ID_ACK :
1527 case RSVP_CLASS_MESSAGE_ID_LIST :
1528 return classnum + RSVPF_OBJECT;
1531 case RSVP_CLASS_RECOVERY_LABEL :
1532 case RSVP_CLASS_UPSTREAM_LABEL :
1533 case RSVP_CLASS_LABEL_SET :
1534 case RSVP_CLASS_PROTECTION :
1535 return RSVPF_RECOVERY_LABEL + (classnum - RSVP_CLASS_RECOVERY_LABEL);
1537 case RSVP_CLASS_SUGGESTED_LABEL :
1538 case RSVP_CLASS_ACCEPTABLE_LABEL_SET :
1539 case RSVP_CLASS_RESTART_CAP :
1540 return RSVPF_SUGGESTED_LABEL + (classnum - RSVP_CLASS_SUGGESTED_LABEL);
1542 case RSVP_CLASS_DIFFSERV :
1543 return RSVPF_DIFFSERV;
1545 case RSVP_CLASS_CLASSTYPE :
1548 case RSVP_CLASS_NOTIFY_REQUEST :
1549 return RSVPF_NOTIFY_REQUEST;
1550 case RSVP_CLASS_ADMIN_STATUS :
1551 return RSVPF_ADMIN_STATUS;
1552 case RSVP_CLASS_LSP_ATTRIBUTES :
1553 return RSVPF_LSP_ATTRIBUTES;
1554 case RSVP_CLASS_ASSOCIATION :
1555 return RSVPF_ASSOCIATION;
1557 case RSVP_CLASS_SESSION_ATTRIBUTE :
1558 return RSVPF_SESSION_ATTRIBUTE;
1559 case RSVP_CLASS_GENERALIZED_UNI :
1560 return RSVPF_GENERALIZED_UNI;
1561 case RSVP_CLASS_CALL_ID :
1562 return RSVPF_CALL_ID;
1563 case RSVP_CLASS_3GPP2_OBJECT :
1564 return RSVPF_3GPP2_OBJECT;
1565 case RSVP_CLASS_DCLASS :
1566 return RSVPF_DCLASS;
1567 case RSVP_CLASS_LSP_TUNNEL_IF_ID :
1568 return RSVPF_LSP_TUNNEL_IF_ID;
1570 case RSVP_CLASS_VENDOR_PRIVATE_1:
1571 case RSVP_CLASS_VENDOR_PRIVATE_2:
1572 case RSVP_CLASS_VENDOR_PRIVATE_3:
1573 case RSVP_CLASS_VENDOR_PRIVATE_4:
1574 case RSVP_CLASS_VENDOR_PRIVATE_5:
1575 case RSVP_CLASS_VENDOR_PRIVATE_6:
1576 case RSVP_CLASS_VENDOR_PRIVATE_7:
1577 case RSVP_CLASS_VENDOR_PRIVATE_8:
1578 case RSVP_CLASS_VENDOR_PRIVATE_9:
1579 case RSVP_CLASS_VENDOR_PRIVATE_10:
1580 case RSVP_CLASS_VENDOR_PRIVATE_11:
1581 case RSVP_CLASS_VENDOR_PRIVATE_12:
1582 return RSVPF_PRIVATE_OBJ;
1585 return RSVPF_UNKNOWN_OBJ;
1590 rsvp_class_to_tree_type(int classnum)
1593 case RSVP_CLASS_SESSION :
1595 case RSVP_CLASS_HOP :
1597 case RSVP_CLASS_INTEGRITY :
1598 return TT_INTEGRITY;
1599 case RSVP_CLASS_TIME_VALUES :
1600 return TT_TIME_VALUES;
1601 case RSVP_CLASS_ERROR :
1603 case RSVP_CLASS_SCOPE :
1605 case RSVP_CLASS_STYLE :
1607 case RSVP_CLASS_FLOWSPEC :
1609 case RSVP_CLASS_FILTER_SPEC :
1610 return TT_FILTER_SPEC;
1611 case RSVP_CLASS_SENDER_TEMPLATE :
1612 return TT_SENDER_TEMPLATE;
1613 case RSVP_CLASS_SENDER_TSPEC :
1615 case RSVP_CLASS_ADSPEC :
1617 case RSVP_CLASS_POLICY :
1619 case RSVP_CLASS_CONFIRM :
1621 case RSVP_CLASS_RECOVERY_LABEL :
1622 case RSVP_CLASS_UPSTREAM_LABEL :
1623 case RSVP_CLASS_SUGGESTED_LABEL :
1624 case RSVP_CLASS_LABEL :
1626 case RSVP_CLASS_LABEL_REQUEST :
1627 return TT_LABEL_REQUEST;
1628 case RSVP_CLASS_HELLO :
1629 return TT_HELLO_OBJ;
1630 case RSVP_CLASS_EXPLICIT_ROUTE :
1631 return TT_EXPLICIT_ROUTE;
1632 case RSVP_CLASS_RECORD_ROUTE :
1633 return TT_RECORD_ROUTE;
1634 case RSVP_CLASS_MESSAGE_ID :
1635 return TT_MESSAGE_ID;
1636 case RSVP_CLASS_MESSAGE_ID_ACK :
1637 return TT_MESSAGE_ID_ACK;
1638 case RSVP_CLASS_MESSAGE_ID_LIST :
1639 return TT_MESSAGE_ID_LIST;
1640 case RSVP_CLASS_LABEL_SET :
1641 return TT_LABEL_SET;
1642 case RSVP_CLASS_PROTECTION :
1643 return TT_PROTECTION_INFO;
1644 case RSVP_CLASS_ACCEPTABLE_LABEL_SET :
1645 return TT_UNKNOWN_CLASS;
1646 case RSVP_CLASS_RESTART_CAP :
1647 return TT_RESTART_CAP;
1648 case RSVP_CLASS_DIFFSERV :
1650 case RSVP_CLASS_CLASSTYPE:
1651 return TT_CLASSTYPE;
1652 case RSVP_CLASS_NOTIFY_REQUEST :
1653 return TT_UNKNOWN_CLASS;
1654 case RSVP_CLASS_ADMIN_STATUS :
1655 return TT_ADMIN_STATUS;
1656 case RSVP_CLASS_LSP_ATTRIBUTES :
1657 case RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES :
1658 return TT_LSP_ATTRIBUTES;
1659 case RSVP_CLASS_ASSOCIATION :
1660 return TT_ASSOCIATION;
1661 case RSVP_CLASS_SESSION_ATTRIBUTE :
1662 return TT_SESSION_ATTRIBUTE;
1663 case RSVP_CLASS_GENERALIZED_UNI :
1665 case RSVP_CLASS_CALL_ID :
1667 case RSVP_CLASS_3GPP2_OBJECT :
1668 return TT_3GPP2_OBJECT;
1669 case RSVP_CLASS_DCLASS :
1671 case RSVP_CLASS_LSP_TUNNEL_IF_ID :
1672 return TT_LSP_TUNNEL_IF_ID;
1673 case RSVP_CLASS_VENDOR_PRIVATE_1:
1674 case RSVP_CLASS_VENDOR_PRIVATE_2:
1675 case RSVP_CLASS_VENDOR_PRIVATE_3:
1676 case RSVP_CLASS_VENDOR_PRIVATE_4:
1677 case RSVP_CLASS_VENDOR_PRIVATE_5:
1678 case RSVP_CLASS_VENDOR_PRIVATE_6:
1679 case RSVP_CLASS_VENDOR_PRIVATE_7:
1680 case RSVP_CLASS_VENDOR_PRIVATE_8:
1681 case RSVP_CLASS_VENDOR_PRIVATE_9:
1682 case RSVP_CLASS_VENDOR_PRIVATE_10:
1683 case RSVP_CLASS_VENDOR_PRIVATE_11:
1684 case RSVP_CLASS_VENDOR_PRIVATE_12:
1685 return TT_PRIVATE_CLASS;
1687 return TT_UNKNOWN_CLASS;
1692 find_rsvp_session_tempfilt(tvbuff_t *tvb, int hdr_offset, int *session_offp, int *tempfilt_offp)
1694 int s_off = 0, t_off = 0;
1698 if (!tvb_bytes_exist(tvb, hdr_offset+6, 2))
1701 len = tvb_get_ntohs(tvb, hdr_offset+6) + hdr_offset;
1702 for (off = hdr_offset + 8; (off < len) && tvb_bytes_exist(tvb, off, 3); off += obj_length) {
1703 obj_length = tvb_get_ntohs(tvb, off);
1704 if (obj_length == 0)
1706 switch(tvb_get_guint8(tvb, off+2)) {
1707 case RSVP_CLASS_SESSION:
1710 case RSVP_CLASS_SENDER_TEMPLATE:
1711 case RSVP_CLASS_FILTER_SPEC:
1720 if (session_offp) *session_offp = s_off;
1721 if (tempfilt_offp) *tempfilt_offp = t_off;
1725 summary_session(tvbuff_t *tvb, int offset)
1727 switch(tvb_get_guint8(tvb, offset+3)) {
1728 case RSVP_SESSION_TYPE_IPV4:
1729 return ep_strdup_printf("SESSION: IPv4, Destination %s, Protocol %d, Port %d. ",
1730 tvb_ip_to_str(tvb, offset+4),
1731 tvb_get_guint8(tvb, offset+8),
1732 tvb_get_ntohs(tvb, offset+10));
1734 case RSVP_SESSION_TYPE_IPV4_LSP:
1735 return ep_strdup_printf("SESSION: IPv4-LSP, Destination %s, Tunnel ID %d, Ext ID %0x. ",
1736 tvb_ip_to_str(tvb, offset+4),
1737 tvb_get_ntohs(tvb, offset+10),
1738 tvb_get_ntohl(tvb, offset+12));
1740 case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
1741 return ep_strdup_printf("SESSION: IPv4-Aggregate, Destination %s, DSCP %d. ",
1742 tvb_ip_to_str(tvb, offset+4),
1743 tvb_get_guint8(tvb, offset+11));
1745 case RSVP_SESSION_TYPE_IPV4_UNI:
1746 return ep_strdup_printf("SESSION: IPv4-UNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
1747 tvb_ip_to_str(tvb, offset+4),
1748 tvb_get_ntohs(tvb, offset+10),
1749 tvb_ip_to_str(tvb, offset+12));
1751 case RSVP_SESSION_TYPE_IPV4_E_NNI:
1752 return ep_strdup_printf("SESSION: IPv4-E-NNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
1753 tvb_ip_to_str(tvb, offset+4),
1754 tvb_get_ntohs(tvb, offset+10),
1755 tvb_ip_to_str(tvb, offset+12));
1758 return ep_strdup_printf("SESSION: Type %d. ", tvb_get_guint8(tvb, offset+3));
1761 DISSECTOR_ASSERT_NOT_REACHED();
1765 summary_template(tvbuff_t *tvb, int offset)
1767 const char *objtype;
1769 if (tvb_get_guint8(tvb, offset+2) == RSVP_CLASS_FILTER_SPEC)
1770 objtype = "FILTERSPEC";
1772 objtype = "SENDER TEMPLATE";
1774 switch(tvb_get_guint8(tvb, offset+3)) {
1776 return ep_strdup_printf("%s: IPv4, Sender %s, Port %d. ", objtype,
1777 tvb_ip_to_str(tvb, offset+4),
1778 tvb_get_ntohs(tvb, offset+10));
1781 return ep_strdup_printf("%s: IPv4-LSP, Tunnel Source: %s, LSP ID: %d. ", objtype,
1782 tvb_ip_to_str(tvb, offset+4),
1783 tvb_get_ntohs(tvb, offset+10));
1786 return ep_strdup_printf("%s: IPv4-Aggregate, Aggregator %s. ", objtype,
1787 tvb_ip_to_str(tvb, offset+4));
1790 return ep_strdup_printf("%s: Type %d. ", objtype, tvb_get_guint8(tvb, offset+3));
1793 DISSECTOR_ASSERT_NOT_REACHED();
1796 /*------------------------------------------------------------------------------
1798 *------------------------------------------------------------------------------*/
1800 dissect_rsvp_session(proto_item *ti, proto_tree *rsvp_object_tree,
1802 int offset, int obj_length,
1803 int rsvp_class _U_, int type,
1804 rsvp_conversation_info *rsvph)
1806 proto_item *hidden_item;
1807 int offset2 = offset + 4;
1809 proto_item_set_text(ti, "%s", summary_session(tvb, offset));
1812 case RSVP_SESSION_TYPE_IPV4:
1813 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
1814 "C-type: 1 - IPv4");
1815 proto_tree_add_item(rsvp_object_tree,
1816 hf_rsvp_filter[RSVPF_SESSION_IP],
1817 tvb, offset2, 4, ENC_BIG_ENDIAN);
1819 proto_tree_add_item(rsvp_object_tree,
1820 hf_rsvp_filter[RSVPF_SESSION_PROTO], tvb,
1821 offset2+4, 1, ENC_BIG_ENDIAN);
1822 proto_tree_add_text(rsvp_object_tree, tvb, offset2+5, 1,
1824 tvb_get_guint8(tvb, offset2+5));
1825 proto_tree_add_item(rsvp_object_tree,
1826 hf_rsvp_filter[RSVPF_SESSION_PORT], tvb,
1827 offset2+6, 2, ENC_BIG_ENDIAN);
1830 * Save this information to build the conversation request key
1833 rsvph->session_type = RSVP_SESSION_TYPE_IPV4;
1834 TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
1835 rsvph->protocol = tvb_get_guint8(tvb, offset2+4);
1836 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
1840 case RSVP_SESSION_TYPE_IPV6:
1841 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
1842 "C-type: 2 - IPv6");
1843 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
1844 "Destination address: %s",
1845 tvb_ip6_to_str(tvb, offset2));
1846 proto_tree_add_text(rsvp_object_tree, tvb, offset2+16, 1,
1848 tvb_get_guint8(tvb, offset2+16));
1849 proto_tree_add_text(rsvp_object_tree, tvb, offset2+17, 1,
1851 tvb_get_guint8(tvb, offset2+17));
1852 proto_tree_add_text(rsvp_object_tree, tvb, offset2+18, 2,
1853 "Destination port: %u",
1854 tvb_get_ntohs(tvb, offset2+18));
1856 * Save this information to build the conversation request key
1857 * later. IPv6 conversatiuon support is not implemented yet, so only
1858 * the session type is stored.
1860 rsvph->session_type = RSVP_SESSION_TYPE_IPV6;
1864 case RSVP_SESSION_TYPE_IPV4_LSP:
1865 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
1866 "C-type: 7 - IPv4 LSP");
1867 proto_tree_add_item(rsvp_object_tree,
1868 hf_rsvp_filter[RSVPF_SESSION_IP],
1869 tvb, offset2, 4, ENC_BIG_ENDIAN);
1871 proto_tree_add_item(rsvp_object_tree,
1872 hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
1873 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
1875 proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
1876 "Extended Tunnel ID: %u (%s)",
1877 tvb_get_ntohl(tvb, offset2+8),
1878 tvb_ip_to_str(tvb, offset2+8));
1879 hidden_item = proto_tree_add_item(rsvp_object_tree,
1880 hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
1881 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
1882 PROTO_ITEM_SET_HIDDEN(hidden_item);
1885 * Save this information to build the conversation request key
1888 rsvph->session_type = RSVP_SESSION_TYPE_IPV4_LSP;
1889 TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
1890 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
1891 rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
1894 case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
1895 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
1896 "C-type: 9 - IPv4 Aggregate");
1897 proto_tree_add_item(rsvp_object_tree,
1898 hf_rsvp_filter[RSVPF_SESSION_IP],
1899 tvb, offset2, 4, ENC_BIG_ENDIAN);
1901 proto_tree_add_text(rsvp_object_tree, tvb, offset2+7, 1,
1903 tvb_get_guint8(tvb, offset2+7),
1904 val_to_str_ext(tvb_get_guint8(tvb, offset2+7),
1905 &dscp_vals_ext, "Unknown (%d)"));
1907 * Save this information to build the conversation request key
1910 rsvph->session_type = RSVP_SESSION_TYPE_AGGREGATE_IPV4;
1911 TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
1912 rsvph->dscp = tvb_get_guint8(tvb, offset2+7);
1913 rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
1916 case RSVP_SESSION_TYPE_IPV4_UNI:
1917 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
1918 "C-type: 11 - IPv4 UNI");
1919 proto_tree_add_item(rsvp_object_tree,
1920 hf_rsvp_filter[RSVPF_SESSION_IP],
1921 tvb, offset2, 4, ENC_BIG_ENDIAN);
1923 proto_tree_add_item(rsvp_object_tree,
1924 hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
1925 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
1927 proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
1928 "Extended IPv4 Address: %s",
1929 tvb_ip_to_str(tvb, offset2+8));
1930 hidden_item = proto_tree_add_item(rsvp_object_tree,
1931 hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
1932 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
1933 PROTO_ITEM_SET_HIDDEN(hidden_item);
1936 * Save this information to build the conversation request key
1939 rsvph->session_type = RSVP_SESSION_TYPE_IPV4_UNI;
1940 TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
1941 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
1942 rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
1946 case RSVP_SESSION_TYPE_IPV4_E_NNI:
1947 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
1948 "C-type: 15 - IPv4 E-NNI");
1949 proto_tree_add_item(rsvp_object_tree,
1950 hf_rsvp_filter[RSVPF_SESSION_IP],
1951 tvb, offset2, 4, ENC_BIG_ENDIAN);
1953 proto_tree_add_item(rsvp_object_tree,
1954 hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
1955 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
1957 proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
1958 "Extended IPv4 Address: %s",
1959 tvb_ip_to_str(tvb, offset2+8));
1960 hidden_item = proto_tree_add_item(rsvp_object_tree,
1961 hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
1962 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
1963 PROTO_ITEM_SET_HIDDEN(hidden_item);
1966 * Save this information to build the conversation request key
1969 rsvph->session_type = RSVP_SESSION_TYPE_IPV4_E_NNI;
1970 TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
1971 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
1972 rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
1977 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
1978 "C-type: Unknown (%u)",
1980 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length-4,
1981 "Data (%d bytes)", obj_length-4);
1986 /*------------------------------------------------------------------------------
1987 * TLVs for HOP, ERROR and other IF_ID extended objects (RFC4920)
1988 * (TODO: TLV type 12, 13, 25)
1989 *------------------------------------------------------------------------------*/
1991 dissect_rsvp_ifid_tlv(proto_tree *ti, proto_tree *rsvp_object_tree,
1992 tvbuff_t *tvb, int offset, int length,
1995 int tlv_off, padding;
1999 const char *tlv_name;
2000 proto_tree *rsvp_ifid_subtree=NULL, *ti2;
2002 for (tlv_off = 0; tlv_off < length; ) {
2003 tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
2004 tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);
2006 if ((tlv_len == 0) || (tlv_off+tlv_len > length)) {
2007 proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off+2, 2,
2008 "Invalid TLV length");
2015 case 14: /* PREVIOUS_HOP_IPV4 */
2016 tlv_name = "Previous-Hop ";
2018 case 16: /* INCOMING_IPV4 */
2019 tlv_name = "Incoming ";
2021 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2022 offset+tlv_off, tlv_len,
2023 "%sIPv4 TLV - %s", tlv_name,
2024 tvb_ip_to_str(tvb, offset+tlv_off+4));
2026 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2027 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
2028 "Type: %d (%sIPv4)", tlv_type, tlv_name);
2029 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
2031 tvb_get_ntohs(tvb, offset+tlv_off+2));
2032 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
2034 tvb_ip_to_str(tvb, offset+tlv_off+4));
2035 proto_item_append_text(ti, "%sIPv4: %s. ", tlv_name,
2036 tvb_ip_to_str(tvb, offset+tlv_off+4));
2042 case 15: /* PREVIOUS_HOP_IPV6 */
2043 tlv_name = "Previous-Hop ";
2045 case 17: /* INCOMING_IPV6 */
2046 tlv_name = "Incoming ";
2048 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2049 offset+tlv_off, tlv_len,
2050 "%sIPv6 TLV - %s", tlv_name,
2051 tvb_ip6_to_str(tvb, offset+tlv_off+4));
2053 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2054 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
2055 "Type: %d (%sIPv6)", tlv_type, tlv_name);
2056 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
2058 tvb_get_ntohs(tvb, offset+tlv_off+2));
2059 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
2061 tvb_ip6_to_str(tvb, offset+tlv_off+4));
2062 proto_item_append_text(ti, "%sIPv6: %s. ", tlv_name,
2063 tvb_ip6_to_str(tvb, offset+tlv_off+4));
2066 case 3: /* IF_INDEX */
2069 case 4: /* COMPONENT_IF_DOWNSTREAM */
2070 tlv_name = " Forward";
2072 case 5: /* COMPONENT_IF_UPSTREAM */
2073 tlv_name = " Reverse";
2075 case 18: /* INCOMING_IF_INDEX */
2076 tlv_name = " Incoming";
2078 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2079 offset+tlv_off, tlv_len,
2080 "Interface-Index%s TLV - %s, %d",
2082 tvb_ip_to_str(tvb, offset+tlv_off+4),
2083 tvb_get_ntohl(tvb, offset+tlv_off+8));
2084 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2085 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
2086 "Type: %d (Interface Index%s)", tlv_type, tlv_name);
2087 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
2089 tvb_get_ntohs(tvb, offset+tlv_off+2));
2090 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
2092 tvb_ip_to_str(tvb, offset+tlv_off+4));
2093 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+8, 4,
2094 "Interface-ID: %d (0x%0x)",
2095 tvb_get_ntohl(tvb, offset+tlv_off+8),
2096 tvb_get_ntohl(tvb, offset+tlv_off+8));
2097 proto_item_append_text(ti, "Data If-Index%s: %s, %d. ", tlv_name,
2098 tvb_ip_to_str(tvb, offset+tlv_off+4),
2099 tvb_get_ntohl(tvb, offset+tlv_off+8));
2102 case 6: /* DOWNSTREAM_LABEL */
2103 tlv_name = "Downstream";
2105 case 7: /* UPSTREAM_LABEL */
2106 tlv_name = "Upstream";
2108 case 19: /* INCOMING_DOWN_LABEL */
2109 tlv_name = "Incoming-Downstream";
2111 case 20: /* INCOMING_UP_LABEL */
2112 tlv_name = "Incoming-Upstream";
2114 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2115 offset+tlv_off, tlv_len,
2116 "%s-Label TLV - %u", tlv_name,
2117 tvb_get_ntohl(tvb, offset+tlv_off+4));
2118 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2119 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
2120 "Type: %d (%s-Label)", tlv_type, tlv_name);
2121 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
2123 tvb_get_ntohs(tvb, offset+tlv_off+2));
2124 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
2126 tvb_get_ntohl(tvb, offset+tlv_off+4));
2127 proto_item_append_text(ti, "%s-Label: %u. ", tlv_name,
2128 tvb_get_ntohl(tvb, offset+tlv_off+4));
2132 case 8: /* NODE_ID */
2135 case 21: /* REPORTING_NODE_ID */
2136 tlv_name = "Reporting-";
2138 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2139 offset+tlv_off, tlv_len,
2140 "%sNode-ID TLV - %s", tlv_name,
2141 tvb_ip_to_str(tvb, offset+tlv_off+4));
2142 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2143 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
2144 "Type: %d (%sNode-ID)", tlv_type, tlv_name);
2145 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
2147 tvb_get_ntohs(tvb, offset+tlv_off+2));
2148 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
2150 tvb_ip_to_str(tvb, offset+tlv_off+4));
2151 proto_item_append_text(ti, "%sNode-ID: %s. ", tlv_name,
2152 tvb_ip_to_str(tvb, offset+tlv_off+4));
2155 case 9: /* OSPF_AREA */
2158 case 22: /* REPORTING_OSPF_AREA */
2159 tlv_name = "Reporting-";
2161 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2162 offset+tlv_off, tlv_len,
2163 "%sOSPF-Area TLV - %u", tlv_name,
2164 tvb_get_ntohl(tvb, offset+tlv_off+4));
2165 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2166 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
2167 "Type: %d (%sOSPF-Area)", tlv_type, tlv_name);
2168 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
2170 tvb_get_ntohs(tvb, offset+tlv_off+2));
2171 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
2173 tvb_get_ntohl(tvb, offset+tlv_off+4));
2174 proto_item_append_text(ti, "%sOSPF-Area: %u. ", tlv_name,
2175 tvb_get_ntohl(tvb, offset+tlv_off+4));
2178 case 10: /* ISIS_AREA */
2181 case 23: /* REPORTING_ISIS_AREA */
2182 tlv_name = "Reporting-";
2184 isis_len = tvb_get_guint8(tvb, offset+tlv_off+4);
2185 if ((isis_len < 2) || (isis_len > 11))
2187 proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, tlv_len,
2188 "%sISIS-Area TLV - Invalid Length field", tlv_name);
2191 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2192 offset+tlv_off, tlv_len,
2193 "%sISIS-Area TLV - %s", tlv_name,
2194 print_nsap_net(tvb_get_ptr(tvb, offset+tlv_off+5, isis_len),
2196 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2197 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
2198 "Type: %d (%sISIS-Area)", tlv_type, tlv_name);
2199 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
2201 tvb_get_ntohs(tvb, offset+tlv_off+2));
2202 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
2203 "IS-IS Area Identifier: %s",
2204 print_nsap_net(tvb_get_ptr(tvb, offset+tlv_off+5, isis_len), isis_len));
2205 proto_item_append_text(ti, "%sISIS-Area: %s. ", tlv_name,
2206 print_nsap_net(tvb_get_ptr(tvb, offset+tlv_off+5, isis_len), isis_len));
2209 case 11: /* AUTONOMOUS_SYSTEM */
2212 case 24: /* REPORTING_AUTONOMOUS_SYSTEM */
2213 tlv_name = "Reporting-";
2215 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2216 offset+tlv_off, tlv_len,
2217 "%sAS TLV - %u", tlv_name,
2218 tvb_get_ntohl(tvb, offset+tlv_off+4));
2219 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2220 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
2221 "Type: %d (%sAS)", tlv_type, tlv_name);
2222 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
2224 tvb_get_ntohs(tvb, offset+tlv_off+2));
2225 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
2226 "Autonomous System: %u",
2227 tvb_get_ntohl(tvb, offset+tlv_off+4));
2228 proto_item_append_text(ti, "%sAS: %u. ", tlv_name,
2229 tvb_get_ntohl(tvb, offset+tlv_off+4));
2232 case 26: /* NODE_EXCLUSIONS */
2235 case 27: /* LINK_EXCLUSIONS */
2238 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2239 offset+tlv_off, tlv_len,
2240 "%s-Exclusions TLV - ", tlv_name);
2241 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2242 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
2243 "Type: %d (%s-Exclusions)", tlv_type, tlv_name);
2244 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
2246 tvb_get_ntohs(tvb, offset+tlv_off+2));
2247 dissect_rsvp_ifid_tlv(ti2, rsvp_ifid_subtree, tvb, offset+tlv_off+4,
2248 tlv_len-4, TREE(TT_HOP_SUBOBJ));
2251 /* FF: ERROR_STRING TLV, RFC 4783 */
2253 proto_tree_add_text(rsvp_object_tree,
2254 tvb, offset + tlv_off,
2256 "ERROR_STRING TLV - %s",
2257 tvb_format_text(tvb, offset + tlv_off + 4,
2259 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2260 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off, 2,
2261 "Type: 516 (ERROR_STRING)");
2262 proto_tree_add_text(rsvp_ifid_subtree,
2263 tvb, offset + tlv_off + 2, 2,
2265 tvb_get_ntohs(tvb, offset + tlv_off + 2));
2266 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
2269 tvb_format_text(tvb, offset + tlv_off + 4,
2274 /* FF: not yet known TLVs are displayed as raw data */
2275 ti2 = proto_tree_add_text(rsvp_object_tree,
2276 tvb, offset + tlv_off,
2278 "Unknown TLV (%u)", tlv_type);
2279 rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
2280 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off, 2,
2281 "Type: %u (Unknown)", tlv_type);
2282 proto_tree_add_text(rsvp_ifid_subtree,
2283 tvb, offset + tlv_off + 2, 2,
2285 tvb_get_ntohs(tvb, offset + tlv_off + 2));
2286 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
2289 tvb_bytes_to_str_punct(tvb, offset + tlv_off + 4, tlv_len - 4, ' '));
2293 padding = (4 - (tlv_len % 4)) % 4;
2295 proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + tlv_len, padding, "Padding: %s",
2296 tvb_bytes_to_str_punct(tvb, offset + tlv_off + tlv_len, padding, ' '));
2297 tlv_off += tlv_len + padding;
2301 /*------------------------------------------------------------------------------
2303 *------------------------------------------------------------------------------*/
2305 dissect_rsvp_hop(proto_item *ti, proto_tree *rsvp_object_tree,
2307 int offset, int obj_length,
2308 int rsvp_class _U_, int type)
2310 int offset2 = offset + 4;
2314 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2315 "C-type: 1 - IPv4");
2316 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
2317 "Neighbor address: %s",
2318 tvb_ip_to_str(tvb, offset2));
2319 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
2320 "Logical interface: %u",
2321 tvb_get_ntohl(tvb, offset2+4));
2322 proto_item_set_text(ti, "HOP: IPv4, %s",
2323 tvb_ip_to_str(tvb, offset2));
2327 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2328 "C-type: 2 - IPv6");
2329 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
2330 "Neighbor address: %s",
2331 tvb_ip6_to_str(tvb, offset2));
2332 proto_tree_add_text(rsvp_object_tree, tvb, offset2+16, 4,
2333 "Logical interface: 0x%08x",
2334 tvb_get_ntohl(tvb, offset2+16));
2338 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2339 "C-type: 3 - IPv4 IF-ID");
2340 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
2341 "Neighbor address: %s",
2342 tvb_ip_to_str(tvb, offset2));
2343 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
2344 "Logical interface: %u",
2345 tvb_get_ntohl(tvb, offset2+4));
2347 proto_item_set_text(ti, "HOP: IPv4 IF-ID. Control IPv4: %s. ",
2348 tvb_ip_to_str(tvb, offset2));
2350 dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length-12,
2351 TREE(TT_HOP_SUBOBJ));
2356 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2357 "C-type: Unknown (%u)",
2359 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
2360 "Data (%d bytes)", obj_length - 4);
2365 /*------------------------------------------------------------------------------
2367 *------------------------------------------------------------------------------*/
2369 dissect_rsvp_time_values(proto_item *ti, proto_tree *rsvp_object_tree,
2371 int offset, int obj_length,
2372 int rsvp_class _U_, int type)
2374 int offset2 = offset + 4;
2378 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2380 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
2381 "Refresh interval: %u ms (%u seconds)",
2382 tvb_get_ntohl(tvb, offset2),
2383 tvb_get_ntohl(tvb, offset2)/1000);
2384 proto_item_set_text(ti, "TIME VALUES: %d ms",
2385 tvb_get_ntohl(tvb, offset2));
2389 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2390 "C-type: Unknown (%u)",
2392 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
2393 "Data (%d bytes)", obj_length - 4);
2398 /*------------------------------------------------------------------------------
2399 * Error value field in ERROR object
2400 *------------------------------------------------------------------------------*/
2402 dissect_rsvp_error_value(proto_tree *ti, tvbuff_t *tvb,
2403 int offset, guint8 error_code)
2406 guint8 error_class, error_ctype;
2407 value_string_ext *rsvp_error_vals_ext_p = NULL;
2409 error_val = tvb_get_ntohs(tvb, offset);
2410 switch (error_code) {
2411 case RSVP_ERROR_ADMISSION:
2412 rsvp_error_vals_ext_p = &rsvp_admission_control_error_vals_ext;
2414 case RSVP_ERROR_POLICY:
2415 rsvp_error_vals_ext_p = &rsvp_policy_control_error_vals_ext;
2417 case RSVP_ERROR_TRAFFIC:
2418 rsvp_error_vals_ext_p = &rsvp_traffic_control_error_vals_ext;
2420 case RSVP_ERROR_ROUTING:
2421 rsvp_error_vals_ext_p = &rsvp_routing_error_vals_ext;
2423 case RSVP_ERROR_NOTIFY:
2424 rsvp_error_vals_ext_p = &rsvp_notify_error_vals_ext;
2426 case RSVP_ERROR_DIFFSERV:
2427 rsvp_error_vals_ext_p = &rsvp_diffserv_error_vals_ext;
2429 case RSVP_ERROR_DSTE:
2430 rsvp_error_vals_ext_p = &rsvp_diffserv_aware_te_error_vals_ext;
2432 case RSVP_ERROR_CALL_MGMT:
2433 rsvp_error_vals_ext_p = &rsvp_call_mgmt_error_vals_ext;
2437 switch (error_code) {
2438 case RSVP_ERROR_ADMISSION:
2439 case RSVP_ERROR_TRAFFIC:
2440 if ((error_val & 0xc0) == 0) {
2441 DISSECTOR_ASSERT(rsvp_error_vals_ext_p != NULL);
2442 proto_tree_add_text(ti, tvb, offset, 2,
2443 "Error value: %u - %s", error_val,
2444 val_to_str_ext(error_val, rsvp_error_vals_ext_p, "Unknown (%d)"));
2446 else if ((error_val & 0xc0) == 0x80) {
2447 proto_tree_add_text(ti, tvb, offset, 2,
2448 "Error value: %u - Organization specific subcode (%u)", error_val,
2451 else if ((error_val & 0xc0) == 0xc0) {
2452 proto_tree_add_text(ti, tvb, offset, 2,
2453 "Error value: %u - Service specific subcode (%u)", error_val,
2457 case RSVP_ERROR_UNKNOWN_CLASS:
2458 case RSVP_ERROR_UNKNOWN_C_TYPE:
2459 error_class = error_val / 256;
2460 error_ctype = error_val % 256;
2461 proto_tree_add_text(ti, tvb, offset, 2, "Class: %u (%s) - CType: %u",
2462 error_class, val_to_str_ext_const(error_class, &rsvp_class_vals_ext, "Unknown"),
2465 case RSVP_ERROR_POLICY:
2466 case RSVP_ERROR_NOTIFY:
2467 case RSVP_ERROR_ROUTING:
2468 case RSVP_ERROR_DIFFSERV:
2469 case RSVP_ERROR_DSTE:
2470 case RSVP_ERROR_CALL_MGMT:
2471 DISSECTOR_ASSERT(rsvp_error_vals_ext_p != NULL);
2472 proto_tree_add_text(ti, tvb, offset, 2, "Error value: %u - %s", error_val,
2473 val_to_str_ext(error_val, rsvp_error_vals_ext_p, "Unknown (%d)"));
2476 proto_tree_add_text(ti, tvb, offset, 2, "Error value: %u", error_val);
2482 /*------------------------------------------------------------------------------
2484 *------------------------------------------------------------------------------*/
2486 dissect_rsvp_error(proto_item *ti, proto_tree *rsvp_object_tree,
2488 int offset, int obj_length,
2489 int rsvp_class _U_, int type)
2491 int offset2 = offset + 4;
2496 proto_tree *ti2, *rsvp_error_subtree;
2500 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2501 "C-type: 1 - IPv4");
2502 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
2504 tvb_ip_to_str(tvb, offset2));
2505 offset3 = offset2+4;
2510 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2511 "C-type: 2 - IPv6");
2512 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
2514 tvb_ip6_to_str(tvb, offset2));
2515 offset3 = offset2+16;
2520 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2521 "C-type: 3 - IPv4 IF-ID");
2522 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
2524 tvb_ip_to_str(tvb, offset2));
2525 offset3 = offset2+4;
2530 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2531 "C-type: Unknown (%u)",
2533 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
2534 "Data (%d bytes)", obj_length - 4);
2538 error_flags = tvb_get_guint8(tvb, offset3);
2539 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_error_flags,
2540 tvb, offset3, 1, ENC_BIG_ENDIAN);
2541 rsvp_error_subtree = proto_item_add_subtree(ti2, TREE(TT_ERROR_FLAGS));
2542 proto_tree_add_item(rsvp_error_subtree, hf_rsvp_error_flags_path_state_removed,
2543 tvb, offset3, 1, ENC_BIG_ENDIAN);
2544 proto_tree_add_item(rsvp_error_subtree, hf_rsvp_error_flags_not_guilty,
2545 tvb, offset3, 1, ENC_BIG_ENDIAN);
2546 proto_tree_add_item(rsvp_error_subtree, hf_rsvp_error_flags_in_place,
2547 tvb, offset3, 1, ENC_BIG_ENDIAN);
2548 proto_item_append_text(ti2, " %s %s %s",
2549 (error_flags & (1<<2)) ? "Path-State-Removed" : "",
2550 (error_flags & (1<<1)) ? "NotGuilty" : "",
2551 (error_flags & (1<<0)) ? "InPlace" : "");
2552 error_code = tvb_get_guint8(tvb, offset3+1);
2553 proto_tree_add_text(rsvp_object_tree, tvb, offset3+1, 1,
2554 "Error code: %u - %s", error_code,
2555 val_to_str_ext(error_code, &rsvp_error_codes_ext, "Unknown (%d)"));
2556 error_val = dissect_rsvp_error_value(rsvp_object_tree, tvb, offset3+2, error_code);
2560 proto_item_set_text(ti, "ERROR: IPv4, Error code: %s, Value: %d, Error Node: %s",
2561 val_to_str_ext(error_code, &rsvp_error_codes_ext, "Unknown (%d)"),
2562 error_val, tvb_ip_to_str(tvb, offset2));
2565 proto_item_set_text(ti, "ERROR: IPv4 IF-ID, Error code: %s, Value: %d, Control Node: %s. ",
2566 val_to_str_ext(error_code, &rsvp_error_codes_ext, "Unknown (%d)"),
2567 error_val, tvb_ip_to_str(tvb, offset2));
2568 dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length-12,
2569 TREE(TT_ERROR_SUBOBJ));
2574 /*------------------------------------------------------------------------------
2576 *------------------------------------------------------------------------------*/
2578 dissect_rsvp_scope(proto_item *ti _U_, proto_tree *rsvp_object_tree,
2580 int offset, int obj_length,
2581 int rsvp_class _U_, int type)
2583 int offset2 = offset + 4;
2586 mylen = obj_length - 4;
2589 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2590 "C-type: 1 - IPv4");
2592 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
2594 tvb_ip_to_str(tvb, offset2));
2602 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2603 "C-type: 2 - IPv6");
2605 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
2607 tvb_ip6_to_str(tvb, offset2));
2615 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2616 "C-type: Unknown (%u)",
2618 proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
2619 "Data (%d bytes)", mylen);
2624 /*------------------------------------------------------------------------------
2626 *------------------------------------------------------------------------------*/
2628 dissect_rsvp_style(proto_item *ti, proto_tree *rsvp_object_tree,
2630 int offset, int obj_length,
2631 int rsvp_class _U_, int type)
2633 int offset2 = offset + 4;
2639 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2641 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
2643 tvb_get_guint8(tvb, offset2));
2644 style = tvb_get_ntoh24(tvb, offset2+1);
2645 proto_tree_add_text(rsvp_object_tree, tvb, offset2+1,
2646 3, "Style: 0x%06X - %s", style,
2647 val_to_str_const(style, style_vals, "Unknown"));
2648 proto_item_set_text(ti, "STYLE: %s (%d)",
2649 val_to_str_const(style, style_vals, "Unknown"),
2655 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2656 "C-type: Unknown (%u)",
2658 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
2659 "Data (%d bytes)", obj_length - 4);
2664 /*------------------------------------------------------------------------------
2666 *------------------------------------------------------------------------------*/
2668 dissect_rsvp_confirm(proto_item *ti, proto_tree *rsvp_object_tree,
2670 int offset, int obj_length,
2671 int rsvp_class _U_, int type)
2673 int offset2 = offset + 4;
2677 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2678 "C-type: 1 - IPv4");
2679 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
2680 "Receiver address: %s",
2681 tvb_ip_to_str(tvb, offset2));
2682 proto_item_set_text(ti, "CONFIRM: Receiver %s",
2683 tvb_ip_to_str(tvb, offset2));
2688 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2689 "C-type: 2 - IPv6");
2690 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
2691 "Receiver address: %s",
2692 tvb_ip6_to_str(tvb, offset2));
2697 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2698 "C-type: Unknown (%u)",
2700 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
2701 "Data (%d bytes)", obj_length - 4);
2706 /*------------------------------------------------------------------------------
2707 * SENDER TEMPLATE and FILTERSPEC
2708 *------------------------------------------------------------------------------*/
2710 dissect_rsvp_template_filter(proto_item *ti, proto_tree *rsvp_object_tree,
2712 int offset, int obj_length,
2713 int rsvp_class _U_, int type,
2714 rsvp_conversation_info *rsvph)
2716 int offset2 = offset + 4;
2718 proto_item_set_text(ti, "%s", summary_template(tvb, offset));
2721 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2722 "C-type: 1 - IPv4");
2723 proto_tree_add_item(rsvp_object_tree,
2724 hf_rsvp_filter[RSVPF_SENDER_IP],
2725 tvb, offset2, 4, ENC_BIG_ENDIAN);
2726 proto_tree_add_item(rsvp_object_tree,
2727 hf_rsvp_filter[RSVPF_SENDER_PORT],
2728 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
2731 * Save this information to build the conversation request key later.
2733 TVB_SET_ADDRESS(&rsvph->source, AT_IPv4, tvb, offset2, 4);
2734 rsvph->udp_source_port = tvb_get_ntohs(tvb, offset2+6);
2738 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2739 "C-type: 2 - IPv6");
2740 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
2741 "Source address: %s",
2742 tvb_ip6_to_str(tvb, offset2));
2743 proto_tree_add_text(rsvp_object_tree, tvb, offset2+18, 2,
2745 tvb_get_ntohs(tvb, offset2+18));
2749 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2750 "C-type: 7 - IPv4 LSP");
2751 proto_tree_add_item(rsvp_object_tree,
2752 hf_rsvp_filter[RSVPF_SENDER_IP],
2753 tvb, offset2, 4, ENC_BIG_ENDIAN);
2754 proto_tree_add_item(rsvp_object_tree,
2755 hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
2756 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
2759 * Save this information to build the conversation request key later.
2761 TVB_SET_ADDRESS(&rsvph->source, AT_IPv4, tvb, offset2, 4);
2762 rsvph->udp_source_port = tvb_get_ntohs(tvb, offset2+6);
2766 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2767 "C-type: 9 - IPv4 Aggregate");
2768 proto_tree_add_item(rsvp_object_tree,
2769 hf_rsvp_filter[RSVPF_SENDER_IP],
2770 tvb, offset2, 4, ENC_BIG_ENDIAN);
2773 * Save this information to build the conversation request key later.
2775 TVB_SET_ADDRESS(&rsvph->source, AT_IPv4, tvb, offset2, 4);
2779 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2780 "C-type: Unknown (%u)",
2782 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
2783 "Data (%d bytes)", obj_length - 4);
2788 /*------------------------------------------------------------------------------
2789 * TLVs for Ethernet SENDER TSPEC and FLOWSPEC (RFC6003)
2790 *------------------------------------------------------------------------------*/
2792 dissect_rsvp_eth_tspec_tlv(proto_item *ti, proto_tree *rsvp_object_tree,
2793 tvbuff_t *tvb, int offset, int tlv_length,
2800 proto_tree *rsvp_ethspec_subtree, *ethspec_profile_subtree, *ti2, *ti3;
2802 for (tlv_off = 0; tlv_off < tlv_length; ) {
2803 tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
2804 tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);
2806 if ((tlv_len == 0) || (tlv_off+tlv_len > tlv_length)) {
2807 proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off+2, 2,
2815 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2816 offset+tlv_off, tlv_len,
2817 "RESERVED (RFC6003)");
2818 rsvp_ethspec_subtree = proto_item_add_subtree(ti2, subtree_type);
2819 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off, 2,
2820 "Type: %u (RESERVED)", tlv_type);
2821 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+2, 2,
2822 "Length: %u", tlv_len);
2826 case 129: /* OIF demo 2009 */
2827 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2828 offset+tlv_off, tlv_len,
2829 "Ethernet Bandwidth Profile TLV: CIR=%.10g, CBS=%.10g, "
2830 "EIR=%.10g, EBS=%.10g",
2831 tvb_get_ntohieee_float(tvb, offset+tlv_off+8),
2832 tvb_get_ntohieee_float(tvb, offset+tlv_off+12),
2833 tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
2834 tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
2835 rsvp_ethspec_subtree = proto_item_add_subtree(ti2, subtree_type);
2836 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off, 2,
2837 "Type: %u - Ethernet Bandwidth Profile", tlv_type);
2838 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+2, 2,
2839 "Length: %u", tlv_len);
2840 profile = tvb_get_guint8(tvb, offset+tlv_off+4);
2841 ti3 = proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+4, 1,
2842 "Profile: 0x%02x", profile);
2843 ethspec_profile_subtree = proto_item_add_subtree(ti3, TREE(TT_ETHSPEC_SUBTREE));
2844 proto_tree_add_item(ethspec_profile_subtree, hf_rsvp_eth_tspec_tlv_color_mode,
2845 tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
2846 proto_tree_add_item(ethspec_profile_subtree, hf_rsvp_eth_tspec_tlv_coupling_flag,
2847 tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
2848 proto_item_append_text(ti3, " %s %s",
2849 (profile & (1<<1)) ? "CM" : "",
2850 (profile & (1<<0)) ? "CF" : "");
2851 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+5, 1,
2852 "Index: %x", tvb_get_guint8(tvb, offset+tlv_off+5));
2853 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+6, 2,
2854 "Reserved: %x", tvb_get_ntohs(tvb, offset+tlv_off+6));
2855 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+8, 4, "CIR: %.10g",
2856 tvb_get_ntohieee_float(tvb, offset+tlv_off+8));
2857 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+12, 4, "CBS: %.10g",
2858 tvb_get_ntohieee_float(tvb, offset+tlv_off+12));
2859 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+16, 4, "EIR: %.10g",
2860 tvb_get_ntohieee_float(tvb, offset+tlv_off+16));
2861 proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+20, 4, "EBS: %.10g",
2862 tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
2864 proto_item_append_text(ti, "ETH profile: CIR=%.10g, CBS=%.10g, EIR=%.10g, "
2866 tvb_get_ntohieee_float(tvb, offset+tlv_off+8),
2867 tvb_get_ntohieee_float(tvb, offset+tlv_off+12),
2868 tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
2869 tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
2873 proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, 2,
2874 "Unknown TLV: %u", tlv_type);
2881 /*------------------------------------------------------------------------------
2883 *------------------------------------------------------------------------------*/
2885 dissect_rsvp_tspec(proto_item *ti, proto_tree *rsvp_object_tree,
2887 int offset, int obj_length,
2888 int rsvp_class _U_, int type)
2890 int offset2 = offset + 4;
2892 proto_tree *tspec_tree, *ti2;
2894 guint16 switch_gran;
2896 mylen = obj_length - 4;
2900 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
2901 "C-type: 2 - Integrated Services");
2902 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
2903 "Message format version: %u",
2904 tvb_get_guint8(tvb, offset2)>>4);
2905 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
2906 "Data length: %u words, not including header",
2907 tvb_get_ntohs(tvb, offset2+2));
2912 proto_item_set_text(ti, "SENDER TSPEC: IntServ, ");
2918 guint param_len_processed;
2921 service_num = tvb_get_guint8(tvb, offset2);
2922 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
2923 "Service header: %u - %s",
2925 val_to_str_const(service_num, qos_vals, "Unknown"));
2926 length = tvb_get_ntohs(tvb, offset2+2);
2927 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
2928 "Length of service %u data: %u words, "
2929 "not including header",
2930 service_num, length);
2935 /* Process all known service headers as a set of parameters */
2936 param_len_processed = 0;
2937 while (param_len_processed < length) {
2938 param_id = tvb_get_guint8(tvb, offset2);
2939 param_len = tvb_get_ntohs(tvb, offset2+2) + 1;
2941 THROW(ReportedBoundsError);
2945 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2946 offset2, param_len*4,
2947 "Token Bucket TSpec: ");
2948 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
2950 proto_tree_add_text(tspec_tree, tvb, offset2, 1,
2951 "Parameter %u - %s",
2953 val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
2954 proto_tree_add_text(tspec_tree, tvb, offset2+1, 1,
2955 "Parameter %u flags: 0x%02x",
2957 tvb_get_guint8(tvb, offset2+1));
2958 proto_tree_add_text(tspec_tree, tvb, offset2+2, 2,
2959 "Parameter %u data length: %u words, "
2960 "not including header",
2962 tvb_get_ntohs(tvb, offset2+2));
2963 proto_tree_add_text(tspec_tree, tvb, offset2+4, 4,
2964 "Token bucket rate: %.10g",
2965 tvb_get_ntohieee_float(tvb, offset2+4));
2966 proto_tree_add_text(tspec_tree, tvb, offset2+8, 4,
2967 "Token bucket size: %.10g",
2968 tvb_get_ntohieee_float(tvb, offset2+8));
2969 proto_tree_add_text(tspec_tree, tvb, offset2+12, 4,
2970 "Peak data rate: %.10g",
2971 tvb_get_ntohieee_float(tvb, offset2+12));
2972 proto_tree_add_text(tspec_tree, tvb, offset2+16, 4,
2973 "Minimum policed unit [m]: %u",
2974 tvb_get_ntohl(tvb, offset2+16));
2975 proto_tree_add_text(tspec_tree, tvb, offset2+20, 4,
2976 "Maximum packet size [M]: %u",
2977 tvb_get_ntohl(tvb, offset2+20));
2978 proto_item_append_text(ti, "Token Bucket, %.10g bytes/sec. ",
2979 tvb_get_ntohieee_float(tvb, offset2+4));
2980 proto_item_append_text(ti2, "Rate=%.10g Burst=%.10g Peak=%.10g m=%u M=%u",
2981 tvb_get_ntohieee_float(tvb, offset2+4),
2982 tvb_get_ntohieee_float(tvb, offset2+8),
2983 tvb_get_ntohieee_float(tvb, offset2+12),
2984 tvb_get_ntohl(tvb, offset2+16),
2985 tvb_get_ntohl(tvb, offset2+20));
2989 /* Null Service (RFC2997) */
2990 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
2991 offset2, param_len*4,
2992 "Null Service TSpec: ");
2993 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
2995 proto_tree_add_text(tspec_tree, tvb, offset2, 1,
2996 "Parameter %u - %s",
2998 val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
2999 proto_tree_add_text(tspec_tree, tvb, offset2+1, 1,
3000 "Parameter %u flags: %x",
3002 tvb_get_guint8(tvb, offset2+1));
3003 proto_tree_add_text(tspec_tree, tvb, offset2+2, 2,
3004 "Parameter %u data length: %u words, "
3005 "not including header",
3007 tvb_get_ntohs(tvb, offset2+2));
3008 proto_tree_add_text(tspec_tree, tvb, offset2+4, 4,
3009 "Maximum packet size [M]: %u",
3010 tvb_get_ntohl(tvb, offset2+4));
3011 proto_item_append_text(ti, "Null Service. M=%u",
3012 tvb_get_ntohl(tvb, offset2+4));
3013 proto_item_append_text(ti2, "Max pkt size=%u",
3014 tvb_get_ntohl(tvb, offset2+4));
3018 /* Compression hint (RFC3006) */
3019 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
3020 offset2, param_len*4,
3021 "Compression Hint: ");
3022 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
3024 proto_tree_add_text(tspec_tree, tvb, offset2, 1,
3025 "Parameter %u - %s",
3027 val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
3028 proto_tree_add_text(tspec_tree, tvb, offset2+1, 1,
3029 "Parameter %u flags: %x",
3031 tvb_get_guint8(tvb, offset2+1));
3032 proto_tree_add_text(tspec_tree, tvb, offset2+2, 2,
3033 "Parameter %u data length: %u words, "
3034 "not including header",
3036 tvb_get_ntohs(tvb, offset2+2));
3037 proto_tree_add_text(tspec_tree, tvb, offset2+4, 4,
3039 tvb_get_ntohl(tvb, offset2+4));
3040 proto_tree_add_text(tspec_tree, tvb, offset2+4, 4,
3041 "Compression Factor: %u",
3042 tvb_get_ntohl(tvb, offset2+8));
3043 proto_item_append_text(ti, "Compression Hint. Hint=%u, Factor=%u",
3044 tvb_get_ntohl(tvb, offset2+4),
3045 tvb_get_ntohl(tvb, offset2+8));
3046 proto_item_append_text(ti2, "Hint=%u, Factor=%u",
3047 tvb_get_ntohl(tvb, offset2+4),
3048 tvb_get_ntohl(tvb, offset2+8));
3052 proto_tree_add_text(rsvp_object_tree, tvb, offset2, param_len*4,
3053 "Unknown parameter %d, %d words",
3054 param_id, param_len);
3057 param_len_processed += param_len;
3058 offset2 += param_len*4;
3064 case 4: /* SONET/SDH Tspec */
3065 proto_item_set_text(ti, "SENDER TSPEC: SONET/SDH, ");
3067 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3068 "C-type: 4 - SONET/SDH");
3069 signal_type = tvb_get_guint8(tvb, offset2);
3070 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
3071 "Signal Type: %d - %s", signal_type,
3072 val_to_str_ext_const(signal_type,
3073 &gmpls_sonet_signal_type_str_ext, "Unknown"));
3074 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
3075 "Requested Concatenation (RCC): %d", tvb_get_guint8(tvb, offset2+1));
3076 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
3077 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_standard_contiguous_concatenation,
3078 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
3079 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_arbitrary_contiguous_concatenation,
3080 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
3081 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3082 "Number of Contiguous Components (NCC): %d", tvb_get_ntohs(tvb, offset2+2));
3083 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
3084 "Number of Virtual Components (NVC): %d", tvb_get_ntohs(tvb, offset2+4));
3085 proto_tree_add_text(rsvp_object_tree, tvb, offset2+6, 2,
3086 "Multiplier (MT): %d", tvb_get_ntohs(tvb, offset2+6));
3087 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
3088 "Transparency (T): 0x%0x", tvb_get_ntohl(tvb, offset2+8));
3089 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
3091 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_regenerator_section,
3092 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3093 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_multiplex_section,
3094 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3095 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_J0_transparency,
3096 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3097 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_SOH_RSOH_DCC_transparency,
3098 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3099 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_LOH_MSOH_DCC_transparency,
3100 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3101 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_LOH_MSOH_extended_DCC_transparency,
3102 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3103 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_K1_K2_transparency,
3104 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3105 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_E1_transparency,
3106 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3107 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_F1_transparency,
3108 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3109 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_E2_transparency,
3110 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3111 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_B1_transparency,
3112 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3113 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_B2_transparency,
3114 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3115 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_M0_transparency,
3116 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3117 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_M1_transparency,
3118 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3120 proto_tree_add_text(rsvp_object_tree, tvb, offset2+12, 4,
3121 "Profile (P): %d", tvb_get_ntohl(tvb, offset2+12));
3123 proto_item_append_text(ti, "Signal [%s], RCC %d, NCC %d, NVC %d, MT %d, Transparency %d, Profile %d",
3124 val_to_str_ext_const(signal_type, &gmpls_sonet_signal_type_str_ext, "Unknown"),
3125 tvb_get_guint8(tvb, offset2+1), tvb_get_ntohs(tvb, offset2+2),
3126 tvb_get_ntohs(tvb, offset2+4), tvb_get_ntohs(tvb, offset2+6),
3127 tvb_get_ntohl(tvb, offset2+8), tvb_get_ntohl(tvb, offset2+12));
3130 case 5: /* FF: G.709 TSPEC, RFC 4328 */
3131 proto_item_set_text(ti, "SENDER TSPEC: G.709, ");
3133 proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
3134 "C-type: 5 - G.709");
3135 signal_type = tvb_get_guint8(tvb, offset2);
3136 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
3137 "Signal Type: %d - %s", signal_type,
3138 rval_to_str(signal_type,
3139 gmpls_g709_signal_type_rvals,
3141 proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 2, 2,
3142 "Number of Multiplexed Components (NMC): %d",
3143 tvb_get_ntohs(tvb, offset2 + 2));
3144 proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 2,
3145 "Number of Virtual Components (NVC): %d",
3146 tvb_get_ntohs(tvb, offset2 + 4));
3148 proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 6, 2,
3149 "Multiplier (MT): %d",
3150 tvb_get_ntohs(tvb, offset2 + 6));
3151 proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
3152 rval_to_str(signal_type,
3153 gmpls_g709_signal_type_rvals,
3155 tvb_get_ntohs(tvb, offset2 + 2),
3156 tvb_get_ntohs(tvb, offset2 + 4),
3157 tvb_get_ntohs(tvb, offset2 + 6));
3160 case 6: /* Ethernet TSPEC (RFC6003) */
3161 proto_item_set_text(ti, "SENDER TSPEC: Ethernet, ");
3162 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3163 "C-type: 6 - Ethernet");
3164 switch_gran = tvb_get_ntohs(tvb, offset2);
3165 if (switch_gran == 0)
3166 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
3167 "Switching granularity: 0 - Provided in signaling");
3168 else if (switch_gran == 1)
3169 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
3170 "Switching granularity: 1 - Ethernet port");
3171 else if (switch_gran == 2)
3172 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
3173 "Switching granularity: 2 - Ethernet frame");
3175 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
3176 "Switching granularity: %u - ???", switch_gran);
3178 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3179 "MTU: %u", tvb_get_ntohs(tvb, offset2+2));
3181 dissect_rsvp_eth_tspec_tlv(ti, rsvp_object_tree, tvb, offset+8, obj_length-8,
3182 TREE(TT_TSPEC_SUBTREE));
3185 default: /* Unknown TSpec */
3186 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3187 "C-type: Unknown (%u)",
3189 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
3190 "Data (%d bytes)", obj_length - 4);
3196 /*------------------------------------------------------------------------------
3198 *------------------------------------------------------------------------------*/
3200 dissect_rsvp_flowspec(proto_item *ti, proto_tree *rsvp_object_tree,
3202 int offset, int obj_length,
3203 int rsvp_class _U_, int type)
3205 int offset2 = offset + 4;
3206 int mylen, signal_type;
3207 proto_tree *flowspec_tree, *ti2;
3209 guint16 switch_gran;
3211 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3212 "C-type: %u", type);
3213 mylen = obj_length - 4;
3219 item = proto_tree_add_text(rsvp_object_tree, tvb, 0, 0,
3220 "Object length %u < 8", obj_length);
3221 PROTO_ITEM_SET_GENERATED(item);
3224 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
3225 "Message format version: %u",
3226 tvb_get_guint8(tvb, offset2)>>4);
3227 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3228 "Data length: %u words, not including header",
3229 tvb_get_ntohs(tvb, offset2+2));
3231 proto_item_set_text(ti, "FLOWSPEC: ");
3240 guint param_len_processed;
3243 item = proto_tree_add_text(rsvp_object_tree, tvb, 0, 0,
3244 "Object length %u not large enough",
3246 PROTO_ITEM_SET_GENERATED(item);
3249 service_num = tvb_get_guint8(tvb, offset2);
3250 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
3251 "Service header: %u - %s",
3253 val_to_str_ext_const(service_num, &intsrv_services_str_ext, "Unknown"));
3254 length = tvb_get_ntohs(tvb, offset2+2);
3255 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3256 "Length of service %u data: %u words, "
3257 "not including header",
3264 proto_item_append_text(ti, "%s: ",
3265 val_to_str_ext(service_num, &intsrv_services_str_ext,
3268 /* Process all known service headers as a set of parameters */
3269 param_len_processed = 0;
3270 while (param_len_processed < length) {
3271 param_id = tvb_get_guint8(tvb, offset2);
3272 param_len = tvb_get_ntohs(tvb, offset2+2) + 1;
3274 THROW(ReportedBoundsError);
3278 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
3279 offset2, param_len*4,
3281 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
3283 proto_tree_add_text(flowspec_tree, tvb, offset2, 1,
3284 "Parameter %u - %s",
3286 val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
3287 proto_tree_add_text(flowspec_tree, tvb, offset2+1, 1,
3288 "Parameter %u flags: 0x%02x",
3290 tvb_get_guint8(tvb, offset2+1));
3291 proto_tree_add_text(flowspec_tree, tvb, offset2+2, 2,
3292 "Parameter %u data length: %u words, "
3293 "not including header",
3295 tvb_get_ntohs(tvb, offset2+2));
3296 proto_tree_add_text(flowspec_tree, tvb, offset2+4, 4,
3297 "Token bucket rate: %.10g",
3298 tvb_get_ntohieee_float(tvb, offset2+4));
3299 proto_tree_add_text(flowspec_tree, tvb, offset2+8, 4,
3300 "Token bucket size: %.10g",
3301 tvb_get_ntohieee_float(tvb, offset2+8));
3302 proto_tree_add_text(flowspec_tree, tvb, offset2+12, 4,
3303 "Peak data rate: %.10g",
3304 tvb_get_ntohieee_float(tvb, offset2+12));
3305 proto_tree_add_text(flowspec_tree, tvb, offset2+16, 4,
3306 "Minimum policed unit [m]: %u",
3307 tvb_get_ntohl(tvb, offset2+16));
3308 proto_tree_add_text(flowspec_tree, tvb, offset2+20, 4,
3309 "Maximum packet size [M]: %u",
3310 tvb_get_ntohl(tvb, offset2+20));
3311 proto_item_append_text(ti, "Token Bucket, %.10g bytes/sec. ",
3312 tvb_get_ntohieee_float(tvb, offset2+4));
3313 proto_item_append_text(ti2, "Rate=%.10g Burst=%.10g Peak=%.10g m=%u M=%u",
3314 tvb_get_ntohieee_float(tvb, offset2+4),
3315 tvb_get_ntohieee_float(tvb, offset2+8),
3316 tvb_get_ntohieee_float(tvb, offset2+12),
3317 tvb_get_ntohl(tvb, offset2+16),
3318 tvb_get_ntohl(tvb, offset2+20));
3322 /* Guaranteed-rate RSpec */
3323 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
3324 offset2, param_len*4,
3325 "Guaranteed-Rate RSpec: ");
3326 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
3327 proto_tree_add_text(flowspec_tree, tvb, offset2, 1,
3328 "Parameter %u - %s",
3330 val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
3331 proto_tree_add_text(flowspec_tree, tvb, offset2+1, 1,
3332 "Parameter %u flags: %x",
3334 tvb_get_guint8(tvb, offset2+1));
3335 proto_tree_add_text(flowspec_tree, tvb, offset2+2, 2,
3336 "Parameter %u data length: %u words, "
3337 "not including header",
3339 tvb_get_ntohs(tvb, offset2+2));
3341 proto_tree_add_text(flowspec_tree, tvb, offset2+4, 4,
3343 tvb_get_ntohieee_float(tvb, offset2+4));
3344 proto_tree_add_text(flowspec_tree, tvb, offset2+8, 4,
3346 tvb_get_ntohl(tvb, offset2+8));
3347 proto_item_append_text(ti, "RSpec, %.10g bytes/sec. ",
3348 tvb_get_ntohieee_float(tvb, offset2+4));
3349 proto_item_append_text(ti2, "R=%.10g, s=%u",
3350 tvb_get_ntohieee_float(tvb, offset2+4),
3351 tvb_get_ntohl(tvb, offset2+8));
3355 /* Null Service (RFC2997) */
3356 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
3357 offset2, param_len*4,
3358 "Null Service Flowspec: ");
3359 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
3361 proto_tree_add_text(flowspec_tree, tvb, offset2, 1,
3362 "Parameter %u - %s",
3364 val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
3365 proto_tree_add_text(flowspec_tree, tvb, offset2+1, 1,
3366 "Parameter %u flags: %x",
3368 tvb_get_guint8(tvb, offset2+1));
3369 proto_tree_add_text(flowspec_tree, tvb, offset2+2, 2,
3370 "Parameter %u data length: %u words, "
3371 "not including header",
3373 tvb_get_ntohs(tvb, offset2+2));
3374 proto_tree_add_text(flowspec_tree, tvb, offset2+4, 4,
3375 "Maximum packet size [M]: %u",
3376 tvb_get_ntohl(tvb, offset2+4));
3377 proto_item_append_text(ti, "Null Service. M=%u",
3378 tvb_get_ntohl(tvb, offset2+4));
3379 proto_item_append_text(ti2, "Max pkt size=%u",
3380 tvb_get_ntohl(tvb, offset2+4));
3384 proto_tree_add_text(rsvp_object_tree, tvb, offset2, param_len*4,
3385 "Unknown parameter %d, %d words",
3386 param_id, param_len);
3389 param_len_processed += param_len;
3390 offset2 += param_len * 4;
3393 /* offset2 += length*4; */
3399 proto_item_set_text(ti, "FLOWSPEC: SONET/SDH, ");
3401 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3402 "C-type: 4 - SONET/SDH");
3403 signal_type = tvb_get_guint8(tvb, offset2);
3404 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
3405 "Signal Type: %d - %s", signal_type,
3406 val_to_str_ext_const(signal_type,
3407 &gmpls_sonet_signal_type_str_ext, "Unknown"));
3408 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
3409 "Requested Concatenation (RCC): %d", tvb_get_guint8(tvb, offset2+1));
3410 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
3411 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_standard_contiguous_concatenation,
3412 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
3413 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_arbitrary_contiguous_concatenation,
3414 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
3415 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3416 "Number of Contiguous Components (NCC): %d", tvb_get_ntohs(tvb, offset2+2));
3417 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
3418 "Number of Virtual Components (NVC): %d", tvb_get_ntohs(tvb, offset2+4));
3419 proto_tree_add_text(rsvp_object_tree, tvb, offset2+6, 2,
3420 "Multiplier (MT): %d", tvb_get_ntohs(tvb, offset2+6));
3421 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
3422 "Transparency (T): 0x%0x", tvb_get_ntohl(tvb, offset2+8));
3423 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
3425 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_regenerator_section,
3426 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3427 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_multiplex_section,
3428 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3429 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_J0_transparency,
3430 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3431 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_SOH_RSOH_DCC_transparency,
3432 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3433 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_LOH_MSOH_DCC_transparency,
3434 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3435 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_LOH_MSOH_extended_DCC_transparency,
3436 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3437 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_K1_K2_transparency,
3438 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3439 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_E1_transparency,
3440 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3441 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_F1_transparency,
3442 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3443 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_E2_transparency,
3444 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3445 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_B1_transparency,
3446 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3447 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_B2_transparency,
3448 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3449 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_M0_transparency,
3450 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3451 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_M1_transparency,
3452 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3454 proto_tree_add_text(rsvp_object_tree, tvb, offset2+12, 4,
3455 "Profile (P): %d", tvb_get_ntohl(tvb, offset2+12));
3457 proto_item_append_text(ti, "Signal [%s], RCC %d, NCC %d, NVC %d, MT %d, Transparency %d, Profile %d",
3458 val_to_str_ext_const(signal_type, &gmpls_sonet_signal_type_str_ext, "Unknown"),
3459 tvb_get_guint8(tvb, offset2+1), tvb_get_ntohs(tvb, offset2+2),
3460 tvb_get_ntohs(tvb, offset2+4), tvb_get_ntohs(tvb, offset2+6),
3461 tvb_get_ntohl(tvb, offset2+8), tvb_get_ntohl(tvb, offset2+12));
3464 case 5: /* FF: G.709 FLOWSPEC, RFC 4328 */
3465 proto_item_set_text(ti, "FLOWSPEC: G.709, ");
3467 proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
3468 "C-type: 5 - G.709");
3469 signal_type = tvb_get_guint8(tvb, offset2);
3470 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
3471 "Signal Type: %d - %s", signal_type,
3472 rval_to_str(signal_type,
3473 gmpls_g709_signal_type_rvals,
3475 proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 2, 2,
3476 "Number of Multiplexed Components (NMC): %d",
3477 tvb_get_ntohs(tvb, offset2 + 2));
3478 proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 2,
3479 "Number of Virtual Components (NVC): %d",
3480 tvb_get_ntohs(tvb, offset2 + 4));
3482 proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 6, 2,
3483 "Multiplier (MT): %d",
3484 tvb_get_ntohs(tvb, offset2 + 6));
3485 proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
3486 rval_to_str(signal_type,
3487 gmpls_g709_signal_type_rvals,
3489 tvb_get_ntohs(tvb, offset2 + 2),
3490 tvb_get_ntohs(tvb, offset2 + 4),
3491 tvb_get_ntohs(tvb, offset2 + 6));
3494 case 6: /* Ethernet FLOWSPEC (RFC6003) */
3495 proto_item_set_text(ti, "FLOWSPEC: Ethernet, ");
3496 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3497 "C-type: 6 - Ethernet");
3498 switch_gran = tvb_get_ntohs(tvb, offset2);
3499 if (switch_gran == 0)
3500 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
3501 "Switching granularity: 0 - Provided in signaling");
3502 else if (switch_gran == 1)
3503 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
3504 "Switching granularity: 1 - Ethernet port");
3505 else if (switch_gran == 2)
3506 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
3507 "Switching granularity: 2 - Ethernet frame");
3509 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
3510 "Switching granularity: %u - ???", switch_gran);
3512 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3513 "MTU: %u", tvb_get_ntohs(tvb, offset2+2));
3515 dissect_rsvp_eth_tspec_tlv(ti, rsvp_object_tree, tvb, offset+8, obj_length-8,
3516 TREE(TT_FLOWSPEC_SUBTREE));
3524 /*------------------------------------------------------------------------------
3526 *------------------------------------------------------------------------------*/
3528 dissect_rsvp_adspec(proto_item *ti, proto_tree *rsvp_object_tree,
3530 int offset, int obj_length,
3531 int rsvp_class _U_, int type)
3533 int offset2 = offset + 4;
3535 proto_tree *adspec_tree;
3537 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3538 "C-type: %u", type);
3539 mylen = obj_length - 4;
3541 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
3542 "Message format version: %u",
3543 tvb_get_guint8(tvb, offset2)>>4);
3544 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3545 "Data length: %u words, not including header",
3546 tvb_get_ntohs(tvb, offset2+2));
3555 service_num = tvb_get_guint8(tvb, offset2);
3556 str = val_to_str_ext_const(service_num, &intsrv_services_str_ext, "Unknown");
3557 break_bit = tvb_get_guint8(tvb, offset2+1);
3558 length = tvb_get_ntohs(tvb, offset2+2);
3559 ti = proto_tree_add_text(rsvp_object_tree, tvb, offset2,
3562 adspec_tree = proto_item_add_subtree(ti,
3563 TREE(TT_ADSPEC_SUBTREE));
3564 proto_tree_add_text(adspec_tree, tvb, offset2, 1,
3565 "Service header %u - %s",
3567 proto_tree_add_text(adspec_tree, tvb, offset2+1, 1,
3569 "Break bit set":"Break bit not set");
3570 proto_tree_add_text(adspec_tree, tvb, offset2+2, 2,
3571 "Data length: %u words, not including header",
3580 id = tvb_get_guint8(tvb, offset2);
3581 phdr_length = tvb_get_ntohs(tvb, offset2+2);
3582 str = try_val_to_str_ext(id, &adspec_params_ext);
3592 /* 32-bit unsigned integer */
3593 proto_tree_add_text(adspec_tree, tvb, offset2,
3595 "%s - %u (type %u, length %u)",
3597 tvb_get_ntohl(tvb, offset2+4),
3603 proto_tree_add_text(adspec_tree, tvb, offset2,
3605 "%s - %.10g (type %u, length %u)",
3607 tvb_get_ntohieee_float(tvb, offset2+4),
3611 proto_tree_add_text(adspec_tree, tvb, offset2,
3613 "%s (type %u, length %u)",
3619 proto_tree_add_text(adspec_tree, tvb, offset2,
3621 "Unknown (type %u, length %u)",
3624 offset2 += (phdr_length+1)<<2;
3625 i -= (phdr_length+1)<<2;
3626 mylen -= (phdr_length+1)<<2;
3631 /*------------------------------------------------------------------------------
3633 *------------------------------------------------------------------------------*/
3635 dissect_rsvp_integrity(proto_item *ti _U_, proto_tree *rsvp_object_tree,
3637 int offset, int obj_length,
3638 int rsvp_class _U_, int type)
3640 int offset2 = offset + 4;
3641 proto_tree *ti2, *rsvp_integ_flags_tree;
3644 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3645 "C-type: %u", type);
3646 flags = tvb_get_guint8(tvb, offset2);
3647 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
3648 "Flags: 0x%02x", flags);
3649 rsvp_integ_flags_tree = proto_item_add_subtree(ti2, TREE(TT_INTEGRITY_FLAGS));
3650 proto_tree_add_item(rsvp_integ_flags_tree, hf_rsvp_integrity_flags_handshake,
3651 tvb, offset2, 1, ENC_BIG_ENDIAN);
3652 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 6,
3653 "Key Identifier: %s", tvb_bytes_to_str(tvb, offset2+2, 6));
3654 proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 8,
3655 "Sequence Number: %" G_GINT64_MODIFIER "u", tvb_get_ntoh64(tvb, offset2+8));
3656 proto_tree_add_text(rsvp_object_tree, tvb, offset2+16, obj_length - 20,
3657 "Hash: %s", tvb_bytes_to_str(tvb, offset2+16, obj_length - 20));
3660 /*------------------------------------------------------------------------------
3662 *------------------------------------------------------------------------------*/
3664 dissect_rsvp_policy(proto_item *ti _U_, proto_tree *rsvp_object_tree,
3666 int offset, int obj_length,
3667 int rsvp_class _U_, int type)
3669 int offset2 = offset + 4;
3671 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3672 "C-type: %u", type);
3673 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
3674 "Data (%d bytes)", obj_length - 4);
3677 /*------------------------------------------------------------------------------
3679 *------------------------------------------------------------------------------*/
3681 dissect_rsvp_label_request(proto_item *ti, proto_tree *rsvp_object_tree,
3683 int offset, int obj_length,
3684 int rsvp_class _U_, int type)
3686 int offset2 = offset + 4;
3687 static const value_string lab_req_type_str[] = {
3689 { 2, "(Label Request with ATM label Range)"},
3690 { 3, "(Label Request with Frame-Relay label Range)"},
3691 { 4, "(Generalized Label Request)"},
3692 { 5, "(Generalized Channel_set Label Request)"},
3695 static value_string_ext lab_req_type_str_ext = VALUE_STRING_EXT_INIT(lab_req_type_str);
3697 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
3698 "C-type: %d %s", type,
3699 val_to_str_ext_const(type, &lab_req_type_str_ext, "Unknown"));
3702 unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
3703 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3704 "L3PID: %s (0x%04x)",
3705 val_to_str_const(l3pid, etype_vals, "Unknown"),
3707 proto_item_set_text(ti, "LABEL REQUEST: Basic: L3PID: %s (0x%04x)",
3708 val_to_str_const(l3pid, etype_vals, "Unknown"),
3714 unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
3715 unsigned short min_vpi, min_vci, max_vpi, max_vci;
3716 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3717 "L3PID: %s (0x%04x)",
3718 val_to_str_const(l3pid, etype_vals, "Unknown"),
3720 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 1,
3721 "M: %s Merge in Data Plane",
3722 (tvb_get_guint8(tvb, offset2+4) & 0x80) ?
3723 "1: Can" : "0: Cannot");
3724 min_vpi = tvb_get_ntohs(tvb, offset2+4) & 0x7f;
3725 min_vci = tvb_get_ntohs(tvb, offset2+6);
3726 max_vpi = tvb_get_ntohs(tvb, offset2+8) & 0x7f;
3727 max_vci = tvb_get_ntohs(tvb, offset2+10);
3728 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
3729 "Min VPI: %d", min_vpi);
3730 proto_tree_add_text(rsvp_object_tree, tvb, offset2+6, 2,
3731 "Min VCI: %d", min_vci);
3732 proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 2,
3733 "Max VPI: %d", max_vpi);
3734 proto_tree_add_text(rsvp_object_tree, tvb, offset2+10, 2,
3735 "Max VCI: %d", max_vci);
3736 proto_item_set_text(ti, "LABEL REQUEST: ATM: L3PID: %s (0x%04x). VPI/VCI: Min: %d/%d, Max: %d/%d. %s Merge. ",
3737 val_to_str_const(l3pid, etype_vals, "Unknown"), l3pid,
3738 min_vpi, min_vci, max_vpi, max_vci,
3739 (tvb_get_guint8(tvb, offset2+4) & 0x80) ? "Can" : "Cannot");
3744 guint16 l3pid = tvb_get_ntohs(tvb, offset2+2);
3745 guint32 min_dlci, max_dlci, dlci_len, dlci_len_code;
3746 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3747 "L3PID: %s (0x%04x)",
3748 val_to_str_const(l3pid, etype_vals, "Unknown"),
3750 dlci_len_code = (tvb_get_ntohs(tvb, offset2+4) & 0x0180) >> 7;
3751 min_dlci = tvb_get_ntohl(tvb, offset2+4) & 0x7fffff;
3752 max_dlci = tvb_get_ntohl(tvb, offset2+8) & 0x7fffff;
3753 switch(dlci_len_code) {
3769 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
3770 "DLCI Length: %s (%d)",
3771 (dlci_len==10) ? "10 bits" :
3772 (dlci_len==23) ? "23 bits" :
3773 "INVALID", dlci_len_code);
3774 proto_tree_add_text(rsvp_object_tree, tvb, offset2+5, 3,
3775 "Min DLCI: %d", min_dlci);
3776 proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 2,
3777 "Max DLCI: %d", max_dlci);
3778 proto_item_set_text(ti, "LABEL REQUEST: Frame: L3PID: %s (0x%04x). DLCI Len: %s. Min DLCI: %d. Max DLCI: %d",
3779 val_to_str_const(l3pid, etype_vals, "Unknown"), l3pid,
3780 (dlci_len==10) ? "10 bits" :
3781 (dlci_len==23) ? "23 bits" :
3782 "INVALID", min_dlci, max_dlci);
3787 unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
3788 unsigned char lsp_enc = tvb_get_guint8(tvb,offset2);
3789 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
3790 "LSP Encoding Type: %s",
3791 rval_to_str(lsp_enc, gmpls_lsp_enc_rvals, "Unknown (%d)"));
3792 proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
3793 "Switching Type: %s",
3794 rval_to_str(tvb_get_guint8(tvb,offset2+1),
3795 gmpls_switching_type_rvals, "Unknown (%d)"));
3796 proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
3797 "G-PID: %s (0x%0x)",
3798 rval_to_str(l3pid, gmpls_gpid_rvals,
3799 val_to_str(l3pid, etype_vals,
3800 "Unknown G-PID(0x%04x)")),
3802 proto_item_set_text(ti, "LABEL REQUEST: Generalized: LSP Encoding=%s, "
3803 "Switching Type=%s, G-PID=%s ",
3804 rval_to_str(lsp_enc, gmpls_lsp_enc_rvals, "Unknown (%d)"),
3805 rval_to_str(tvb_get_guint8(tvb,offset2+1),
3806 gmpls_switching_type_rvals, "Unknown (%d)"),
3807 rval_to_str(l3pid, gmpls_gpid_rvals,
3808 val_to_str(l3pid, etype_vals,
3809 "Unknown (0x%04x)")));
3814 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
3815 "Data (%d bytes)", obj_length - 4);
3817 } /* switch(type) */
3820 /*-----------------------------------------------------------------------------
3822 *---------------------------------------------------------------------------*/
3825 FF: G.694 lambda label, see draft-ietf-ccamp-gmpls-g-694-lambda-labels-05
3828 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
3829 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3830 |Grid | C.S | Reserved | n |
3831 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3834 dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
3839 guint32 wavelength = 0;
3840 float cs_thz = 0.0f;
3842 guint8 grid = ((tvb_get_guint8(tvb, offset) & 0xE0) >> 5);
3843 guint8 cs = ((tvb_get_guint8(tvb, offset) & 0x1E) >> 1);
3844 gint16 n = tvb_get_ntohs(tvb, offset + 2);
3847 /* DWDM grid: Frequency (THz) = 193.1 THz + n * channel spacing (THz) */
3854 freq = 193.1f + (n * cs_thz);
3855 proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
3856 "Wavelength Label: "
3858 "channel spacing=%s, "
3863 /* channel spacing */
3864 cs == 1 ? "100GHz" :
3867 cs == 4 ? "12.5GHz" :
3873 proto_item_append_text(ti, ": Wavelength: "
3875 "channel spacing=%s, "
3879 cs == 1 ? "100GHz" :
3882 cs == 4 ? "12.5GHz" :
3886 } else if (grid == 2) {
3887 /* CWDM grid: Wavelength (nm) = 1471 nm + n * 20 nm */
3888 wavelength = 1471 + (n * 20);
3889 proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
3890 "Wavelength Label: "
3892 "channel spacing=%s, "
3897 /* channel spacing */
3904 proto_item_append_text(ti, ": Wavelength: "
3906 "channel spacing=%s, "
3916 proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
3917 "Wavelength Label: "
3919 "channel spacing=%u, "
3922 proto_item_append_text(ti, ": Wavelength: "
3924 "channel spacing=%u, "
3932 FF: SONET/SDH label, see RFC 4606
3935 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
3936 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3937 | S | U | K | L | M |
3938 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3941 dissect_glabel_sdh(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
3945 guint16 s = tvb_get_ntohs(tvb, offset);
3946 guint8 u = ((tvb_get_guint8(tvb, offset + 2) & 0xF0) >> 4);
3947 guint8 k = ((tvb_get_guint8(tvb, offset + 2) & 0x0F) >> 0);
3948 guint8 l = ((tvb_get_guint8(tvb, offset + 3) & 0xF0) >> 4);
3949 guint8 m = ((tvb_get_guint8(tvb, offset + 3) & 0x0F) >> 0);
3951 proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
3959 proto_item_append_text(ti, ": SONET/SDH: "
3969 FF: G.709 label (aka ODUk label), see RFC 4328
3972 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
3973 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3974 | Reserved | t3 | t2 |t1
3975 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3978 dissect_glabel_g709(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
3982 guint8 t2 = ((tvb_get_guint8(tvb, offset + 3) & 0x0E) >> 1);
3983 guint8 t1 = ((tvb_get_guint8(tvb, offset + 3) & 0x01) >> 0);
3985 guint8 t3 = ((tvb_get_guint8(tvb, offset + 2) & 0x03) << 4);
3986 t3 |= ((tvb_get_guint8(tvb, offset + 3) & 0xF0) >> 4);
3988 proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
3989 "G.709 ODUk Label: "
3994 proto_item_append_text(ti, ": G.709 ODUk: "
4002 dissect_rsvp_label(proto_tree *ti, proto_tree *rsvp_object_tree,
4004 int offset, int obj_length,
4005 int rsvp_class, int type)
4007 int offset2 = offset + 4;
4011 name = (rsvp_class==RSVP_CLASS_SUGGESTED_LABEL ? "SUGGESTED LABEL":
4012 (rsvp_class==RSVP_CLASS_UPSTREAM_LABEL ? "UPSTREAM LABEL":
4013 (rsvp_class==RSVP_CLASS_RECOVERY_LABEL ? "RECOVERY LABEL":
4015 mylen = obj_length - 4;
4018 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4019 "C-type: 1 (Packet Label)");
4020 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
4022 tvb_get_ntohl(tvb, offset2));
4023 proto_item_set_text(ti, "%s: %u", name,
4024 tvb_get_ntohl(tvb, offset2));
4028 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4029 "C-type: 2 (Generalized Label)");
4030 if (rsvp_generalized_label_option == 1) {
4031 /* FF: no generalized label interpretation */
4032 proto_item_set_text(ti, "%s: Generalized: ", name);
4033 for (i = 0; i < mylen; i += 4) {
4034 proto_tree_add_text(rsvp_object_tree, tvb, offset2+i, 4,
4035 "Generalized Label: %u (0x%x)",
4036 tvb_get_ntohl(tvb, offset2+i),
4037 tvb_get_ntohl(tvb, offset2+i));
4039 proto_item_append_text(ti, "0x%x%s",
4040 tvb_get_ntohl(tvb, offset2+i),
4042 } else if (i == 16) {
4043 proto_item_append_text(ti, "...");
4046 } else if (rsvp_generalized_label_option == 2) {
4047 dissect_glabel_sdh(ti, rsvp_object_tree, tvb, offset2);
4048 } else if (rsvp_generalized_label_option == 4) {
4049 dissect_glabel_g709(ti, rsvp_object_tree, tvb, offset2);
4050 } else if (rsvp_generalized_label_option == 3) {
4051 dissect_glabel_lambda(ti, rsvp_object_tree, tvb, offset2);
4056 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4057 "C-type: 4 (Generalized Channel_set)");
4058 proto_item_append_text(ti, ": Generalized Channel_set");
4059 proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
4060 "Data (%d bytes)", mylen);
4064 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4065 "C-type: Unknown (%u)", type);
4066 proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
4067 "Data (%d bytes)", mylen);
4071 /*------------------------------------------------------------------------------
4073 *------------------------------------------------------------------------------*/
4075 dissect_rsvp_label_set(proto_item *ti, proto_tree *rsvp_object_tree,
4077 int offset, int obj_length,
4078 int rsvp_class _U_, int type)
4080 int offset2 = offset + 8;
4084 static const value_string action_type_vals[] = {
4085 { 0, "Inclusive list"},
4086 { 1, "Exclusive list"},
4087 { 2, "Inclusive range"},
4088 { 3, "Exclusive range"},
4091 static value_string_ext action_type_vals_ext = VALUE_STRING_EXT_INIT(action_type_vals);
4093 len = obj_length - 8;
4094 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1, "C-type: %u", type);
4095 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1, "Action: %s",
4096 val_to_str_ext(tvb_get_guint8(tvb, offset+4),
4097 &action_type_vals_ext, "Unknown (%u)"));
4098 proto_item_append_text(ti, ": %s",
4099 val_to_str_ext(tvb_get_guint8(tvb, offset+4),
4100 &action_type_vals_ext, "Unknown (%u)"));
4101 label_type = tvb_get_guint8 (tvb, offset+7);
4102 proto_tree_add_text(rsvp_object_tree, tvb, offset+7, 1, "Label type: %s",
4103 (label_type == 1) ? "Packet Label" : "Generalized Label");
4104 proto_item_append_text(ti, ", %s",
4105 (label_type == 1) ? "Packet Label: " : "Generalized Label: ");
4107 for (i = 0; i < len/4; i++) {
4108 proto_tree_add_text(rsvp_object_tree, tvb, offset2+i*4, 4,
4109 "Subchannel %u: %u (0x%x)", i+1,
4110 tvb_get_ntohl(tvb, offset2+i*4),
4111 tvb_get_ntohl(tvb, offset2+i*4));
4115 proto_item_append_text(ti, ", ");
4117 proto_item_append_text(ti, "%u",
4118 tvb_get_ntohl(tvb, offset2+i*4));
4123 /*------------------------------------------------------------------------------
4125 *------------------------------------------------------------------------------*/
4127 dissect_rsvp_session_attribute(proto_item *ti, proto_tree *rsvp_object_tree,
4129 int offset, int obj_length,
4130 int rsvp_class _U_, int type)
4132 int offset2 = offset + 4;
4135 proto_tree *ti2, *rsvp_sa_flags_tree;
4141 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4142 "C-type: %u - IPv4 LSP (%sResource Affinities)",
4143 type, (type == 1) ? "" : "No ");
4146 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
4147 "Exclude-Any: 0x%0x", tvb_get_ntohl(tvb, offset2));
4148 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
4149 "Include-Any: 0x%0x", tvb_get_ntohl(tvb, offset2+4));
4150 proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
4151 "Include-All: 0x%0x", tvb_get_ntohl(tvb, offset2+8));
4152 offset2 = offset2+12;
4155 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
4156 "Setup priority: %u",
4157 tvb_get_guint8(tvb, offset2));
4158 proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
4159 "Hold priority: %u",
4160 tvb_get_guint8(tvb, offset2+1));
4161 flags = tvb_get_guint8(tvb, offset2+2);
4162 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 1,
4163 "Flags: 0x%02x", flags);
4164 rsvp_sa_flags_tree = proto_item_add_subtree(ti2,
4165 TREE(TT_SESSION_ATTRIBUTE_FLAGS));
4166 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_local,
4167 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4168 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_label,
4169 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4170 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_se_style,
4171 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4172 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_bandwidth,
4173 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4174 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_node,
4175 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4177 name_len = tvb_get_guint8(tvb, offset2+3);
4178 proto_tree_add_text(rsvp_object_tree, tvb, offset2+3, 1,
4179 "Name length: %u", name_len);
4180 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, name_len,
4182 tvb_format_text(tvb, offset2+4, name_len));
4184 proto_item_set_text(ti, "SESSION ATTRIBUTE: SetupPrio %d, HoldPrio %d, %s%s%s%s%s [%s]",
4185 tvb_get_guint8(tvb, offset2),
4186 tvb_get_guint8(tvb, offset2+1),
4187 flags &0x01 ? "Local Protection, " : "",
4188 flags &0x02 ? "Label Recording, " : "",
4189 flags &0x04 ? "SE Style, " : "",
4190 flags &0x08 ? "Bandwidth Protection, " : "",
4191 flags &0x10 ? "Node Protection, " : "",
4192 name_len ? tvb_format_text(tvb, offset2+4, name_len) : "");
4196 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4197 "C-type: Unknown (%u)",
4199 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
4200 "Data (%d bytes)", obj_length - 4);
4205 /*------------------------------------------------------------------------------
4206 * EXPLICIT ROUTE AND RECORD ROUTE SUBOBJECTS,
4207 * RFC 3209, RFC 3473, RFC 5420, RFC 4873, RFC 5553
4208 *------------------------------------------------------------------------------*/
4210 dissect_rsvp_ero_rro_subobjects(proto_tree *ti, proto_tree *rsvp_object_tree,
4212 int offset, int obj_length, int rsvp_class)
4214 int i, j, k, l, flags;
4215 proto_tree *ti2, *rsvp_ro_subtree, *rsvp_rro_flags_subtree;
4218 switch(rsvp_class) {
4219 case RSVP_CLASS_EXPLICIT_ROUTE:
4220 tree_type = TREE(TT_EXPLICIT_ROUTE_SUBOBJ);
4222 case RSVP_CLASS_RECORD_ROUTE:
4223 tree_type = TREE(TT_RECORD_ROUTE_SUBOBJ);
4230 for (i=1, l = 0; l < obj_length - 4; i++) {
4231 j = tvb_get_guint8(tvb, offset+l) & 0x7f;
4234 k = tvb_get_guint8(tvb, offset+l) & 0x80;
4235 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
4237 "IPv4 Subobject - %s%s",
4238 tvb_ip_to_str(tvb, offset+l+2),
4239 rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE ?
4240 (k ? ", Loose" : ", Strict") : "");
4242 proto_item_add_subtree(ti2, tree_type);
4243 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
4244 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4245 k ? "Loose Hop " : "Strict Hop");
4246 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4248 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4250 tvb_get_guint8(tvb, offset+l+1));
4251 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 4,
4253 tvb_ip_to_str(tvb, offset+l+2));
4254 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+6, 1,
4255 "Prefix length: %u",
4256 tvb_get_guint8(tvb, offset+l+6));
4258 proto_item_append_text(ti, "IPv4 %s%s",
4259 tvb_ip_to_str(tvb, offset+l+2),
4262 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
4263 flags = tvb_get_guint8(tvb, offset+l+7);
4265 proto_item_append_text(ti, " (Node-id)");
4266 proto_item_append_text(ti2, " (Node-id)");
4268 if (flags&0x01) proto_item_append_text(ti2, ", Local Protection Available");
4269 if (flags&0x02) proto_item_append_text(ti2, ", Local Protection In Use");
4270 if (flags&0x04) proto_item_append_text(ti2, ", Backup BW Avail");
4271 if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
4272 ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+7, 1,
4273 "Flags: 0x%02x", flags);
4274 rsvp_rro_flags_subtree =
4275 proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
4276 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_avail,
4277 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
4278 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_in_use,
4279 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
4280 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_bandwidth,
4281 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
4282 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_node,
4283 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
4284 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_node_address,
4285 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
4291 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
4295 proto_item_add_subtree(ti2, tree_type);
4296 k = tvb_get_guint8(tvb, offset+l) & 0x80;
4297 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
4298 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4299 k ? "Loose Hop " : "Strict Hop");
4300 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4302 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4304 tvb_get_guint8(tvb, offset+l+1));
4305 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 16,
4307 tvb_ip6_to_str(tvb, offset+l+2));
4308 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+18, 1,
4309 "Prefix length: %u",
4310 tvb_get_guint8(tvb, offset+l+18));
4312 proto_item_append_text(ti, "IPv6 [...]%s", k ? " [L]":"");
4314 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
4315 flags = tvb_get_guint8(tvb, offset+l+19);
4317 proto_item_append_text(ti, " (Node-id)");
4318 proto_item_append_text(ti2, " (Node-id)");
4320 if (flags&0x01) proto_item_append_text(ti2, ", Local Protection Available");
4321 if (flags&0x02) proto_item_append_text(ti2, ", Local Protection In Use");
4322 if (flags&0x04) proto_item_append_text(ti2, ", Backup BW Avail");
4323 if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
4324 ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+19, 1,
4325 "Flags: 0x%02x", flags);
4326 rsvp_rro_flags_subtree =
4327 proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
4329 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_avail,
4330 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
4331 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_in_use,
4332 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
4333 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_backup_tunnel_bandwidth,
4334 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
4335 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_backup_tunnel_hop,
4336 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
4337 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_node_address,
4338 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
4344 case 3: /* Label RFC 3477 */
4345 k = tvb_get_guint8(tvb, offset+l) & 0x80;
4346 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
4348 "Label Subobject - %d, %s",
4349 tvb_get_ntohl(tvb, offset+l+4),
4350 rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE ?
4351 (k ? "Loose" : "Strict") : "");
4353 proto_item_add_subtree(ti2, tree_type);
4354 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
4355 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4356 k ? "Loose Hop " : "Strict Hop");
4357 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4359 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4361 tvb_get_guint8(tvb, offset+l+1));
4362 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
4363 flags = tvb_get_guint8(tvb, offset+l+2);
4364 if (flags&0x01) proto_item_append_text(ti2, "The label will be understood if received on any interface");
4365 ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 1,
4366 "Flags: 0x%02x", flags);
4367 rsvp_rro_flags_subtree =
4368 proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
4370 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_global_label,
4371 tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
4373 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+3, 1,
4375 tvb_get_guint8(tvb, offset+l+3));
4376 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+4, 4,
4378 tvb_get_ntohl(tvb, offset+l+4));
4380 proto_item_append_text(ti, "Label %d%s",
4381 tvb_get_ntohl(tvb, offset+l+4),
4386 case 4: /* Unnumbered Interface-ID RFC 3477, RFC 6107*/
4387 k = tvb_get_guint8(tvb, offset+l) & 0x80;
4388 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
4390 "Unnumbered Interface-ID - %s, %d, %s",
4391 tvb_ip_to_str(tvb, offset+l+4),
4392 tvb_get_ntohl(tvb, offset+l+8),
4393 rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE ?
4394 (k ? "Loose" : "Strict") : "");
4396 proto_item_add_subtree(ti2, tree_type);
4397 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
4398 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4399 k ? "Loose Hop " : "Strict Hop");
4400 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4401 "Type: 4 (Unnumbered Interface-ID)");
4402 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4404 tvb_get_guint8(tvb, offset+l+1));
4405 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
4406 flags = tvb_get_guint8(tvb, offset+l+2);
4407 if (flags&0x01) proto_item_append_text(ti2, ", Local Protection Available");
4408 if (flags&0x02) proto_item_append_text(ti2, ", Local Protection In Use");
4409 ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 1,
4410 "Flags: 0x%02x", flags);
4411 rsvp_rro_flags_subtree =
4412 proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
4413 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_avail,
4414 tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
4415 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_in_use,
4416 tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
4418 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+4, 4,
4420 tvb_ip_to_str(tvb, offset+l+4));
4421 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+8, 4,
4423 tvb_get_ntohl(tvb, offset+l+8));
4425 proto_item_append_text(ti, "Unnum %s/%d%s",
4426 tvb_ip_to_str(tvb, offset+l+4),
4427 tvb_get_ntohl(tvb, offset+l+8),
4433 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) goto defaultsub;
4434 k = tvb_get_ntohs(tvb, offset+l+2);
4435 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
4437 "Autonomous System %u",
4440 proto_item_add_subtree(ti2, tree_type);
4441 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4442 "Type: 32 (Autonomous System Number)");
4443 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4445 tvb_get_guint8(tvb, offset+l+1));
4446 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 2,
4447 "Autonomous System %u", k);
4449 proto_item_append_text(ti, "AS %d",
4450 tvb_get_ntohs(tvb, offset+l+2));
4454 case 64: /* PKSv4 - RFC5520 */
4455 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) goto defaultsub;
4456 k = tvb_get_ntohs(tvb, offset+l+2);
4457 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
4459 "Path Key subobject - %s, %u",
4460 tvb_ip_to_str(tvb, offset+l+4),
4463 proto_item_add_subtree(ti2, tree_type);
4464 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4465 "Type: 64 (Path Key with IPv4 PCE-ID)");
4466 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4468 tvb_get_guint8(tvb, offset+l+1));
4469 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 2,
4471 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+4, 4,
4473 tvb_ip_to_str(tvb, offset+l+4));
4475 proto_item_append_text(ti, "Path Key %d", k);
4479 case 65: /* PKSv6 - RFC5520 */
4480 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) goto defaultsub;
4481 k = tvb_get_ntohs(tvb, offset+l+2);
4482 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
4484 "Path Key subobject - %s, %u",
4485 tvb_ip6_to_str(tvb, offset+l+4),
4488 proto_item_add_subtree(ti2, tree_type);
4489 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4490 "Type: 65 (Path Key with IPv6 PCE-ID)");
4491 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4493 tvb_get_guint8(tvb, offset+l+1));
4494 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 2,
4496 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+4, 4,
4498 tvb_ip6_to_str(tvb, offset+l+4));
4500 proto_item_append_text(ti, "Path Key %d", k);
4509 * FF: Types 124 through 127 are to be reserved for Vendor
4510 * Private Use (see RFC 3936, Section 2.3.1) in case of
4511 * EXPLICIT_ROUTE (aka ERO).
4513 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE)
4524 * FF: Types 252 through 255 are to be reserved for Vendor
4525 * Private Use (see RFC 3936, Section 2.3.1) in case of
4526 * RECORD_ROUTE (aka RRO).
4528 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
4534 privatesub: /* Private subobject */
4536 * FF: The first four octets of the sub-object contents of
4537 * a Vendor Private sub-object of an EXPLICIT_ROUTE or
4538 * RECORD_ROUTE object MUST be that vendor's SMI enterprise
4539 * code in network octet order.
4542 guint8 private_so_len = tvb_get_guint8(tvb, offset+l+1);
4543 k = tvb_get_guint8(tvb, offset+l) & 0x80;
4544 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset+l,
4545 tvb_get_guint8(tvb, offset+l+1),
4546 "Private Subobject: %d", j);
4548 proto_item_add_subtree(ti2, tree_type);
4549 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4550 k ? "Loose Hop " : "Strict Hop");
4551 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4552 "Type: %u (Private)", j);
4553 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4557 proto_tree_add_item(rsvp_ro_subtree,
4558 hf_rsvp_filter[RSVPF_ENT_CODE],
4559 tvb, offset+l+4, 4, ENC_BIG_ENDIAN);
4560 if (private_so_len > 8) {
4561 /* some private data */
4562 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+8,
4565 private_so_len - 8);
4570 default: /* Unknown subobject */
4572 k = tvb_get_guint8(tvb, offset+l) & 0x80;
4573 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
4575 tvb_get_guint8(tvb, offset+l+1),
4576 "Unknown subobject: %d", j);
4578 proto_item_add_subtree(ti2, tree_type);
4579 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4580 k ? "Loose Hop " : "Strict Hop");
4581 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
4582 "Type: %u (Unknown)", j);
4583 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4585 tvb_get_guint8(tvb, offset+l+1));
4589 if (tvb_get_guint8(tvb, offset+l+1) < 1) {
4590 proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
4591 "Invalid length: %u", tvb_get_guint8(tvb, offset+l+1));
4594 l += tvb_get_guint8(tvb, offset+l+1);
4595 if (l < obj_length - 4) {
4597 proto_item_append_text(ti, ", ");
4599 proto_item_append_text(ti, "...");
4604 /*------------------------------------------------------------------------------
4605 * EXPLICIT ROUTE OBJECT
4606 *------------------------------------------------------------------------------*/
4608 dissect_rsvp_explicit_route(proto_item *ti, proto_tree *rsvp_object_tree,
4610 int offset, int obj_length,
4611 int rsvp_class, int type)
4615 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4617 proto_item_set_text(ti, "EXPLICIT ROUTE: ");
4619 dissect_rsvp_ero_rro_subobjects(ti, rsvp_object_tree, tvb,
4620 offset + 4, obj_length, rsvp_class);
4624 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4625 "C-type: Unknown (%u)",
4627 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
4628 "Data (%d bytes)", obj_length - 4);
4633 /*------------------------------------------------------------------------------
4634 * RECORD ROUTE OBJECT
4635 *------------------------------------------------------------------------------*/
4637 dissect_rsvp_record_route(proto_item *ti, proto_tree *rsvp_object_tree,
4639 int offset, int obj_length,
4640 int rsvp_class, int type)
4642 proto_item_set_text(ti, "RECORD ROUTE: ");
4645 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4648 dissect_rsvp_ero_rro_subobjects(ti, rsvp_object_tree, tvb,
4649 offset + 4, obj_length, rsvp_class);
4653 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4654 "C-type: Unknown (%u)",
4656 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
4657 "Data (%d bytes)", obj_length - 4);
4662 /*------------------------------------------------------------------------------
4664 *------------------------------------------------------------------------------*/
4666 dissect_rsvp_message_id(proto_tree *ti, proto_tree *rsvp_object_tree,
4668 int offset, int obj_length,
4669 int rsvp_class _U_, int type)
4671 int offset2 = offset + 4;
4675 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4677 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
4678 "Flags: %d", tvb_get_guint8(tvb, offset+4));
4679 proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 3,
4680 "Epoch: %d", tvb_get_ntoh24(tvb, offset+5));
4681 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
4682 "Message-ID: %d", tvb_get_ntohl(tvb, offset+8));
4683 proto_item_set_text(ti, "MESSAGE-ID: %d %s",
4684 tvb_get_ntohl(tvb, offset+8),
4685 tvb_get_guint8(tvb, offset+4) & 1 ? "(Ack Desired)" : "");
4689 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4690 "C-type: Unknown (%u)",
4692 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
4693 "Data (%d bytes)", obj_length - 4);
4698 /*------------------------------------------------------------------------------
4700 *------------------------------------------------------------------------------*/
4702 dissect_rsvp_message_id_ack(proto_tree *ti, proto_tree *rsvp_object_tree,
4704 int offset, int obj_length,
4705 int rsvp_class _U_, int type)
4707 int offset2 = offset + 4;
4711 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4713 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
4714 "Flags: %d", tvb_get_guint8(tvb, offset+4));
4715 proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 3,
4716 "Epoch: %d", tvb_get_ntoh24(tvb, offset+5));
4717 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
4718 "Message-ID: %d", tvb_get_ntohl(tvb, offset+8));
4719 proto_item_set_text(ti, "MESSAGE-ID ACK: %d", tvb_get_ntohl(tvb, offset+8));
4723 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4725 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
4726 "Flags: %d", tvb_get_guint8(tvb, offset+4));
4727 proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 3,
4728 "Epoch: %d", tvb_get_ntoh24(tvb, offset+5));
4729 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
4730 "Message-ID: %d", tvb_get_ntohl(tvb, offset+8));
4731 proto_item_set_text(ti, "MESSAGE-ID NACK: %d", tvb_get_ntohl(tvb, offset+8));
4735 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4736 "C-type: Unknown (%u)",
4738 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
4739 "Data (%d bytes)", obj_length - 4);
4744 /*------------------------------------------------------------------------------
4746 *------------------------------------------------------------------------------*/
4748 dissect_rsvp_message_id_list(proto_tree *ti, proto_tree *rsvp_object_tree,
4750 int offset, int obj_length,
4751 int rsvp_class _U_, int type)
4753 int offset2 = offset + 4;
4758 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4760 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
4761 "Flags: %d", tvb_get_guint8(tvb, offset+4));
4762 proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 3,
4763 "Epoch: %d", tvb_get_ntoh24(tvb, offset+5));
4764 for (mylen = 8; mylen < obj_length; mylen += 4)
4765 proto_tree_add_text(rsvp_object_tree, tvb, offset+mylen, 4,
4766 "Message-ID: %d", tvb_get_ntohl(tvb, offset+mylen));
4767 proto_item_set_text(ti, "MESSAGE-ID LIST: %d IDs",
4768 (obj_length - 8)/4);
4772 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4773 "C-type: Unknown (%u)",
4775 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
4776 "Data (%d bytes)", obj_length - 4);
4781 /*------------------------------------------------------------------------------
4783 *------------------------------------------------------------------------------*/
4785 dissect_rsvp_hello(proto_tree *ti, proto_tree *rsvp_object_tree,
4787 int offset, int obj_length _U_,
4788 int rsvp_class _U_, int type)
4793 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4794 "C-Type: %d - HELLO %s object",
4795 tvb_get_guint8 (tvb, offset+3),
4796 type==1 ? "REQUEST" : "ACK");
4797 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
4798 "Source Instance: 0x%x",tvb_get_ntohl(tvb, offset+4));
4799 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
4800 "Destination Instance: 0x%x",tvb_get_ntohl(tvb, offset+8));
4801 proto_item_append_text(ti, ": %s. Src Instance: 0x%0x. Dest Instance: 0x%0x. ",
4802 type==1 ? "REQUEST" : "ACK",
4803 tvb_get_ntohl(tvb, offset+4),
4804 tvb_get_ntohl(tvb, offset+8));
4807 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4808 "C-Type: %d - UNKNOWN", type);
4813 /*------------------------------------------------------------------------------
4815 *------------------------------------------------------------------------------*/
4817 dissect_rsvp_dclass(proto_tree *ti, proto_tree *rsvp_object_tree,
4819 int offset, int obj_length,
4820 int rsvp_class _U_, int type)
4822 int offset2 = offset + 4;
4825 proto_item_set_text(ti, "DCLASS: ");
4828 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4830 for (mylen = 4; mylen < obj_length; mylen += 4) {
4831 proto_tree_add_text(rsvp_object_tree, tvb, offset+mylen+3, 1,
4833 val_to_str_ext(tvb_get_guint8(tvb, offset+mylen+3),
4834 &dscp_vals_ext, "Unknown (%d)"));
4835 proto_item_append_text(ti, "%d%s",
4836 tvb_get_guint8(tvb, offset+mylen+3)>>2,
4837 mylen==obj_length-4 ? "":
4839 mylen==16 ? ", ..." : "");
4844 mylen = obj_length - 4;
4845 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4846 "C-type: Unknown (%u)",
4848 proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
4849 "Data (%d bytes)", mylen);
4854 /*------------------------------------------------------------------------------
4855 * ADMINISTRATIVE STATUS
4856 *------------------------------------------------------------------------------*/
4858 dissect_rsvp_admin_status(proto_tree *ti, proto_tree *rsvp_object_tree,
4860 int offset, int obj_length,
4861 int rsvp_class _U_, int type)
4863 int offset2 = offset + 4;
4864 proto_tree *ti2, *rsvp_admin_subtree;
4867 proto_item_set_text(ti, "ADMIN STATUS: ");
4870 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4872 status = tvb_get_ntohl(tvb, offset2);
4873 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
4874 "Admin Status: 0x%08x", status);
4875 rsvp_admin_subtree =
4876 proto_item_add_subtree(ti2, TREE(TT_ADMIN_STATUS_FLAGS));
4878 proto_tree_add_boolean(rsvp_admin_subtree,
4879 hf_rsvp_filter[RSVPF_ADMIN_STATUS_REFLECT],
4880 tvb, offset2, 4, status);
4881 proto_tree_add_boolean(rsvp_admin_subtree,
4882 hf_rsvp_filter[RSVPF_ADMIN_STATUS_HANDOVER],
4883 tvb, offset2, 4, status);
4884 proto_tree_add_boolean(rsvp_admin_subtree,
4885 hf_rsvp_filter[RSVPF_ADMIN_STATUS_LOCKOUT],
4886 tvb, offset2, 4, status);
4887 proto_tree_add_boolean(rsvp_admin_subtree,
4888 hf_rsvp_filter[RSVPF_ADMIN_STATUS_INHIBIT],
4889 tvb, offset2, 4, status);
4890 proto_tree_add_boolean(rsvp_admin_subtree,
4891 hf_rsvp_filter[RSVPF_ADMIN_STATUS_CALL_MGMT],
4892 tvb, offset2, 4, status);
4893 proto_tree_add_boolean(rsvp_admin_subtree,
4894 hf_rsvp_filter[RSVPF_ADMIN_STATUS_TESTING],
4895 tvb, offset2, 4, status);
4896 proto_tree_add_boolean(rsvp_admin_subtree,
4897 hf_rsvp_filter[RSVPF_ADMIN_STATUS_DOWN],
4898 tvb, offset2, 4, status);
4899 proto_tree_add_boolean(rsvp_admin_subtree,
4900 hf_rsvp_filter[RSVPF_ADMIN_STATUS_DELETE],
4901 tvb, offset2, 4, status);
4902 proto_item_set_text(ti, "ADMIN-STATUS: %s%s%s%s%s%s%s%s",
4903 (status & (1<<31)) ? "Reflect " : "",
4904 (status & (1<<6)) ? "Handover " : "",
4905 (status & (1<<5)) ? "Lockout " : "",
4906 (status & (1<<4)) ? "Inhibit " : "",
4907 (status & (1<<3)) ? "Call " : "",
4908 (status & (1<<2)) ? "Testing " : "",
4909 (status & (1<<1)) ? "Admin-Down " : "",
4910 (status & (1<<0)) ? "Deleting " : "");
4914 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4915 "C-type: Unknown (%u)",
4917 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
4918 "Data (%d bytes)", obj_length - 4);
4923 /*------------------------------------------------------------------------------
4925 *------------------------------------------------------------------------------*/
4927 dissect_rsvp_lsp_attributes(proto_tree *ti, proto_tree *rsvp_object_tree,
4928 tvbuff_t *tvb, int offset, int obj_length,
4929 int rsvp_class _U_, int type)
4933 guint16 tlv_type, tlv_len;
4934 proto_tree *ti2, *rsvp_lsp_attr_subtree;
4936 if (rsvp_class == RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES)
4937 proto_item_set_text(ti, "LSP REQUIRED ATTRIBUTES: ");
4939 proto_item_set_text(ti, "LSP ATTRIBUTES: ");
4943 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4945 for (tlv_off = 4; tlv_off < obj_length-4; ) {
4946 tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
4947 tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);
4949 if ((tlv_len == 0) || (tlv_off+tlv_len > (obj_length-4))) {
4950 proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off+2, 2,
4956 attributes = tvb_get_ntohl(tvb, offset+tlv_off+4);
4957 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, tlv_len,
4958 "LSP attributes TLV: 0x%08x", attributes);
4959 rsvp_lsp_attr_subtree = proto_item_add_subtree(ti2, TREE(TT_LSP_ATTRIBUTES_FLAGS));
4960 proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_e2e,
4961 tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
4962 proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_boundary,
4963 tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
4964 proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_segment,
4965 tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
4966 proto_item_append_text(ti, "LSP Attribute:%s%s%s",
4967 (attributes & 0x01) ? " End-to-end re-routing" : "",
4968 (attributes & 0x02) ? " Boundary re-routing" : "",
4969 (attributes & 0x04) ? " Segment-based re-routing" : "");
4973 proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, tlv_len,
4982 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
4983 "C-type: Unknown (%u)",
4985 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
4986 "Data (%d bytes)", obj_length - 4);
4991 /*------------------------------------------------------------------------------
4993 *------------------------------------------------------------------------------*/
4995 dissect_rsvp_association(proto_tree *ti, proto_tree *rsvp_object_tree,
4997 int offset, int obj_length,
4998 int rsvp_class _U_, int type)
5000 guint16 association_type;
5001 guint16 association_id;
5003 static const value_string association_type_vals[] = {
5006 { 2, "Resource Sharing"},
5007 { 3, "Segment Recovery"},
5008 { 4, "Inter-domain Recovery"},
5011 static value_string_ext association_type_vals_ext = VALUE_STRING_EXT_INIT(association_type_vals);
5013 proto_item_set_text(ti, "ASSOCIATION ");
5014 association_type = tvb_get_ntohs (tvb, offset + 4);
5015 association_id = tvb_get_ntohs (tvb, offset + 6);
5018 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5019 "C-type: 1 (IPv4)");
5020 proto_item_append_text(ti, "(IPv4): ");
5021 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 2,
5022 "Association type: %s",
5023 val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
5024 proto_item_append_text(ti, "%s. ",
5025 val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
5026 proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 2,
5027 "Association ID: %u", association_id);
5028 proto_item_append_text(ti, "ID: %u. ", association_id);
5029 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
5030 "Association source: %s", tvb_ip_to_str(tvb, offset+8));
5031 proto_item_append_text(ti, "Src: %s", tvb_ip_to_str(tvb, offset+8));
5035 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5036 "C-type: 2 (IPv6)");
5037 proto_item_append_text(ti, "(IPv6): ");
5038 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 2,
5039 "Association type: %s",
5040 val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
5041 proto_item_append_text(ti, "%s. ",
5042 val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
5043 proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 2,
5044 "Association ID: %u", association_id);
5045 proto_item_append_text(ti, "ID: %u. ", association_id);
5046 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 16,
5047 "Association source: %s", tvb_ip6_to_str(tvb, offset+8));
5048 proto_item_append_text(ti, "Src: %s", tvb_ip6_to_str(tvb, offset+8));
5051 case 4: /* oif2008.389 */
5052 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5053 "C-type: 4 (Routing Area)");
5054 proto_item_append_text(ti, "(Routing Area): ");
5055 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 2,
5056 "Association type: %s",
5057 val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
5058 proto_item_append_text(ti, "%s. ",
5059 val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
5060 proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 2,
5061 "Association ID: %u", association_id);
5062 proto_item_append_text(ti, "Association ID: %u, ", association_id);
5063 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
5064 "Routing Area ID: %u", tvb_get_ntohl (tvb, offset+8));
5065 proto_item_append_text(ti, "Routing Area ID: %u, ", tvb_get_ntohl (tvb, offset+8));
5066 proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 4,
5067 "Node ID: %s", tvb_ip_to_str(tvb, offset+12));
5068 proto_item_append_text(ti, "Node ID: %s", tvb_ip_to_str(tvb, offset+12));
5069 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 16,
5070 "Padding: %s", tvb_bytes_to_str_punct(tvb, offset+16, 8, ' '));
5074 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5075 "C-type: Unknown (%u)", type);
5076 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
5077 "Data (%d bytes)", obj_length - 4);
5081 /*------------------------------------------------------------------------------
5082 * TLVs for LSP TUNNEL IF ID object
5083 * draft-ietf-ccamp-lsp-hierarchy-bis-02
5084 *------------------------------------------------------------------------------*/
5086 dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree,
5087 tvbuff_t *tvb, int offset, int tlv_length,
5093 proto_tree *ti, *rsvp_lsp_tunnel_if_id_subtree;
5095 for (tlv_off = 0; tlv_off < tlv_length; ) {
5096 tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
5097 tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);
5099 if ((tlv_len == 0) || ((tlv_off+tlv_len) > tlv_length)) {
5100 proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off+2, 2,
5106 ti = proto_tree_add_text(rsvp_object_tree, tvb,
5107 offset+tlv_off, tlv_len,
5108 "Unnumbered component link identifier: %u",
5109 tvb_get_ntohl(tvb, offset+tlv_off+4));
5110 rsvp_lsp_tunnel_if_id_subtree = proto_item_add_subtree(ti, subtree_type);
5111 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off, 2,
5112 "Type: 1 (Unnumbered component link identifier)");
5113 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+2, 2,
5114 "Length: %u", tlv_len);
5115 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+4, 4,
5116 "Component link identifier: %u",
5117 tvb_get_ntohl(tvb, offset+tlv_off+4));
5121 ti = proto_tree_add_text(rsvp_object_tree, tvb,
5122 offset+tlv_off, tlv_len,
5123 "IPv4 component link identifier: %s",
5124 tvb_ip_to_str(tvb, offset+tlv_off+4));
5125 rsvp_lsp_tunnel_if_id_subtree = proto_item_add_subtree(ti, subtree_type);
5126 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off, 2,
5127 "Type: 2 (IPv4 component link identifier)");
5128 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+2, 2,
5129 "Length: %u", tlv_len);
5130 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+4, 4,
5131 "Component link identifier: %s",
5132 tvb_ip_to_str(tvb, offset+tlv_off+4));
5135 case 32769: /* oif-p0040.002.09 demo spec */
5136 ti = proto_tree_add_text(rsvp_object_tree, tvb,
5137 offset+tlv_off, tlv_len,
5138 "Targeted client layer: ");
5139 rsvp_lsp_tunnel_if_id_subtree = proto_item_add_subtree(ti, subtree_type);
5140 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off, 2,
5141 "Type: 32769 (Targeted client layer)");
5142 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+2, 2,
5143 "Length: %u", tlv_len);
5144 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+4, 1,
5145 "LSP Encoding Type: %s",
5146 rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+4),
5147 gmpls_lsp_enc_rvals, "Unknown (%d)"));
5148 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+5, 1,
5149 "Switching Type: %s",
5150 rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+5),
5151 gmpls_switching_type_rvals, "Unknown (%d)"));
5152 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+6, 1,
5154 val_to_str_ext(tvb_get_guint8(tvb,offset+tlv_off+6),
5155 &gmpls_sonet_signal_type_str_ext, "Unknown (%d)"));
5156 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+8, 8,
5157 "Sub Interface/Connection ID: %" G_GINT64_MODIFIER "u (0x%s)",
5158 tvb_get_ntoh64(tvb, offset+tlv_off+8),
5159 tvb_bytes_to_str(tvb, offset+tlv_off+8, 8));
5160 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+16, 4,
5162 tvb_ip_to_str(tvb, offset+tlv_off+16));
5163 proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+20, 4,
5164 "SC PC SCN Address: %s",
5165 tvb_ip_to_str(tvb, offset+tlv_off+20));
5166 proto_item_append_text(ti, "LSP Encoding=%s, Switching Type=%s, Signal Type=%s",
5167 rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+4),
5168 gmpls_lsp_enc_rvals, "Unknown (%d)"),
5169 rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+5),
5170 gmpls_switching_type_rvals, "Unknown (%d)"),
5171 val_to_str_ext(tvb_get_guint8(tvb,offset+tlv_off+6),
5172 &gmpls_sonet_signal_type_str_ext, "Unknown (%d)"));
5176 proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, 2,
5177 "Unknown TLV: %u", tlv_type);
5184 /*------------------------------------------------------------------------------
5185 * LSP TUNNEL INTERFACE ID
5186 *------------------------------------------------------------------------------*/
5188 dissect_rsvp_lsp_tunnel_if_id(proto_tree *ti, proto_tree *rsvp_object_tree,
5190 int offset, int obj_length,
5191 int rsvp_class _U_, int type)
5195 static const value_string lsp_tunnel_if_id_action_str[] = {
5196 { 0, "LSP is FA (MPLS-TE topology advertisement only)"},
5197 { 1, "LSP is RA (IP network advertisement only)"},
5198 { 2, "LSP is RA (both IP and MPLS-TE topology advertisement)"},
5199 { 3, "LSP is to be used as a virtual local link"},
5203 proto_item_set_text(ti, "LSP INTERFACE-ID: ");
5206 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5207 "C-type: 1 - Unnumbered interface");
5208 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
5210 tvb_ip_to_str(tvb, offset+4));
5211 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
5212 "Interface ID: %u", tvb_get_ntohl(tvb, offset+8));
5213 proto_item_set_text(ti, "LSP INTERFACE-ID: Unnumbered, Router-ID %s, Interface-ID %d",
5214 tvb_ip_to_str(tvb, offset+4),
5215 tvb_get_ntohl(tvb, offset+8));
5219 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5220 "C-type: 2 - IPv4");
5221 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
5222 "IPv4 interface address: %s",
5223 tvb_ip_to_str(tvb, offset+4));
5224 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
5225 "Target IGP instance: %s",
5226 tvb_ip_to_str(tvb, offset+8));
5227 proto_item_set_text(ti, "LSP INTERFACE-ID: IPv4, interface address %s,"
5229 tvb_ip_to_str(tvb, offset+4),
5230 tvb_ip_to_str(tvb, offset+8));
5231 action = tvb_get_guint8(tvb, offset+12);
5233 proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 1, "Action: %d - %s",
5235 val_to_str_const(action, lsp_tunnel_if_id_action_str, "Unknown"));
5236 dissect_rsvp_lsp_tunnel_if_id_tlv(rsvp_object_tree, tvb, offset+16, obj_length-16,
5237 TREE(TT_LSP_TUNNEL_IF_ID_SUBTREE));
5241 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5242 "C-type: 3 - IPv6");
5243 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 16,
5244 "IPv6 interface address: %s",
5245 tvb_ip6_to_str(tvb, offset+4));
5246 proto_tree_add_text(rsvp_object_tree, tvb, offset+20, 4,
5247 "Target IGP instance: %s",
5248 tvb_ip_to_str(tvb, offset+20));
5249 proto_item_set_text(ti, "LSP INTERFACE-ID: IPv6, interface address %s,"
5251 tvb_ip6_to_str(tvb, offset+4),
5252 tvb_ip_to_str(tvb, offset+20));
5253 action = tvb_get_guint8(tvb, offset+24);
5255 proto_tree_add_text(rsvp_object_tree, tvb, offset+24, 1, "Action: %d - %s",
5257 val_to_str_const(action, lsp_tunnel_if_id_action_str, "Unknown"));
5258 dissect_rsvp_lsp_tunnel_if_id_tlv(rsvp_object_tree, tvb, offset+28, obj_length-28,
5259 TREE(TT_LSP_TUNNEL_IF_ID_SUBTREE));
5263 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5264 "C-type: 4 - Unnumbered interface with target");
5265 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
5267 tvb_ip_to_str(tvb, offset+4));
5268 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
5269 "Interface ID: %u", tvb_get_ntohl(tvb, offset+8));
5270 proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 4,
5271 "Target IGP instance: %s",
5272 tvb_ip_to_str(tvb, offset+12));
5273 proto_item_set_text(ti, "LSP INTERFACE-ID: Unnumbered with target, Router-ID %s,"
5274 " Interface-ID %d, IGP instance %s",
5275 tvb_ip_to_str(tvb, offset+4),
5276 tvb_get_ntohl(tvb, offset+8),
5277 tvb_ip_to_str(tvb, offset+12));
5278 action = tvb_get_guint8(tvb, offset+16);
5280 proto_tree_add_text(rsvp_object_tree, tvb, offset+16, 1, "Action: %d - %s",
5282 val_to_str_const(action, lsp_tunnel_if_id_action_str, "Unknown"));
5283 dissect_rsvp_lsp_tunnel_if_id_tlv(rsvp_object_tree, tvb, offset+20, obj_length-20,
5284 TREE(TT_LSP_TUNNEL_IF_ID_SUBTREE));
5288 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5289 "C-type: Unknown (%u)",
5291 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length-4,
5292 "Data (%d bytes)", obj_length-4);
5297 /*------------------------------------------------------------------------------
5299 *------------------------------------------------------------------------------*/
5301 dissect_rsvp_notify_request(proto_item *ti, proto_tree *rsvp_object_tree,
5303 int offset, int obj_length,
5304 int rsvp_class _U_, int type)
5306 int offset2 = offset + 4;
5310 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5311 "C-type: 1 - IPv4");
5312 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
5313 "Notify node address: %s",
5314 tvb_ip_to_str(tvb, offset2));
5315 proto_item_append_text(ti, ": Notify node: %s",
5316 tvb_ip_to_str(tvb, offset2));
5321 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5322 "C-type: 2 - IPv6");
5323 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
5324 "Notify node address: %s",
5325 tvb_ip6_to_str(tvb, offset2));
5326 proto_item_append_text(ti, ": Notify node: %s",
5327 tvb_ip6_to_str(tvb, offset2));
5332 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5333 "C-type: Unknown (%u)",
5335 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
5336 "Data (%d bytes)", obj_length - 4);
5341 /*------------------------------------------------------------------------------
5343 *------------------------------------------------------------------------------*/
5345 dissect_rsvp_gen_uni(proto_tree *ti, proto_tree *rsvp_object_tree,
5347 int offset, int obj_length,
5348 int rsvp_class _U_, int type,
5349 rsvp_conversation_info *rsvph)
5351 int offset2 = offset + 4;
5352 int mylen, i, j, k, l, m;
5354 proto_tree *rsvp_gen_uni_subtree, *rsvp_session_subtree, *rsvp_template_subtree;
5355 int s_len, s_class, s_type, sobj_len, nsap_len;
5358 proto_item_set_text(ti, "GENERALIZED UNI: ");
5360 mylen = obj_length - 4;
5364 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5366 for (i=1, l = 0; l < mylen; i++) {
5367 sobj_len = tvb_get_ntohs(tvb, offset2+l);
5368 j = tvb_get_guint8(tvb, offset2+l+2);
5371 case 2: /* We do source and destination TNA together */
5372 c = (j==1) ? "Source" : "Destination";
5373 k = tvb_get_guint8(tvb, offset2+l+3);
5376 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5378 "%s IPv4 TNA: %s", c,
5379 tvb_ip_to_str(tvb, offset2+l+4));
5380 rsvp_gen_uni_subtree =
5381 proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
5382 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
5383 "Class: %d (%s)", j, c);
5384 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
5386 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
5387 "Length: %u", sobj_len);
5389 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
5390 tvb, offset2+l+4, 4, ENC_BIG_ENDIAN);
5392 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
5393 tvb, offset2+l+4, 4, ENC_BIG_ENDIAN);
5395 proto_item_append_text(ti, "%s IPv4 TNA: %s", c,
5396 tvb_ip_to_str(tvb, offset2+l+4));
5401 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5404 rsvp_gen_uni_subtree =
5405 proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
5406 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
5407 "Class: %d (%s)", j, c);
5408 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
5410 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
5411 "Length: %u", sobj_len);
5413 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
5414 tvb, offset2+l+4, 16, ENC_NA);
5416 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
5417 tvb, offset2+l+4, 16, ENC_NA);
5419 proto_item_append_text(ti, "%s IPv6 TNA: %s", c,
5420 tvb_ip6_to_str(tvb, offset2+l+4));
5425 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5426 offset2+l, tvb_get_ntohs(tvb, offset2+l),
5427 "%s NSAP TNA: ", c);
5428 rsvp_gen_uni_subtree =
5429 proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
5430 nsap_len = tvb_get_guint8(tvb, offset2+l+4);
5431 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
5432 "Class: %d (%s)", j, c);
5433 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
5435 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
5436 "Length: %u", sobj_len);
5437 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4, 1,
5438 "NSAP Length: %u", nsap_len);
5439 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+5,
5442 print_nsap_net(tvb_get_ptr(tvb, offset2+l+5, nsap_len), nsap_len));
5444 proto_item_append_text(ti, "%s NSAP TNA: %s", c,
5445 print_nsap_net(tvb_get_ptr(tvb, offset2+l+5, nsap_len), nsap_len));
5450 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5451 offset2+l, tvb_get_ntohs(tvb, offset2+l),
5452 "%s UNKNOWN TNA", c);
5453 rsvp_gen_uni_subtree =
5454 proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
5455 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
5456 "Class: %d (%s)", j, c);
5457 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
5458 "Type: %d (UNKNOWN)", j);
5459 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
5460 "Length: %u", sobj_len);
5461 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4,
5465 proto_item_append_text(ti, "%s UNKNOWN", c);
5471 case 3: /* Diversity subobject */
5472 k = tvb_get_guint8(tvb, offset2+l+3);
5476 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5477 offset2+l, tvb_get_ntohs(tvb, offset2+l),
5478 "Diversity Subobject");
5479 rsvp_gen_uni_subtree =
5480 proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
5481 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
5482 "Class: %d (Diversity)", j);
5483 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
5484 "Type: %d", tvb_get_guint8(tvb, offset2+l+3));
5485 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
5486 "Length: %u", sobj_len);
5487 m = tvb_get_guint8(tvb, offset2+l+4) >> 4;
5488 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4, 1,
5489 "Diversity: %d - %s", m,
5490 val_to_str_const(m, ouni_guni_diversity_str, "Unknown"));
5491 s_len = tvb_get_ntohs(tvb, offset2+l+8);
5492 s_class = tvb_get_guint8(tvb, offset2+l+10);
5493 s_type = tvb_get_guint8(tvb, offset2+l+11);
5494 ti2 = proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+8,
5496 rsvp_session_subtree =
5497 proto_item_add_subtree(ti2, TREE(rsvp_class_to_tree_type(s_class)));
5499 proto_tree_add_text(rsvp_object_tree, tvb, offset2+l+8, 2,
5500 "Length: %u (bogus, must be >= 4)", s_len);
5503 proto_tree_add_text(rsvp_session_subtree, tvb, offset2+l+8, 2,
5504 "Length: %u", s_len);
5505 proto_tree_add_uint(rsvp_session_subtree, hf_rsvp_filter[RSVPF_OBJECT], tvb,
5506 offset2+8+l+10, 1, s_class);
5507 dissect_rsvp_session(ti2, rsvp_session_subtree, tvb, offset2+l+8,
5508 s_len, s_class, s_type, rsvph);
5509 offset3 = offset2 + s_len;
5510 s_len = tvb_get_ntohs(tvb, offset3+l+8);
5511 s_class = tvb_get_guint8(tvb, offset3+l+10);
5512 s_type = tvb_get_guint8(tvb, offset3+l+11);
5513 ti2 = proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset3+l+8,
5515 rsvp_template_subtree =
5516 proto_item_add_subtree(ti2, TREE(rsvp_class_to_tree_type(s_class)));
5518 proto_tree_add_text(rsvp_object_tree, tvb, offset3+l+8, 2,
5519 "Length: %u (bogus, must be >= 4)", s_len);
5522 proto_tree_add_text(rsvp_template_subtree, tvb, offset3+l+8, 2,
5523 "Length: %u", s_len);
5524 proto_tree_add_uint(rsvp_template_subtree, hf_rsvp_filter[RSVPF_OBJECT], tvb,
5525 offset3+8+l+10, 1, s_class);
5526 dissect_rsvp_template_filter(ti2, rsvp_template_subtree, tvb, offset3+l+8,
5527 s_len, s_class, s_type, rsvph);
5530 proto_item_append_text(ti, "Diversity");
5537 case 4: /* Egress Label */
5538 k = tvb_get_guint8(tvb, offset2+l+3);
5539 if (k == 1) /* Egress label sub-type */
5540 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5541 offset2+l, sobj_len,
5542 "Egress Label Subobject");
5543 else if (k == 2) /* SPC_label sub-type (see G.7713.2) */
5544 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5545 offset2+l, sobj_len,
5546 "SPC Label Subobject");
5548 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5549 offset2+l, sobj_len,
5550 "Unknown Label Subobject");
5551 rsvp_gen_uni_subtree = proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
5552 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
5553 "Class: %d (Egress/SPC Label)", j);
5554 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
5556 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
5557 "Length: %u", sobj_len);
5558 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_gen_uni_direction,
5559 tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
5560 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+7, 1,
5561 "Label type: %u", tvb_get_guint8(tvb, offset2+l+7));
5562 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+8, 4,
5563 "Logical Port ID: %u", tvb_get_ntohl(tvb, offset2+l+8));
5564 proto_item_append_text(ti2, ": %s, Label type %d, Port ID %d, Label ",
5565 tvb_get_guint8(tvb, offset2+l+4) & 0x80 ?
5566 "Upstream" : "Downstream",
5567 tvb_get_guint8(tvb, offset2+l+7),
5568 tvb_get_ntohl(tvb, offset2+l+8));
5569 for (j=12; j < sobj_len; j+=4) {
5570 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+j, 4,
5571 "Label: %u", tvb_get_ntohl(tvb, offset2+l+j));
5572 proto_item_append_text(ti2, "%u ", tvb_get_ntohl(tvb, offset2+l+j));
5576 proto_item_append_text(ti, "Egress Label");
5578 proto_item_append_text(ti, "SPC Label");
5582 case 5: /* Service Level */
5583 k = tvb_get_guint8(tvb, offset2+l+3);
5587 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5588 offset2+l, sobj_len,
5589 "Service Level Subobject");
5590 rsvp_gen_uni_subtree =
5591 proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
5592 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
5593 "Class: %d (Service Level)", j);
5594 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
5595 "Type: %d", tvb_get_guint8(tvb, offset2+l+3));
5596 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
5597 "Length: %u", sobj_len);
5598 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4, 1,
5599 "Service Level: %u", tvb_get_guint8(tvb, offset2+l+4));
5600 proto_item_append_text(ti2, ": %u", tvb_get_guint8(tvb, offset2+l+4));
5602 proto_item_append_text(ti, "Service Level %d", tvb_get_guint8(tvb, offset2+l+4));
5608 default: /* Unknown subobject */
5609 ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
5610 offset2+l, sobj_len,
5611 "Unknown subobject: %u",
5613 rsvp_gen_uni_subtree =
5614 proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
5615 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 1,
5616 "Type: %u (Unknown)", j);
5617 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+1, 1,
5619 tvb_get_guint8(tvb, offset2+l+1));
5623 if (tvb_get_guint8(tvb, offset2+l+1) < 1) {
5624 proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+1, 1,
5625 "Invalid length: %u", tvb_get_guint8(tvb, offset2+l+1));
5628 l += tvb_get_guint8(tvb, offset2+l+1);
5631 proto_item_append_text(ti, ", ");
5633 proto_item_append_text(ti, "...");
5640 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5641 "C-type: Unknown (%u)",
5643 proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
5644 "Data (%d bytes)", mylen);
5649 /*------------------------------------------------------------------------------
5651 *------------------------------------------------------------------------------*/
5653 dissect_rsvp_call_id(proto_tree *ti, proto_tree *rsvp_object_tree,
5655 int offset, int obj_length,
5656 int rsvp_class _U_, int c_type)
5660 int offset2 = offset + 4;
5661 int offset3, offset4, len;
5663 static const value_string address_type_vals[] = {
5668 { 0x7f, "0x7f (Vendor-defined)"},
5671 static value_string_ext address_type_vals_ext = VALUE_STRING_EXT_INIT(address_type_vals);
5673 proto_item_set_text(ti, "CALL-ID: ");
5676 proto_item_append_text(ti,"Empty");
5677 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5678 "C-type: Empty (%u)", c_type);
5680 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length-4,
5681 "Data (%d bytes)", obj_length-4);
5685 type = tvb_get_guint8 (tvb, offset2);
5687 offset3 = offset2 + 4;
5688 len = obj_length - 16;
5689 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5690 "C-type: 1 (operator specific)");
5691 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1, "Address type: %s",
5692 val_to_str_ext(type, &address_type_vals_ext, "Unknown (%u)"));
5693 proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 3, "Reserved: %u",
5694 tvb_get_ntoh24(tvb, offset2+1));
5695 proto_item_append_text(ti, "Operator-Specific. Addr Type: %s. ",
5696 val_to_str_ext(type, &address_type_vals_ext, "Unknown (%u)"));
5699 offset3 = offset2 + 16;
5700 len = obj_length - 28;
5701 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5702 "C-type: 2 (globally unique)");
5703 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1, "Address type: %s",
5704 val_to_str_ext(type, &address_type_vals_ext, "Unknown (%u)"));
5705 str = tvb_get_ephemeral_string (tvb, offset2 + 1, 3);
5706 proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 1, 3,
5707 "International Segment: %s", str);
5708 proto_item_append_text(ti, "Globally-Unique. Addr Type: %s. Intl Segment: %s. ",
5709 val_to_str_ext(type, &address_type_vals_ext, "Unknown (%u)"), str);
5710 str = tvb_get_ephemeral_string (tvb, offset2 + 4, 12);
5711 proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 12,
5712 "National Segment: %s", str);
5713 proto_item_append_text(ti, "Natl Segment: %s. ", str);
5718 offset4 = offset3 + 4;
5719 str = tvb_ip_to_str(tvb, offset3);
5720 proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
5721 tvb, offset3, 4, ENC_BIG_ENDIAN);
5725 offset4 = offset3 + 16;
5726 str = tvb_ip6_to_str(tvb, offset3);
5727 proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
5728 tvb, offset3, 16, ENC_NA);
5732 offset4 = offset3 + 20;
5733 str = print_nsap_net(tvb_get_ptr(tvb, offset3, 20), 20);
5734 proto_tree_add_text(rsvp_object_tree, tvb, offset3, 20,
5735 "Source Transport Network addr: %s", str);
5739 offset4 = offset3 + 6;
5740 str = tvb_ether_to_str(tvb, offset3);
5741 proto_tree_add_text(rsvp_object_tree, tvb, offset3, 6,
5742 "Source Transport Network addr: %s", str);
5746 offset4 = offset3 + len;
5747 str = tvb_bytes_to_str(tvb, offset3, len);
5748 proto_tree_add_text(rsvp_object_tree, tvb, offset3, len,
5749 "Source Transport Network addr: %s", str);
5753 offset4 = offset3 + len;
5755 proto_tree_add_text(rsvp_object_tree, tvb, offset3, len, "Unknown Transport Network type: %d",
5760 proto_item_append_text(ti, "Src: %s. ", str);
5761 proto_tree_add_text(rsvp_object_tree, tvb, offset4, 8, "Local Identifier: %s",
5762 tvb_bytes_to_str(tvb, offset4, 8));
5763 proto_item_append_text(ti, "Local ID: %s. ", tvb_bytes_to_str(tvb, offset4, 8));
5767 proto_item_append_text(ti, " Unknown");
5768 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5769 "C-type: Unknown (%u)", c_type);
5770 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length-4,
5771 "Data (%d bytes)", obj_length-4);
5776 /*------------------------------------------------------------------------------
5777 * 3GPP2_OBJECT X.S0057-0 v1.0
5778 *------------------------------------------------------------------------------*/
5779 static const value_string rsvp_3gpp_object_ie_type_vals[] = {
5786 dissect_rsvp_3gpp_object(proto_tree *ti, proto_tree *rsvp_object_tree,
5788 int offset, int obj_length,
5789 int rsvp_class _U_, int c_type)
5794 proto_tree_add_item(rsvp_object_tree, hf_rsvp_c_type, tvb, offset, 1, ENC_BIG_ENDIAN);
5796 /* Set obj_length to the remaining bytes */
5797 obj_length = obj_length - 4;
5799 /* Transaction ID */
5800 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tid, tvb, offset, 4, ENC_BIG_ENDIAN);
5802 obj_length = obj_length - 4;
5804 while(obj_length>0){
5805 length = tvb_get_ntohs(tvb, offset);
5806 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ie_len, tvb, offset, 2, ENC_BIG_ENDIAN);
5808 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ie_type, tvb, offset, 2, ENC_BIG_ENDIAN);
5810 proto_tree_add_text(rsvp_object_tree, tvb, offset, length-2, "IE Data");
5811 obj_length = obj_length - length;
5816 /*------------------------------------------------------------------------------
5817 * RESTART CAPABILITY
5818 *------------------------------------------------------------------------------*/
5820 dissect_rsvp_restart_cap(proto_tree *ti, proto_tree *rsvp_object_tree,
5822 int offset, int obj_length,
5823 int rsvp_class _U_, int type)
5825 int offset2 = offset + 4;
5827 proto_item_set_text(ti, "RESTART CAPABILITY: ");
5830 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5832 proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
5833 "Restart Time: %d ms",
5834 tvb_get_ntohl(tvb, offset2));
5835 proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
5836 "Recovery Time: %d ms",
5837 tvb_get_ntohl(tvb, offset2+4));
5838 proto_item_append_text(ti, "Restart Time: %d ms. Recovery Time: %d ms.",
5839 tvb_get_ntohl(tvb, offset2), tvb_get_ntohl(tvb, offset2+4));
5843 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5844 "C-type: Unknown (%u)",
5846 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
5847 "Data (%d bytes)", obj_length - 4);
5852 /*------------------------------------------------------------------------------
5853 * PROTECTION INFORMATION
5854 *------------------------------------------------------------------------------*/
5856 dissect_rsvp_protection_info(proto_tree *ti, proto_tree *rsvp_object_tree,
5858 int offset, int obj_length,
5859 int rsvp_class _U_, int type)
5861 guint8 flags1, lsp_flags, link_flags, seg_flags;
5862 proto_tree *ti2, *ti3, *ti4, *rsvp_pi_link_flags_tree, *rsvp_pi_lsp_flags_tree, *rsvp_pi_seg_flags_tree;
5863 int offset2 = offset + 4;
5865 proto_item_set_text(ti, "PROTECTION_INFO: ");
5868 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5870 flags1 = tvb_get_guint8(tvb, offset2);
5871 proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_flags_secondary_lsp,
5872 tvb, offset2, 1, ENC_BIG_ENDIAN);
5874 link_flags = tvb_get_guint8(tvb, offset2+3);
5875 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+3, 1,
5876 "Link Flags: 0x%02x", link_flags);
5877 rsvp_pi_link_flags_tree = proto_item_add_subtree(ti2, TREE(TT_PROTECTION_INFO_LINK));
5878 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_extra_traffic,
5879 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5880 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_unprotected,
5881 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5882 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_shared,
5883 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5884 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated1_1,
5885 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5886 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated1plus1,
5887 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5888 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_enhanced,
5889 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5890 proto_item_append_text(ti, "%s%s%s%s%s%s%s.",
5891 flags1&0x80 ? "SecondaryLSP ":"",
5892 link_flags&0x01 ? "ExtraTraffic ":"",
5893 link_flags&0x02 ? "Unprotected ":"",
5894 link_flags&0x04 ? "Shared ":"",
5895 link_flags&0x08 ? "Dedicated1:1 ":"",
5896 link_flags&0x10 ? "Dedicated1+1 ":"",
5897 link_flags&0x20 ? "Enhanced ":"");
5900 case 2: /* RFC4872 */
5901 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
5903 flags1 = tvb_get_guint8(tvb, offset2);
5904 proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_secondary,
5905 tvb, offset2, 1, ENC_BIG_ENDIAN);
5906 proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_protecting,
5907 tvb, offset2, 1, ENC_BIG_ENDIAN);
5908 proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_notification_msg,
5909 tvb, offset2, 1, ENC_BIG_ENDIAN);
5910 proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_operational,
5911 tvb, offset2, 1, ENC_BIG_ENDIAN);
5913 lsp_flags = tvb_get_guint8(tvb, offset2+1);
5914 ti3 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
5915 "LSP Flags: 0x%02x -%s%s%s%s%s%s", lsp_flags,
5916 lsp_flags == 0 ? " Unprotected":"",
5917 lsp_flags&0x01 ? " Rerouting":"",
5918 lsp_flags&0x02 ? " Rerouting with extra-traffic":"",
5919 lsp_flags&0x04 ? " 1:N Protection with extra-traffic":"",
5920 lsp_flags&0x08 ? " 1+1 Unidirectional protection":"",
5921 lsp_flags&0x10 ? " 1+1 Bidirectional protection":"");
5922 rsvp_pi_lsp_flags_tree = proto_item_add_subtree(ti3, TREE(TT_PROTECTION_INFO_LSP));
5923 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_full_rerouting,
5924 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5925 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_rerouting_extra,
5926 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5927 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_1_n_protection,
5928 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5929 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_1plus1_unidirectional,
5930 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5931 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_1plus1_bidirectional,
5932 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5934 link_flags = tvb_get_guint8(tvb, offset2+3);
5935 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+3, 1,
5936 "Link Flags: 0x%02x -%s%s%s%s%s%s", link_flags,
5937 link_flags&0x01 ? " ExtraTraffic":"",
5938 link_flags&0x02 ? " Unprotected":"",
5939 link_flags&0x04 ? " Shared":"",
5940 link_flags&0x08 ? " Dedicated1:1":"",
5941 link_flags&0x10 ? " Dedicated1+1":"",
5942 link_flags&0x20 ? " Enhanced":"");
5943 rsvp_pi_link_flags_tree = proto_item_add_subtree(ti2, TREE(TT_PROTECTION_INFO_LINK));
5944 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_extra,
5945 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5946 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_unprotected,
5947 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5948 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_shared,
5949 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5950 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated_1_1,
5951 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5952 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated_1plus1,
5953 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5954 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_enhanced,
5955 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
5957 proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_in_place,
5958 tvb, offset2+4, 1, ENC_BIG_ENDIAN);
5959 proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_required,
5960 tvb, offset2+4, 1, ENC_BIG_ENDIAN);
5962 seg_flags = tvb_get_guint8(tvb, offset2+5);
5963 ti4 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+5, 1,
5964 "Segment recovery Flags: 0x%02x - %s%s%s%s%s%s", seg_flags,
5965 seg_flags == 0 ? " Unprotected":"",
5966 seg_flags&0x01 ? " Rerouting":"",
5967 seg_flags&0x02 ? " Rerouting with extra-traffic":"",
5968 seg_flags&0x04 ? " 1:N Protection with extra-traffic":"",
5969 seg_flags&0x08 ? " 1+1 Unidirectional protection":"",
5970 seg_flags&0x10 ? " 1+1 Bidirectional protection":"");
5971 rsvp_pi_seg_flags_tree = proto_item_add_subtree(ti4, TREE(TT_PROTECTION_INFO_SEG));
5972 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_full_rerouting,
5973 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5974 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_rerouting_extra,
5975 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5976 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_1_n_protection,
5977 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5978 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_1plus1_unidirectional,
5979 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5980 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_1plus1_bidirectional,
5981 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
5983 proto_item_append_text(ti, "%s%s%s%s Link:%s%s%s%s%s%s, LSP:%s%s%s%s%s%s.",
5984 flags1&0x80 ? "SecondaryLSP ":"",
5985 flags1&0x40 ? "ProtectingLSP ":"",
5986 flags1&0x20 ? "Notification ":"",
5987 flags1&0x10 ? "OperationalLSP ":"",
5988 link_flags&0x01 ? " ExtraTraffic":"",
5989 link_flags&0x02 ? " Unprotected":"",
5990 link_flags&0x04 ? " Shared":"",
5991 link_flags&0x08 ? " Dedicated1:1":"",
5992 link_flags&0x10 ? " Dedicated1+1":"",
5993 link_flags&0x20 ? " Enhanced":"",
5994 lsp_flags == 0 ? " Unprotected":"",
5995 lsp_flags&0x01 ? " Rerouting":"",
5996 lsp_flags&0x02 ? " Rerouting with extra-traffic":"",
5997 lsp_flags&0x04 ? " 1:N Protection with extra-traffic":"",
5998 lsp_flags&0x08 ? " 1+1 Unidirectional protection":"",
5999 lsp_flags&0x10 ? " 1+1 Bidirectional protection":"");
6003 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
6004 "C-type: Unknown (%u)",
6006 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
6007 "Data (%d bytes)", obj_length - 4);
6012 /*------------------------------------------------------------------------------
6014 *------------------------------------------------------------------------------*/
6016 dissect_rsvp_fast_reroute(proto_tree *ti, proto_tree *rsvp_object_tree,
6018 int offset, int obj_length,
6019 int rsvp_class _U_, int type)
6022 proto_tree *ti2, *rsvp_frr_flags_tree;
6024 proto_item_set_text(ti, "FAST_REROUTE: ");
6028 if (((type == 1) && (obj_length != 24)) || ((type == 7) && (obj_length != 20))) {
6029 proto_tree_add_text(rsvp_object_tree, tvb, offset, obj_length,
6030 "<<<Invalid length: cannot decode>>>");
6031 proto_item_append_text(ti, "Invalid length");
6034 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
6035 "C-type: %u", type);
6036 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
6037 "Setup Priority: %d", tvb_get_guint8(tvb, offset+4));
6038 proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 1,
6039 "Hold Priority: %d", tvb_get_guint8(tvb, offset+5));
6040 proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 1,
6041 "Hop Limit: %d", tvb_get_guint8(tvb, offset+6));
6043 flags = tvb_get_guint8(tvb, offset+7);
6044 ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset+7, 1,
6045 "Flags: 0x%02x", flags);
6046 rsvp_frr_flags_tree = proto_item_add_subtree(ti2, TREE(TT_FAST_REROUTE_FLAGS));
6047 proto_tree_add_item(rsvp_frr_flags_tree, hf_rsvp_frr_flags_one2one_backup,
6048 tvb, offset+7, 1, ENC_BIG_ENDIAN);
6049 proto_tree_add_item(rsvp_frr_flags_tree, hf_rsvp_frr_flags_facility_backup,
6050 tvb, offset+7, 1, ENC_BIG_ENDIAN);
6051 proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
6052 "Bandwidth: %.10g", tvb_get_ntohieee_float(tvb, offset+8));
6053 proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 4,
6054 "Include-Any: 0x%0x", tvb_get_ntohl(tvb, offset+12));
6055 proto_tree_add_text(rsvp_object_tree, tvb, offset+16, 4,
6056 "Exclude-Any: 0x%0x", tvb_get_ntohl(tvb, offset+16));
6058 proto_tree_add_text(rsvp_object_tree, tvb, offset+20, 4,
6059 "Include-All: 0x%0x", tvb_get_ntohl(tvb, offset+20));
6062 proto_item_append_text(ti, "%s%s",
6063 flags &0x01 ? "One-to-One Backup, " : "",
6064 flags &0x02 ? "Facility Backup" : "");
6068 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
6069 "C-type: Unknown (%u)",
6071 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
6072 "Data (%d bytes)", obj_length - 4);
6077 /*------------------------------------------------------------------------------
6079 *------------------------------------------------------------------------------*/
6081 dissect_rsvp_detour(proto_tree *ti, proto_tree *rsvp_object_tree,
6083 int offset, int obj_length,
6084 int rsvp_class _U_, int type)
6086 int remaining_length, count;
6089 proto_item_set_text(ti, "DETOUR: ");
6093 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
6094 "C-type: %u", type);
6095 for (remaining_length = obj_length - 4, count = 1;
6096 remaining_length > 0; remaining_length -= 8, count++) {
6097 if (remaining_length < 8) {
6098 proto_tree_add_text(rsvp_object_tree, tvb, offset+remaining_length,
6099 obj_length-remaining_length,
6100 "<<<Invalid length: cannot decode>>>");
6101 proto_item_append_text(ti, "Invalid length");
6105 proto_tree_add_text(rsvp_object_tree, tvb, offset+(4*iter), 4,
6106 "PLR ID %d: %s", count,
6107 tvb_ip_to_str(tvb, offset+(4*iter)));
6109 proto_tree_add_text(rsvp_object_tree, tvb, offset+(4*iter), 4,
6110 "Avoid Node ID %d: %s", count,
6111 tvb_ip_to_str(tvb, offset+(4*iter)));
6116 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
6117 "C-type: Unknown (%u)",
6119 proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
6120 "Data (%d bytes)", obj_length - 4);
6125 /*------------------------------------------------------------------------------
6127 *------------------------------------------------------------------------------*/
6129 dissect_rsvp_diffserv(proto_tree *ti, proto_tree *rsvp_object_tree,
6131 int offset, int obj_length,
6132 int rsvp_class _U_, int type)
6135 int *hfindexes[] = {
6136 &hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
6137 &hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
6138 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
6139 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
6140 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
6141 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
6142 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15]
6145 &TREE(TT_DIFFSERV_MAP),
6146 &TREE(TT_DIFFSERV_MAP_PHBID)
6149 proto_item_set_text(ti, "DIFFSERV: ");
6153 proto_tree_add_text(rsvp_object_tree, tvb, offset, 1,
6154 "C-type: 1 - E-LSP");
6155 proto_tree_add_uint(rsvp_object_tree, hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
6157 mapnb = tvb_get_guint8(tvb, offset + 4) & 15);
6158 proto_item_append_text(ti, "E-LSP, %u MAP%s", mapnb,
6159 (mapnb == 0) ? "" : "s");
6162 for (count = 0; count < mapnb; count++) {
6163 dissect_diffserv_mpls_common(tvb, rsvp_object_tree, type,
6164 offset, hfindexes, etts);
6169 proto_item_append_text(ti, "L-LSP");
6170 proto_tree_add_text(rsvp_object_tree, tvb, offset, 1,
6171 "C-type: 2 - L-LSP");
6172 dissect_diffserv_mpls_common(tvb, rsvp_object_tree, type,
6173 offset + 3, hfindexes, etts);
6176 proto_tree_add_text(rsvp_object_tree, tvb, offset, 1,
6177 "C-type: Unknown (%u)", type);
6178 proto_tree_add_text(rsvp_object_tree, tvb, offset + 1, obj_length - 4,
6179 "Data (%d bytes)", obj_length - 4);
6184 /*------------------------------------------------------------------------------
6186 *------------------------------------------------------------------------------*/
6188 dissect_rsvp_diffserv_aware_te(proto_tree *ti, proto_tree *rsvp_object_tree,
6190 int offset, int obj_length,
6191 int rsvp_class _U_, int type)
6193 proto_item *hidden_item;
6194 int offset2 = offset + 4;
6197 hidden_item = proto_tree_add_item(rsvp_object_tree,
6198 hf_rsvp_filter[RSVPF_DSTE],
6199 tvb, offset, 8, ENC_NA);
6200 PROTO_ITEM_SET_HIDDEN(hidden_item);
6204 ct = tvb_get_guint8(tvb, offset2+3);
6205 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1, "C-type: 1");
6206 proto_tree_add_item(rsvp_object_tree,
6207 hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
6208 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
6209 proto_item_set_text(ti, "CLASSTYPE: CT %u", ct);
6212 proto_item_set_text(ti, "CLASSTYPE: (Unknown C-type)");
6213 proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
6214 "C-type: Unknown (%u)", type);
6215 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
6216 "Data (%d bytes)", obj_length - 4);
6221 /*----------------------------------------------------------------------------
6222 * VENDOR PRIVATE USE
6223 *---------------------------------------------------------------------------*/
6225 dissect_rsvp_vendor_private_use(proto_tree *ti _U_,
6226 proto_tree *rsvp_object_tree,
6228 int offset, int obj_length,
6229 int rsvp_class _U_, int type)
6232 * FF: from Section 2, RFC 3936
6234 * "Organization/Vendor Private" ranges refer to values that are
6235 * enterprise-specific; these MUST NOT be registered with IANA. For
6236 * Vendor Private values, the first 4-octet word of the data field MUST
6237 * be an enterprise code [ENT: www.iana.org/assignments/enterprise-numbers]
6238 * (network order) as registered with the IANA SMI Network Management
6239 * Private Enterprise Codes, and the rest of the data thereafter is for
6240 * the private use of the registered enterprise.
6242 proto_item *hidden_item;
6244 hidden_item = proto_tree_add_item(rsvp_object_tree,
6245 hf_rsvp_filter[RSVPF_PRIVATE_OBJ],
6246 tvb, offset, obj_length, ENC_NA);
6247 PROTO_ITEM_SET_HIDDEN(hidden_item);
6248 proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
6249 "C-type: %u", type);
6250 proto_tree_add_item(rsvp_object_tree,
6251 hf_rsvp_filter[RSVPF_ENT_CODE],
6252 tvb, offset + 4, 4, ENC_BIG_ENDIAN);
6253 proto_tree_add_text(rsvp_object_tree, tvb, offset + 8, obj_length - 8,
6254 "Data (%d bytes)", obj_length - 8);
6257 /*------------------------------------------------------------------------------
6258 * Dissect a single RSVP message in a tree
6259 *------------------------------------------------------------------------------*/
6261 dissect_rsvp_msg_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
6262 int tree_mode, rsvp_conversation_info *rsvph)
6264 proto_tree *rsvp_tree;
6265 proto_tree *rsvp_header_tree;
6266 proto_tree *rsvp_object_tree;
6268 proto_item *hidden_item;
6269 guint16 cksum, computed_cksum;
6274 guint8 message_type;
6275 int session_off, tempfilt_off;
6281 ver_flags = tvb_get_guint8(tvb, 0);
6282 msg_length = tvb_get_ntohs(tvb, 6);
6283 message_type = tvb_get_guint8(tvb, 1);
6285 ti = proto_tree_add_item(tree, proto_rsvp, tvb, offset, msg_length,
6287 rsvp_tree = proto_item_add_subtree(ti, tree_mode);
6288 if (pinfo->ipproto == IP_PROTO_RSVPE2EI)
6289 proto_item_append_text(rsvp_tree, " (E2E-IGNORE)");
6290 proto_item_append_text(rsvp_tree, ": ");
6291 proto_item_append_text(rsvp_tree, "%s", val_to_str_ext(message_type, &message_type_vals_ext,
6293 find_rsvp_session_tempfilt(tvb, 0, &session_off, &tempfilt_off);
6295 proto_item_append_text(rsvp_tree, "%s", summary_session(tvb, session_off));
6297 proto_item_append_text(rsvp_tree, "%s", summary_template(tvb, tempfilt_off));
6299 ti = proto_tree_add_text(rsvp_tree, tvb, offset, 8, "RSVP Header. %s",
6300 val_to_str_ext(message_type, &message_type_vals_ext,
6301 "Unknown Message (%u). "));
6302 if (pinfo->ipproto == IP_PROTO_RSVPE2EI)
6303 proto_item_append_text(ti, " (E2E-IGNORE)");
6304 rsvp_header_tree = proto_item_add_subtree(ti, TREE(TT_HDR));
6306 proto_tree_add_text(rsvp_header_tree, tvb, offset, 1, "RSVP Version: %u",
6307 (ver_flags & 0xf0)>>4);
6308 proto_tree_add_text(rsvp_header_tree, tvb, offset, 1, "Flags: %02x",
6310 proto_tree_add_uint(rsvp_header_tree, hf_rsvp_filter[RSVPF_MSG], tvb,
6311 offset+1, 1, message_type);
6312 switch (RSVPF_MSG + message_type) {
6318 case RSVPF_PATHTEAR:
6319 case RSVPF_RESVTEAR:
6320 case RSVPF_RCONFIRM:
6321 case RSVPF_RTEARCONFIRM:
6324 case RSVPF_SREFRESH:
6327 hidden_item = proto_tree_add_boolean(rsvp_header_tree, hf_rsvp_filter[RSVPF_MSG + message_type], tvb,
6329 PROTO_ITEM_SET_HIDDEN(hidden_item);
6333 cksum = tvb_get_ntohs(tvb, offset+2);
6334 if (!pinfo->fragmented && ((int) tvb_length(tvb) >= msg_length)) {
6335 /* The packet isn't part of a fragmented datagram and isn't
6336 truncated, so we can checksum it. */
6337 cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, msg_length);
6338 cksum_vec[0].len = msg_length;
6339 computed_cksum = in_cksum(&cksum_vec[0], 1);
6340 if (computed_cksum == 0) {
6341 proto_tree_add_text(rsvp_header_tree, tvb, offset+2, 2,
6342 "Message Checksum: 0x%04x [correct]",
6345 proto_tree_add_text(rsvp_header_tree, tvb, offset+2, 2,
6346 "Message Checksum: 0x%04x [incorrect, should be 0x%04x]",
6348 in_cksum_shouldbe(cksum, computed_cksum));
6351 proto_tree_add_text(rsvp_header_tree, tvb, offset+2, 2,
6352 "Message Checksum: 0x%04x",
6355 proto_tree_add_text(rsvp_header_tree, tvb, offset+4, 1,
6357 tvb_get_guint8(tvb, offset+4));
6358 proto_tree_add_text(rsvp_header_tree, tvb, offset+6, 2,
6359 "Message length: %u", msg_length);
6364 if (message_type == RSVP_MSG_BUNDLE) {
6365 /* Bundle message. Dissect component messages */
6366 if (rsvp_bundle_dissect) {
6368 while (len2 < msg_length) {
6371 sub_len = tvb_get_ntohs(tvb, len2+6);
6372 tvb_sub = tvb_new_subset(tvb, len2, sub_len, sub_len);
6373 dissect_rsvp_msg_tree(tvb_sub, pinfo, rsvp_tree, TREE(TT_BUNDLE_COMPMSG), rsvph);
6377 proto_tree_add_text(rsvp_tree, tvb, offset, msg_length - len,
6378 "Bundle Component Messages Not Dissected");
6383 while (len < msg_length) {
6387 obj_length = tvb_get_ntohs(tvb, offset);
6388 rsvp_class = tvb_get_guint8(tvb, offset+2);
6389 type = tvb_get_guint8(tvb, offset+3);
6390 ti = proto_tree_add_item(rsvp_tree, hf_rsvp_filter[rsvp_class_to_filter_num(rsvp_class)],
6391 tvb, offset, obj_length, ENC_BIG_ENDIAN);
6392 rsvp_object_tree = proto_item_add_subtree(ti, TREE(rsvp_class_to_tree_type(rsvp_class)));
6393 if (obj_length < 4) {
6394 proto_tree_add_text(rsvp_object_tree, tvb, offset, 2,
6395 "Length: %u (bogus, must be >= 4)", obj_length);
6398 proto_tree_add_text(rsvp_object_tree, tvb, offset, 2,
6399 "Length: %u", obj_length);
6400 proto_tree_add_uint(rsvp_object_tree, hf_rsvp_filter[RSVPF_OBJECT], tvb,
6401 offset+2, 1, rsvp_class);
6405 switch(rsvp_class) {
6407 case RSVP_CLASS_SESSION:
6408 dissect_rsvp_session(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type, rsvph);
6411 case RSVP_CLASS_HOP:
6412 dissect_rsvp_hop(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6415 case RSVP_CLASS_TIME_VALUES:
6416 dissect_rsvp_time_values(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6419 case RSVP_CLASS_ERROR:
6420 dissect_rsvp_error(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6423 case RSVP_CLASS_SCOPE:
6424 dissect_rsvp_scope(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6427 case RSVP_CLASS_STYLE:
6428 dissect_rsvp_style(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6431 case RSVP_CLASS_CONFIRM:
6432 dissect_rsvp_confirm(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6435 case RSVP_CLASS_SENDER_TEMPLATE:
6436 case RSVP_CLASS_FILTER_SPEC:
6437 dissect_rsvp_template_filter(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type, rsvph);
6440 case RSVP_CLASS_SENDER_TSPEC:
6441 dissect_rsvp_tspec(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6444 case RSVP_CLASS_FLOWSPEC:
6445 dissect_rsvp_flowspec(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6448 case RSVP_CLASS_ADSPEC:
6449 dissect_rsvp_adspec(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6452 case RSVP_CLASS_INTEGRITY:
6453 dissect_rsvp_integrity(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6456 case RSVP_CLASS_POLICY:
6457 dissect_rsvp_policy(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6460 case RSVP_CLASS_LABEL_REQUEST:
6461 dissect_rsvp_label_request(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6464 case RSVP_CLASS_RECOVERY_LABEL:
6465 case RSVP_CLASS_UPSTREAM_LABEL:
6466 case RSVP_CLASS_SUGGESTED_LABEL:
6467 case RSVP_CLASS_LABEL:
6468 dissect_rsvp_label(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6471 case RSVP_CLASS_LABEL_SET:
6472 dissect_rsvp_label_set(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6475 case RSVP_CLASS_SESSION_ATTRIBUTE:
6476 dissect_rsvp_session_attribute(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6479 case RSVP_CLASS_EXPLICIT_ROUTE:
6480 dissect_rsvp_explicit_route(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6483 case RSVP_CLASS_RECORD_ROUTE:
6484 dissect_rsvp_record_route(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6487 case RSVP_CLASS_MESSAGE_ID:
6488 dissect_rsvp_message_id(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6491 case RSVP_CLASS_MESSAGE_ID_ACK:
6492 dissect_rsvp_message_id_ack(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6495 case RSVP_CLASS_MESSAGE_ID_LIST:
6496 dissect_rsvp_message_id_list(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6499 case RSVP_CLASS_HELLO:
6500 dissect_rsvp_hello(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6503 case RSVP_CLASS_DCLASS:
6504 dissect_rsvp_dclass(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6507 case RSVP_CLASS_ADMIN_STATUS:
6508 dissect_rsvp_admin_status(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6511 case RSVP_CLASS_LSP_ATTRIBUTES:
6512 case RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES:
6513 dissect_rsvp_lsp_attributes(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6516 case RSVP_CLASS_ASSOCIATION:
6517 dissect_rsvp_association(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6520 case RSVP_CLASS_LSP_TUNNEL_IF_ID:
6521 dissect_rsvp_lsp_tunnel_if_id(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6524 case RSVP_CLASS_NOTIFY_REQUEST:
6525 dissect_rsvp_notify_request(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6528 case RSVP_CLASS_GENERALIZED_UNI:
6529 dissect_rsvp_gen_uni(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type, rsvph);
6532 case RSVP_CLASS_CALL_ID:
6533 dissect_rsvp_call_id(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6536 case RSVP_CLASS_3GPP2_OBJECT:
6537 dissect_rsvp_3gpp_object(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6540 case RSVP_CLASS_RESTART_CAP:
6541 dissect_rsvp_restart_cap(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6544 case RSVP_CLASS_PROTECTION:
6545 dissect_rsvp_protection_info(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6548 case RSVP_CLASS_FAST_REROUTE:
6549 dissect_rsvp_fast_reroute(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6552 case RSVP_CLASS_DETOUR:
6553 dissect_rsvp_detour(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6556 case RSVP_CLASS_DIFFSERV:
6557 dissect_rsvp_diffserv(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6560 case RSVP_CLASS_CLASSTYPE:
6561 dissect_rsvp_diffserv_aware_te(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6564 case RSVP_CLASS_VENDOR_PRIVATE_1:
6565 case RSVP_CLASS_VENDOR_PRIVATE_2:
6566 case RSVP_CLASS_VENDOR_PRIVATE_3:
6567 case RSVP_CLASS_VENDOR_PRIVATE_4:
6568 case RSVP_CLASS_VENDOR_PRIVATE_5:
6569 case RSVP_CLASS_VENDOR_PRIVATE_6:
6570 case RSVP_CLASS_VENDOR_PRIVATE_7:
6571 case RSVP_CLASS_VENDOR_PRIVATE_8:
6572 case RSVP_CLASS_VENDOR_PRIVATE_9:
6573 case RSVP_CLASS_VENDOR_PRIVATE_10:
6574 case RSVP_CLASS_VENDOR_PRIVATE_11:
6575 case RSVP_CLASS_VENDOR_PRIVATE_12:
6576 dissect_rsvp_vendor_private_use(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
6579 case RSVP_CLASS_NULL:
6581 proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
6582 "Data (%d bytes)", obj_length - 4);
6586 offset += obj_length;
6591 /*------------------------------------------------------------------------------
6593 *------------------------------------------------------------------------------*/
6595 dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
6597 guint8 message_type;
6598 int session_off, tempfilt_off;
6600 rsvp_conversation_info *rsvph;
6601 conversation_t *conversation;
6602 struct rsvp_request_key request_key, *new_request_key;
6603 struct rsvp_request_val *request_val;
6605 col_set_str(pinfo->cinfo, COL_PROTOCOL,
6606 (pinfo->ipproto == IP_PROTO_RSVPE2EI) ? "RSVP-E2EI" : "RSVP");
6607 col_clear(pinfo->cinfo, COL_INFO);
6609 message_type = tvb_get_guint8(tvb, 1);
6611 rsvph = ep_new0(rsvp_conversation_info);
6613 /* Copy over the source and destination addresses from the pinfo strucutre */
6614 SET_ADDRESS(&rsvph->source, pinfo->src.type, pinfo->src.len, pinfo->src.data);
6615 SET_ADDRESS(&rsvph->destination, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data);
6617 col_add_str(pinfo->cinfo, COL_INFO,
6618 val_to_str_ext(message_type, &message_type_vals_ext, "Unknown (%u). "));
6620 if (message_type == RSVP_MSG_BUNDLE) {
6621 col_set_str(pinfo->cinfo, COL_INFO,
6622 rsvp_bundle_dissect ?
6623 "Component Messages Dissected" :
6624 "Component Messages Not Dissected");
6626 find_rsvp_session_tempfilt(tvb, 0, &session_off, &tempfilt_off);
6628 col_append_str(pinfo->cinfo, COL_INFO, summary_session(tvb, session_off));
6630 col_append_str(pinfo->cinfo, COL_INFO, summary_template(tvb, tempfilt_off));
6634 dissect_rsvp_msg_tree(tvb, pinfo, tree, TREE(TT_RSVP), rsvph);
6637 /* ACK, SREFRESH and HELLO messages don't have any associated SESSION and,
6638 therefore, no conversation */
6639 if ((message_type == RSVP_MSG_ACK) ||
6640 (message_type == RSVP_MSG_SREFRESH) ||
6641 (message_type == RSVP_MSG_HELLO))
6644 /* Find out what conversation this packet is part of. */
6645 conversation = find_or_create_conversation(pinfo);
6647 /* Now build the request key */
6648 memset(&request_key, 0, sizeof(request_key));
6649 request_key.conversation = conversation->index;
6650 request_key.session_type = rsvph->session_type;
6652 switch (request_key.session_type) {
6653 case RSVP_SESSION_TYPE_IPV4:
6654 SET_ADDRESS(&request_key.u.session_ipv4.destination,
6655 rsvph->destination.type, rsvph->destination.len,
6656 rsvph->destination.data);
6657 request_key.u.session_ipv4.protocol = rsvph->protocol;
6658 request_key.u.session_ipv4.udp_dest_port = rsvph->udp_dest_port;
6661 case RSVP_SESSION_TYPE_IPV6:
6662 /* Not supported yet */
6665 case RSVP_SESSION_TYPE_IPV4_LSP:
6666 SET_ADDRESS(&request_key.u.session_ipv4_lsp.destination,
6667 rsvph->destination.type, rsvph->destination.len,
6668 rsvph->destination.data);
6669 request_key.u.session_ipv4_lsp.udp_dest_port = rsvph->udp_dest_port;
6670 request_key.u.session_ipv4_lsp.ext_tunnel_id = rsvph->ext_tunnel_id;
6673 case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
6674 SET_ADDRESS(&request_key.u.session_agg_ipv4.destination,
6675 rsvph->destination.type, rsvph->destination.len,
6676 rsvph->destination.data);
6677 request_key.u.session_agg_ipv4.dscp = rsvph->dscp;
6680 case RSVP_SESSION_TYPE_IPV4_UNI:
6681 SET_ADDRESS(&request_key.u.session_ipv4_uni.destination,
6682 rsvph->destination.type, rsvph->destination.len,
6683 rsvph->destination.data);
6684 request_key.u.session_ipv4_uni.udp_dest_port = rsvph->udp_dest_port;
6685 request_key.u.session_ipv4_uni.ext_tunnel_id = rsvph->ext_tunnel_id;
6688 case RSVP_SESSION_TYPE_IPV4_E_NNI:
6689 SET_ADDRESS(&request_key.u.session_ipv4_enni.destination,
6690 rsvph->destination.type, rsvph->destination.len,
6691 rsvph->destination.data);
6692 request_key.u.session_ipv4_enni.udp_dest_port = rsvph->udp_dest_port;
6693 request_key.u.session_ipv4_enni.ext_tunnel_id = rsvph->ext_tunnel_id;
6696 /* This should never happen. */
6698 proto_tree_add_text(tree, tvb, 0, 0, "Unknown session type");
6703 SE_COPY_ADDRESS(&request_key.source_info.source, &rsvph->source);
6704 request_key.source_info.udp_source_port = rsvph->udp_source_port;
6706 /* See if a request with this key already exists */
6708 (struct rsvp_request_val *) g_hash_table_lookup(rsvp_request_hash,
6711 /* If not, insert the new request key into the hash table */
6713 new_request_key = (struct rsvp_request_key *)se_memdup(&request_key, sizeof(struct rsvp_request_key));
6715 request_val = se_new(struct rsvp_request_val);
6716 request_val->value = conversation->index;
6718 g_hash_table_insert(rsvp_request_hash, new_request_key, request_val);
6721 tap_queue_packet(rsvp_tap, pinfo, rsvph);
6725 register_rsvp_prefs(void)
6727 module_t *rsvp_module;
6729 rsvp_module = prefs_register_protocol(proto_rsvp, NULL);
6730 prefs_register_bool_preference(
6731 rsvp_module, "process_bundle",
6732 "Dissect sub-messages in BUNDLE message",
6733 "Specifies whether Wireshark should decode and display sub-messages within BUNDLE messages",
6734 &rsvp_bundle_dissect);
6735 prefs_register_enum_preference(
6736 rsvp_module, "generalized_label_options",
6737 "Dissect generalized labels as",
6738 "Specifies how Wireshark should dissect generalized labels",
6739 (gint *)&rsvp_generalized_label_option,
6740 rsvp_generalized_label_options,
6745 proto_register_rsvp(void)
6749 static hf_register_info rsvpf_info[] = {
6751 /* Message type number */
6752 {&hf_rsvp_filter[RSVPF_MSG],
6753 { "Message Type", "rsvp.msg",
6754 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &message_type_vals_ext, 0x0,
6758 /* Message type shorthands */
6759 {&hf_rsvp_filter[RSVPF_PATH],
6760 { "Path Message", "rsvp.path",
6761 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6765 {&hf_rsvp_filter[RSVPF_RESV],
6766 { "Resv Message", "rsvp.resv",
6767 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6771 {&hf_rsvp_filter[RSVPF_PATHERR],
6772 { "Path Error Message", "rsvp.perr",
6773 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6777 {&hf_rsvp_filter[RSVPF_RESVERR],
6778 { "Resv Error Message", "rsvp.rerr",
6779 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6783 {&hf_rsvp_filter[RSVPF_PATHTEAR],
6784 { "Path Tear Message", "rsvp.ptear",
6785 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6789 {&hf_rsvp_filter[RSVPF_RESVTEAR],
6790 { "Resv Tear Message", "rsvp.rtear",
6791 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6795 {&hf_rsvp_filter[RSVPF_RCONFIRM],
6796 { "Resv Confirm Message", "rsvp.resvconf",
6797 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6801 {&hf_rsvp_filter[RSVPF_RTEARCONFIRM],
6802 { "Resv Tear Confirm Message", "rsvp.rtearconf",
6803 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6807 {&hf_rsvp_filter[RSVPF_BUNDLE],
6808 { "Bundle Message", "rsvp.bundle",
6809 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6813 {&hf_rsvp_filter[RSVPF_ACK],
6814 { "Ack Message", "rsvp.ack",
6815 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6819 {&hf_rsvp_filter[RSVPF_SREFRESH],
6820 { "Srefresh Message", "rsvp.srefresh",
6821 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6825 {&hf_rsvp_filter[RSVPF_HELLO],
6826 { "HELLO Message", "rsvp.hello",
6827 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6832 {&hf_rsvp_filter[RSVPF_OBJECT],
6833 { "Object class", "rsvp.object",
6834 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &rsvp_class_vals_ext, 0x0,
6838 {&hf_rsvp_filter[RSVPF_NOTIFY],
6839 { "Notify Message", "rsvp.notify",
6840 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
6844 /* Object present shorthands */
6845 {&hf_rsvp_filter[RSVPF_SESSION],
6846 { "SESSION", "rsvp.session",
6847 FT_NONE, BASE_NONE, NULL, 0x0,
6851 {&hf_rsvp_filter[RSVPF_HOP],
6852 { "HOP", "rsvp.hop",
6853 FT_NONE, BASE_NONE, NULL, 0x0,
6857 {&hf_rsvp_filter[RSVPF_HELLO_OBJ],
6858 { "HELLO Request/Ack", "rsvp.hello_obj",
6859 FT_NONE, BASE_NONE, NULL, 0x0,
6863 {&hf_rsvp_filter[RSVPF_INTEGRITY],
6864 { "INTEGRITY", "rsvp.integrity",
6865 FT_NONE, BASE_NONE, NULL, 0x0,
6869 {&hf_rsvp_filter[RSVPF_TIME_VALUES],
6870 { "TIME VALUES", "rsvp.time",
6871 FT_NONE, BASE_NONE, NULL, 0x0,
6875 {&hf_rsvp_filter[RSVPF_ERROR],
6876 { "ERROR", "rsvp.error",
6877 FT_NONE, BASE_NONE, NULL, 0x0,
6881 {&hf_rsvp_filter[RSVPF_SCOPE],
6882 { "SCOPE", "rsvp.scope",
6883 FT_NONE, BASE_NONE, NULL, 0x0,
6887 {&hf_rsvp_filter[RSVPF_STYLE],
6888 { "STYLE", "rsvp.style",
6889 FT_NONE, BASE_NONE, NULL, 0x0,
6893 {&hf_rsvp_filter[RSVPF_FLOWSPEC],
6894 { "FLOWSPEC", "rsvp.flowspec",
6895 FT_NONE, BASE_NONE, NULL, 0x0,
6899 {&hf_rsvp_filter[RSVPF_FILTER_SPEC],
6900 { "FILTERSPEC", "rsvp.filter",
6901 FT_NONE, BASE_NONE, NULL, 0x0,
6905 {&hf_rsvp_filter[RSVPF_SENDER],
6906 { "SENDER TEMPLATE", "rsvp.sender",
6907 FT_NONE, BASE_NONE, NULL, 0x0,
6911 {&hf_rsvp_filter[RSVPF_TSPEC],
6912 { "SENDER TSPEC", "rsvp.tspec",
6913 FT_NONE, BASE_NONE, NULL, 0x0,
6917 {&hf_rsvp_filter[RSVPF_ADSPEC],
6918 { "ADSPEC", "rsvp.adspec",
6919 FT_NONE, BASE_NONE, NULL, 0x0,
6923 {&hf_rsvp_filter[RSVPF_POLICY],
6924 { "POLICY", "rsvp.policy",
6925 FT_NONE, BASE_NONE, NULL, 0x0,
6929 {&hf_rsvp_filter[RSVPF_CONFIRM],
6930 { "CONFIRM", "rsvp.confirm",
6931 FT_NONE, BASE_NONE, NULL, 0x0,
6935 {&hf_rsvp_filter[RSVPF_LABEL],
6936 { "LABEL", "rsvp.label",
6937 FT_NONE, BASE_NONE, NULL, 0x0,
6941 {&hf_rsvp_filter[RSVPF_RECOVERY_LABEL],
6942 { "RECOVERY LABEL", "rsvp.recovery_label",
6943 FT_NONE, BASE_NONE, NULL, 0x0,
6947 {&hf_rsvp_filter[RSVPF_UPSTREAM_LABEL],
6948 { "UPSTREAM LABEL", "rsvp.upstream_label",
6949 FT_NONE, BASE_NONE, NULL, 0x0,
6953 {&hf_rsvp_filter[RSVPF_SUGGESTED_LABEL],
6954 { "SUGGESTED LABEL", "rsvp.suggested_label",
6955 FT_NONE, BASE_NONE, NULL, 0x0,
6959 {&hf_rsvp_filter[RSVPF_LABEL_SET],
6960 { "LABEL SET", "rsvp.label_set",
6961 FT_NONE, BASE_NONE, NULL, 0x0,
6965 {&hf_rsvp_filter[RSVPF_ACCEPTABLE_LABEL_SET],
6966 { "ACCEPTABLE LABEL SET", "rsvp.acceptable_label_set",
6967 FT_NONE, BASE_NONE, NULL, 0x0,
6971 {&hf_rsvp_filter[RSVPF_PROTECTION],
6972 { "PROTECTION", "rsvp.protection",
6973 FT_NONE, BASE_NONE, NULL, 0x0,
6977 {&hf_rsvp_filter[RSVPF_DIFFSERV],
6978 { "DIFFSERV", "rsvp.diffserv",
6979 FT_NONE, BASE_NONE, NULL, 0x0,
6983 {&hf_rsvp_filter[RSVPF_DSTE],
6984 { "CLASSTYPE", "rsvp.dste",
6985 FT_NONE, BASE_NONE, NULL, 0x0,
6989 {&hf_rsvp_filter[RSVPF_RESTART_CAP],
6990 { "RESTART CAPABILITY", "rsvp.restart",
6991 FT_NONE, BASE_NONE, NULL, 0x0,
6995 {&hf_rsvp_filter[RSVPF_LABEL_REQUEST],
6996 { "LABEL REQUEST", "rsvp.label_request",
6997 FT_NONE, BASE_NONE, NULL, 0x0,
7001 {&hf_rsvp_filter[RSVPF_SESSION_ATTRIBUTE],
7002 { "SESSION ATTRIBUTE", "rsvp.session_attribute",
7003 FT_NONE, BASE_NONE, NULL, 0x0,
7007 {&hf_rsvp_filter[RSVPF_EXPLICIT_ROUTE],
7008 { "EXPLICIT ROUTE", "rsvp.explicit_route",
7009 FT_NONE, BASE_NONE, NULL, 0x0,
7013 {&hf_rsvp_filter[RSVPF_RECORD_ROUTE],
7014 { "RECORD ROUTE", "rsvp.record_route",
7015 FT_NONE, BASE_NONE, NULL, 0x0,
7019 {&hf_rsvp_filter[RSVPF_MESSAGE_ID],
7020 { "MESSAGE-ID", "rsvp.msgid",
7021 FT_NONE, BASE_NONE, NULL, 0x0,
7025 {&hf_rsvp_filter[RSVPF_MESSAGE_ID_ACK],
7026 { "MESSAGE-ID ACK", "rsvp.msgid_ack",
7027 FT_NONE, BASE_NONE, NULL, 0x0,
7031 {&hf_rsvp_filter[RSVPF_MESSAGE_ID_LIST],
7032 { "MESSAGE-ID LIST", "rsvp.msgid_list",
7033 FT_NONE, BASE_NONE, NULL, 0x0,
7037 {&hf_rsvp_filter[RSVPF_DCLASS],
7038 { "DCLASS", "rsvp.dclass",
7039 FT_NONE, BASE_NONE, NULL, 0x0,
7043 {&hf_rsvp_filter[RSVPF_LSP_TUNNEL_IF_ID],
7044 { "LSP INTERFACE-ID", "rsvp.lsp_tunnel_if_id",
7045 FT_NONE, BASE_NONE, NULL, 0x0,
7049 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS],
7050 { "ADMIN STATUS", "rsvp.admin_status",
7051 FT_NONE, BASE_NONE, NULL, 0x0,
7055 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_REFLECT],
7056 { "Reflect", "rsvp.admin_status.reflect",
7057 FT_BOOLEAN, 32, NULL, 0x80000000,
7061 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_HANDOVER],
7062 { "Handover", "rsvp.admin_status.handover",
7063 FT_BOOLEAN, 32, NULL, 0x40,
7067 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_LOCKOUT],
7068 { "Lockout", "rsvp.admin_status.lockout",
7069 FT_BOOLEAN, 32, NULL, 0x20,
7073 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_INHIBIT],
7074 { "Inhibit Alarm Communication", "rsvp.admin_status.inhibit",
7075 FT_BOOLEAN, 32, NULL, 0x10,
7079 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_CALL_MGMT],
7080 { "Call Management", "rsvp.admin_status.callmgmt",
7081 FT_BOOLEAN, 32, NULL, 0x08,
7085 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_TESTING],
7086 { "Testing", "rsvp.admin_status.testing",
7087 FT_BOOLEAN, 32, NULL, 0x04,
7091 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_DOWN],
7092 { "Administratively down", "rsvp.admin_status.down",
7093 FT_BOOLEAN, 32, NULL, 0x02,
7097 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_DELETE],
7098 { "Delete in progress", "rsvp.admin_status.delete",
7099 FT_BOOLEAN, 32, NULL, 0x01,
7103 {&hf_rsvp_filter[RSVPF_LSP_ATTRIBUTES],
7104 { "LSP ATTRIBUTES", "rsvp.lsp_attributes",
7105 FT_NONE, BASE_NONE, NULL, 0x0,
7109 {&hf_rsvp_filter[RSVPF_ASSOCIATION],
7110 { "ASSOCIATION", "rsvp.association",
7111 FT_NONE, BASE_NONE, NULL, 0x0,
7115 {&hf_rsvp_filter[RSVPF_NOTIFY_REQUEST],
7116 { "NOTIFY REQUEST", "rsvp.notify_request",
7117 FT_NONE, BASE_NONE, NULL, 0x0,
7121 {&hf_rsvp_filter[RSVPF_GENERALIZED_UNI],
7122 { "GENERALIZED UNI", "rsvp.generalized_uni",
7123 FT_NONE, BASE_NONE, NULL, 0x0,
7127 {&hf_rsvp_filter[RSVPF_CALL_ID],
7128 { "CALL ID", "rsvp.call_id",
7129 FT_NONE, BASE_NONE, NULL, 0x0,
7133 {&hf_rsvp_filter[RSVPF_3GPP2_OBJECT],
7134 { "3GPP2 OBJECT", "rsvp.3gpp2_object",
7135 FT_NONE, BASE_NONE, NULL, 0x0,
7138 {&hf_rsvp_filter[RSVPF_PRIVATE_OBJ],
7139 { "Private object", "rsvp.obj_private",
7140 FT_NONE, BASE_NONE, NULL, 0x0,
7144 {&hf_rsvp_filter[RSVPF_UNKNOWN_OBJ],
7145 { "Unknown object", "rsvp.obj_unknown",
7146 FT_NONE, BASE_NONE, NULL, 0x0,
7150 /* Session fields */
7151 {&hf_rsvp_filter[RSVPF_SESSION_IP],
7152 { "Destination address", "rsvp.session.ip",
7153 FT_IPv4, BASE_NONE, NULL, 0x0,
7157 {&hf_rsvp_filter[RSVPF_SESSION_PORT],
7158 { "Port number", "rsvp.session.port",
7159 FT_UINT16, BASE_DEC, NULL, 0x0,
7163 {&hf_rsvp_filter[RSVPF_SESSION_PROTO],
7164 { "Protocol", "rsvp.session.proto",
7165 FT_UINT8, BASE_DEC, VALS(proto_vals), 0x0,
7169 {&hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
7170 { "Tunnel ID", "rsvp.session.tunnel_id",
7171 FT_UINT16, BASE_DEC, NULL, 0x0,
7175 {&hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
7176 { "Extended tunnel ID", "rsvp.session.ext_tunnel_id",
7177 FT_UINT32, BASE_DEC, NULL, 0x0,
7181 /* Sender template/Filterspec fields */
7182 {&hf_rsvp_filter[RSVPF_SENDER_IP],
7183 { "Sender IPv4 address", "rsvp.sender.ip",
7184 FT_IPv4, BASE_NONE, NULL, 0x0,
7188 {&hf_rsvp_filter[RSVPF_SENDER_PORT],
7189 { "Sender port number", "rsvp.sender.port",
7190 FT_UINT16, BASE_DEC, NULL, 0x0,
7194 {&hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
7195 { "Sender LSP ID", "rsvp.sender.lsp_id",
7196 FT_UINT16, BASE_DEC, NULL, 0x0,
7200 /* Diffserv object fields */
7201 {&hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
7202 { "MAPnb", "rsvp.diffserv.mapnb",
7203 FT_UINT8, BASE_DEC, NULL, 0x0,
7204 MAPNB_DESCRIPTION, HFILL }
7207 {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
7208 { "MAP", "rsvp.diffserv.map",
7209 FT_NONE, BASE_NONE, NULL, 0x0,
7210 MAP_DESCRIPTION, HFILL }
7213 {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
7214 { "EXP", "rsvp.diffserv.map.exp",
7215 FT_UINT8, BASE_DEC, NULL, 0x0,
7216 EXP_DESCRIPTION, HFILL }
7219 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
7220 { PHBID_DESCRIPTION, "rsvp.diffserv.phbid",
7221 FT_NONE, BASE_NONE, NULL, 0x0,
7225 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
7226 { PHBID_DSCP_DESCRIPTION, "rsvp.diffserv.phbid.dscp",
7227 FT_UINT16, BASE_DEC, NULL, PHBID_DSCP_MASK,
7231 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
7232 { PHBID_CODE_DESCRIPTION, "rsvp.diffserv.phbid.code",
7233 FT_UINT16, BASE_DEC, NULL, PHBID_CODE_MASK,
7237 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
7238 { PHBID_BIT14_DESCRIPTION, "rsvp.diffserv.phbid.bit14",
7239 FT_UINT16, BASE_DEC, VALS(phbid_bit14_vals), PHBID_BIT14_MASK,
7243 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15],
7244 { PHBID_BIT15_DESCRIPTION, "rsvp.diffserv.phbid.bit15",
7245 FT_UINT16, BASE_DEC, VALS(phbid_bit15_vals), PHBID_BIT15_MASK,
7249 /* Diffserv-aware TE object field */
7250 {&hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
7251 { "CT", "rsvp.dste.classtype",
7252 FT_UINT8, BASE_DEC, NULL, 0x0,
7256 /* Generalized UNI object field */
7257 {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
7258 { "Source TNA", "rsvp.guni.srctna.ipv4",
7259 FT_IPv4, BASE_NONE, NULL, 0x0,
7263 {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
7264 { "Destination TNA", "rsvp.guni.dsttna.ipv4",
7265 FT_IPv4, BASE_NONE, NULL, 0x0,
7269 {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
7270 { "Source TNA", "rsvp.guni.srctna.ipv6",
7271 FT_IPv6, BASE_NONE, NULL, 0x0,
7275 {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
7276 { "Destination TNA", "rsvp.guni.dsttna.ipv6",
7277 FT_IPv6, BASE_NONE, NULL, 0x0,
7281 /* Generalized UNI object field */
7282 {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
7283 { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv4",
7284 FT_IPv4, BASE_NONE, NULL, 0x0,
7288 {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
7289 { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv6",
7290 FT_IPv6, BASE_NONE, NULL, 0x0,
7294 * FF: Vendor Private object field, please see
7295 * http://www.iana.org/assignments/enterprise-numbers
7297 {&hf_rsvp_filter[RSVPF_ENT_CODE],
7298 { "Enterprise Code", "rsvp.obj_private.enterprise",
7299 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0,
7300 "IANA Network Management Private Enterprise Code", HFILL }
7303 {&hf_rsvp_error_flags,
7304 { "Flags", "rsvp.error_flags",
7305 FT_UINT8, BASE_HEX, NULL, 0x0,
7309 {&hf_rsvp_error_flags_path_state_removed,
7310 { "Path State Removed", "rsvp.error_flags.path_state_removed",
7311 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x04,
7315 {&hf_rsvp_error_flags_not_guilty,
7316 { "NotGuilty", "rsvp.error_flags.not_guilty",
7317 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02,
7321 {&hf_rsvp_error_flags_in_place,
7322 { "InPlace", "rsvp.error_flags.in_place",
7323 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01,
7327 {&hf_rsvp_eth_tspec_tlv_color_mode,
7328 { "Color Mode (CM)", "rsvp.eth_tspec_tlv.color_mode",
7329 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02,
7333 {&hf_rsvp_eth_tspec_tlv_coupling_flag,
7334 { "Coupling Flag (CF)", "rsvp.eth_tspec_tlv.coupling_flag",
7335 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01,
7339 {&hf_rsvp_sender_tspec_standard_contiguous_concatenation,
7340 { "Standard contiguous concatenation", "rsvp.sender_tspec.standard_contiguous_concatenation",
7341 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01,
7345 {&hf_rsvp_sender_tspec_arbitrary_contiguous_concatenation,
7346 { "Arbitrary contiguous concatenation", "rsvp.sender_tspec.arbitrary_contiguous_concatenation",
7347 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
7351 {&hf_rsvp_sender_tspec_regenerator_section,
7352 { "Section/Regenerator Section layer transparency", "rsvp.sender_tspec.regenerator_section",
7353 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
7357 {&hf_rsvp_sender_tspec_multiplex_section,
7358 { "Line/Multiplex Section layer transparency", "rsvp.sender_tspec.multiplex_section",
7359 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
7363 {&hf_rsvp_sender_tspec_J0_transparency,
7364 { "J0 transparency", "rsvp.sender_tspec.J0_transparency",
7365 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
7369 {&hf_rsvp_sender_tspec_SOH_RSOH_DCC_transparency,
7370 { "SOH/RSOH DCC transparency", "rsvp.sender_tspec.SOH_RSOH_DCC_transparency",
7371 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
7375 {&hf_rsvp_sender_tspec_LOH_MSOH_DCC_transparency,
7376 { "LOH/MSOH DCC transparency", "rsvp.sender_tspec.LOH_MSOH_DCC_transparency",
7377 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0010,
7381 {&hf_rsvp_sender_tspec_LOH_MSOH_extended_DCC_transparency,
7382 { "LOH/MSOH Extended DCC transparency", "rsvp.sender_tspec.LOH_MSOH_extended_DCC_transparency",
7383 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0020,
7387 {&hf_rsvp_sender_tspec_K1_K2_transparency,
7388 { "K1/K2 transparency", "rsvp.sender_tspec.K1_K2_transparency",
7389 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0040,
7393 {&hf_rsvp_sender_tspec_E1_transparency,
7394 { "E1 transparency", "rsvp.sender_tspec.E1_transparency",
7395 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0080,
7399 {&hf_rsvp_sender_tspec_F1_transparency,
7400 { "F1 transparency", "rsvp.sender_tspec.F1_transparency",
7401 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0100,
7405 {&hf_rsvp_sender_tspec_E2_transparency,
7406 { "E2 transparency", "rsvp.sender_tspec.E2_transparency",
7407 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0200,
7411 {&hf_rsvp_sender_tspec_B1_transparency,
7412 { "B1 transparency", "rsvp.sender_tspec.B1_transparency",
7413 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0400,
7417 {&hf_rsvp_sender_tspec_B2_transparency,
7418 { "B2 transparency", "rsvp.sender_tspec.B2_transparency",
7419 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0800,
7423 {&hf_rsvp_sender_tspec_M0_transparency,
7424 { "M0 transparency", "rsvp.sender_tspec.M0_transparency",
7425 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x1000,
7429 {&hf_rsvp_sender_tspec_M1_transparency,
7430 { "M1 transparency", "rsvp.sender_tspec.M1_transparency",
7431 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x2000,
7435 {&hf_rsvp_flowspec_standard_contiguous_concatenation,
7436 { "Standard contiguous concatenation", "rsvp.flowspec.standard_contiguous_concatenation",
7437 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01,
7441 {&hf_rsvp_flowspec_arbitrary_contiguous_concatenation,
7442 { "Arbitrary contiguous concatenation", "rsvp.flowspec.arbitrary_contiguous_concatenation",
7443 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
7447 {&hf_rsvp_flowspec_regenerator_section,
7448 { "Section/Regenerator Section layer transparency", "rsvp.flowspec.regenerator_section",
7449 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
7453 {&hf_rsvp_flowspec_multiplex_section,
7454 { "Line/Multiplex Section layer transparency", "rsvp.flowspec.multiplex_section",
7455 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
7459 {&hf_rsvp_flowspec_J0_transparency,
7460 { "J0 transparency", "rsvp.flowspec.J0_transparency",
7461 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
7465 {&hf_rsvp_flowspec_SOH_RSOH_DCC_transparency,
7466 { "SOH/RSOH DCC transparency", "rsvp.flowspec.SOH_RSOH_DCC_transparency",
7467 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
7471 {&hf_rsvp_flowspec_LOH_MSOH_DCC_transparency,
7472 { "LOH/MSOH DCC transparency", "rsvp.flowspec.LOH_MSOH_DCC_transparency",
7473 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0010,
7477 {&hf_rsvp_flowspec_LOH_MSOH_extended_DCC_transparency,
7478 { "LOH/MSOH Extended DCC transparency", "rsvp.flowspec.LOH_MSOH_extended_DCC_transparency",
7479 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0020,
7483 {&hf_rsvp_flowspec_K1_K2_transparency,
7484 { "K1/K2 transparency", "rsvp.flowspec.K1_K2_transparency",
7485 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0040,
7489 {&hf_rsvp_flowspec_E1_transparency,
7490 { "E1 transparency", "rsvp.flowspec.E1_transparency",
7491 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0080,
7495 {&hf_rsvp_flowspec_F1_transparency,
7496 { "F1 transparency", "rsvp.flowspec.F1_transparency",
7497 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0100,
7501 {&hf_rsvp_flowspec_E2_transparency,
7502 { "E2 transparency", "rsvp.flowspec.E2_transparency",
7503 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0200,
7507 {&hf_rsvp_flowspec_B1_transparency,
7508 { "B1 transparency", "rsvp.flowspec.B1_transparency",
7509 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0400,
7513 {&hf_rsvp_flowspec_B2_transparency,
7514 { "B2 transparency", "rsvp.flowspec.B2_transparency",
7515 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0800,
7519 {&hf_rsvp_flowspec_M0_transparency,
7520 { "M0 transparency", "rsvp.flowspec.M0_transparency",
7521 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x1000,
7525 {&hf_rsvp_flowspec_M1_transparency,
7526 { "M1 transparency", "rsvp.flowspec.M1_transparency",
7527 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x2000,
7531 {&hf_rsvp_integrity_flags_handshake,
7532 { "Handshake", "rsvp.integrity.flags.handshake",
7533 FT_BOOLEAN, 8, TFS(&tfs_capable_not_capable), 0x01,
7537 {&hf_rsvp_sa_flags_local,
7538 { "Local protection", "rsvp.sa.flags.local",
7539 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
7543 {&hf_rsvp_sa_flags_label,
7544 { "Label recording", "rsvp.sa.flags.label",
7545 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
7549 {&hf_rsvp_sa_flags_se_style,
7550 { "SE style", "rsvp.sa.flags.se_style",
7551 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
7555 {&hf_rsvp_sa_flags_bandwidth,
7556 { "Bandwidth protection", "rsvp.sa.flags.bandwidth",
7557 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
7561 {&hf_rsvp_sa_flags_node,
7562 { "Node protection", "rsvp.sa.flags.node",
7563 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
7567 {&hf_rsvp_rro_flags_local_avail,
7568 { "Local Protection", "rsvp.rro.flags.local_avail",
7569 FT_BOOLEAN, 8, TFS(&tfs_available_not_available), 0x01,
7573 {&hf_rsvp_rro_flags_local_in_use,
7574 { "Local Protection", "rsvp.rro.flags.local_in_use",
7575 FT_BOOLEAN, 8, TFS(&tfs_used_notused), 0x02,
7579 {&hf_rsvp_rro_flags_bandwidth,
7580 { "Bandwidth Protection", "rsvp.rro.flags.bandwidth",
7581 FT_BOOLEAN, 8, TFS(&tfs_available_not_available), 0x04,
7585 {&hf_rsvp_rro_flags_node,
7586 { "Node Protection", "rsvp.rro.flags.node",
7587 FT_BOOLEAN, 8, TFS(&tfs_available_not_available), 0x08,
7591 {&hf_rsvp_rro_flags_node_address,
7592 { "Address Specifies a Node-id Address", "rsvp.rro.flags.node_address",
7593 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10,
7597 {&hf_rsvp_rro_flags_backup_tunnel_bandwidth,
7598 { "Backup Tunnel Has Bandwidth", "rsvp.rro.flags.backup_tunnel_bandwidth",
7599 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04,
7603 {&hf_rsvp_rro_flags_backup_tunnel_hop,
7604 { "Backup Tunnel Goes To", "rsvp.rro.flags.backup_tunnel_hop",
7605 FT_BOOLEAN, 8, TFS(&tfs_next_next_hop_next_hop), 0x08,
7609 {&hf_rsvp_rro_flags_global_label,
7610 { "Global label", "rsvp.rro.flags.global_label",
7611 FT_BOOLEAN, 8, NULL, 0x01,
7615 {&hf_rsvp_lsp_attr_e2e,
7616 { "E2E re-routing", "rsvp.lsp_attr.e2e",
7617 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x01,
7621 {&hf_rsvp_lsp_attr_boundary,
7622 { "Boundary re-routing", "rsvp.lsp_attr.boundary",
7623 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x02,
7627 {&hf_rsvp_lsp_attr_segment,
7628 { "Segment-based re-routing", "rsvp.lsp_attr.segment",
7629 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x04,
7633 {&hf_rsvp_gen_uni_direction,
7634 { "Direction", "rsvp.gen_uni.direction",
7635 FT_BOOLEAN, 8, TFS(&tfs_gen_uni_direction), 0x80,
7639 {&hf_rsvp_protection_info_flags_secondary_lsp,
7640 { "Secondary LSP", "rsvp.pi.flags.secondary_lsp",
7641 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
7645 {&hf_rsvp_pi_link_flags_extra_traffic,
7646 { "Extra Traffic", "rsvp.pi_link.flags.extra_traffic",
7647 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
7651 {&hf_rsvp_pi_link_flags_unprotected,
7652 { "Unprotected", "rsvp.pi_link.flags.unprotected",
7653 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
7657 {&hf_rsvp_pi_link_flags_shared,
7658 { "Shared", "rsvp.pi_link.flags.shared",
7659 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
7663 {&hf_rsvp_pi_link_flags_dedicated1_1,
7664 { "Dedicated 1:1", "rsvp.pi_link.flags.dedicated1_1",
7665 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
7669 {&hf_rsvp_pi_link_flags_dedicated1plus1,
7670 { "Dedicated 1+1", "rsvp.pi_link.flags.dedicated1plus1",
7671 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
7675 {&hf_rsvp_pi_link_flags_enhanced,
7676 { "Enhanced", "rsvp.pi_link.flags.enhanced",
7677 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x20,
7681 {&hf_rsvp_pi_link_flags_extra,
7682 { "Extra Traffic", "rsvp.pi_link.flags.extra",
7683 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
7687 {&hf_rsvp_pi_link_flags_dedicated_1_1,
7688 { "Dedicated 1:1", "rsvp.pi_link.flags.dedicated_1_1",
7689 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
7693 {&hf_rsvp_pi_link_flags_dedicated_1plus1,
7694 { "Dedicated 1+1", "rsvp.pi_link.flags.dedicated_1plus1",
7695 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
7699 {&hf_rsvp_rfc4872_secondary,
7700 { "Secondary LSP", "rsvp.rfc4872.secondary",
7701 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
7705 {&hf_rsvp_rfc4872_protecting,
7706 { "Protecting LSP", "rsvp.rfc4872.protecting",
7707 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
7711 {&hf_rsvp_rfc4872_notification_msg,
7712 { "Protecting LSP", "rsvp.rfc4872.notification_msg",
7713 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20,
7717 {&hf_rsvp_rfc4872_operational,
7718 { "Protecting LSP", "rsvp.rfc4872.operational",
7719 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10,
7723 {&hf_rsvp_pi_lsp_flags_full_rerouting,
7724 { "(Full) rerouting", "rsvp.pi_lsp.flags.full_rerouting",
7725 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
7729 {&hf_rsvp_pi_lsp_flags_rerouting_extra,
7730 { "Rerouting without extra-traffic", "rsvp.pi_lsp.flags.rerouting_extra",
7731 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
7735 {&hf_rsvp_pi_lsp_flags_1_n_protection,
7736 { "1:N protection with extra-traffic", "rsvp.pi_lsp.flags.1_n_protection",
7737 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
7741 {&hf_rsvp_pi_lsp_flags_1plus1_unidirectional,
7742 { "1+1 unidirectional protection", "rsvp.pi_lsp.flags.1plus1_unidirectional",
7743 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
7747 {&hf_rsvp_pi_lsp_flags_1plus1_bidirectional,
7748 { "1+1 bidirectional protection", "rsvp.pi_lsp.flags.1plus1_bidirectional",
7749 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
7753 {&hf_rsvp_protection_info_in_place,
7754 { "In-Place", "rsvp.protection_info.in_place",
7755 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
7759 {&hf_rsvp_protection_info_required,
7760 { "Required", "rsvp.protection_info.required",
7761 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
7765 {&hf_rsvp_pi_seg_flags_full_rerouting,
7766 { "(Full) rerouting", "rsvp.pi_seg.flags.full_rerouting",
7767 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
7771 {&hf_rsvp_pi_seg_flags_rerouting_extra,
7772 { "Rerouting without extra-traffic", "rsvp.pi_seg.flags.rerouting_extra",
7773 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
7777 {&hf_rsvp_pi_seg_flags_1_n_protection,
7778 { "1:N protection with extra-traffic", "rsvp.pi_seg.flags.1_n_protection",
7779 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
7783 {&hf_rsvp_pi_seg_flags_1plus1_unidirectional,
7784 { "1+1 unidirectional protection", "rsvp.pi_seg.flags.1plus1_unidirectional",
7785 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
7789 {&hf_rsvp_pi_seg_flags_1plus1_bidirectional,
7790 { "1+1 bidirectional protection", "rsvp.pi_seg.flags.1plus1_bidirectional",
7791 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
7795 {&hf_rsvp_frr_flags_one2one_backup,
7796 { "One-to-One Backup", "rsvp.frr.flags.one2one_backup",
7797 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
7801 {&hf_rsvp_frr_flags_facility_backup,
7802 { "Facility Backup", "rsvp.frr.flags.facility_backup",
7803 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
7807 { "C-Type", "rsvp.ctype",
7808 FT_UINT8, BASE_DEC, NULL, 0,
7811 {&hf_rsvp_3gpp_obj_tid,
7812 { "Transaction ID", "rsvp.3gpp_obj.tid",
7813 FT_UINT32, BASE_DEC, NULL, 0,
7816 {&hf_rsvp_3gpp_obj_ie_len,
7817 { "Length", "rsvp.3gpp_obj.length",
7818 FT_UINT32, BASE_DEC, NULL, 0,
7821 {&hf_rsvp_3gpp_obj_ie_type,
7822 { "IE Type", "rsvp.3gpp_obj.ie_type",
7823 FT_UINT32, BASE_DEC, VALS(rsvp_3gpp_object_ie_type_vals), 0,
7829 gint *ett_tree[TT_MAX];
7831 /* Build the tree array */
7832 for (i=0; i<TT_MAX; i++) {
7833 ett_treelist[i] = -1;
7834 ett_tree[i] = &(ett_treelist[i]);
7836 proto_rsvp = proto_register_protocol("Resource ReserVation Protocol (RSVP)",
7838 proto_register_field_array(proto_rsvp, rsvpf_info, array_length(rsvpf_info));
7839 proto_register_subtree_array(ett_tree, array_length(ett_tree));
7840 register_rsvp_prefs();
7842 rsvp_dissector_table = register_dissector_table("rsvp.proto", "RSVP Protocol",
7843 FT_UINT8, BASE_DEC);
7845 /* Initialization routine for RSVP conversations */
7846 register_init_routine(&rsvp_init_protocol);
7850 proto_reg_handoff_rsvp(void)
7852 dissector_handle_t rsvp_handle;
7854 rsvp_handle = create_dissector_handle(dissect_rsvp, proto_rsvp);
7855 dissector_add_uint("ip.proto", IP_PROTO_RSVP, rsvp_handle);
7856 dissector_add_uint("ip.proto", IP_PROTO_RSVPE2EI, rsvp_handle);
7857 dissector_add_uint("udp.port", UDP_PORT_PRSVP, rsvp_handle);
7858 rsvp_tap = register_tap("rsvp");