1 /* packet-rsvp.c
2 * Routines for RSVP packet disassembly
3 *
4 * (c) Copyright Ashok Narayanan <ashokn@cisco.com>
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13 /*
14 * NOTES
15 *
16 * This module defines routines to disassemble RSVP packets, as defined in
17 * RFC 2205. All objects from RFC2205 are supported, in IPv4 and IPv6 mode.
18 * In addition, the Integrated Services traffic specification objects
19 * defined in RFC2210 are also supported.
20 *
21 * IPv6 support is not completely tested
22 *
23 * Mar 3, 2000: Added support for MPLS/TE objects, as defined in
24 * <draft-ietf-mpls-rsvp-lsp-tunnel-04.txt>
25 *
26 * May 6, 2004: Added support for E-NNI objects, as defined in
27 * <OIF-E-NNI-01.0> (Roberto Morro)
28 * <roberto.morro[AT]tilab.com>
29 *
30 * May 6, 2004: Modified some UNI objects, as defined in
31 * <OIF2003.249.09> (Roberto Morro)
32 * <roberto.morro[AT]tilab.com>
33 *
34 * June 2, 2005: Modified more UNI objects to show correct TNA
35 * addresses; Fixed LSP interface ID subobject (Richard Rabbat)
36 * <richard[AT]us.fujitsu.com>
37 *
38 * July 25, 2005: improved ERROR and LABEL_SET objects dissector;
39 * new ASSOCIATION object dissector (Roberto Morro)
40 * <roberto.morro[AT]tilab.com>
41 *
42 * August 22, 2005: added support for tapping and conversations.
43 * (Manu Pathak) <mapathak[AT]cisco.com>
44 *
45 * July 4, 2006: added support for RFC4124; new CLASSTYPE object dissector
46 * (FF) <francesco.fondelli[AT]gmail.com>
47 *
48 * June 9, 2007: added support for draft-ietf-ccamp-ethernet-traffic-parameters-02
49 * and draft-ietf-ccamp-lsp-hierarchy-bis-02; added support for NOTIFY_REQUEST
50 * and RECOVERY_LABEL objects (Roberto Morro) * <roberto.morro[AT]tilab.com>
51 *
52 * Oct 21, 2009: add support for RFC4328, new G.709 traffic parameters,
53 * update gpid, switching and encoding type values to actual IANA numbers.
54 * (FF) <francesco.fondelli[AT]gmail.com>
55 *
56 * Gen 20, 2010: add support for ERROR_STRING IF_ID TLV (see RFC 4783)
57 * (FF) <francesco.fondelli[AT]gmail.com>
58 *
59 * Feb 12, 2010: add support for generalized label interpretation: SUKLM
60 * format for SONET/SDH label (RFC 4606), t3t2t1 format for G.709 ODUk label
61 * (RFC 4328), G.694 format for lambda label (draft-ietf-ccamp-gmpls-g-694-lamb
62 * da-labels-05). Add related user preference option.
63 * (FF) <francesco.fondelli[AT]gmail.com>
64 *
65 * Dec 3, 2010: add support for vendor private class object and ERO/RRO
66 * sub-object (see RFC 3936).
67 * (FF) <francesco.fondelli[AT]gmail.com>
68 *
69 * Dec 21, 2010: add new PROTECTION obj c-type 2 (RFC4872),
70 * new TLVs for IF_ID (RFC4920), Path Key subobj in ERO (RFC5520),
71 * new ASSOCIATION obj c-type 4 (oif2008.389), new LSP_ATTRIBUTES and
72 * LSP_REQUIRED_ATTRIBUTES objects (RFC5420), improved ERROR object dissection,
73 * new ADMIN_STATUS flags and fix to conversation (not applied to ACK, SREFRESH
74 * and HELLO messages).
75 * (Roberto Morro) <roberto.morro[AT]telecomitalia.it>
76 *
77 * Jul 20, 2013: add support for Exclude Routes (XRO) (see RFC 4874)
78 * (FF) <francesco.fondelli[AT]gmail.com>
79 *
80 * Added support for "Ethernet line" LSP encoding (RFC 6004)
81 * Added support for flexi-grid label (RFC 7699)
82 * Added support for codepoint for network-assigned label (RFC 8359)
83 * Added support for clean-up and bug fixes on ERO/RRO/XRO
84 * Added support for full support of RFC 8001, including error code
85 * - (c) 2018 Julien Meuric <julien.meuric@orange.com>
86 * - (c) 2018 Khalifa Ndiaye <khalifa.ndiaye@orange.com>
87 */
88
89
90 #include "config.h"
91
92 #include <epan/packet.h>
93 #include <epan/expert.h>
94 #include <epan/exceptions.h>
95 #include <epan/prefs.h>
96 #include <epan/to_str.h>
97 #include <epan/in_cksum.h>
98 #include <epan/etypes.h>
99 #include <epan/ipproto.h>
100 #include <epan/conversation.h>
101 #include <epan/conversation_table.h>
102 #include <epan/tap.h>
103 #include <epan/addr_resolv.h>
104 #include "packet-rsvp.h"
105 #include "packet-ip.h"
106 #include "packet-diffserv-mpls-common.h"
107 #include "packet-osi.h"
108
109 /* RSVP over UDP encapsulation */
110 #define UDP_PORT_PRSVP 3455
111
112 void proto_register_rsvp(void);
113 void proto_reg_handoff_rsvp(void);
114
115 static int proto_rsvp = -1;
116 static int proto_rsvp_e2e1 = -1;
117
118 static int hf_rsvp_error_flags = -1;
119 static int hf_rsvp_error_flags_path_state_removed = -1;
120 static int hf_rsvp_error_flags_not_guilty = -1;
121 static int hf_rsvp_error_flags_in_place = -1;
122 static int hf_rsvp_eth_tspec_tlv_color_mode = -1;
123 static int hf_rsvp_eth_tspec_tlv_coupling_flag = -1;
124 static int hf_rsvp_sender_tspec_standard_contiguous_concatenation = -1;
125 static int hf_rsvp_sender_tspec_arbitrary_contiguous_concatenation = -1;
126 static int hf_rsvp_sender_tspec_regenerator_section = -1;
127 static int hf_rsvp_sender_tspec_multiplex_section = -1;
128 static int hf_rsvp_sender_tspec_J0_transparency = -1;
129 static int hf_rsvp_sender_tspec_SOH_RSOH_DCC_transparency = -1;
130 static int hf_rsvp_sender_tspec_LOH_MSOH_DCC_transparency = -1;
131 static int hf_rsvp_sender_tspec_LOH_MSOH_extended_DCC_transparency = -1;
132 static int hf_rsvp_sender_tspec_K1_K2_transparency = -1;
133 static int hf_rsvp_sender_tspec_E1_transparency = -1;
134 static int hf_rsvp_sender_tspec_F1_transparency = -1;
135 static int hf_rsvp_sender_tspec_E2_transparency = -1;
136 static int hf_rsvp_sender_tspec_B1_transparency = -1;
137 static int hf_rsvp_sender_tspec_B2_transparency = -1;
138 static int hf_rsvp_sender_tspec_M0_transparency = -1;
139 static int hf_rsvp_sender_tspec_M1_transparency = -1;
140 static int hf_rsvp_flowspec_standard_contiguous_concatenation = -1;
141 static int hf_rsvp_flowspec_arbitrary_contiguous_concatenation = -1;
142 static int hf_rsvp_flowspec_regenerator_section = -1;
143 static int hf_rsvp_flowspec_multiplex_section = -1;
144 static int hf_rsvp_flowspec_J0_transparency = -1;
145 static int hf_rsvp_flowspec_SOH_RSOH_DCC_transparency = -1;
146 static int hf_rsvp_flowspec_LOH_MSOH_DCC_transparency = -1;
147 static int hf_rsvp_flowspec_LOH_MSOH_extended_DCC_transparency = -1;
148 static int hf_rsvp_flowspec_K1_K2_transparency = -1;
149 static int hf_rsvp_flowspec_E1_transparency = -1;
150 static int hf_rsvp_flowspec_F1_transparency = -1;
151 static int hf_rsvp_flowspec_E2_transparency = -1;
152 static int hf_rsvp_flowspec_B1_transparency = -1;
153 static int hf_rsvp_flowspec_B2_transparency = -1;
154 static int hf_rsvp_flowspec_M0_transparency = -1;
155 static int hf_rsvp_flowspec_M1_transparency = -1;
156 static int hf_rsvp_integrity_flags_handshake = -1;
157 static int hf_rsvp_sa_flags_local = -1;
158 static int hf_rsvp_sa_flags_label = -1;
159 static int hf_rsvp_sa_flags_se_style = -1;
160 static int hf_rsvp_sa_flags_bandwidth = -1;
161 static int hf_rsvp_sa_flags_node = -1;
162 static int hf_rsvp_rro_flags_local_avail = -1;
163 static int hf_rsvp_rro_flags_local_in_use = -1;
164 static int hf_rsvp_rro_flags_bandwidth = -1;
165 static int hf_rsvp_rro_flags_node = -1;
166 static int hf_rsvp_rro_flags_node_address = -1;
167 static int hf_rsvp_rro_flags_backup_tunnel_bandwidth = -1;
168 static int hf_rsvp_rro_flags_backup_tunnel_hop = -1;
169 static int hf_rsvp_rro_flags_global_label = -1;
170 static int hf_rsvp_lsp_attr = -1;
171 static int hf_rsvp_lsp_attr_e2e = -1;
172 static int hf_rsvp_lsp_attr_boundary = -1;
173 static int hf_rsvp_lsp_attr_segment = -1;
174 static int hf_rsvp_lsp_attr_integrity = -1;
175 static int hf_rsvp_lsp_attr_contiguous = -1;
176 static int hf_rsvp_lsp_attr_stitching = -1;
177 static int hf_rsvp_lsp_attr_preplanned = -1;
178 static int hf_rsvp_lsp_attr_nophp = -1;
179 static int hf_rsvp_lsp_attr_oobmap = -1;
180 static int hf_rsvp_lsp_attr_entropy = -1;
181 static int hf_rsvp_lsp_attr_oammep = -1;
182 static int hf_rsvp_lsp_attr_oammip = -1;
183 static int hf_rsvp_lsp_attr_loopback = -1;
184 static int hf_rsvp_lsp_attr_p2mp = -1;
185 static int hf_rsvp_lsp_attr_rtm = -1;
186 static int hf_rsvp_lsp_attr_lsi = -1;
187 static int hf_rsvp_lsp_attr_lsids2e = -1;
188 static int hf_rsvp_lsp_attr_telinklabel = -1;
189 static int hf_rsvp_lsp_attr_srlgcollect = -1;
190 static int hf_rsvp_gen_uni_direction = -1;
191 static int hf_rsvp_protection_info_flags_secondary_lsp = -1;
192 static int hf_rsvp_pi_link_flags_extra_traffic = -1;
193 static int hf_rsvp_pi_link_flags_unprotected = -1;
194 static int hf_rsvp_pi_link_flags_shared = -1;
195 static int hf_rsvp_pi_link_flags_dedicated1_1 = -1;
196 static int hf_rsvp_pi_link_flags_dedicated1plus1 = -1;
197 static int hf_rsvp_pi_link_flags_enhanced = -1;
198 static int hf_rsvp_pi_link_flags_extra = -1;
199 static int hf_rsvp_pi_link_flags_dedicated_1_1 = -1;
200 static int hf_rsvp_pi_link_flags_dedicated_1plus1 = -1;
201 static int hf_rsvp_rfc4872_secondary = -1;
202 static int hf_rsvp_rfc4872_protecting = -1;
203 static int hf_rsvp_rfc4872_notification_msg = -1;
204 static int hf_rsvp_rfc4872_operational = -1;
205 static int hf_rsvp_pi_lsp_flags_full_rerouting = -1;
206 static int hf_rsvp_pi_lsp_flags_rerouting_extra = -1;
207 static int hf_rsvp_pi_lsp_flags_1_n_protection = -1;
208 static int hf_rsvp_pi_lsp_flags_1plus1_unidirectional = -1;
209 static int hf_rsvp_pi_lsp_flags_1plus1_bidirectional = -1;
210 static int hf_rsvp_protection_info_in_place = -1;
211 static int hf_rsvp_protection_info_required = -1;
212 static int hf_rsvp_pi_seg_flags_full_rerouting = -1;
213 static int hf_rsvp_pi_seg_flags_rerouting_extra = -1;
214 static int hf_rsvp_pi_seg_flags_1_n_protection = -1;
215 static int hf_rsvp_pi_seg_flags_1plus1_unidirectional = -1;
216 static int hf_rsvp_pi_seg_flags_1plus1_bidirectional = -1;
217 static int hf_rsvp_frr_flags_one2one_backup = -1;
218 static int hf_rsvp_frr_flags_facility_backup = -1;
219 static int hf_rsvp_type = -1;
220 static int hf_rsvp_3gpp_obj_tid = -1;
221 static int hf_rsvp_3gpp_obj_ie_len = -1;
222 static int hf_rsvp_3gpp_obj_ie_type = -1;
223 static int hf_rsvp_3gpp_obj_ue_ipv4_addr = -1;
224 static int hf_rsvp_3gpp_obj_ue_ipv6_addr = -1;
225 static int hf_rsvp_3gpp_obj_tft_d = -1;
226 static int hf_rsvp_3gpp_obj_tft_ns = -1;
227 static int hf_rsvp_3gpp_obj_tft_sr_id = -1;
228 static int hf_rsvp_3gpp_obj_tft_p = -1;
229 static int hf_rsvp_3gpp_obj_tft_opcode = -1;
230 static int hf_rsvp_3gpp_obj_tft_n_pkt_flt = -1;
231 static int hf_rsvp_3gpp_obj_flow_id = -1;
232 static int hf_rsvp_3gpp_obj_pf_ev_prec = -1;
233 static int hf_rsvp_3gpp_obj_pf_len = -1;
234 static int hf_rsvp_3gpp_obj_pf_type = -1;
235 static int hf_rsvp_3gpp_obj_pf_cont_len = -1;
236 static int hf_rsvp_3gpp_obj_pf_comp_type_id = -1;
237 static int hf_rsvp_3gpp_obj_pf_src_ipv4 = -1;
238 static int hf_rsvp_3gpp_obj_pf_dst_ipv4 = -1;
239 static int hf_rsvp_3gpp_obj_pf_ipv4_mask = -1;
240 static int hf_rsvp_3gpp_obj_pf_src_ipv6 = -1;
241 static int hf_rsvp_3gpp_obj_pf_dst_ipv6 = -1;
242 static int hf_rsvp_3gpp_obj_pf_ipv6_prefix_length = -1;
243 static int hf_rsvp_3gpp_obj_pf_prot_next = -1;
244 static int hf_rsvp_3gpp_obj_pf_dst_port = -1;
245 static int hf_rsvp_3gpp_obj_pf_src_port = -1;
246 static int hf_rsvp_3gpp_obj_pf_ipsec_spi = -1;
247 static int hf_rsvp_3gpp_obj_pf_tos_tc = -1;
248 static int hf_rsvp_3gpp_obj_pf_flow_lbl = -1;
249 static int hf_rsvp_3gpp_obj_pf_ipv6 = -1;
250 static int hf_rsvp_3gpp_obj_pf_treatment = -1;
251 static int hf_rsvp_3gpp_obj_pf_hint = -1;
252 static int hf_rsvp_3gpp_obj_tft_qos_list_len = -1;
253 static int hf_rsvp_3gpp_r_qos_blob_len = -1;
254 static int hf_rsvp_3gpp_r_qos_blob_flow_pri = -1;
255 static int hf_rsvp_3gpp_r_qos_blob_num_qos_att_set = -1;
256 static int hf_rsvp_3gpp_qos_att_set_len = -1;
257 static int hf_rsvp_3gpp_qos_attribute_set_id = -1;
258 static int hf_rsvp_3gpp_qos_attribute_verbose = -1;
259 static int hf_rsvp_3gpp_qos_attribute_prof_id = -1;
260 static int hf_rsvp_3gpp_qos_attribute_traff_cls = -1;
261 static int hf_rsvp_3gpp_qos_attribute_peak_rate = -1;
262 static int hf_rsvp_3gpp_qos_attribute_bucket_size = -1;
263 static int hf_rsvp_3gpp_qos_attribute_token_rate = -1;
264 static int hf_rsvp_3gpp_qos_attribute_max_latency = -1;
265 static int hf_rsvp_3gpp_qos_attribute_max_loss_rte = -1;
266 static int hf_rsvp_3gpp_qos_attribute_delay_var_sensitive = -1;
267 static int hf_rsvp_3gpp_qos_attribute_reserved = -1;
268 static int hf_rsvp_3gpp_r_qos_blob = -1;
269 static int hf_rsvp_3gpp_qos_result = -1;
270 static int hf_rsvp_xro_sobj_lbit = -1;
271 static int hf_rsvp_rro_sobj_dbit = -1;
272 static int hf_rsvp_xro_sobj_len = -1;
273 static int hf_rsvp_xro_sobj_ipv4_addr = -1;
274 static int hf_rsvp_xro_sobj_ipv4_prefix = -1;
275 static int hf_rsvp_xro_sobj_ipv4_attr = -1;
276 static int hf_rsvp_xro_sobj_ipv6_attr = -1;
277 static int hf_rsvp_xro_sobj_srlg_id = -1;
278 static int hf_rsvp_xro_sobj_srlg_res = -1;
279 static int hf_rsvp_private_data = -1;
280 static int hf_rsvp_juniper_numtlvs = -1;
281 static int hf_rsvp_juniper_padlength = -1;
282 static int hf_rsvp_juniper_type = -1;
283 static int hf_rsvp_juniper_length = -1;
284 static int hf_rsvp_juniper_attrib_cos = -1;
285 static int hf_rsvp_juniper_attrib_metric1 = -1;
286 static int hf_rsvp_juniper_attrib_metric2 = -1;
287 static int hf_rsvp_juniper_attrib_ccc_status = -1;
288 static int hf_rsvp_juniper_attrib_path = -1;
289 static int hf_rsvp_juniper_attrib_unknown = -1;
290 static int hf_rsvp_juniper_unknown = -1;
291 static int hf_rsvp_juniper_pad = -1;
292 static int hf_rsvp_unknown_data = -1;
293 static int hf_rsvp_ctype = -1;
294 static int hf_rsvp_ctype_session = -1;
295 static int hf_rsvp_ctype_scope = -1;
296 static int hf_rsvp_ctype_label_request = -1;
297 static int hf_rsvp_ctype_integrity = -1;
298 static int hf_rsvp_ctype_adspec = -1;
299 static int hf_rsvp_ctype_tspec = -1;
300 static int hf_rsvp_ctype_call_id = -1;
301 static int hf_rsvp_ctype_template = -1;
302 static int hf_rsvp_ctype_style = -1;
303 static int hf_rsvp_ctype_policy = -1;
304 static int hf_rsvp_ctype_error = -1;
305 static int hf_rsvp_ctype_attribute = -1;
306 static int hf_rsvp_ctype_explicit_route = -1;
307 static int hf_rsvp_ctype_flowspec = -1;
308 static int hf_rsvp_ctype_hop = -1;
309 static int hf_rsvp_ctype_confirm = -1;
310 static int hf_rsvp_ctype_time_values = -1;
311 static int hf_rsvp_ctype_record_route = -1;
312 static int hf_rsvp_ctype_exclude_route = -1;
313 static int hf_rsvp_ctype_message_id = -1;
314 static int hf_rsvp_ctype_message_id_ack = -1;
315 static int hf_rsvp_ctype_message_id_list = -1;
316 static int hf_rsvp_ctype_hello = -1;
317 static int hf_rsvp_ctype_dclass = -1;
318 static int hf_rsvp_ctype_admin_status = -1;
319 static int hf_rsvp_ctype_lsp_attributes = -1;
320 static int hf_rsvp_ctype_label_set = -1;
321 static int hf_rsvp_ctype_association = -1;
322 static int hf_rsvp_ctype_tunnel_if_id = -1;
323 static int hf_rsvp_ctype_3gpp_object = -1;
324 static int hf_rsvp_ctype_restart_cap = -1;
325 static int hf_rsvp_ctype_link_cap = -1;
326 static int hf_rsvp_ctype_protection_info = -1;
327 static int hf_rsvp_ctype_fast_reroute = -1;
328 static int hf_rsvp_ctype_detour = -1;
329 static int hf_rsvp_ctype_diffserv = -1;
330 static int hf_rsvp_ctype_diffserv_aware_te = -1;
331 static int hf_rsvp_ctype_vendor = -1;
332 static int hf_rsvp_ctype_juniper = -1;
333 static int hf_rsvp_ctype_unknown = -1;
334 static int hf_rsvp_ctype_label = -1;
335 static int hf_rsvp_ctype_notify_request = -1;
336 static int hf_rsvp_ctype_generalized_uni = -1;
337 static int hf_rsvp_parameter = -1;
338 static int hf_rsvp_parameter_flags = -1;
339 static int hf_rsvp_parameter_length = -1;
340 static int hf_rsvp_error_value = -1;
341 static int hf_rsvp_class = -1;
342 static int hf_rsvp_class_length = -1;
343 static int hf_rsvp_reserved = -1;
344 static int hf_rsvp_switching_granularity = -1;
345 static int hf_rsvp_callid_srcaddr_ether = -1;
346 static int hf_rsvp_callid_srcaddr_bytes = -1;
347 static int hf_rsvp_loose_hop = -1;
348 static int hf_rsvp_data_length = -1;
349
350 static int hf_rsvp_ctype_s2l_sub_lsp = -1;
351 static int hf_rsvp_s2l_sub_lsp_destination_ipv4_address = -1;
352 static int hf_rsvp_s2l_sub_lsp_destination_ipv6_address = -1;
353 static int hf_rsvp_s2l_sub_lsp_data = -1;
354
355 /* Generated from convert_proto_tree_add_text.pl */
356 static int hf_rsvp_message_id_data = -1;
357 static int hf_rsvp_ero_rro_subobjects_length = -1;
358 static int hf_rsvp_fast_reroute_hop_limit = -1;
359 static int hf_rsvp_lsp_tunnel_if_id_router_id = -1;
360 static int hf_rsvp_ero_rro_subobjects_path_key = -1;
361 static int hf_rsvp_ifid_tlv_area = -1;
362 static int hf_rsvp_session_attribute_include_any = -1;
363 static int hf_rsvp_lsp_tunnel_if_id_sc_pc_scn_address = -1;
364 static int hf_rsvp_ero_rro_subobjects_ipv6_hop = -1;
365 static int hf_rsvp_lsp_tunnel_if_id_ipv6_interface_address = -1;
366 static int hf_rsvp_lsp_tunnel_if_id_component_link_identifier_ipv4 = -1;
367 static int hf_rsvp_ifid_tlvinterface_id = -1;
368 static int hf_rsvp_eth_tspec_cir = -1;
369 static int hf_rsvp_confirm_receiver_address_ipv6 = -1;
370 static int hf_rsvp_error_error_node_ipv6 = -1;
371 static int hf_rsvp_time_values_data = -1;
372 static int hf_rsvp_flowspec_rate = -1;
373 static int hf_rsvp_session_attribute_hold_priority = -1;
374 static int hf_rsvp_notify_request_notify_node_address_ipv4 = -1;
375 static int hf_rsvp_lsp_tunnel_if_id_action = -1;
376 static int hf_rsvp_scope_data = -1;
377 static int hf_rsvp_label_request_l3pid = -1;
378 static int hf_rsvp_eth_tspec_index = -1;
379 static int hf_rsvp_integrity_sequence_number = -1;
380 static int hf_rsvp_adspec_message_format_version = -1;
381 static int hf_rsvp_fast_reroute_setup_priority = -1;
382 static int hf_rsvp_eth_tspec_reserved = -1;
383 static int hf_rsvp_eth_tspec_el2cp = -1;
384 static int hf_rsvp_eth_tspec_il2cp = -1;
385 static int hf_rsvp_fast_reroute_include_all = -1;
386 static int hf_rsvp_association_routing_area_id = -1;
387 static int hf_rsvp_label_label = -1;
388 static int hf_rsvp_session_attribute_include_all = -1;
389 static int hf_rsvp_flowspec_token_bucket_rate = -1;
390 static int hf_rsvp_call_id_address_type = -1;
391 static int hf_rsvp_session_attribute_name_length = -1;
392 static int hf_rsvp_detour_data = -1;
393 static int hf_rsvp_association_node_id = -1;
394 static int hf_rsvp_ifid_tlv_length = -1;
395 static int hf_rsvp_flags = -1;
396 static int hf_rsvp_tspec_message_format_version = -1;
397 static int hf_rsvp_ifid_tlv_ipv4_address = -1;
398 static int hf_rsvp_hop_data = -1;
399 static int hf_rsvp_ifid_tlv_data = -1;
400 static int hf_rsvp_length = -1;
401 static int hf_rsvp_ero_rro_subobjects_pce_id_ipv6 = -1;
402 static int hf_rsvp_association_data = -1;
403 static int hf_rsvp_tspec_number_of_multiplexed_components = -1;
404 static int hf_rsvp_session_attribute_setup_priority = -1;
405 static int hf_rsvp_message_id_flags = -1;
406 static int hf_rsvp_hop_logical_interface = -1;
407 static int hf_rsvp_compression_factor = -1;
408 static int hf_rsvp_ero_rro_subobjects_private_data = -1;
409 static int hf_rsvp_lsp_attributes_tlv_data = -1;
410 static int hf_rsvp_flowspec_token_bucket_size = -1;
411 static int hf_rsvp_call_id_data = -1;
412 static int hf_rsvp_template_filter_source_address_ipv6 = -1;
413 static int hf_rsvp_message_id_ack_flags = -1;
414 static int hf_rsvp_flowspec_multiplier = -1;
415 static int hf_rsvp_tspec_token_bucket_size = -1;
416 static int hf_rsvp_admin_status_bits = -1;
417 static int hf_rsvp_admin_status_data = -1;
418 static int hf_rsvp_tspec_peak_data_rate = -1;
419 static int hf_rsvp_flowspec_number_of_virtual_components = -1;
420 static int hf_rsvp_hop_neighbor_address_ipv6 = -1;
421 static int hf_rsvp_flowspec_signal_type_sonet = -1;
422 static int hf_rsvp_ifid_tlv_autonomous_system = -1;
423 static int hf_rsvp_scope_ipv6_address = -1;
424 static int hf_rsvp_flowspec_service_header = -1;
425 static int hf_rsvp_tspec_hint = -1;
426 static int hf_rsvp_label_set_action = -1;
427 static int hf_rsvp_error_data = -1;
428 static int hf_rsvp_style_flags = -1;
429 static int hf_rsvp_g_pid = -1;
430 static int hf_rsvp_integrity_key_identifier = -1;
431 static int hf_rsvp_adspec_service_header = -1;
432 static int hf_rsvp_ifid_tlv_error_string = -1;
433 static int hf_rsvp_session_destination_address = -1;
434 static int hf_rsvp_ifid_tlv_node_id = -1;
435 static int hf_rsvp_lsp_tunnel_if_id_component_link_identifier = -1;
436 static int hf_rsvp_call_id_international_segment = -1;
437 static int hf_rsvp_fast_reroute_include_any = -1;
438 static int hf_rsvp_label_request_min_vci = -1;
439 static int hf_rsvp_tspec_profile = -1;
440 static int hf_rsvp_eth_tspec_length = -1;
441 static int hf_rsvp_exclude_route_data = -1;
442 static int hf_rsvp_record_route_data = -1;
443 static int hf_rsvp_confirm_receiver_address_ipv4 = -1;
444 static int hf_rsvp_message_id_list_message_id = -1;
445 static int hf_rsvp_template_filter_ipv4_tunnel_sender_address = -1;
446 static int hf_rsvp_template_filter_ipv6_tunnel_sender_address = -1;
447 static int hf_rsvp_template_filter_sub_group_originator_id = -1;
448 static int hf_rsvp_template_filter_sub_group_id = -1;
449 static int hf_rsvp_template_filter_data = -1;
450 static int hf_rsvp_notify_request_notify_node_address_ipv6 = -1;
451 static int hf_rsvp_message_id_ack_data = -1;
452 static int hf_rsvp_eth_tspec_profile = -1;
453 static int hf_rsvp_label_request_max_vpi = -1;
454 static int hf_rsvp_ero_rro_subobjects_private_length = -1;
455 static int hf_rsvp_fast_reroute_exclude_any = -1;
456 static int hf_rsvp_lsp_tunnel_if_id_data = -1;
457 static int hf_rsvp_hello_destination_instance = -1;
458 static int hf_rsvp_tspec_signal_type_g709 = -1;
459 static int hf_rsvp_call_id_reserved = -1;
460 static int hf_rsvp_version = -1;
461 static int hf_rsvp_association_source_ipv6 = -1;
462 static int hf_rsvp_ero_rro_subobjects_flags = -1;
463 static int hf_rsvp_lsp_tunnel_if_id_lsp_encoding_type = -1;
464 static int hf_rsvp_association_type = -1;
465 static int hf_rsvp_tspec_data = -1;
466 static int hf_rsvp_session_destination_port = -1;
467 static int hf_rsvp_association_id = -1;
468 static int hf_rsvp_integrity_hash = -1;
469 static int hf_rsvp_flowspec_number_of_contiguous_components = -1;
470 static int hf_rsvp_policy_data = -1;
471 static int hf_rsvp_tspec_token_bucket_rate = -1;
472 static int hf_rsvp_tspec_multiplier = -1;
473 static int hf_rsvp_dclass_dscp = -1;
474 static int hf_rsvp_tspec_number_of_contiguous_components = -1;
475 static int hf_rsvp_session_p2mp_id = -1;
476 static int hf_rsvp_session_data = -1;
477 static int hf_rsvp_lsp_tunnel_if_id_target_igp_instance = -1;
478 static int hf_rsvp_flowspec_profile = -1;
479 static int hf_rsvp_message_id_ack_epoch = -1;
480 static int hf_rsvp_hello_source_instance = -1;
481 static int hf_rsvp_scope_ipv4_address = -1;
482 static int hf_rsvp_label_request_lsp_encoding_type = -1;
483 static int hf_rsvp_fast_reroute_hold_priority = -1;
484 static int hf_rsvp_label_request_max_vci = -1;
485 static int hf_rsvp_fast_reroute_flags = -1;
486 static int hf_rsvp_flowspec_peak_data_rate = -1;
487 static int hf_rsvp_ero_rro_subobjects_label = -1;
488 static int hf_rsvp_notify_request_data = -1;
489 static int hf_rsvp_lsp_tunnel_if_id_connection_id = -1;
490 static int hf_rsvp_eth_tspec_ebs = -1;
491 static int hf_rsvp_fast_reroute_data = -1;
492 static int hf_rsvp_label_request_min_vpi = -1;
493 static int hf_rsvp_session_attribute_data = -1;
494 static int hf_rsvp_protection_info_data = -1;
495 static int hf_rsvp_tspec_transparency = -1;
496 static int hf_rsvp_ifid_tlv_label = -1;
497 static int hf_rsvp_session_extended_ipv4_address = -1;
498 static int hf_rsvp_diffserv_aware_te_data = -1;
499 static int hf_rsvp_lsp_tunnel_if_id_signal_type = -1;
500 static int hf_rsvp_ero_rro_subobjects_pce_id_ipv4 = -1;
501 static int hf_rsvp_error_error_node_ipv4 = -1;
502 static int hf_rsvp_session_protocol = -1;
503 static int hf_rsvp_tspec_signal_type_sonet = -1;
504 static int hf_rsvp_session_attribute_flags = -1;
505 static int hf_rsvp_ero_rro_subobjects_router_id = -1;
506 static int hf_rsvp_message_id_list_data = -1;
507 static int hf_rsvp_style_style = -1;
508 static int hf_rsvp_tspec_number_of_virtual_components = -1;
509 static int hf_rsvp_tspec_mtu = -1;
510 static int hf_rsvp_lsp_tunnel_if_id_length = -1;
511 static int hf_rsvp_ifid_tlv_ipv6_address = -1;
512 static int hf_rsvp_diffserv_data = -1;
513 static int hf_rsvp_session_flags = -1;
514 static int hf_rsvp_flowspec_transparency = -1;
515 static int hf_rsvp_dclass_data = -1;
516 static int hf_rsvp_lsp_tunnel_if_id_interface_id = -1;
517 static int hf_rsvp_lsp_tunnel_if_id_sc_pc_id = -1;
518 static int hf_rsvp_error_error_code = -1;
519 static int hf_rsvp_lsp_tunnel_if_id_ipv4_interface_address = -1;
520 static int hf_rsvp_session_attribute_exclude_any = -1;
521 static int hf_rsvp_sending_ttl = -1;
522 static int hf_rsvp_integrity_flags = -1;
523 static int hf_rsvp_message_id_ack_message_id = -1;
524 static int hf_rsvp_message_id_message_id = -1;
525 static int hf_rsvp_ero_rro_subobjects_interface_id = -1;
526 static int hf_rsvp_message_length = -1;
527 static int hf_rsvp_message_id_epoch = -1;
528 static int hf_rsvp_flowspec_signal_type_g709 = -1;
529 static int hf_rsvp_label_request_data = -1;
530 static int hf_rsvp_restart_cap_data = -1;
531 static int hf_rsvp_lsp_attributes_tlv = -1;
532 static int hf_rsvp_flowspec_mtu = -1;
533 static int hf_rsvp_flowspec_m = -1;
534 static int hf_rsvp_tspec_service_header = -1;
535 static int hf_rsvp_eth_tspec_cbs = -1;
536 static int hf_rsvp_call_id_national_segment = -1;
537 static int hf_rsvp_template_filter_source_port = -1;
538 static int hf_rsvp_eth_tspec_eir = -1;
539 static int hf_rsvp_ero_rro_subobjects_ipv4_hop = -1;
540 static int hf_rsvp_lsp_tunnel_if_id_switching_type = -1;
541 static int hf_rsvp_flowspec_number_of_multiplexed_components = -1;
542 static int hf_rsvp_label_request_switching_type = -1;
543 static int hf_rsvp_ero_rro_subobjects_prefix_length = -1;
544 static int hf_rsvp_explicit_route_data = -1;
545 static int hf_rsvp_association_source_ipv4 = -1;
546 static int hf_rsvp_call_id_local_identifier = -1;
547 static int hf_rsvp_flowspec_message_format_version = -1;
548 static int hf_rsvp_tspec_requested_concatenation = -1;
549 static int hf_rsvp_association_padding = -1;
550 static int hf_rsvp_hop_neighbor_address_ipv4 = -1;
551 static int hf_rsvp_flowspec_requested_concatenation = -1;
552 static int hf_rsvp_fast_reroute_bandwidth = -1;
553 static int hf_rsvp_message_id_list_epoch = -1;
554 static int hf_rsvp_style_data = -1;
555 static int hf_rsvp_session_dscp = -1;
556 static int hf_rsvp_confirm_data = -1;
557 static int hf_rsvp_protection_info_link_flags = -1;
558 static int hf_rsvp_message_id_list_flags = -1;
559 static int hf_rsvp_label_data = -1;
560 static int hf_rsvp_flowspec_slack_term = -1;
561 static int hf_rsvp_label_generalized_label = -1;
562 static int hf_rsvp_label_generalized_label_evpl_vlad_id = -1;
563 static int hf_rsvp_session_attribute_name = -1;
564 static int hf_rsvp_ifid_tlv_padding = -1;
565 static int hf_rsvp_max_dlci = -1;
566 static int hf_rsvp_minimum_policed_unit = -1;
567 static int hf_rsvp_dlci_length = -1;
568 static int hf_rsvp_label_request_m = -1;
569 static int hf_rsvp_detour_avoid_node_id = -1;
570 static int hf_rsvp_restart_cap_restart_time = -1;
571 static int hf_rsvp_nsap_length = -1;
572 static int hf_rsvp_message_checksum = -1;
573 static int hf_rsvp_ero_rro_autonomous_system = -1;
574 static int hf_rsvp_gen_uni_service_level = -1;
575 static int hf_rsvp_hf_rsvp_adspec_break_bit = -1;
576 static int hf_rsvp_extended_tunnel_id = -1;
577 static int hf_rsvp_extended_tunnel_ipv6 = -1;
578 static int hf_rsvp_maximum_packet_size = -1;
579 static int hf_rsvp_min_dlci = -1;
580 static int hf_rsvp_gen_uni_data = -1;
581 static int hf_rsvp_gen_uni_logical_port_id = -1;
582 static int hf_rsvp_refresh_interval = -1;
583 static int hf_rsvp_detour_plr_id = -1;
584 static int hf_rsvp_restart_cap_recovery_time = -1;
585 static int hf_rsvp_extended_tunnel = -1;
586 static int hf_rsvp_call_attributes_endpont_id = -1;
587 static int hf_rsvp_isis_area_id = -1;
588 static int hf_rsvp_adspec_type = -1;
589 static int hf_rsvp_adspec_len = -1;
590 static int hf_rsvp_adspec_uint = -1;
591 static int hf_rsvp_adspec_float = -1;
592 static int hf_rsvp_adspec_bytes = -1;
593 static int hf_rsvp_wavelength_grid = -1;
594 static int hf_rsvp_wavelength_cs1 = -1;
595 static int hf_rsvp_wavelength_cs2 = -1;
596 static int hf_rsvp_wavelength_cs3 = -1;
597 static int hf_rsvp_wavelength_channel_spacing = -1;
598 static int hf_rsvp_wavelength_n = -1;
599 static int hf_rsvp_wavelength_m = -1;
600 static int hf_rsvp_wavelength_freq = -1;
601 static int hf_rsvp_wavelength_wavelength = -1;
602 static int hf_rsvp_sonet_s = -1;
603 static int hf_rsvp_sonet_u = -1;
604 static int hf_rsvp_sonet_k = -1;
605 static int hf_rsvp_sonet_l = -1;
606 static int hf_rsvp_sonet_m = -1;
607 static int hf_rsvp_g709_t3 = -1;
608 static int hf_rsvp_g709_t2 = -1;
609 static int hf_rsvp_g709_t1 = -1;
610 static int hf_rsvp_label_set_type = -1;
611 static int hf_rsvp_label_set_subchannel = -1;
612 static int hf_rsvp_nsap_address = -1;
613 static int hf_rsvp_class_diversity = -1;
614 static int hf_rsvp_egress_label_type = -1;
615 static int hf_rsvp_egress_label = -1;
616 static int hf_rsvp_source_transport_network_addr = -1;
617 static int hf_rsvp_ie_data = -1;
618 static int hf_rsvp_3gpp_obj_pf_dst_port_range = -1;
619 static int hf_rsvp_3gpp_obj_pf_src_port_range = -1;
620
621 static expert_field ei_rsvp_invalid_length = EI_INIT;
622 static expert_field ei_rsvp_packet_filter_component = EI_INIT;
623 static expert_field ei_rsvp_bundle_component_msg = EI_INIT;
624 static expert_field ei_rsvp_parameter = EI_INIT;
625 static expert_field ei_rsvp_adspec_type = EI_INIT;
626 static expert_field ei_rsvp_call_id_address_type = EI_INIT;
627 static expert_field ei_rsvp_session_type = EI_INIT;
628
629 static int rsvp_tap = -1;
630
631 /*
632 * All RSVP packets belonging to a particular flow belong to the same
633 * conversation. The following structure definitions are for auxillary
634 * structures which have all the relevant flow information to make up the
635 * RSVP five-tuple. Note that the values of the five-tuple are determined
636 * from the session object and sender template/filter spec for PATH/RESV
637 * messages.
638 * Update rsvp_request_equal() when you add stuff here. You might also
639 * have to update rsvp_request_hash().
640 * TODO: Support for IPv6 conversations.
641 */
642
643 typedef struct rsvp_session_ipv4_info {
644 address destination;
645 guint8 protocol;
646 guint16 udp_dest_port;
647 } rsvp_session_ipv4_info;
648
649 typedef struct rsvp_session_ipv6_info {
650 /* not supported yet */
651
652 guint8 dummy;
653 } rsvp_session_ipv6_info;
654
655 typedef struct rsvp_session_ipv4_lsp_info {
656 address destination;
657 guint16 udp_dest_port;
658 guint32 ext_tunnel_id;
659 } rsvp_session_ipv4_lsp_info;
660
661 typedef struct rsvp_session_ipv6_lsp_info {
662 address destination;
663 guint16 udp_dest_port;
664 guint64 ext_tunnel_id;
665 } rsvp_session_ipv6_lsp_info;
666
667 typedef struct rsvp_session_agg_ipv4_info {
668 address destination;
669 guint8 dscp;
670 } rsvp_session_agg_ipv4_info;
671
672 typedef struct rsvp_session_ipv4_uni_info {
673 address destination;
674 guint16 udp_dest_port;
675 guint32 ext_tunnel_id;
676 } rsvp_session_ipv4_uni_info;
677
678 typedef struct rsvp_session_ipv4_p2mp_lsp_info {
679 address destination;
680 guint16 udp_dest_port;
681 guint32 ext_tunnel_id;
682 } rsvp_session_ipv4_p2mp_lsp_info;
683
684 typedef struct rsvp_session_ipv6_p2mp_lsp_info {
685 address destination;
686 guint16 udp_dest_port;
687 guint64 ext_tunnel_id;
688 } rsvp_session_ipv6_p2mp_lsp_info;
689
690 typedef struct rsvp_session_ipv4_enni_info {
691 address destination;
692 guint16 udp_dest_port;
693 guint32 ext_tunnel_id;
694 } rsvp_session_ipv4_enni_info;
695
696 typedef struct rsvp_template_filter_info {
697 address source;
698 guint16 udp_source_port;
699 } rsvp_template_filter_info;
700
701 /*
702 * The actual request key consists of a union of the various session objects
703 * (which are uniquely identified based on the session type), and the
704 * source_info structure, which has the information derived from the sender
705 * template or the filter spec.
706 * The request key is populated by copying the information from the
707 * rsvp_conversation_info structure (rsvph), which in turn is populated when
708 * the session, filter and sender template objects are dissected.
709 */
710 struct rsvp_request_key {
711 guint32 session_type;
712
713 union { /* differentiated by session_type field */
714 rsvp_session_ipv4_info session_ipv4;
715 rsvp_session_ipv6_info session_ipv6;
716 rsvp_session_ipv4_lsp_info session_ipv4_lsp;
717 rsvp_session_ipv6_lsp_info session_ipv6_lsp;
718 rsvp_session_agg_ipv4_info session_agg_ipv4;
719 rsvp_session_ipv4_uni_info session_ipv4_uni;
720 rsvp_session_ipv4_p2mp_lsp_info session_ipv4_p2mp_lsp;
721 rsvp_session_ipv6_p2mp_lsp_info session_ipv6_p2mp_lsp;
722 rsvp_session_ipv4_enni_info session_ipv4_enni;
723 } u;
724
725 rsvp_template_filter_info source_info;
726 guint32 conversation;
727 };
728
729 /*
730 * At present, there is nothing particularly important that we need to
731 * store for the request value for each rsvp_request_key, so we just
732 * store the unique 32-bit identifier internally allocated for the key
733 * (and stored in the conversation attribute of rsvp_request_key above.
734 * If this changes in the future, then other stuff can be added here.
735 */
736 struct rsvp_request_val {
737 guint32 value;
738 };
739
740 /*
741 * Initialize the conversation related data structures.
742 */
743 static wmem_map_t *rsvp_request_hash = NULL;
744
745 /*
746 * The list of tree types
747 */
748 enum {
749 TT_RSVP,
750 TT_HDR,
751 TT_SESSION,
752 TT_HOP,
753 TT_HOP_SUBOBJ,
754 TT_TIME_VALUES,
755 TT_ERROR,
756 TT_ERROR_SUBOBJ,
757 TT_ERROR_FLAGS,
758 TT_SCOPE,
759 TT_STYLE,
760 TT_CONFIRM,
761 TT_SENDER_TEMPLATE,
762 TT_FILTER_SPEC,
763 TT_TSPEC,
764 TT_TSPEC_SUBTREE,
765 TT_FLOWSPEC,
766 TT_FLOWSPEC_SUBTREE,
767 TT_ETHSPEC_SUBTREE,
768 TT_ADSPEC,
769 TT_ADSPEC_SUBTREE,
770 TT_INTEGRITY,
771 TT_INTEGRITY_FLAGS,
772 TT_DCLASS,
773 TT_LSP_TUNNEL_IF_ID,
774 TT_LSP_TUNNEL_IF_ID_SUBTREE,
775 TT_POLICY,
776 TT_MESSAGE_ID,
777 TT_MESSAGE_ID_ACK,
778 TT_MESSAGE_ID_LIST,
779 TT_LABEL,
780 TT_LABEL_SET,
781 TT_LABEL_REQUEST,
782 TT_SESSION_ATTRIBUTE,
783 TT_SESSION_ATTRIBUTE_FLAGS,
784 TT_HELLO_OBJ,
785 TT_EXPLICIT_ROUTE,
786 TT_EXPLICIT_ROUTE_SUBOBJ,
787 TT_EXCLUDE_ROUTE,
788 TT_EXCLUDE_ROUTE_SUBOBJ,
789 TT_RECORD_ROUTE,
790 TT_RECORD_ROUTE_SUBOBJ,
791 TT_RECORD_ROUTE_SUBOBJ_FLAGS,
792 TT_ADMIN_STATUS,
793 TT_ADMIN_STATUS_FLAGS,
794 TT_LSP_ATTRIBUTES,
795 TT_LSP_ATTRIBUTES_FLAGS,
796 TT_ASSOCIATION,
797 TT_GEN_UNI,
798 TT_GEN_UNI_SUBOBJ,
799 TT_CALL_ID,
800 TT_3GPP2_OBJECT,
801 TT_BUNDLE_COMPMSG,
802 TT_RESTART_CAP,
803 TT_LINK_CAP,
804 TT_PROTECTION_INFO,
805 TT_PROTECTION_INFO_LINK,
806 TT_PROTECTION_INFO_LSP,
807 TT_PROTECTION_INFO_SEG,
808 TT_FAST_REROUTE,
809 TT_FAST_REROUTE_FLAGS,
810 TT_DETOUR,
811 TT_DIFFSERV,
812 TT_DIFFSERV_MAP,
813 TT_DIFFSERV_MAP_PHBID,
814 TT_CLASSTYPE,
815 TT_PRIVATE_CLASS,
816 TT_JUNIPER,
817 TT_UNKNOWN_CLASS,
818 TT_3GPP_OBJ_FLOW,
819 TT_3GPP_OBJ_QOS,
820 TT_3GPP_OBJ_QOS_SUB_BLOB,
821 TT_3GPP_OBJ_T2,
822 TT_3GPP_OBJ_HO,
823 TT_ADSPEC_TYPE_SUBTREE,
824 TT_WAVELENGTH,
825 TT_SONET_SDH,
826 TT_G709,
827 TT_RSVP_LSP_ATTR,
828
829 TT_MAX
830 };
831 static gint ett_treelist[TT_MAX];
832 #define TREE(X) ett_treelist[(X)]
833
834 /* Should we dissect bundle messages? */
835 static gboolean rsvp_bundle_dissect = TRUE;
836
837 /* FF: How should we dissect generalized label? */
838 static const enum_val_t rsvp_generalized_label_options[] = {
839 /* see RFC 3471 Section 3.2.1.2 */
840 { "data", "data (no interpretation)", 1 },
841 /* see RFC 4606 Section 3 */
842 { "SUKLM", "SONET/SDH (\"S, U, K, L, M\" scheme)", 2 },
843 /* see I-D draft-ietf-ccamp-gmpls-g-694-lambda-labels-05 */
844 { "G694", "Wavelength Label (fixed or flexi grid)", 3 },
845 /* see RFC 4328 Section 4.1 */
846 { "G709", "ODUk Label", 4 },
847 { NULL, NULL, 0 }
848 };
849
850 static guint rsvp_generalized_label_option = 1;
851
852 /*
853 * RSVP message types.
854 * See
855 *
856 * http://www.iana.org/assignments/rsvp-parameters
857 */
858 typedef enum {
859 RSVP_MSG_PATH = 1, /* RFC 2205 */
860 RSVP_MSG_RESV, /* RFC 2205 */
861 RSVP_MSG_PERR, /* RFC 2205 */
862 RSVP_MSG_RERR, /* RFC 2205 */
863 RSVP_MSG_PTEAR, /* RFC 2205 */
864 RSVP_MSG_RTEAR, /* RFC 2205 */
865 RSVP_MSG_CONFIRM, /* XXX - DREQ, RFC 2745? */
866 /* 9 is DREP, RFC 2745 */
867 RSVP_MSG_RTEAR_CONFIRM = 10, /* from Fred Baker at Cisco */
868 /* 11 is unassigned */
869 RSVP_MSG_BUNDLE = 12, /* RFC 2961 */
870 RSVP_MSG_ACK, /* RFC 2961 */
871 /* 14 is reserved */
872 RSVP_MSG_SREFRESH = 15, /* RFC 2961 */
873 /* 16, 17, 18, 19 not listed */
874 RSVP_MSG_HELLO = 20, /* RFC 3209 */
875 RSVP_MSG_NOTIFY /* [RFC3473] */
876 /* 25 is Integrity Challenge RFC 2747, RFC 3097 */
877 /* 26 is Integrity Response RFC 2747, RFC 3097 */
878 /* 66 is DSBM_willing [SBM] */
879 /* 67 is I_AM_DSBM [SBM] */
880 /* [SBM] is Subnet Bandwidth Manager ID from July 1997 */
881 } rsvp_message_types;
882
883 static const value_string message_type_vals[] = {
884 { RSVP_MSG_PATH, "PATH Message. "},
885 { RSVP_MSG_RESV, "RESV Message. "},
886 { RSVP_MSG_PERR, "PATH ERROR Message. "},
887 { RSVP_MSG_RERR, "RESV ERROR Message. "},
888 { RSVP_MSG_PTEAR, "PATH TEAR Message. "},
889 { RSVP_MSG_RTEAR, "RESV TEAR Message. "},
890 { RSVP_MSG_CONFIRM, "CONFIRM Message. "},
891 { RSVP_MSG_RTEAR_CONFIRM, "RESV TEAR CONFIRM Message. "},
892 { RSVP_MSG_BUNDLE, "BUNDLE Message. "},
893 { RSVP_MSG_ACK, "ACK Message. "},
894 { RSVP_MSG_SREFRESH, "SREFRESH Message. "},
895 { RSVP_MSG_HELLO, "HELLO Message. "},
896 { RSVP_MSG_NOTIFY, "NOTIFY Message. "},
897 { 0, NULL}
898 };
899 static value_string_ext message_type_vals_ext = VALUE_STRING_EXT_INIT(message_type_vals);
900
901 /*
902 * FF: please keep this list in sync with
903 * http://www.iana.org/assignments/rsvp-parameters
904 * Registry Name: 'Class'
905 */
906 enum rsvp_classes {
907 RSVP_CLASS_NULL = 0,
908 RSVP_CLASS_SESSION,
909
910 RSVP_CLASS_HOP = 3,
911 RSVP_CLASS_INTEGRITY,
912 RSVP_CLASS_TIME_VALUES,
913 RSVP_CLASS_ERROR,
914 RSVP_CLASS_SCOPE,
915 RSVP_CLASS_STYLE,
916 RSVP_CLASS_FLOWSPEC,
917 RSVP_CLASS_FILTER_SPEC,
918 RSVP_CLASS_SENDER_TEMPLATE,
919 RSVP_CLASS_SENDER_TSPEC,
920 RSVP_CLASS_ADSPEC,
921 RSVP_CLASS_POLICY,
922 RSVP_CLASS_CONFIRM,
923 RSVP_CLASS_LABEL,
924 RSVP_CLASS_HOP_COUNT,
925 RSVP_CLASS_STRICT_SOURCE_ROUTE,
926 RSVP_CLASS_LABEL_REQUEST = 19,
927 RSVP_CLASS_EXPLICIT_ROUTE,
928 RSVP_CLASS_RECORD_ROUTE,
929
930 RSVP_CLASS_HELLO,
931
932 RSVP_CLASS_MESSAGE_ID,
933 RSVP_CLASS_MESSAGE_ID_ACK,
934 RSVP_CLASS_MESSAGE_ID_LIST,
935
936 /* 26-29 Unassigned */
937
938 RSVP_CLASS_DIAGNOSTIC = 30,
939 RSVP_CLASS_ROUTE,
940 RSVP_CLASS_DIAG_RESPONSE,
941 RSVP_CLASS_DIAG_SELECT,
942 RSVP_CLASS_RECOVERY_LABEL,
943 RSVP_CLASS_UPSTREAM_LABEL,
944 RSVP_CLASS_LABEL_SET,
945 RSVP_CLASS_PROTECTION,
946
947 /* 38-41 Unassigned */
948 RSVP_CLASS_DSBM_IP_ADDRESS = 42,
949 RSVP_CLASS_SBM_PRIORITY,
950 RSVP_CLASS_DSBM_TIMER_INTERVALS,
951 RSVP_CLASS_SBM_INFO,
952
953 /* 46-49 Unassigned */
954
955 RSVP_CLASS_S2L_SUB_LSP = 50,
956
957 /* 51-62 Unassigned */
958
959 RSVP_CLASS_DETOUR = 63,
960 RSVP_CLASS_CHALLENGE,
961 RSVP_CLASS_DIFFSERV,
962 RSVP_CLASS_CLASSTYPE, /* FF: RFC4124 */
963 RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES = 67,
964
965 /* 68-123 Unassigned */
966
967 RSVP_CLASS_VENDOR_PRIVATE_1 = 124,
968 RSVP_CLASS_VENDOR_PRIVATE_2 = 125,
969 RSVP_CLASS_VENDOR_PRIVATE_3 = 126,
970 RSVP_CLASS_VENDOR_PRIVATE_4 = 127,
971
972 RSVP_CLASS_NODE_CHAR = 128,
973 RSVP_CLASS_SUGGESTED_LABEL,
974 RSVP_CLASS_ACCEPTABLE_LABEL_SET,
975 RSVP_CLASS_RESTART_CAP,
976 RSVP_CLASS_LINK_CAP = 133,
977
978 /* 132-160 Unassigned */
979
980 /* 166-187 Unassigned */
981
982 RSVP_CLASS_VENDOR_PRIVATE_5 = 188,
983 RSVP_CLASS_VENDOR_PRIVATE_6 = 189,
984 RSVP_CLASS_VENDOR_PRIVATE_7 = 190,
985 RSVP_CLASS_VENDOR_PRIVATE_8 = 191,
986
987 RSVP_CLASS_SESSION_ASSOC = 192,
988 RSVP_CLASS_LSP_TUNNEL_IF_ID,
989 /* 194 Unassigned */
990 RSVP_CLASS_NOTIFY_REQUEST = 195,
991 RSVP_CLASS_ADMIN_STATUS,
992 RSVP_CLASS_LSP_ATTRIBUTES,
993 RSVP_CLASS_ALARM_SPEC,
994 RSVP_CLASS_ASSOCIATION,
995 RSVP_CLASS_CALL_ATTRIBUTES = 202,
996
997 /* 203-204 Unassigned */
998 /*
999 204 Proprietary Juniper LSP properties
1000 https://www.juniper.net/techpubs/en_US/junos12.1/information-products/topic-collections/nog-mpls-logs/topic-20284.html
1001 */
1002 RSVP_CLASS_JUNIPER_PROPERTIES = 204,
1003 RSVP_CLASS_FAST_REROUTE = 205,
1004 /* 206 Unassigned */
1005 RSVP_CLASS_SESSION_ATTRIBUTE = 207,
1006 /* 208-223 Unassigned */
1007 /*
1008 Class Numbers 224-255 are assigned by IANA using FCFS allocation.
1009 RSVP will silently ignore, but FORWARD an object with a Class Number
1010 in this range that it does not understand.
1011 */
1012 /* 224 Unassigned */
1013 RSVP_CLASS_DCLASS = 225,
1014 RSVP_CLASS_PACKETCABLE_EXTENSIONS,
1015 RSVP_CLASS_ATM_SERVICECLASS,
1016 RSVP_CLASS_CALL_OPS,
1017 RSVP_CLASS_GENERALIZED_UNI,
1018 RSVP_CLASS_CALL_ID,
1019 RSVP_CLASS_3GPP2_OBJECT,
1020 RSVP_CLASS_EXCLUDE_ROUTE,
1021
1022 /* 233-251 Unassigned */
1023
1024 RSVP_CLASS_VENDOR_PRIVATE_9 = 252,
1025 RSVP_CLASS_VENDOR_PRIVATE_10 = 253,
1026 RSVP_CLASS_VENDOR_PRIVATE_11 = 254,
1027 RSVP_CLASS_VENDOR_PRIVATE_12 = 255
1028 };
1029
1030 /* XXX: are any/all of the "missing" values below supposed to have value-strings */
1031 static const value_string rsvp_class_vals[] = {
1032 { RSVP_CLASS_NULL, "NULL object"},
1033 { RSVP_CLASS_SESSION, "SESSION object"},
1034
1035 { RSVP_CLASS_HOP, "HOP object"},
1036 { RSVP_CLASS_INTEGRITY, "INTEGRITY object"},
1037 { RSVP_CLASS_TIME_VALUES, "TIME VALUES object"},
1038 { RSVP_CLASS_ERROR, "ERROR object"},
1039 { RSVP_CLASS_SCOPE, "SCOPE object"},
1040 { RSVP_CLASS_STYLE, "STYLE object"},
1041 { RSVP_CLASS_FLOWSPEC, "FLOWSPEC object"},
1042 { RSVP_CLASS_FILTER_SPEC, "FILTER SPEC object"},
1043 { RSVP_CLASS_SENDER_TEMPLATE, "SENDER TEMPLATE object"},
1044 { RSVP_CLASS_SENDER_TSPEC, "SENDER TSPEC object"},
1045 { RSVP_CLASS_ADSPEC, "ADSPEC object"},
1046 { RSVP_CLASS_POLICY, "POLICY object"},
1047 { RSVP_CLASS_CONFIRM, "CONFIRM object"},
1048 { RSVP_CLASS_LABEL, "LABEL object"},
1049 { RSVP_CLASS_HOP_COUNT, "HOP_COUNT object"},
1050 { RSVP_CLASS_STRICT_SOURCE_ROUTE, "STRICT_SOURCE_ROUTE object"},
1051 { RSVP_CLASS_LABEL_REQUEST, "LABEL REQUEST object"},
1052 { RSVP_CLASS_EXPLICIT_ROUTE, "EXPLICIT ROUTE object"},
1053 { RSVP_CLASS_RECORD_ROUTE, "RECORD ROUTE object"},
1054
1055 { RSVP_CLASS_HELLO, "HELLO object"},
1056
1057 { RSVP_CLASS_MESSAGE_ID, "MESSAGE-ID object"},
1058 { RSVP_CLASS_MESSAGE_ID_ACK, "MESSAGE-ID ACK/NACK object"},
1059 { RSVP_CLASS_MESSAGE_ID_LIST, "MESSAGE-ID LIST object"},
1060
1061 /*
1062 RSVP_CLASS_DIAGNOSTIC
1063 RSVP_CLASS_ROUTE,
1064 RSVP_CLASS_DIAG_RESPONSE,
1065 RSVP_CLASS_DIAG_SELECT,
1066 */
1067
1068 { RSVP_CLASS_RECOVERY_LABEL, "RECOVERY-LABEL object"},
1069 { RSVP_CLASS_UPSTREAM_LABEL, "UPSTREAM-LABEL object"},
1070 { RSVP_CLASS_LABEL_SET, "LABEL-SET object"},
1071 { RSVP_CLASS_PROTECTION, "PROTECTION object"},
1072
1073 /*
1074 RSVP_CLASS_DSBM_IP_ADDRESS
1075 RSVP_CLASS_SBM_PRIORITY,
1076 RSVP_CLASS_DSBM_TIMER_INTERVALS,
1077 RSVP_CLASS_SBM_INFO,
1078 */
1079 { RSVP_CLASS_S2L_SUB_LSP, "S2L_SUB_LSP object"},
1080 { RSVP_CLASS_DETOUR, "DETOUR object"},
1081 /*
1082 RSVP_CLASS_CHALLENGE,
1083 */
1084 { RSVP_CLASS_DIFFSERV, "DIFFSERV object"},
1085 { RSVP_CLASS_CLASSTYPE, "CLASSTYPE object"},
1086
1087 { RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES, "LSP REQUIRED ATTRIBUTES object"},
1088
1089
1090 { RSVP_CLASS_VENDOR_PRIVATE_1, "VENDOR PRIVATE object (0bbbbbbb: "
1091 "reject if unknown)"},
1092 { RSVP_CLASS_VENDOR_PRIVATE_2, "VENDOR PRIVATE object (0bbbbbbb: "
1093 "reject if unknown)"},
1094 { RSVP_CLASS_VENDOR_PRIVATE_3, "VENDOR PRIVATE object (0bbbbbbb: "
1095 "reject if unknown)"},
1096 { RSVP_CLASS_VENDOR_PRIVATE_4, "VENDOR PRIVATE object (0bbbbbbb: "
1097 "reject if unknown)"},
1098
1099 /*
1100 RSVP_CLASS_NODE_CHAR
1101 */
1102 { RSVP_CLASS_SUGGESTED_LABEL, "SUGGESTED-LABEL object"},
1103 { RSVP_CLASS_ACCEPTABLE_LABEL_SET, "ACCEPTABLE-LABEL-SET object"},
1104 { RSVP_CLASS_RESTART_CAP, "RESTART-CAPABILITY object"},
1105 { RSVP_CLASS_LINK_CAP, "LINK-CAPABILITY object"},
1106
1107 { RSVP_CLASS_VENDOR_PRIVATE_5, "VENDOR PRIVATE object (10bbbbbb: "
1108 "ignore if unknown)"},
1109 { RSVP_CLASS_VENDOR_PRIVATE_6, "VENDOR PRIVATE object (10bbbbbb: "
1110 "ignore if unknown)"},
1111 { RSVP_CLASS_VENDOR_PRIVATE_7, "VENDOR PRIVATE object (10bbbbbb: "
1112 "ignore if unknown)"},
1113 { RSVP_CLASS_VENDOR_PRIVATE_8, "VENDOR PRIVATE object (10bbbbbb: "
1114 "ignore if unknown)"},
1115 /*
1116 RSVP_CLASS_SESSION_ASSOC
1117 */
1118 { RSVP_CLASS_LSP_TUNNEL_IF_ID, "LSP-TUNNEL INTERFACE-ID object"},
1119
1120 { RSVP_CLASS_NOTIFY_REQUEST, "NOTIFY-REQUEST object"},
1121 { RSVP_CLASS_ADMIN_STATUS, "ADMIN-STATUS object"},
1122 { RSVP_CLASS_LSP_ATTRIBUTES, "LSP ATTRIBUTES object"},
1123 /*
1124 RSVP_CLASS_ALARM_SPEC,
1125 */
1126 { RSVP_CLASS_ASSOCIATION, "ASSOCIATION object"},
1127
1128 { RSVP_CLASS_CALL_ATTRIBUTES, "CALL ATTRIBUTES object"},
1129
1130 { RSVP_CLASS_JUNIPER_PROPERTIES, "Juniper properties object"},
1131 { RSVP_CLASS_FAST_REROUTE, "FAST-REROUTE object"},
1132
1133 { RSVP_CLASS_SESSION_ATTRIBUTE, "SESSION ATTRIBUTE object"},
1134
1135 { RSVP_CLASS_DCLASS, "DCLASS object"},
1136 /*
1137 RSVP_CLASS_PACKETCABLE_EXTENSIONS,
1138 RSVP_CLASS_ATM_SERVICECLASS,
1139 RSVP_CLASS_CALL_OPS,
1140 */
1141 { RSVP_CLASS_GENERALIZED_UNI, "GENERALIZED-UNI object"},
1142 { RSVP_CLASS_CALL_ID, "CALL-ID object"},
1143 { RSVP_CLASS_3GPP2_OBJECT, "3GPP2 object"},
1144 { RSVP_CLASS_EXCLUDE_ROUTE, "EXCLUDE ROUTE object"},
1145
1146 { RSVP_CLASS_VENDOR_PRIVATE_9, "VENDOR PRIVATE object (11bbbbbb: "
1147 "forward if unknown)"},
1148 { RSVP_CLASS_VENDOR_PRIVATE_10, "VENDOR PRIVATE object (11bbbbbb: "
1149 "forward if unknown)"},
1150 { RSVP_CLASS_VENDOR_PRIVATE_11, "VENDOR PRIVATE object (11bbbbbb: "
1151 "forward if unknown)"},
1152 { RSVP_CLASS_VENDOR_PRIVATE_12, "VENDOR PRIVATE object (11bbbbbb: "
1153 "forward if unknown)"},
1154 { 0, NULL}
1155 };
1156 static value_string_ext rsvp_class_vals_ext = VALUE_STRING_EXT_INIT(rsvp_class_vals);
1157
1158 /*
1159 * RSVP error values
1160 */
1161 enum rsvp_error_types {
1162 RSVP_ERROR_CONFIRM = 0,
1163 RSVP_ERROR_ADMISSION,
1164 RSVP_ERROR_POLICY,
1165 RSVP_ERROR_NO_PATH,
1166 RSVP_ERROR_NO_SENDER,
1167 RSVP_ERROR_CONFLICT_RESV_STYLE,
1168 RSVP_ERROR_UNKNOWN_RESV_STYLE,
1169 RSVP_ERROR_CONFLICT_DEST_PORTS,
1170 RSVP_ERROR_CONFLICT_SRC_PORTS,
1171 /* 9-11 Reserved */
1172 RSVP_ERROR_PREEMPTED =12,
1173 RSVP_ERROR_UNKNOWN_CLASS,
1174 RSVP_ERROR_UNKNOWN_C_TYPE,
1175 /* 15-19 Reserved */
1176 RSVP_ERROR_RES_FOR_API = 20,
1177 RSVP_ERROR_TRAFFIC,
1178 RSVP_ERROR_TRAFFIC_SYSTEM,
1179 RSVP_ERROR_SYSTEM,
1180 RSVP_ERROR_ROUTING,
1181 RSVP_ERROR_NOTIFY,
1182 RSVP_ERROR_NEW_AGGR, /* RFC3175 */
1183 RSVP_ERROR_DIFFSERV,
1184 RSVP_ERROR_DSTE, /* RFC4124 */
1185 RSVP_ERROR_UNKNOWN_ATTR_TLV, /* RFC5420 */
1186 RSVP_ERROR_UNKNOWN_ATTR_BIT, /* RFC5420 */
1187 RSVP_ERROR_ALARMS, /* RFC4783 */
1188 RSVP_ERROR_CALL_MGMT, /* RFC4974 */
1189 RSVP_ERROR_USER_ERROR_SPEC, /* RFC5284 */
1190 RSVP_ERROR_REROUTE, /* RFC5710 */
1191 RSVP_ERROR_HO_PROC_FAIL, /* RFC5852 */
1192 RSVP_ERROR_UNREC_REC_PROXY_ERR, /* RFC5946 */
1193 RSVP_ERROR_RSVP_OVER_MPLS_PROB, /* RFC6016 */
1194 RSVP_ERROR_LSP_HIER_ISSUE, /* RFC6107 */
1195 RSVP_ERROR_VCAT_CALL_MGMT /* RFC6344 */
1196
1197 };
1198
1199 static const value_string rsvp_error_codes[] = {
1200 { RSVP_ERROR_CONFIRM, "Confirmation"},
1201 { RSVP_ERROR_ADMISSION, "Admission Control Failure "},
1202 { RSVP_ERROR_POLICY, "Policy Control Failure"},
1203 { RSVP_ERROR_NO_PATH, "No PATH information for this RESV message"},
1204 { RSVP_ERROR_NO_SENDER, "No sender information for this RESV message"},
1205 { RSVP_ERROR_CONFLICT_RESV_STYLE, "Conflicting reservation styles"},
1206 { RSVP_ERROR_UNKNOWN_RESV_STYLE, "Unknown reservation style"},
1207 { RSVP_ERROR_CONFLICT_DEST_PORTS, "Conflicting destination ports"},
1208 { RSVP_ERROR_CONFLICT_SRC_PORTS, "Conflicting source ports"},
1209 { RSVP_ERROR_PREEMPTED, "Service preempted"},
1210 { RSVP_ERROR_UNKNOWN_CLASS, "Unknown object class"},
1211 { RSVP_ERROR_UNKNOWN_C_TYPE, "Unknown object C-type"},
1212 { RSVP_ERROR_RES_FOR_API, "Reserved for API"},
1213 { RSVP_ERROR_TRAFFIC, "Traffic Control Error"},
1214 { RSVP_ERROR_TRAFFIC_SYSTEM, "Traffic Control System Error"},
1215 { RSVP_ERROR_SYSTEM, "RSVP System Error"},
1216 { RSVP_ERROR_ROUTING, "Routing Error"},
1217 { RSVP_ERROR_NOTIFY, "RSVP Notify Error"},
1218 { RSVP_ERROR_NEW_AGGR, "New aggregate needed"},
1219 { RSVP_ERROR_DIFFSERV, "RSVP Diff-Serv Error"},
1220 { RSVP_ERROR_DSTE, "RSVP DiffServ-aware TE Error"},
1221 { RSVP_ERROR_UNKNOWN_ATTR_TLV, "Unknown attributes TLV"},
1222 { RSVP_ERROR_UNKNOWN_ATTR_BIT, "Unknown attributes bit"},
1223 { RSVP_ERROR_ALARMS, "Alarms"},
1224 { RSVP_ERROR_CALL_MGMT, "Call management"},
1225 { RSVP_ERROR_USER_ERROR_SPEC, "User error spec"},
1226 { RSVP_ERROR_REROUTE, "Reroute"},
1227 { RSVP_ERROR_HO_PROC_FAIL, "Handover Procedure Failure"},
1228 { RSVP_ERROR_UNREC_REC_PROXY_ERR, "Unrecoverable Receiver Proxy Error"},
1229 { RSVP_ERROR_RSVP_OVER_MPLS_PROB, "RSVP over MPLS Problem"},
1230 { RSVP_ERROR_LSP_HIER_ISSUE, "LSP Hierarchy Issue"},
1231 { RSVP_ERROR_VCAT_CALL_MGMT, "VCAT Call Management"},
1232
1233 { 0, NULL}
1234 };
1235 static value_string_ext rsvp_error_codes_ext = VALUE_STRING_EXT_INIT(rsvp_error_codes);
1236
1237 static const value_string rsvp_admission_control_error_vals[] = {
1238 { 1, "Delay bound cannot be met"},
1239 { 2, "Requested bandwidth unavailable"},
1240 { 3, "MTU in flowspec larger than interface MTU"},
1241 { 4, "LSP Admission Failure"},
1242 { 5, "Bad Association Type"},
1243 { 0, NULL}
1244 };
1245 static value_string_ext rsvp_admission_control_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_admission_control_error_vals);
1246
1247 static const value_string rsvp_policy_control_error_vals[] = {
1248 { 0, "Information reporting"},
1249 { 1, "Warning"},
1250 { 2, "Reason unknown"},
1251 { 3, "Generic Policy Rejection"},
1252 { 4, "Quota or Accounting violation"},
1253 { 5, "Flow was preempted"},
1254 { 6, "Previously installed policy expired (not refreshed)"},
1255 { 7, "Previous policy data was replaced & caused rejection"},
1256 { 8, "Policies could not be merged (multicast)"},
1257 { 9, "PDP down or non functioning"},
1258 { 10, "Third Party Server (e.g., Kerberos) unavailable"},
1259 { 11, "POLICY_DATA object has bad syntax"},
1260 { 12, "POLICY_DATA object failed Integrity Check"},
1261 { 13, "POLICY_ELEMENT object has bad syntax"},
1262 { 14, "Mandatory PE Missing (Empty PE is in the PD object)"},
1263 { 15, "PEP Out of resources to handle policies."},
1264 { 16, "PDP encountered bad RSVP objects or syntax"},
1265 { 17, "Service type was rejected"},
1266 { 18, "Reservation Style was rejected"},
1267 { 19, "FlowSpec was rejected (too large)"},
1268 { 20, "Hard Pre-empted"},
1269 { 21, "SRLG Recording Rejected"},
1270 { 100, "Unauthorized sender"},
1271 { 101, "Unauthorized receiver"},
1272 { 102, "ERR_PARTIAL_PREEMPT"},
1273 { 103, "Inter-domain policy failure"},
1274 { 104, "Inter-domain explicit route rejected"},
1275 { 0, NULL}
1276 };
1277 static value_string_ext rsvp_policy_control_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_policy_control_error_vals);
1278
1279 static const value_string rsvp_traffic_control_error_vals[] = {
1280 { 1, "Service conflict"},
1281 { 2, "Service unsupported"},
1282 { 3, "Bad Flowspec value"},
1283 { 4, "Bad Tspec value"},
1284 { 5, "Bad Adspec value"},
1285 { 0, NULL}
1286 };
1287 static value_string_ext rsvp_traffic_control_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_traffic_control_error_vals);
1288
1289 static const value_string rsvp_routing_error_vals[] = {
1290 { 1, "Bad EXPLICIT_ROUTE object"},
1291 { 2, "Bad strict node"},
1292 { 3, "Bad loose node"},
1293 { 4, "Bad initial subobject"},
1294 { 5, "No route available toward destination"},
1295 { 6, "Unacceptable label value"},
1296 { 7, "RRO indicated routing loops"},
1297 { 8, "non-RSVP-capable router stands in the path"},
1298 { 9, "MPLS label allocation failure"},
1299 { 10, "Unsupported L3PID"},
1300 { 11, "Label Set"},
1301 { 12, "Switching Type"},
1302 { 13, "Unassigned"},
1303 { 14, "Unsupported Encoding"},
1304 { 15, "Unsupported Link Protection"},
1305 { 16, "Unknown Interface Index"},
1306 { 17, "Unsupported LSP Protection"},
1307 { 18, "PROTECTION object not applicable"},
1308 { 19, "Bad PRIMARY_PATH_ROUTE object"},
1309 { 20, "PRIMARY_PATH_ROUTE object not applicable"},
1310 { 21, "LSP Segment Protection Failed"},
1311 { 22, "Re-routing limit exceeded"},
1312 { 23, "Unable to Branch"},
1313 { 24, "Unsupported LSP Integrity"},
1314 { 25, "P2MP Re-Merge Detected"},
1315 { 26, "P2MP Re-Merge Parameter Mismatch"},
1316 { 27, "ERO Resulted in Re-Merge"},
1317 { 28, "Contiguous LSP type not supported"},
1318 { 29, "ERO conflicts with inter-domain signaling method"},
1319 { 30, "Stitching unsupported"},
1320 { 31, "Unknown PCE-ID for PKS expansion"},
1321 { 32, "Unreachable PCE for PKS expansion"},
1322 { 33, "Unknown Path Key for PKS expansion"},
1323 { 34, "ERO too large for MTU"},
1324 { 64, "Unsupported Exclude Route Subobject Type"},
1325 { 65, "Inconsistent Subobject"},
1326 { 66, "Local Node in Exclude Route"},
1327 { 67, "Route Blocked by Exclude Route"},
1328 { 68, "XRO Too Complex"},
1329 { 69, "EXRS Too Complex"},
1330 { 100, "Diversity not available"},
1331 { 101, "Service level not available"},
1332 { 102, "Invalid/Unknown connection ID"},
1333 { 103, "No route available toward source (ASON)"},
1334 { 104, "Unacceptable interface ID (ASON)"},
1335 { 105, "Invalid/unknown call ID (ASON)"},
1336 { 106, "Invalid SPC interface ID/label (ASON)"},
1337 { 0, NULL}
1338 };
1339 static value_string_ext rsvp_routing_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_routing_error_vals);
1340
1341 static const value_string rsvp_notify_error_vals[] = {
1342 { 1, "RRO too large for MTU"},
1343 { 2, "RRO Notification"},
1344 { 3, "Tunnel locally repaired"},
1345 { 4, "Control Channel Active State"},
1346 { 5, "Control Channel Degraded State"},
1347 { 6, "Preferable path exists"},
1348 { 7, "Link maintenance required"},
1349 { 8, "Node maintenance required"},
1350 { 9, "LSP Failure"},
1351 { 10, "LSP recovered"},
1352 { 11, "LSP Local Failure"},
1353 { 12, "No OOB mapping received"},
1354 { 0, NULL}
1355 };
1356 static value_string_ext rsvp_notify_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_notify_error_vals);
1357
1358 static const value_string rsvp_diffserv_error_vals[] = {
1359 { 1, "Unexpected DIFFSERV object"},
1360 { 2, "Unsupported PHB"},
1361 { 3, "Invalid `EXP<->PHB mapping'"},
1362 { 4, "Unsupported PSC"},
1363 { 5, "Per-LSP context allocation failure"},
1364 { 0, NULL}
1365 };
1366 static value_string_ext rsvp_diffserv_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_diffserv_error_vals);
1367
1368 /* FF: RFC4124 */
1369 static const value_string rsvp_diffserv_aware_te_error_vals[] = {
1370 { 1, "Unexpected CLASSTYPE object"},
1371 { 2, "Unsupported Class-Type"},
1372 { 3, "Invalid Class-Type value"},
1373 { 4, "CT and setup priority do not form a configured TE-Class"},
1374 { 5, "CT and holding priority do not form a configured TE-Class"},
1375 { 6, "CT and setup priority do not form a configured TE-Class AND CT and holding priority do not form a configured TE-Class"},
1376 { 7, "Inconsistency between signaled PSC and signaled CT"},
1377 { 8, "Inconsistency between signaled PHBs and signaled CT"},
1378 { 0, NULL}
1379 };
1380 static value_string_ext rsvp_diffserv_aware_te_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_diffserv_aware_te_error_vals);
1381
1382 static const value_string rsvp_call_mgmt_error_vals[] = {
1383 { 1, "Call ID Contention"},
1384 { 2, "Connections still Exist"},
1385 { 3, "Unknown Call ID"},
1386 { 4, "Duplicate Call"},
1387 { 0, NULL}
1388 };
1389 static value_string_ext rsvp_call_mgmt_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_call_mgmt_error_vals);
1390
1391 /*
1392 * Defines the reservation style plus style-specific information that
1393 * is not a FLOWSPEC or FILTER_SPEC object, in a RESV message.
1394 */
1395 #define RSVP_DISTINCT (1 << 3)
1396 #define RSVP_SHARED (2 << 3)
1397 #define RSVP_SHARING_MASK (RSVP_DISTINCT | RSVP_SHARED)
1398
1399 #define RSVP_SCOPE_WILD 1
1400 #define RSVP_SCOPE_EXPLICIT 2
1401 #define RSVP_SCOPE_MASK 0x07
1402
1403 #define RSVP_WF (RSVP_SHARED | RSVP_SCOPE_WILD)
1404 #define RSVP_FF (RSVP_DISTINCT | RSVP_SCOPE_EXPLICIT)
1405 #define RSVP_SE (RSVP_SHARED | RSVP_SCOPE_EXPLICIT)
1406
1407 static const value_string style_vals[] = {
1408 { RSVP_WF, "Wildcard Filter" },
1409 { RSVP_FF, "Fixed Filter" },
1410 { RSVP_SE, "Shared-Explicit" },
1411 { 0, NULL }
1412 };
1413
1414 enum {
1415 RSVP_SESSION_TYPE_IPV4 = 1,
1416 RSVP_SESSION_TYPE_IPV6,
1417
1418 RSVP_SESSION_TYPE_IPV4_LSP = 7,
1419 RSVP_SESSION_TYPE_IPV6_LSP,
1420
1421 RSVP_SESSION_TYPE_AGGREGATE_IPV4 = 9,
1422 RSVP_SESSION_TYPE_AGGREGATE_IPV6,
1423
1424 RSVP_SESSION_TYPE_IPV4_UNI = 11,
1425
1426 RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV4 = 13,
1427 RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV6,
1428 RSVP_SESSION_TYPE_IPV4_E_NNI
1429 };
1430
1431 /*
1432 * Defines a desired QoS, in a RESV message.
1433 */
1434 enum qos_service_type {
1435 QOS_QUALITATIVE = 128, /* Qualitative service */
1436 QOS_NULL = 6, /* Null service (RFC2997) */
1437 QOS_CONTROLLED_LOAD= 5, /* Controlled Load Service */
1438 QOS_GUARANTEED = 2, /* Guaranteed service */
1439 QOS_TSPEC = 1 /* Traffic specification */
1440 };
1441
1442 static const value_string qos_vals[] = {
1443 { QOS_QUALITATIVE, "Qualitative QoS" },
1444 { QOS_NULL, "Null-Service QoS" },
1445 { QOS_CONTROLLED_LOAD, "Controlled-load QoS" },
1446 { QOS_GUARANTEED, "Guaranteed rate QoS" },
1447 { QOS_TSPEC, "Traffic specification" },
1448 { 0, NULL }
1449 };
1450
1451 static const value_string svc_vals[] = {
1452 { 126, "Compression Hint" },
1453 { 127, "Token bucket" },
1454 { 128, "Null Service" },
1455 { 130, "Guaranteed-rate RSpec" },
1456 { 0, NULL }
1457 };
1458 static value_string_ext svc_vals_ext = VALUE_STRING_EXT_INIT(svc_vals);
1459
1460 enum rsvp_spec_types { INTSRV = 2 };
1461
1462 enum intsrv_services {
1463 INTSRV_GENERAL = 1,
1464 INTSRV_GTD = 2,
1465 INTSRV_CLOAD = 5,
1466 INTSRV_NULL = 6,
1467 INTSRV_QUALITATIVE = 128
1468 };
1469
1470 static const value_string intsrv_services_str[] = {
1471 { INTSRV_GENERAL, "Default General Parameters"},
1472 { INTSRV_GTD, "Guaranteed Rate"},
1473 { INTSRV_CLOAD, "Controlled Load"},
1474 { INTSRV_NULL, "Null Service"},
1475 { INTSRV_QUALITATIVE, "Null Service"},
1476 { 0, NULL }
1477 };
1478 static value_string_ext intsrv_services_str_ext = VALUE_STRING_EXT_INIT(intsrv_services_str);
1479
1480 /*Ingress Layer 2 Control Processing values*/
1481 static const value_string il2cp_val_str[] = {
1482 { 0, "Ingress Layer 2 Control Processing: 0 - Reserved" },
1483 { 1, "Ingress Layer 2 Control Processing: 1 - Discard/Block" },
1484 { 2, "Ingress Layer 2 Control Processing: 2 - Peer/Process" },
1485 { 3, "Ingress Layer 2 Control Processing: 3 - Pass to EVC/Pass" },
1486 { 4, "Ingress Layer 2 Control Processing: 4 - Peer and Pass to EVC" },
1487 { 0, NULL }
1488 };
1489
1490 /*Egress Layer 2 Control Processing values*/
1491 static const value_string el2cp_val_str[] = {
1492 { 0, "Egress Layer 2 Control Processing: 0 - Reserved" },
1493 { 1, "Egress Layer 2 Control Processing: 1 - Based on IL2CP Value" },
1494 { 2, "Egress Layer 2 Control Processing: 2 - Generate" },
1495 { 3, "Egress Layer 2 Control Processing: 3 - None" },
1496 { 4, "Egress Layer 2 Control Processing: 4 - Reserved" },
1497 { 0, NULL }
1498 };
1499
1500 #if 0
1501 enum intsrv_field_name {
1502 INTSRV_NON_IS_HOPS = 1,
1503 INTSRV_COMPOSED_NON_IS_HOPS,
1504 INTSRV_IS_HOPS,
1505 INTSRV_COMPOSED_IS_HOPS,
1506 INTSRV_PATH_BANDWIDTH,
1507 INTSRV_MIN_PATH_BANDWIDTH,
1508 INTSRV_IF_LATENCY,
1509 INTSRV_PATH_LATENCY,
1510 INTSRV_MTU,
1511 INTSRV_COMPOSED_MTU,
1512
1513 INTSRV_TOKEN_BUCKET_TSPEC = 127,
1514 INTSRV_QUALITATIVE_TSPEC = 128,
1515 INTSRV_GTD_RSPEC = 130,
1516
1517 INTSRV_DELAY = 131, /* Gtd Parameter C - Max Delay Bound - bytes */
1518 INTSRV_MAX_JITTER, /* Gtd Parameter D - Max Jitter */
1519 INTSRV_E2E_DELAY, /* Gtd Parameter Ctot */
1520 INTSRV_E2E_MAX_JITTER, /* Gtd Parameter Dtot */
1521 INTSRV_SHP_DELAY, /* Gtd Parameter Csum */
1522 INTSRV_SHP_MAX_JITTER /* Gtd Parameter Dsum */
1523 };
1524 #endif
1525
1526 static const value_string adspec_params[] = {
1527 { 4, "IS Hop Count"},
1528 { 6, "Path b/w estimate"},
1529 { 8, "Minimum path latency"},
1530 { 10, "Composed MTU"},
1531 { 133, "End-to-end composed value for C"},
1532 { 134, "End-to-end composed value for D"},
1533 { 135, "Since-last-reshaping point composed C"},
1534 { 136, "Since-last-reshaping point composed D"},
1535 { 0, NULL }
1536 };
1537 static value_string_ext adspec_params_ext = VALUE_STRING_EXT_INIT(adspec_params);
1538
1539 /*
1540 * FF: please keep this list in sync with
1541 * http://www.iana.org/assignments/gmpls-sig-parameters
1542 * Registry Name: 'LSP Encoding Types'
1543 */
1544 const range_string gmpls_lsp_enc_rvals[] = {
1545 { 1, 1, "Packet" },
1546 { 2, 2, "Ethernet" },
1547 { 3, 3, "ANSI/ETSI PDH" },
1548 { 4, 4, "Reserved" },
1549 { 5, 5, "SDH ITU-T G.707 / SONET ANSI T1.105" },
1550 { 6, 6, "Reserved" },
1551 { 7, 7, "Digital Wrapper" },
1552 { 8, 8, "Lambda (photonic)" },
1553 { 9, 9, "Fiber" },
1554 { 10, 10, "Reserved" },
1555 { 11, 11, "FiberChannel" },
1556 { 12, 12, "G.709 ODUk (Digital Path)" },
1557 { 13, 13, "G.709 Optical Channel" },
1558 { 14, 14, "Ethernet Line (EPL Type 2)" },
1559 { 15, 239, "Unassigned" },
1560 { 240, 255, "Experimental Usage/temporarily" },
1561 { 0, 0, NULL }
1562 };
1563
1564 /*
1565 * FF: please keep this list in sync with
1566 * http://www.iana.org/assignments/gmpls-sig-parameters
1567 * Registry Name: 'Switching Types'
1568 */
1569 const range_string gmpls_switching_type_rvals[] = {
1570 { 1, 1, "Packet-Switch Capable-1 (PSC-1)" },
1571 { 2, 2, "Packet-Switch Capable-2 (PSC-2)" },
1572 { 3, 3, "Packet-Switch Capable-3 (PSC-3)" },
1573 { 4, 4, "Packet-Switch Capable-4 (PSC-4)" },
1574 { 5, 29, "Unassigned" },
1575 { 30, 30, "Ethernet Virtual Private Line (EVPL)" },
1576 { 31, 39, "Unassigned" },
1577 { 40, 40, "802.1 PBB-TE" },
1578 { 41, 50, "Unassigned" },
1579 { 51, 51, "Layer-2 Switch Capable (L2SC)" },
1580 { 52, 99, "Unassigned" },
1581 { 100, 100, "Time-Division-Multiplex Capable (TDM)" },
1582 { 101, 124, "Unassigned" },
1583 { 125, 125, "Data Channel Switching Capable (DCSC)" },
1584 { 126, 149, "Unassigned" },
1585 { 150, 150, "Lambda-Switch Capable (LSC)" },
1586 { 151, 151, "WSON-LSC"},
1587 { 152, 152, "Flexi-Grid-LSC"},
1588 { 153, 169, "Unassigned" },
1589 { 200, 200, "Fiber-Switch Capable (FSC)" },
1590 { 201, 255, "Unassigned" },
1591 { 0, 0, NULL }
1592 };
1593
1594 /*
1595 * FF: please keep this list in sync with
1596 * http://www.iana.org/assignments/gmpls-sig-parameters
1597 * Registry Name: 'Generalized PID (G-PID)'
1598 */
1599 static const range_string gmpls_gpid_rvals[] = {
1600 { 0, 0, "Unknown" },
1601 { 1, 4, "Reserved" },
1602 { 5, 5, "Asynchronous mapping of E4" },
1603 { 6, 6, "Asynchronous mapping of DS3/T3" },
1604 { 7, 7, "Asynchronous mapping of E3" },
1605 { 8, 8, "Bit synchronous mapping of E3" },
1606 { 9, 9, "Byte synchronous mapping of E3" },
1607 { 10, 10, "Asynchronous mapping of DS2/T2" },
1608 { 11, 11, "Bit synchronous mapping of DS2/T2" },
1609 { 12, 12, "Reserved" },
1610 { 13, 13, "Asynchronous mapping of E1" },
1611 { 14, 14, "Byte synchronous mapping of E1" },
1612 { 15, 15, "Byte synchronous mapping of 31 * DS0" },
1613 { 16, 16, "Asynchronous mapping of DS1/T1" },
1614 { 17, 17, "Bit synchronous mapping of DS1/T1" },
1615 { 18, 18, "Byte synchronous mapping of DS1/T1" },
1616 { 19, 19, "VC-11 in VC-12" },
1617 { 20, 21, "Reserved" },
1618 { 22, 22, "DS1 SF Asynchronous" },
1619 { 23, 23, "DS1 ESF Asynchronous" },
1620 { 24, 24, "DS3 M23 Asynchronous" },
1621 { 25, 25, "DS3 C-Bit Parity Asynchronous" },
1622 { 26, 26, "VT/LOVC" },
1623 { 27, 27, "STS SPE/HOVC" },
1624 { 28, 28, "POS - No Scrambling, 16 bit CRC" },
1625 { 29, 29, "POS - No Scrambling, 32 bit CRC" },
1626 { 30, 30, "POS - Scrambling, 16 bit CRC" },
1627 { 31, 31, "POS - Scrambling, 32 bit CRC" },
1628 { 32, 32, "ATM mapping" },
1629 { 33, 33, "Ethernet PHY" },
1630 { 34, 34, "SONET/SDH" },
1631 { 35, 35, "Reserved (SONET deprecated)" },
1632 { 36, 36, "Digital Wrapper" },
1633 { 37, 37, "Lambda" },
1634 { 38, 38, "ANSI/ETSI PDH" },
1635 { 39, 39, "Reserved" },
1636 { 40, 40, "Link Access Protocol SDH (LAPS - X.85 and X.86)" },
1637 { 41, 41, "FDDI" },
1638 { 42, 42, "DQDB (ETSI ETS 300 216)" },
1639 { 43, 43, "FiberChannel-3 (Services)" },
1640 { 44, 44, "HDLC" },
1641 { 45, 45, "Ethernet V2/DIX (only)" },
1642 { 46, 46, "Ethernet 802.3 (only)" },
1643 { 47, 47, "G.709 ODUj" },
1644 { 48, 48, "G.709 OTUk(v)" },
1645 { 49, 49, "CBR/CBRa" },
1646 { 50, 50, "CBRb" },
1647 { 51, 51, "BSOT" },
1648 { 52, 52, "BSNT" },
1649 { 53, 53, "IP/PPP (GFP)" },
1650 { 54, 54, "Ethernet MAC (framed GFP)" },
1651 { 55, 55, "Ethernet PHY (transparent GFP" },
1652 { 56, 56, "ESCON" },
1653 { 57, 57, "FICON" },
1654 { 58, 58, "Fiber Channel" },
1655 { 59, 31743, "Unassigned" },
1656 { 31744, 32767, "Experimental Usage/temporarily" },
1657 { 32768, 65535, "Reserved" },
1658 { 0, 0, NULL },
1659 };
1660
1661 const value_string gmpls_protection_cap_str[] = {
1662 { 1, "Extra Traffic"},
1663 { 2, "Unprotected"},
1664 { 4, "Shared"},
1665 { 8, "Dedicated 1:1"},
1666 { 16, "Dedicated 1+1"},
1667 { 32, "Enhanced"},
1668 { 64, "Reserved"},
1669 { 128, "Reserved"},
1670 { 0, NULL }
1671 };
1672
1673 static const value_string gmpls_sonet_signal_type_str[] = {
1674 { 1, "VT1.5 SPE / VC-11"},
1675 { 2, "VT2 SPE / VC-12"},
1676 { 3, "VT3 SPE"},
1677 { 4, "VT6 SPE / VC-2"},
1678 { 5, "STS-1 SPE / VC-3"},
1679 { 6, "STS-3c SPE / VC-4"},
1680 { 7, "STS-1 / STM-0 (transp)"},
1681 { 8, "STS-3 / STM-1 (transp)"},
1682 { 9, "STS-12 / STM-4 (transp)"},
1683 { 10, "STS-48 / STM-16 (transp)"},
1684 { 11, "STS-192 / STM-64 (transp)"},
1685 { 12, "STS-768 / STM-256 (transp)"},
1686
1687 /* Extended non-SONET signal types */
1688 { 13, "VTG / TUG-2"},
1689 { 14, "TUG-3"},
1690 { 15, "STSG-3 / AUG-1"},
1691 { 16, "STSG-12 / AUG-4"},
1692 { 17, "STSG-48 / AUG-16"},
1693 { 18, "STSG-192 / AUG-64"},
1694 { 19, "STSG-768 / AUG-256"},
1695
1696 /* Other SONEt signal types */
1697 { 21, "STS-12c SPE / VC-4-4c"},
1698 { 22, "STS-48c SPE / VC-4-16c"},
1699 { 23, "STS-192c SPE / VC-4-64c"},
1700 { 0, NULL}
1701 };
1702 value_string_ext gmpls_sonet_signal_type_str_ext = VALUE_STRING_EXT_INIT(gmpls_sonet_signal_type_str);
1703
1704 static const value_string ouni_guni_diversity_str[] = {
1705 { 1, "Node Diverse"},
1706 { 2, "Link Diverse"},
1707 { 3, "Shared-Risk Link Group Diverse"},
1708 { 4, "Shared Path"},
1709 { 0, NULL}
1710 };
1711
1712 /* FF: RFC 4328 G.709 signal type */
1713 static const range_string gmpls_g709_signal_type_rvals[] = {
1714 { 0, 0, "Not significant"},
1715 { 1, 1, "ODU1 (i.e., 2.5 Gbps)"},
1716 { 2, 2, "ODU2 (i.e., 10 Gbps)"},
1717 { 3, 3, "ODU3 (i.e., 40 Gbps)"},
1718 { 4, 5, "Reserved (for future use)"},
1719 { 6, 6, "OCh at 2.5 Gbps"},
1720 { 7, 7, "OCh at 10 Gbps"},
1721 { 8, 8, "OCh at 40 Gbps"},
1722 { 9, 255, "Reserved (for future use)"},
1723 { 0, 0, NULL}
1724 };
1725
1726 /* XRO related */
1727
1728 static const value_string rsvp_xro_sobj_lbit_vals[] = {
1729 { 1, "Should be avoided" },
1730 { 0, "Must be excluded" },
1731 { 0, NULL }
1732 };
1733
1734 /* RRO related */
1735 static const value_string rsvp_rro_sobj_dbit_vals[] = {
1736 { 1, "Upstream direction" },
1737 { 0, "Downstream direction" },
1738 { 0, NULL }
1739 };
1740
1741 #if 0
1742 static const value_string rsvp_xro_sobj_type_vals[] = {
1743 { 1, "IPv4 prefix" },
1744 { 2, "IPv6 prefix" },
1745 { 4, "Unnumbered Interface ID" },
1746 { 32, "Autonomous system number" },
1747 { 33, "Explicit Exclusion Route subobject (EXRS)" },
1748 { 34, "SRLG" },
1749 { 0, NULL }
1750 };
1751 #endif
1752
1753 static const value_string rsvp_xro_sobj_ip_attr_vals[] = {
1754 { 0, "Interface" },
1755 { 1, "Node" },
1756 { 2, "SRLG" },
1757 { 0, NULL }
1758 };
1759
1760 static const value_string rsvp_juniper_attr_vals[] = {
1761 { 0x01, "Cos" },
1762 { 0x02, "Metric 1" },
1763 { 0x04, "Metric 2" },
1764 { 0x08, "CCC Status" },
1765 { 0x10, "Path Type" },
1766 { 0, NULL }
1767 };
1768
1769 static const value_string rsvp_juniper_path_attr_vals[] = {
1770 { 0x02, "Primary" },
1771 { 0x03, "Secondary" },
1772 { 0, NULL }
1773 };
1774
1775 /* -------------------- Stuff for MPLS/TE objects -------------------- */
1776
1777 static const value_string proto_vals[] = {
1778 { IP_PROTO_ICMP, "ICMP"},
1779 { IP_PROTO_IGMP, "IGMP"},
1780 { IP_PROTO_TCP, "TCP" },
1781 { IP_PROTO_UDP, "UDP" },
1782 { IP_PROTO_OSPF, "OSPF"},
1783 { 0, NULL }
1784 };
1785
1786 /* Filter keys */
1787 enum hf_rsvp_filter_keys {
1788
1789 /* Message types */
1790 RSVPF_MSG, /* Message type */
1791 /* Shorthand for message types */
1792 RSVPF_PATH,
1793 RSVPF_RESV,
1794 RSVPF_PATHERR,
1795 RSVPF_RESVERR,
1796 RSVPF_PATHTEAR,
1797 RSVPF_RESVTEAR,
1798 RSVPF_RCONFIRM,
1799 RSVPF_JUNK_MSG8,
1800 RSVPF_JUNK_MSG9,
1801 RSVPF_RTEARCONFIRM,
1802 RSVPF_JUNK11,
1803 RSVPF_BUNDLE,
1804 RSVPF_ACK,
1805 RSVPF_JUNK14,
1806 RSVPF_SREFRESH,
1807 RSVPF_JUNK16,
1808 RSVPF_JUNK17,
1809 RSVPF_JUNK18,
1810 RSVPF_JUNK19,
1811 RSVPF_HELLO,
1812 RSVPF_NOTIFY,
1813 /* Does the message contain an object of this type? */
1814 RSVPF_OBJECT,
1815 /* Object present shorthands */
1816 RSVPF_SESSION,
1817 RSVPF_DUMMY_1,
1818 RSVPF_HOP,
1819 RSVPF_INTEGRITY,
1820 RSVPF_TIME_VALUES,
1821 RSVPF_ERROR,
1822 RSVPF_SCOPE,
1823 RSVPF_STYLE,
1824 RSVPF_FLOWSPEC,
1825 RSVPF_FILTER_SPEC,
1826 RSVPF_SENDER,
1827 RSVPF_TSPEC,
1828 RSVPF_ADSPEC,
1829 RSVPF_POLICY,
1830 RSVPF_CONFIRM,
1831 RSVPF_LABEL,
1832 RSVPF_DUMMY_2,
1833 RSVPF_DUMMY_3,
1834 RSVPF_LABEL_REQUEST,
1835 RSVPF_EXPLICIT_ROUTE,
1836 RSVPF_RECORD_ROUTE,
1837 RSVPF_HELLO_OBJ,
1838 RSVPF_MESSAGE_ID,
1839 RSVPF_MESSAGE_ID_ACK,
1840 RSVPF_MESSAGE_ID_LIST,
1841 RSVPF_RECOVERY_LABEL,
1842 RSVPF_UPSTREAM_LABEL,
1843 RSVPF_LABEL_SET,
1844 RSVPF_PROTECTION,
1845 RSVPF_DIFFSERV,
1846 RSVPF_DSTE,
1847
1848 RSVPF_SUGGESTED_LABEL,
1849 RSVPF_ACCEPTABLE_LABEL_SET,
1850 RSVPF_RESTART_CAP,
1851
1852 RSVPF_LINK_CAP,
1853
1854 RSVPF_SESSION_ATTRIBUTE,
1855 RSVPF_DCLASS,
1856 RSVPF_LSP_TUNNEL_IF_ID,
1857 RSVPF_NOTIFY_REQUEST,
1858 RSVPF_ADMIN_STATUS,
1859 RSVPF_ADMIN_STATUS_REFLECT,
1860 RSVPF_ADMIN_STATUS_HANDOVER,
1861 RSVPF_ADMIN_STATUS_LOCKOUT,
1862 RSVPF_ADMIN_STATUS_INHIBIT,
1863 RSVPF_ADMIN_STATUS_CALL_MGMT,
1864 RSVPF_ADMIN_STATUS_TESTING,
1865 RSVPF_ADMIN_STATUS_DOWN,
1866 RSVPF_ADMIN_STATUS_DELETE,
1867 RSVPF_LSP_ATTRIBUTES,
1868 RSVPF_ASSOCIATION,
1869 RSVPF_CALL_ATTRIBUTES,
1870 RSVPF_GENERALIZED_UNI,
1871 RSVPF_CALL_ID,
1872 RSVPF_3GPP2_OBJECT,
1873 RSVPF_UNKNOWN_OBJ,
1874
1875 /* Session object */
1876 RSVPF_SESSION_IP,
1877 RSVPF_SESSION_SHORT_CALL_ID,
1878 RSVPF_SESSION_PROTO,
1879 RSVPF_SESSION_PORT,
1880 RSVPF_SESSION_TUNNEL_ID,
1881 RSVPF_SESSION_EXT_TUNNEL_ID,
1882 RSVPF_SESSION_EXT_TUNNEL_ID_IPV6,
1883
1884 /* Sender template */
1885 RSVPF_SENDER_IP,
1886 RSVPF_SENDER_PORT,
1887 RSVPF_SENDER_LSP_ID,
1888 RSVPF_SENDER_SHORT_CALL_ID,
1889
1890 /* Diffserv object */
1891 RSVPF_DIFFSERV_MAPNB,
1892 RSVPF_DIFFSERV_MAP,
1893 RSVPF_DIFFSERV_MAP_EXP,
1894 RSVPF_DIFFSERV_PHBID,
1895 RSVPF_DIFFSERV_PHBID_DSCP,
1896 RSVPF_DIFFSERV_PHBID_CODE,
1897 RSVPF_DIFFSERV_PHBID_BIT14,
1898 RSVPF_DIFFSERV_PHBID_BIT15,
1899
1900 /* Diffserv-aware TE object */
1901 RSVPF_DSTE_CLASSTYPE,
1902
1903 /* Generalized UNI object */
1904 RSVPF_GUNI_SRC_IPV4,
1905 RSVPF_GUNI_DST_IPV4,
1906 RSVPF_GUNI_SRC_IPV6,
1907 RSVPF_GUNI_DST_IPV6,
1908
1909 /* CALL ID object */
1910 RSVPF_CALL_ID_SRC_ADDR_IPV4,
1911 RSVPF_CALL_ID_SRC_ADDR_IPV6,
1912
1913 /* EXCLUDE ROUTE object */
1914 RSVPF_EXCLUDE_ROUTE,
1915
1916 /* Vendor Private objects */
1917 RSVPF_PRIVATE_OBJ,
1918 RSVPF_ENT_CODE,
1919
1920 RSVPF_JUNIPER,
1921
1922 /* Sentinel */
1923 RSVPF_MAX
1924 };
1925
1926 static const true_false_string tfs_desired_not_desired = { "Desired", "Not Desired" };
1927 static const true_false_string tfs_next_next_hop_next_hop = { "Next-Next-Hop", "Next-Hop" };
1928 static const true_false_string tfs_loose_strict_hop = { "Loose Hop", "Strict Hop" };
1929 static const true_false_string tfs_can_cannot = { "Can", "Cannot" };
1930 static const true_false_string tfs_gen_uni_direction = { "U: 1 - Upstream label/port ID", "U: 0 - Downstream label/port ID" };
1931
1932 static const unit_name_string units_word_not_including_header = { " word, not including header", " words, not including header" };
1933
1934 static int hf_rsvp_filter[RSVPF_MAX] = { -1 };
1935
1936 /* RSVP Conversation related Hash functions */
1937
1938 /*
1939 * Compare two RSVP request keys to see if they are equal. Return 1 if they
1940 * are, 0 otherwise.
1941 * Two RSVP request keys are equal if and only if they have the exactly the
1942 * same internal conversation identifier, session type, and matching values in
1943 * the session info and source info structures.
1944 */
1945 static gint
rsvp_equal(gconstpointer k1,gconstpointer k2)1946 rsvp_equal(gconstpointer k1, gconstpointer k2)
1947 {
1948 const struct rsvp_request_key *key1 = (const struct rsvp_request_key*) k1;
1949 const struct rsvp_request_key *key2 = (const struct rsvp_request_key*) k2;
1950
1951 if (key1->conversation != key2->conversation) {
1952 return 0;
1953 }
1954
1955 if (key1->session_type != key2->session_type) {
1956 return 0;
1957 }
1958
1959 switch (key1->session_type) {
1960 case RSVP_SESSION_TYPE_IPV4:
1961 if (addresses_equal(&key1->u.session_ipv4.destination,
1962 &key2->u.session_ipv4.destination) == FALSE)
1963 return 0;
1964
1965 if (key1->u.session_ipv4.protocol != key2->u.session_ipv4.protocol)
1966 return 0;
1967
1968 if (key1->u.session_ipv4.udp_dest_port != key2->u.session_ipv4.udp_dest_port)
1969 return 0;
1970
1971 break;
1972
1973 case RSVP_SESSION_TYPE_IPV6:
1974 /* this is not supported yet for conversations */
1975 break;
1976
1977 case RSVP_SESSION_TYPE_IPV4_LSP:
1978 if (addresses_equal(&key1->u.session_ipv4_lsp.destination,
1979 &key2->u.session_ipv4_lsp.destination) == FALSE)
1980 return 0;
1981
1982 if (key1->u.session_ipv4_lsp.udp_dest_port !=
1983 key2->u.session_ipv4_lsp.udp_dest_port)
1984 return 0;
1985
1986
1987 if (key1->u.session_ipv4_lsp.ext_tunnel_id !=
1988 key2->u.session_ipv4_lsp.ext_tunnel_id)
1989 return 0;
1990
1991 break;
1992
1993 case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
1994 if (addresses_equal(&key1->u.session_agg_ipv4.destination,
1995 &key2->u.session_agg_ipv4.destination) == FALSE)
1996 return 0;
1997
1998 if (key1->u.session_agg_ipv4.dscp != key2->u.session_agg_ipv4.dscp)
1999 return 0;
2000
2001 break;
2002
2003 case RSVP_SESSION_TYPE_AGGREGATE_IPV6:
2004 /* this is not supported yet for conversations */
2005 break;
2006
2007 case RSVP_SESSION_TYPE_IPV4_UNI:
2008 if (addresses_equal(&key1->u.session_ipv4_uni.destination,
2009 &key2->u.session_ipv4_uni.destination) == FALSE)
2010 return 0;
2011
2012 if (key1->u.session_ipv4_uni.udp_dest_port !=
2013 key2->u.session_ipv4_uni.udp_dest_port)
2014 return 0;
2015
2016
2017 if (key1->u.session_ipv4_uni.ext_tunnel_id !=
2018 key2->u.session_ipv4_uni.ext_tunnel_id)
2019 return 0;
2020
2021 break;
2022
2023 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV4:
2024 if (addresses_equal(&key1->u.session_ipv4_p2mp_lsp.destination,
2025 &key2->u.session_ipv4_p2mp_lsp.destination) == FALSE)
2026 return 0;
2027
2028 if (key1->u.session_ipv4_p2mp_lsp.udp_dest_port !=
2029 key2->u.session_ipv4_p2mp_lsp.udp_dest_port)
2030 return 0;
2031
2032
2033 if (key1->u.session_ipv4_p2mp_lsp.ext_tunnel_id !=
2034 key2->u.session_ipv4_p2mp_lsp.ext_tunnel_id)
2035 return 0;
2036
2037 break;
2038
2039 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV6:
2040 if (addresses_equal(&key1->u.session_ipv6_p2mp_lsp.destination,
2041 &key2->u.session_ipv6_p2mp_lsp.destination) == FALSE)
2042 return 0;
2043
2044 if (key1->u.session_ipv6_p2mp_lsp.udp_dest_port !=
2045 key2->u.session_ipv6_p2mp_lsp.udp_dest_port)
2046 return 0;
2047
2048
2049 if (key1->u.session_ipv6_p2mp_lsp.ext_tunnel_id !=
2050 key2->u.session_ipv6_p2mp_lsp.ext_tunnel_id)
2051 return 0;
2052
2053 break;
2054
2055 case RSVP_SESSION_TYPE_IPV4_E_NNI:
2056 if (addresses_equal(&key1->u.session_ipv4_enni.destination,
2057 &key2->u.session_ipv4_enni.destination) == FALSE)
2058 return 0;
2059
2060 if (key1->u.session_ipv4_enni.udp_dest_port !=
2061 key2->u.session_ipv4_enni.udp_dest_port)
2062 return 0;
2063
2064
2065 if (key1->u.session_ipv4_enni.ext_tunnel_id !=
2066 key2->u.session_ipv4_enni.ext_tunnel_id)
2067 return 0;
2068
2069 break;
2070
2071 default:
2072 /* This should never happen. */
2073 break;
2074 }
2075
2076 if (addresses_equal(&key1->source_info.source,
2077 &key2->source_info.source) == FALSE)
2078 return 0;
2079
2080 if (key1->source_info.udp_source_port != key2->source_info.udp_source_port)
2081 return 0;
2082
2083 /* If we get here, the two keys are equal. */
2084 return 1;
2085 }
2086
2087 /*
2088 * Calculate a hash key for the supplied RSVP request. The internally allocated
2089 * conversation-id is unique, so we just use that.
2090 */
2091 static guint
rsvp_hash(gconstpointer k)2092 rsvp_hash(gconstpointer k)
2093 {
2094 const struct rsvp_request_key *key = (const struct rsvp_request_key*) k;
2095 return key->conversation;
2096 }
2097
rsvp_conv_get_filter_type(conv_item_t * conv,conv_filter_type_e filter)2098 static const char* rsvp_conv_get_filter_type(conv_item_t* conv, conv_filter_type_e filter)
2099 {
2100 if ((filter == CONV_FT_SRC_ADDRESS) && (conv->src_address.type == AT_IPv4))
2101 return "ip.src";
2102
2103 if ((filter == CONV_FT_DST_ADDRESS) && (conv->dst_address.type == AT_IPv4))
2104 return "ip.dst";
2105
2106 if ((filter == CONV_FT_ANY_ADDRESS) && (conv->src_address.type == AT_IPv4))
2107 return "ip.addr";
2108
2109 return CONV_FILTER_INVALID;
2110 }
2111
2112 static ct_dissector_info_t rsvp_ct_dissector_info = {&rsvp_conv_get_filter_type};
2113
2114 static tap_packet_status
rsvp_conversation_packet(void * pct,packet_info * pinfo,epan_dissect_t * edt _U_,const void * vip)2115 rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
2116 {
2117 conv_hash_t *hash = (conv_hash_t*) pct;
2118 const rsvp_conversation_info *rsvph = (const rsvp_conversation_info *)vip;
2119
2120 add_conversation_table_data(hash, &rsvph->source, &rsvph->destination,
2121 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &rsvp_ct_dissector_info, ENDPOINT_NONE);
2122
2123 return TAP_PACKET_REDRAW;
2124 }
2125
rsvp_host_get_filter_type(hostlist_talker_t * host,conv_filter_type_e filter)2126 static const char* rsvp_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
2127 {
2128 if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_IPv4))
2129 return "ip.addr";
2130
2131 return CONV_FILTER_INVALID;
2132 }
2133
2134 static hostlist_dissector_info_t rsvp_host_dissector_info = {&rsvp_host_get_filter_type};
2135
2136 static tap_packet_status
rsvp_hostlist_packet(void * pit,packet_info * pinfo,epan_dissect_t * edt _U_,const void * vip)2137 rsvp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
2138 {
2139 conv_hash_t *hash = (conv_hash_t*) pit;
2140 const rsvp_conversation_info *rsvph = (const rsvp_conversation_info *)vip;
2141
2142 /* Take two "add" passes per packet, adding for each direction, ensures
2143 * that all packets are counted properly (even if address is sending to
2144 * itself). XXX - this could probably be done more efficiently inside
2145 * hostlist_table
2146 */
2147 add_hostlist_table_data(hash, &rsvph->source, 0, TRUE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, ENDPOINT_NONE);
2148 add_hostlist_table_data(hash, &rsvph->destination, 0, FALSE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, ENDPOINT_NONE);
2149 return TAP_PACKET_REDRAW;
2150 }
2151
2152 static inline int
rsvp_class_to_filter_num(int classnum)2153 rsvp_class_to_filter_num(int classnum)
2154 {
2155 switch(classnum) {
2156 case RSVP_CLASS_SESSION :
2157 case RSVP_CLASS_HOP :
2158 case RSVP_CLASS_INTEGRITY :
2159 case RSVP_CLASS_TIME_VALUES :
2160 case RSVP_CLASS_ERROR :
2161 case RSVP_CLASS_SCOPE :
2162 case RSVP_CLASS_STYLE :
2163 case RSVP_CLASS_FLOWSPEC :
2164 case RSVP_CLASS_FILTER_SPEC :
2165 case RSVP_CLASS_SENDER_TEMPLATE :
2166 case RSVP_CLASS_SENDER_TSPEC :
2167 case RSVP_CLASS_ADSPEC :
2168 case RSVP_CLASS_POLICY :
2169 case RSVP_CLASS_CONFIRM :
2170 case RSVP_CLASS_LABEL :
2171 case RSVP_CLASS_LABEL_REQUEST :
2172 case RSVP_CLASS_HELLO :
2173 case RSVP_CLASS_EXPLICIT_ROUTE :
2174 case RSVP_CLASS_RECORD_ROUTE :
2175 case RSVP_CLASS_MESSAGE_ID :
2176 case RSVP_CLASS_MESSAGE_ID_ACK :
2177 case RSVP_CLASS_MESSAGE_ID_LIST :
2178 return classnum + RSVPF_OBJECT;
2179 break;
2180
2181 case RSVP_CLASS_RECOVERY_LABEL :
2182 case RSVP_CLASS_UPSTREAM_LABEL :
2183 case RSVP_CLASS_LABEL_SET :
2184 case RSVP_CLASS_PROTECTION :
2185 return RSVPF_RECOVERY_LABEL + (classnum - RSVP_CLASS_RECOVERY_LABEL);
2186
2187 case RSVP_CLASS_SUGGESTED_LABEL :
2188 case RSVP_CLASS_ACCEPTABLE_LABEL_SET :
2189 case RSVP_CLASS_RESTART_CAP :
2190 return RSVPF_SUGGESTED_LABEL + (classnum - RSVP_CLASS_SUGGESTED_LABEL);
2191
2192 case RSVP_CLASS_LINK_CAP :
2193 return RSVPF_LINK_CAP;
2194
2195 case RSVP_CLASS_DIFFSERV :
2196 return RSVPF_DIFFSERV;
2197
2198 case RSVP_CLASS_CLASSTYPE :
2199 return RSVPF_DSTE;
2200
2201 case RSVP_CLASS_NOTIFY_REQUEST :
2202 return RSVPF_NOTIFY_REQUEST;
2203 case RSVP_CLASS_ADMIN_STATUS :
2204 return RSVPF_ADMIN_STATUS;
2205 case RSVP_CLASS_LSP_ATTRIBUTES :
2206 return RSVPF_LSP_ATTRIBUTES;
2207 case RSVP_CLASS_ASSOCIATION :
2208 return RSVPF_ASSOCIATION;
2209 case RSVP_CLASS_CALL_ATTRIBUTES:
2210 return RSVPF_CALL_ATTRIBUTES;
2211
2212 case RSVP_CLASS_SESSION_ATTRIBUTE :
2213 return RSVPF_SESSION_ATTRIBUTE;
2214 case RSVP_CLASS_GENERALIZED_UNI :
2215 return RSVPF_GENERALIZED_UNI;
2216 case RSVP_CLASS_CALL_ID :
2217 return RSVPF_CALL_ID;
2218 case RSVP_CLASS_3GPP2_OBJECT :
2219 return RSVPF_3GPP2_OBJECT;
2220 case RSVP_CLASS_DCLASS :
2221 return RSVPF_DCLASS;
2222 case RSVP_CLASS_LSP_TUNNEL_IF_ID :
2223 return RSVPF_LSP_TUNNEL_IF_ID;
2224 case RSVP_CLASS_EXCLUDE_ROUTE:
2225 return RSVPF_EXCLUDE_ROUTE;
2226
2227 case RSVP_CLASS_JUNIPER_PROPERTIES :
2228 return RSVPF_JUNIPER;
2229 case RSVP_CLASS_VENDOR_PRIVATE_1:
2230 case RSVP_CLASS_VENDOR_PRIVATE_2:
2231 case RSVP_CLASS_VENDOR_PRIVATE_3:
2232 case RSVP_CLASS_VENDOR_PRIVATE_4:
2233 case RSVP_CLASS_VENDOR_PRIVATE_5:
2234 case RSVP_CLASS_VENDOR_PRIVATE_6:
2235 case RSVP_CLASS_VENDOR_PRIVATE_7:
2236 case RSVP_CLASS_VENDOR_PRIVATE_8:
2237 case RSVP_CLASS_VENDOR_PRIVATE_9:
2238 case RSVP_CLASS_VENDOR_PRIVATE_10:
2239 case RSVP_CLASS_VENDOR_PRIVATE_11:
2240 case RSVP_CLASS_VENDOR_PRIVATE_12:
2241 return RSVPF_PRIVATE_OBJ;
2242
2243 default:
2244 return RSVPF_UNKNOWN_OBJ;
2245 }
2246 }
2247
2248 static inline int
rsvp_class_to_tree_type(int classnum)2249 rsvp_class_to_tree_type(int classnum)
2250 {
2251 switch(classnum) {
2252 case RSVP_CLASS_SESSION :
2253 return TT_SESSION;
2254 case RSVP_CLASS_HOP :
2255 return TT_HOP;
2256 case RSVP_CLASS_INTEGRITY :
2257 return TT_INTEGRITY;
2258 case RSVP_CLASS_TIME_VALUES :
2259 return TT_TIME_VALUES;
2260 case RSVP_CLASS_ERROR :
2261 return TT_ERROR;
2262 case RSVP_CLASS_SCOPE :
2263 return TT_SCOPE;
2264 case RSVP_CLASS_STYLE :
2265 return TT_STYLE;
2266 case RSVP_CLASS_FLOWSPEC :
2267 return TT_FLOWSPEC;
2268 case RSVP_CLASS_FILTER_SPEC :
2269 return TT_FILTER_SPEC;
2270 case RSVP_CLASS_SENDER_TEMPLATE :
2271 return TT_SENDER_TEMPLATE;
2272 case RSVP_CLASS_SENDER_TSPEC :
2273 return TT_TSPEC;
2274 case RSVP_CLASS_ADSPEC :
2275 return TT_ADSPEC;
2276 case RSVP_CLASS_POLICY :
2277 return TT_POLICY;
2278 case RSVP_CLASS_CONFIRM :
2279 return TT_CONFIRM;
2280 case RSVP_CLASS_RECOVERY_LABEL :
2281 case RSVP_CLASS_UPSTREAM_LABEL :
2282 case RSVP_CLASS_SUGGESTED_LABEL :
2283 case RSVP_CLASS_LABEL :
2284 return TT_LABEL;
2285 case RSVP_CLASS_LABEL_REQUEST :
2286 return TT_LABEL_REQUEST;
2287 case RSVP_CLASS_HELLO :
2288 return TT_HELLO_OBJ;
2289 case RSVP_CLASS_EXPLICIT_ROUTE :
2290 return TT_EXPLICIT_ROUTE;
2291 case RSVP_CLASS_RECORD_ROUTE :
2292 return TT_RECORD_ROUTE;
2293 case RSVP_CLASS_MESSAGE_ID :
2294 return TT_MESSAGE_ID;
2295 case RSVP_CLASS_MESSAGE_ID_ACK :
2296 return TT_MESSAGE_ID_ACK;
2297 case RSVP_CLASS_MESSAGE_ID_LIST :
2298 return TT_MESSAGE_ID_LIST;
2299 case RSVP_CLASS_LABEL_SET :
2300 return TT_LABEL_SET;
2301 case RSVP_CLASS_PROTECTION :
2302 return TT_PROTECTION_INFO;
2303 case RSVP_CLASS_ACCEPTABLE_LABEL_SET :
2304 return TT_UNKNOWN_CLASS;
2305 case RSVP_CLASS_RESTART_CAP :
2306 return TT_RESTART_CAP;
2307 case RSVP_CLASS_LINK_CAP :
2308 return TT_LINK_CAP;
2309 case RSVP_CLASS_DIFFSERV :
2310 return TT_DIFFSERV;
2311 case RSVP_CLASS_CLASSTYPE:
2312 return TT_CLASSTYPE;
2313 case RSVP_CLASS_NOTIFY_REQUEST :
2314 return TT_UNKNOWN_CLASS;
2315 case RSVP_CLASS_ADMIN_STATUS :
2316 return TT_ADMIN_STATUS;
2317 case RSVP_CLASS_LSP_ATTRIBUTES :
2318 case RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES :
2319 return TT_LSP_ATTRIBUTES;
2320 case RSVP_CLASS_ASSOCIATION :
2321 return TT_ASSOCIATION;
2322 case RSVP_CLASS_CALL_ATTRIBUTES:
2323 return RSVPF_CALL_ATTRIBUTES;
2324 case RSVP_CLASS_JUNIPER_PROPERTIES :
2325 return TT_JUNIPER;
2326 case RSVP_CLASS_SESSION_ATTRIBUTE :
2327 return TT_SESSION_ATTRIBUTE;
2328 case RSVP_CLASS_GENERALIZED_UNI :
2329 return TT_GEN_UNI;
2330 case RSVP_CLASS_CALL_ID :
2331 return TT_CALL_ID;
2332 case RSVP_CLASS_3GPP2_OBJECT :
2333 return TT_3GPP2_OBJECT;
2334 case RSVP_CLASS_DCLASS :
2335 return TT_DCLASS;
2336 case RSVP_CLASS_LSP_TUNNEL_IF_ID :
2337 return TT_LSP_TUNNEL_IF_ID;
2338 case RSVP_CLASS_EXCLUDE_ROUTE :
2339 return TT_EXCLUDE_ROUTE;
2340 case RSVP_CLASS_VENDOR_PRIVATE_1:
2341 case RSVP_CLASS_VENDOR_PRIVATE_2:
2342 case RSVP_CLASS_VENDOR_PRIVATE_3:
2343 case RSVP_CLASS_VENDOR_PRIVATE_4:
2344 case RSVP_CLASS_VENDOR_PRIVATE_5:
2345 case RSVP_CLASS_VENDOR_PRIVATE_6:
2346 case RSVP_CLASS_VENDOR_PRIVATE_7:
2347 case RSVP_CLASS_VENDOR_PRIVATE_8:
2348 case RSVP_CLASS_VENDOR_PRIVATE_9:
2349 case RSVP_CLASS_VENDOR_PRIVATE_10:
2350 case RSVP_CLASS_VENDOR_PRIVATE_11:
2351 case RSVP_CLASS_VENDOR_PRIVATE_12:
2352 return TT_PRIVATE_CLASS;
2353 default:
2354 return TT_UNKNOWN_CLASS;
2355 }
2356 }
2357
2358 static void
find_rsvp_session_tempfilt(tvbuff_t * tvb,int hdr_offset,int * session_offp,int * tempfilt_offp)2359 find_rsvp_session_tempfilt(tvbuff_t *tvb, int hdr_offset, int *session_offp, int *tempfilt_offp)
2360 {
2361 int s_off = 0, t_off = 0;
2362 int len, off;
2363 guint obj_length;
2364
2365 if (!tvb_bytes_exist(tvb, hdr_offset+6, 2))
2366 goto done;
2367
2368 len = tvb_get_ntohs(tvb, hdr_offset+6) + hdr_offset;
2369 for (off = hdr_offset + 8; (off < len) && tvb_bytes_exist(tvb, off, 3); off += obj_length) {
2370 obj_length = tvb_get_ntohs(tvb, off);
2371 if (obj_length == 0)
2372 break;
2373 switch(tvb_get_guint8(tvb, off+2)) {
2374 case RSVP_CLASS_SESSION:
2375 s_off = off;
2376 break;
2377 case RSVP_CLASS_SENDER_TEMPLATE:
2378 case RSVP_CLASS_FILTER_SPEC:
2379 t_off = off;
2380 break;
2381 default:
2382 break;
2383 }
2384 }
2385
2386 done:
2387 if (session_offp) *session_offp = s_off;
2388 if (tempfilt_offp) *tempfilt_offp = t_off;
2389 }
2390
2391 static const value_string rsvp_c_type_session_vals[] = {
2392 {RSVP_SESSION_TYPE_IPV4, "IPv4"},
2393 {RSVP_SESSION_TYPE_IPV4_LSP, "IPv4-LSP"},
2394 {RSVP_SESSION_TYPE_IPV6_LSP, "IPv6-LSP"},
2395 {RSVP_SESSION_TYPE_AGGREGATE_IPV4, "IPv4-Aggregate"},
2396 {RSVP_SESSION_TYPE_IPV4_UNI, "IPv4-UNI"},
2397 {RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV4, "IPv4-P2MP LSP TUNNEL"},
2398 {RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV6, "IPv6-P2MP LSP TUNNEL"},
2399 {RSVP_SESSION_TYPE_IPV4_E_NNI, "IPv4-E-NNI"},
2400 {0, NULL }
2401 };
2402
2403 static const value_string rsvp_c_type_call_id_vals[] = {
2404 {0, "Empty"},
2405 {1, "Operator Specific"},
2406 {2, "Globally Unique"},
2407 {0, NULL }
2408 };
2409
2410 static const value_string rsvp_c_type_hop_vals[] = {
2411 {1, "IPv4"},
2412 {2, "IPv6"},
2413 {3, "IPv4 IF-ID"},
2414 {4, "IPv6 IF-ID"},
2415 {0, NULL }
2416 };
2417
2418 static const value_string rsvp_c_type_time_values_vals[] = {
2419 {1, "Time Values"},
2420 {0, NULL }
2421 };
2422
2423 static const value_string rsvp_c_type_error_vals[] = {
2424 {1, "IPv4"},
2425 {2, "IPv6"},
2426 {3, "IPv4 IF-ID"},
2427 {4, "IPv6 IF-ID"},
2428 {0, NULL }
2429 };
2430
2431 static const value_string rsvp_c_type_scope_vals[] = {
2432 {1, "IPv4"},
2433 {2, "IPv6"},
2434 {0, NULL }
2435 };
2436
2437 static const value_string rsvp_c_type_style_vals[] = {
2438 {1, "Style"},
2439 {0, NULL }
2440 };
2441
2442 static const value_string rsvp_c_type_confirm_vals[] = {
2443 {1, "IPv4"},
2444 {2, "IPv6"},
2445 {0, NULL }
2446 };
2447
2448 static const value_string rsvp_c_type_template_vals[] = {
2449 {1, "IPv4"},
2450 {2, "IPv6"},
2451 {7, "IPv4 LSP"},
2452 {8, "IPv6 LSP"},
2453 {9, "IPv4 Aggregate"},
2454 {12, "P2MP_LSP_TUNNEL_IPv4"},
2455 {13, "P2MP_LSP_TUNNEL_IPv6"},
2456 {0, NULL }
2457 };
2458
2459 static const value_string rsvp_c_type_tspec_vals[] = {
2460 {2, "Integrated Services"},
2461 {4, "SONET/SDH"},
2462 {5, "G.709"},
2463 {6, "Ethernet"},
2464 {0, NULL }
2465 };
2466
2467 static const value_string rsvp_c_type_flowspec_vals[] = {
2468 {2, "Integrated Services"},
2469 {4, "SONET/SDH"},
2470 {5, "G.709"},
2471 {6, "Ethernet"},
2472 {0, NULL }
2473 };
2474
2475 static const value_string rsvp_c_type_label_request_vals[] = {
2476 { 2, "Label Request with ATM label Range"},
2477 { 3, "Label Request with Frame-Relay label Range"},
2478 { 4, "Generalized Label Request"},
2479 { 5, "Generalized Channel_set Label Request"},
2480 { 0, NULL }
2481 };
2482
2483 static const value_string rsvp_c_type_attribute_vals[] = {
2484 { 1, "IPv4 LSP"},
2485 { 7, "IPv4 LSP Resource Affinities"},
2486 { 0, NULL }
2487 };
2488
2489 static const value_string rsvp_c_type_association_vals[] = {
2490 { 1, "IPv4"},
2491 { 2, "IPv6"},
2492 { 4, "Routing Area"},
2493 { 0, NULL }
2494 };
2495
2496 static const value_string rsvp_c_type_tunnel_if_vals[] = {
2497 { 1, "Unnumbered interface"},
2498 { 2, "IPv4"},
2499 { 3, "IPv6"},
2500 { 4, "Unnumbered interface with target"},
2501 { 0, NULL }
2502 };
2503
2504 static const value_string rsvp_c_type_diffserv_vals[] = {
2505 { 1, "E-LSP"},
2506 { 2, "L-LSP"},
2507 { 0, NULL }
2508 };
2509
2510 static const value_string rsvp_c_type_label_vals[] = {
2511 { 1, "Packet Label"},
2512 { 2, "Generalized Label"},
2513 { 4, "Generalized Channel_set"},
2514 { 0, NULL }
2515 };
2516
2517 static const value_string rsvp_c_type_notify_request_vals[] = {
2518 { 1, "IPv4"},
2519 { 2, "IPv6"},
2520 { 0, NULL }
2521 };
2522
2523 static const value_string rsvp_c_type_s2l_sub_lsp_vals[] = {
2524 { 1, "IPv4"},
2525 { 2, "IPv6"},
2526 { 0, NULL }
2527 };
2528
2529 static char *
summary_session(wmem_allocator_t * pool,tvbuff_t * tvb,int offset)2530 summary_session(wmem_allocator_t *pool, tvbuff_t *tvb, int offset)
2531 {
2532 switch(tvb_get_guint8(tvb, offset+3)) {
2533 case RSVP_SESSION_TYPE_IPV4:
2534 return wmem_strdup_printf(pool,
2535 "SESSION: IPv4, Destination %s, Protocol %d, Port %d. ",
2536 tvb_ip_to_str(pool, tvb, offset+4),
2537 tvb_get_guint8(tvb, offset+8),
2538 tvb_get_ntohs(tvb, offset+10));
2539 break;
2540 case RSVP_SESSION_TYPE_IPV4_LSP:
2541 return wmem_strdup_printf(pool,
2542 "SESSION: IPv4-LSP, Destination %s, Short Call ID %d, Tunnel ID %d, Ext ID %0x. ",
2543 tvb_ip_to_str(pool, tvb, offset+4),
2544 tvb_get_ntohs(tvb, offset+8),
2545 tvb_get_ntohs(tvb, offset+10),
2546 tvb_get_ntohl(tvb, offset+12));
2547 break;
2548 case RSVP_SESSION_TYPE_IPV6_LSP:
2549 return wmem_strdup_printf(pool,
2550 "SESSION: IPv6-LSP, Destination %s, Short Call ID %d, Tunnel ID %d, Ext ID %0x%0x%0x%0x. ",
2551 tvb_ip6_to_str(pool, tvb, offset+4),
2552 tvb_get_ntohs(tvb, offset+20),
2553 tvb_get_ntohs(tvb, offset+22),
2554 tvb_get_ntohl(tvb, offset+24),
2555 tvb_get_ntohl(tvb, offset+28),
2556 tvb_get_ntohl(tvb, offset+32),
2557 tvb_get_ntohl(tvb, offset+36));
2558 case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
2559 return wmem_strdup_printf(pool,
2560 "SESSION: IPv4-Aggregate, Destination %s, DSCP %d. ",
2561 tvb_ip_to_str(pool, tvb, offset+4),
2562 tvb_get_guint8(tvb, offset+11));
2563 break;
2564 case RSVP_SESSION_TYPE_IPV4_UNI:
2565 return wmem_strdup_printf(pool,
2566 "SESSION: IPv4-UNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
2567 tvb_ip_to_str(pool, tvb, offset+4),
2568 tvb_get_ntohs(tvb, offset+10),
2569 tvb_ip_to_str(pool, tvb, offset+12));
2570 break;
2571 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV4:
2572 return wmem_strdup_printf(pool,
2573 "SESSION: IPv4-P2MP LSP TUNNEL, PSMP ID %d, Tunnel ID %d, Ext Tunnel %s. ",
2574 tvb_get_ntohl(tvb, offset+4),
2575 tvb_get_ntohs(tvb, offset+10),
2576 tvb_ip_to_str(pool, tvb, offset+12));
2577 break;
2578 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV6:
2579 return wmem_strdup_printf(pool,
2580 "SESSION: IPv6-P2MP LSP TUNNEL, PSMP ID %d, Tunnel ID %d, Ext Tunnel %s. ",
2581 tvb_get_ntohl(tvb, offset+4),
2582 tvb_get_ntohs(tvb, offset+10),
2583 tvb_ip6_to_str(pool, tvb, offset+12));
2584 break;
2585 case RSVP_SESSION_TYPE_IPV4_E_NNI:
2586 return wmem_strdup_printf(pool,
2587 "SESSION: IPv4-E-NNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
2588 tvb_ip_to_str(pool, tvb, offset+4),
2589 tvb_get_ntohs(tvb, offset+10),
2590 tvb_ip_to_str(pool, tvb, offset+12));
2591 break;
2592 default:
2593 return wmem_strdup_printf(pool,
2594 "SESSION: Type %d. ", tvb_get_guint8(tvb, offset+3));
2595 break;
2596 }
2597 DISSECTOR_ASSERT_NOT_REACHED();
2598 }
2599
2600 static char *
summary_template(wmem_allocator_t * pool,tvbuff_t * tvb,int offset)2601 summary_template(wmem_allocator_t *pool, tvbuff_t *tvb, int offset)
2602 {
2603 const char *objtype;
2604
2605 if (tvb_get_guint8(tvb, offset+2) == RSVP_CLASS_FILTER_SPEC)
2606 objtype = "FILTERSPEC";
2607 else
2608 objtype = "SENDER TEMPLATE";
2609
2610 switch(tvb_get_guint8(tvb, offset+3)) {
2611 case 1:
2612 return wmem_strdup_printf(pool,
2613 "%s: IPv4, Sender %s, Port %d. ", objtype,
2614 tvb_ip_to_str(pool, tvb, offset+4),
2615 tvb_get_ntohs(tvb, offset+10));
2616 break;
2617 case 7:
2618 return wmem_strdup_printf(pool,
2619 "%s: IPv4-LSP, Tunnel Source: %s, Short Call ID: %d, LSP ID: %d. ", objtype,
2620 tvb_ip_to_str(pool, tvb, offset+4),
2621 tvb_get_ntohs(tvb, offset+8),
2622 tvb_get_ntohs(tvb, offset+10));
2623 break;
2624 case 8:
2625 return wmem_strdup_printf(pool,
2626 "%s: IPv6-LSP, Tunnel Source: %s, Short Call ID: %d, LSP ID: %d. ", objtype,
2627 tvb_ip6_to_str(pool, tvb, offset+4),
2628 tvb_get_ntohs(tvb, offset+20),
2629 tvb_get_ntohs(tvb, offset+22));
2630 break;
2631 case 9:
2632 return wmem_strdup_printf(pool,
2633 "%s: IPv4-Aggregate, Aggregator %s. ", objtype,
2634 tvb_ip_to_str(pool, tvb, offset+4));
2635 break;
2636 case 12:
2637 return wmem_strdup_printf(pool,
2638 "%s: P2MP_LSP_TUNNEL_IPv4, IPv4 tunnel sender address %s, LSP ID: %d, Sub-Group ID %d. ", objtype,
2639 tvb_ip_to_str(pool, tvb, offset+4),
2640 tvb_get_ntohs(tvb, offset+10),
2641 tvb_get_ntohs(tvb, offset+18));
2642 break;
2643 case 13:
2644 return wmem_strdup_printf(pool,
2645 "%s: P2MP_LSP_TUNNEL_IPv6, IPv6 tunnel sender address %s, LSP ID: %d, Sub-Group ID %d. ", objtype,
2646 tvb_ip_to_str(pool, tvb, offset+4),
2647 tvb_get_ntohs(tvb, offset+22),
2648 tvb_get_ntohs(tvb, offset+40));
2649 break;
2650 default:
2651 return wmem_strdup_printf(pool,
2652 "%s: Type %d. ", objtype, tvb_get_guint8(tvb, offset+3));
2653 break;
2654 }
2655 DISSECTOR_ASSERT_NOT_REACHED();
2656 }
2657
2658 /*------------------------------------------------------------------------------
2659 * SESSION
2660 *------------------------------------------------------------------------------*/
2661 static void
dissect_rsvp_session(packet_info * pinfo,proto_item * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type,rsvp_conversation_info * rsvph)2662 dissect_rsvp_session(packet_info *pinfo, proto_item *ti, proto_tree *rsvp_object_tree,
2663 tvbuff_t *tvb,
2664 int offset, int obj_length,
2665 int rsvp_class _U_, int type,
2666 rsvp_conversation_info *rsvph)
2667 {
2668 proto_item *hidden_item;
2669 int offset2 = offset + 4;
2670
2671 proto_item_set_text(ti, "%s", summary_session(pinfo->pool, tvb, offset));
2672
2673 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
2674 proto_item_set_hidden(hidden_item);
2675
2676 switch(type) {
2677 case RSVP_SESSION_TYPE_IPV4:
2678 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);
2679 proto_tree_add_item(rsvp_object_tree,
2680 hf_rsvp_filter[RSVPF_SESSION_IP],
2681 tvb, offset2, 4, ENC_BIG_ENDIAN);
2682
2683 proto_tree_add_item(rsvp_object_tree,
2684 hf_rsvp_filter[RSVPF_SESSION_PROTO], tvb,
2685 offset2+4, 1, ENC_BIG_ENDIAN);
2686 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_flags, tvb, offset2+5, 1, ENC_BIG_ENDIAN);
2687 proto_tree_add_item(rsvp_object_tree,
2688 hf_rsvp_filter[RSVPF_SESSION_PORT], tvb,
2689 offset2+6, 2, ENC_BIG_ENDIAN);
2690
2691 /*
2692 * Save this information to build the conversation request key
2693 * later.
2694 */
2695 rsvph->session_type = RSVP_SESSION_TYPE_IPV4;
2696 set_address_tvb(&rsvph->destination, AT_IPv4, 4, tvb, offset2);
2697 rsvph->protocol = tvb_get_guint8(tvb, offset2+4);
2698 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
2699
2700 break;
2701
2702 case RSVP_SESSION_TYPE_IPV6:
2703 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);
2704 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_destination_address, tvb, offset2, 16, ENC_NA);
2705 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_protocol, tvb, offset2+16, 1, ENC_BIG_ENDIAN);
2706 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_flags, tvb, offset2+17, 1, ENC_BIG_ENDIAN);
2707 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_destination_port, tvb, offset2+18, 2, ENC_BIG_ENDIAN);
2708 /*
2709 * Save this information to build the conversation request key
2710 * later. IPv6 conversatiuon support is not implemented yet, so only
2711 * the session type is stored.
2712 */
2713 rsvph->session_type = RSVP_SESSION_TYPE_IPV6;
2714
2715 break;
2716
2717 case RSVP_SESSION_TYPE_IPV4_LSP:
2718 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);;
2719 proto_tree_add_item(rsvp_object_tree,
2720 hf_rsvp_filter[RSVPF_SESSION_IP],
2721 tvb, offset2, 4, ENC_BIG_ENDIAN);
2722
2723 /*short call id*/
2724 proto_tree_add_item(rsvp_object_tree,
2725 hf_rsvp_filter[RSVPF_SESSION_SHORT_CALL_ID],
2726 tvb, offset2+4, 2, ENC_BIG_ENDIAN);
2727
2728 proto_tree_add_item(rsvp_object_tree,
2729 hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
2730 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
2731
2732 proto_tree_add_uint_format_value(rsvp_object_tree, hf_rsvp_extended_tunnel_id, tvb, offset2+8, 4,
2733 tvb_get_ntohl(tvb, offset2+8), "%u (%s)",
2734 tvb_get_ntohl(tvb, offset2+8),
2735 tvb_ip_to_str(pinfo->pool, tvb, offset2+8));
2736 hidden_item = proto_tree_add_item(rsvp_object_tree,
2737 hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
2738 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
2739 proto_item_set_hidden(hidden_item);
2740
2741 /*
2742 * Save this information to build the conversation request key
2743 * later.
2744 */
2745 rsvph->session_type = RSVP_SESSION_TYPE_IPV4_LSP;
2746 set_address_tvb(&rsvph->destination, AT_IPv4, 4, tvb, offset2);
2747 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
2748 rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
2749 break;
2750
2751 case RSVP_SESSION_TYPE_IPV6_LSP:
2752 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);
2753 proto_tree_add_item(rsvp_object_tree,
2754 hf_rsvp_filter[RSVPF_SESSION_IP],
2755 tvb, offset2, 16, ENC_BIG_ENDIAN);
2756
2757 /*short call id*/
2758 proto_tree_add_item(rsvp_object_tree,
2759 hf_rsvp_filter[RSVPF_SESSION_SHORT_CALL_ID],
2760 tvb, offset2+16, 2, ENC_BIG_ENDIAN);
2761
2762 proto_tree_add_item(rsvp_object_tree,
2763 hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
2764 tvb, offset2+18, 2, ENC_BIG_ENDIAN);
2765
2766 proto_tree_add_item(rsvp_object_tree, hf_rsvp_extended_tunnel_ipv6, tvb, offset2+20, 16, ENC_NA);
2767 proto_item_set_text(ti, "Extended Tunnel ID: (%s)", tvb_ip6_to_str(pinfo->pool, tvb, offset2+20));
2768
2769
2770 hidden_item = proto_tree_add_item(rsvp_object_tree,
2771 hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID_IPV6],
2772 tvb, offset2+20, 16, ENC_NA);
2773 proto_item_set_hidden(hidden_item);
2774
2775 /*
2776 * Save this information to build the conversation request key
2777 * later.
2778 */
2779 rsvph->session_type = RSVP_SESSION_TYPE_IPV6_LSP;
2780 set_address_tvb(&rsvph->destination, AT_IPv6, 16, tvb, offset2);
2781 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+18);
2782 rsvph->ext_tunnel_id_ipv6_pre = tvb_get_ntoh64(tvb, offset2+20);
2783 rsvph->ext_tunnel_id_ipv6_post = tvb_get_ntoh64(tvb, offset2+28);
2784 break;
2785
2786
2787 case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
2788 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);;
2789 proto_tree_add_item(rsvp_object_tree,
2790 hf_rsvp_filter[RSVPF_SESSION_IP],
2791 tvb, offset2, 4, ENC_BIG_ENDIAN);
2792
2793 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_dscp, tvb, offset2+7, 1, ENC_BIG_ENDIAN);
2794 /*
2795 * Save this information to build the conversation request key
2796 * later.
2797 */
2798 rsvph->session_type = RSVP_SESSION_TYPE_AGGREGATE_IPV4;
2799 set_address_tvb(&rsvph->destination, AT_IPv4, 4, tvb, offset2);
2800 rsvph->dscp = tvb_get_guint8(tvb, offset2+7);
2801 rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
2802 break;
2803
2804 case RSVP_SESSION_TYPE_IPV4_UNI:
2805 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);
2806 proto_tree_add_item(rsvp_object_tree,
2807 hf_rsvp_filter[RSVPF_SESSION_IP],
2808 tvb, offset2, 4, ENC_BIG_ENDIAN);
2809
2810 proto_tree_add_item(rsvp_object_tree,
2811 hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
2812 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
2813
2814 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_extended_ipv4_address, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
2815 hidden_item = proto_tree_add_item(rsvp_object_tree,
2816 hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
2817 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
2818 proto_item_set_hidden(hidden_item);
2819
2820 /*
2821 * Save this information to build the conversation request key
2822 * later.
2823 */
2824 rsvph->session_type = RSVP_SESSION_TYPE_IPV4_UNI;
2825 set_address_tvb(&rsvph->destination, AT_IPv4, 4, tvb, offset2);
2826 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
2827 rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
2828
2829 break;
2830
2831 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV4:
2832 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);
2833 proto_tree_add_item(rsvp_object_tree,
2834 hf_rsvp_session_p2mp_id,
2835 tvb, offset2, 4, ENC_BIG_ENDIAN);
2836
2837 proto_tree_add_item(rsvp_object_tree,
2838 hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
2839 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
2840
2841 proto_tree_add_item(rsvp_object_tree, hf_rsvp_extended_tunnel, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
2842 hidden_item = proto_tree_add_item(rsvp_object_tree,
2843 hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
2844 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
2845 proto_item_set_hidden(hidden_item);
2846
2847 /*
2848 * Save this information to build the conversation request key
2849 * later.
2850 */
2851 rsvph->session_type = RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV4;
2852 set_address_tvb(&rsvph->destination, AT_IPv4, 4, tvb, offset2);
2853 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
2854 rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
2855
2856 break;
2857 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV6:
2858 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);
2859 proto_tree_add_item(rsvp_object_tree,
2860 hf_rsvp_session_p2mp_id,
2861 tvb, offset2, 4, ENC_BIG_ENDIAN);
2862
2863 proto_tree_add_item(rsvp_object_tree,
2864 hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
2865 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
2866
2867 proto_tree_add_item(rsvp_object_tree, hf_rsvp_extended_tunnel, tvb, offset2+8, 16, ENC_NA);
2868 hidden_item = proto_tree_add_item(rsvp_object_tree,
2869 hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID_IPV6],
2870 tvb, offset2+8, 16, ENC_NA);
2871 proto_item_set_hidden(hidden_item);
2872
2873 /*
2874 * Save this information to build the conversation request key
2875 * later.
2876 */
2877 rsvph->session_type = RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV6;
2878 set_address_tvb(&rsvph->destination, AT_IPv6, 16, tvb, offset2);
2879 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+18);
2880 rsvph->ext_tunnel_id_ipv6_pre = tvb_get_ntoh64(tvb, offset2+20);
2881 rsvph->ext_tunnel_id_ipv6_post = tvb_get_ntoh64(tvb, offset2+28);
2882 break;
2883
2884 case RSVP_SESSION_TYPE_IPV4_E_NNI:
2885 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);
2886 proto_tree_add_item(rsvp_object_tree,
2887 hf_rsvp_filter[RSVPF_SESSION_IP],
2888 tvb, offset2, 4, ENC_BIG_ENDIAN);
2889
2890 proto_tree_add_item(rsvp_object_tree,
2891 hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
2892 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
2893
2894 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_extended_ipv4_address, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
2895 hidden_item = proto_tree_add_item(rsvp_object_tree,
2896 hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
2897 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
2898 proto_item_set_hidden(hidden_item);
2899
2900 /*
2901 * Save this information to build the conversation request key
2902 * later.
2903 */
2904 rsvph->session_type = RSVP_SESSION_TYPE_IPV4_E_NNI;
2905 set_address_tvb(&rsvph->destination, AT_IPv4, 4, tvb, offset2);
2906 rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
2907 rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
2908
2909 break;
2910
2911 default:
2912 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);
2913 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_data, tvb, offset2, obj_length-4, ENC_NA);
2914 break;
2915 }
2916 }
2917
2918 /*------------------------------------------------------------------------------
2919 * TLVs for HOP, ERROR and other IF_ID extended objects (RFC4920)
2920 * (TODO: TLV type 12, 13, 25)
2921 *------------------------------------------------------------------------------*/
2922 static void
dissect_rsvp_ifid_tlv(proto_tree * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int length,int subtree_type)2923 dissect_rsvp_ifid_tlv(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
2924 tvbuff_t *tvb, int offset, int length,
2925 int subtree_type)
2926 {
2927 int tlv_off, padding;
2928 guint16 tlv_type;
2929 int tlv_len;
2930 guint8 isis_len;
2931 const char *tlv_name, *ip_str;
2932 proto_tree *rsvp_ifid_subtree=NULL, *ti2 = NULL;
2933
2934 for (tlv_off = 0; tlv_off < length; ) {
2935 tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
2936 tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);
2937
2938 if ((tlv_len == 0) || (tlv_off+tlv_len > length)) {
2939 proto_tree_add_expert_format(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length,
2940 tvb, offset+tlv_off+2, 2, "Invalid TLV length");
2941 return;
2942 }
2943 switch(tlv_type) {
2944 case 1: /* IPv4 */
2945 tlv_name = "";
2946 goto ifid_ipv4;
2947 case 14: /* PREVIOUS_HOP_IPV4 */
2948 tlv_name = "Previous-Hop ";
2949 goto ifid_ipv4;
2950 case 16: /* INCOMING_IPV4 */
2951 tlv_name = "Incoming ";
2952 ifid_ipv4:
2953 ip_str = tvb_ip_to_str(pinfo->pool, tvb, offset+tlv_off+4);
2954 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
2955 offset+tlv_off, tlv_len,
2956 subtree_type, NULL, "%sIPv4 TLV - %s", tlv_name,
2957 ip_str);
2958
2959 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
2960 tlv_type, "%d (%sIPv4)", tlv_type, tlv_name);
2961 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
2962 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_ipv4_address, tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
2963 proto_item_append_text(ti, "%sIPv4: %s. ", tlv_name, ip_str);
2964 break;
2965
2966 case 2: /* IPv6 */
2967 tlv_name = "";
2968 goto ifid_ipv6;
2969 case 15: /* PREVIOUS_HOP_IPV6 */
2970 tlv_name = "Previous-Hop ";
2971 goto ifid_ipv6;
2972 case 17: /* INCOMING_IPV6 */
2973 tlv_name = "Incoming ";
2974 ifid_ipv6:
2975 ip_str = tvb_ip6_to_str(pinfo->pool, tvb, offset+tlv_off+4);
2976 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
2977 offset+tlv_off, tlv_len,
2978 subtree_type, NULL, "%sIPv6 TLV - %s", tlv_name, ip_str);
2979
2980 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
2981 tlv_type, "%d (%sIPv6)", tlv_type, tlv_name);
2982 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
2983 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_ipv6_address, tvb, offset+tlv_off+4, 16, ENC_NA);
2984 proto_item_append_text(ti, "%sIPv6: %s. ", tlv_name, ip_str);
2985 break;
2986
2987 case 3: /* IF_INDEX */
2988 tlv_name = "";
2989 goto ifid_ifindex;
2990 case 4: /* COMPONENT_IF_DOWNSTREAM */
2991 tlv_name = " Forward";
2992 goto ifid_ifindex;
2993 case 5: /* COMPONENT_IF_UPSTREAM */
2994 tlv_name = " Reverse";
2995 goto ifid_ifindex;
2996 case 18: /* INCOMING_IF_INDEX */
2997 tlv_name = " Incoming";
2998 ifid_ifindex:
2999 ip_str = tvb_ip_to_str(pinfo->pool, tvb, offset+tlv_off+4);
3000 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
3001 offset+tlv_off, tlv_len,
3002 subtree_type, NULL, "Interface-Index%s TLV - %s, %d",
3003 tlv_name,
3004 ip_str,
3005 tvb_get_ntohl(tvb, offset+tlv_off+8));
3006 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3007 tlv_type, "%d (Interface Index%s)", tlv_type, tlv_name);
3008 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3009 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_ipv4_address, tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
3010 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlvinterface_id, tvb, offset+tlv_off+8, 4, ENC_BIG_ENDIAN);
3011 proto_item_append_text(ti, "Data If-Index%s: %s, %d. ", tlv_name, ip_str,
3012 tvb_get_ntohl(tvb, offset+tlv_off+8));
3013 break;
3014
3015 case 6: /* DOWNSTREAM_LABEL */
3016 tlv_name = "Downstream";
3017 goto ifid_label;
3018 case 7: /* UPSTREAM_LABEL */
3019 tlv_name = "Upstream";
3020 goto ifid_label;
3021 case 19: /* INCOMING_DOWN_LABEL */
3022 tlv_name = "Incoming-Downstream";
3023 goto ifid_label;
3024 case 20: /* INCOMING_UP_LABEL */
3025 tlv_name = "Incoming-Upstream";
3026 ifid_label:
3027 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
3028 offset+tlv_off, tlv_len,
3029 subtree_type, NULL, "%s-Label TLV - %u", tlv_name,
3030 tvb_get_ntohl(tvb, offset+tlv_off+4));
3031 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3032 tlv_type, "%d (%s-Label)", tlv_type, tlv_name);
3033 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3034 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_label, tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
3035 proto_item_append_text(ti, "%s-Label: %u. ", tlv_name,
3036 tvb_get_ntohl(tvb, offset+tlv_off+4));
3037 break;
3038
3039
3040 case 8: /* NODE_ID */
3041 tlv_name = "";
3042 goto ifid_nodeid;
3043 case 21: /* REPORTING_NODE_ID */
3044 tlv_name = "Reporting-";
3045 ifid_nodeid:
3046 ip_str = tvb_ip_to_str(pinfo->pool, tvb, offset+tlv_off+4);
3047 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
3048 offset+tlv_off, tlv_len,
3049 subtree_type, NULL, "%sNode-ID TLV - %s", tlv_name,
3050 ip_str);
3051 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3052 tlv_type, "%d (%sNode-ID)", tlv_type, tlv_name);
3053 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3054 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_node_id, tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
3055 proto_item_append_text(ti, "%sNode-ID: %s. ", tlv_name, ip_str);
3056 break;
3057
3058 case 9: /* OSPF_AREA */
3059 tlv_name = "";
3060 goto ifid_ospf;
3061 case 22: /* REPORTING_OSPF_AREA */
3062 tlv_name = "Reporting-";
3063 ifid_ospf:
3064 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
3065 offset+tlv_off, tlv_len,
3066 subtree_type, NULL, "%sOSPF-Area TLV - %u", tlv_name,
3067 tvb_get_ntohl(tvb, offset+tlv_off+4));
3068 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3069 tlv_type, "%d (%sOSPF-Area)", tlv_type, tlv_name);
3070 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3071 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_area, tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
3072 proto_item_append_text(ti, "%sOSPF-Area: %u. ", tlv_name,
3073 tvb_get_ntohl(tvb, offset+tlv_off+4));
3074 break;
3075
3076 case 10: /* ISIS_AREA */
3077 tlv_name = "";
3078 goto ifid_isis;
3079 case 23: /* REPORTING_ISIS_AREA */
3080 tlv_name = "Reporting-";
3081 ifid_isis:
3082 isis_len = tvb_get_guint8(tvb, offset+tlv_off+4);
3083 if ((isis_len < 2) || (isis_len > 11))
3084 {
3085 proto_tree_add_expert_format(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length, tvb, offset+tlv_off, tlv_len,
3086 "%sISIS-Area TLV - Invalid Length field", tlv_name);
3087 break;
3088 }
3089 ip_str = print_nsap_net(pinfo->pool, tvb, offset+tlv_off+5, isis_len);
3090 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
3091 offset+tlv_off, tlv_len,
3092 subtree_type, NULL, "%sISIS-Area TLV - %s", tlv_name,
3093 ip_str);
3094 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3095 tlv_type, "%d (%sISIS-Area)", tlv_type, tlv_name);
3096 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3097 proto_tree_add_string(rsvp_ifid_subtree, hf_rsvp_isis_area_id, tvb, offset+tlv_off+4, 4, ip_str);
3098 proto_item_append_text(ti, "%sISIS-Area: %s. ", tlv_name, ip_str);
3099 break;
3100
3101 case 11: /* AUTONOMOUS_SYSTEM */
3102 tlv_name = "";
3103 goto ifid_as;
3104 case 24: /* REPORTING_AUTONOMOUS_SYSTEM */
3105 tlv_name = "Reporting-";
3106 ifid_as:
3107 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
3108 offset+tlv_off, tlv_len,
3109 subtree_type, NULL, "%sAS TLV - %u", tlv_name,
3110 tvb_get_ntohl(tvb, offset+tlv_off+4));
3111 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3112 tlv_type, "%d (%sAS)", tlv_type, tlv_name);
3113 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3114 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_autonomous_system, tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
3115 proto_item_append_text(ti, "%sAS: %u. ", tlv_name,
3116 tvb_get_ntohl(tvb, offset+tlv_off+4));
3117 break;
3118
3119 case 26: /* NODE_EXCLUSIONS */
3120 tlv_name = "Node";
3121 goto ifid_ex;
3122 case 27: /* LINK_EXCLUSIONS */
3123 tlv_name = "Link";
3124 ifid_ex:
3125 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
3126 offset+tlv_off, tlv_len,
3127 subtree_type, &ti2, "%s-Exclusions TLV - ", tlv_name);
3128 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3129 tlv_type, "%d (%s-Exclusions)", tlv_type, tlv_name);
3130 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3131 dissect_rsvp_ifid_tlv(ti2, pinfo, rsvp_ifid_subtree, tvb, offset+tlv_off+4,
3132 tlv_len-4, TREE(TT_HOP_SUBOBJ));
3133 break;
3134 case 516:
3135 /* FF: ERROR_STRING TLV, RFC 4783 */
3136 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree,
3137 tvb, offset + tlv_off,
3138 tlv_len,
3139 subtree_type, NULL, "ERROR_STRING TLV - %s",
3140 tvb_format_text(pinfo->pool, tvb, offset + tlv_off + 4,
3141 tlv_len - 4));
3142 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset + tlv_off, 2,
3143 tlv_type, "516 (ERROR_STRING)");
3144 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset + tlv_off + 2, 2, ENC_BIG_ENDIAN);
3145 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_error_string, tvb, offset + tlv_off + 4, tlv_len - 4, ENC_NA|ENC_ASCII);
3146 break;
3147
3148 default:
3149 /* FF: not yet known TLVs are displayed as raw data */
3150 rsvp_ifid_subtree = proto_tree_add_subtree_format(rsvp_object_tree,
3151 tvb, offset + tlv_off,
3152 tlv_len,
3153 subtree_type, NULL, "Unknown TLV (%u)", tlv_type);
3154 proto_tree_add_uint_format_value(rsvp_ifid_subtree, hf_rsvp_type, tvb, offset + tlv_off, 2,
3155 tlv_type, "%u (Unknown)", tlv_type);
3156 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_length, tvb, offset + tlv_off + 2, 2, ENC_BIG_ENDIAN);
3157 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_data, tvb, offset + tlv_off + 4, tlv_len - 4, ENC_NA);
3158 break;
3159 }
3160
3161 padding = (4 - (tlv_len % 4)) % 4;
3162 if (padding != 0)
3163 proto_tree_add_item(rsvp_ifid_subtree, hf_rsvp_ifid_tlv_padding, tvb, offset + tlv_off + tlv_len, padding, ENC_NA);
3164 tlv_off += tlv_len + padding;
3165 }
3166 }
3167
3168 /*------------------------------------------------------------------------------
3169 * HOP
3170 *------------------------------------------------------------------------------*/
3171 static void
dissect_rsvp_hop(proto_item * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)3172 dissect_rsvp_hop(proto_item *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
3173 tvbuff_t *tvb,
3174 int offset, int obj_length,
3175 int rsvp_class _U_, int type)
3176 {
3177 int offset2 = offset + 4;
3178 proto_tree *hidden_item;
3179
3180 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3181 proto_item_set_hidden(hidden_item);
3182
3183 switch(type) {
3184 case 1:
3185 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_hop, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3186 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hop_neighbor_address_ipv4, tvb, offset2, 4, ENC_BIG_ENDIAN);
3187 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hop_logical_interface, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
3188 proto_item_set_text(ti, "HOP: IPv4, %s",
3189 tvb_ip_to_str(pinfo->pool, tvb, offset2));
3190 break;
3191
3192 case 2:
3193 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_hop, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3194 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hop_neighbor_address_ipv6, tvb, offset2, 16, ENC_NA);
3195 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hop_logical_interface, tvb, offset2+16, 4, ENC_BIG_ENDIAN);
3196 break;
3197
3198 case 3:
3199 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_hop, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3200 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hop_neighbor_address_ipv4, tvb, offset2, 4, ENC_BIG_ENDIAN);
3201 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hop_logical_interface, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
3202
3203 proto_item_set_text(ti, "HOP: IPv4 IF-ID. Control IPv4: %s. ",
3204 tvb_ip_to_str(pinfo->pool, tvb, offset2));
3205
3206 dissect_rsvp_ifid_tlv(ti, pinfo, rsvp_object_tree, tvb, offset+12, obj_length-12,
3207 TREE(TT_HOP_SUBOBJ));
3208
3209 break;
3210
3211 case 4:
3212 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_hop, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3213 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hop_neighbor_address_ipv6, tvb, offset2, 16, ENC_NA);
3214 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hop_logical_interface, tvb, offset2+16, 4, ENC_BIG_ENDIAN);
3215
3216 proto_item_set_text(ti, "HOP: IPv6 IF-ID. Control IPv6: %s. ",
3217 tvb_ip6_to_str(pinfo->pool, tvb, offset2));
3218
3219 dissect_rsvp_ifid_tlv(ti, pinfo, rsvp_object_tree, tvb, offset+24, obj_length-24,
3220 TREE(TT_HOP_SUBOBJ));
3221
3222 break;
3223
3224 default:
3225 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_hop, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3226 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hop_data, tvb, offset2, obj_length - 4, ENC_NA);
3227 break;
3228 }
3229 }
3230
3231 /*------------------------------------------------------------------------------
3232 * TIME VALUES
3233 *------------------------------------------------------------------------------*/
3234 static void
dissect_rsvp_time_values(proto_item * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)3235 dissect_rsvp_time_values(proto_item *ti, proto_tree *rsvp_object_tree,
3236 tvbuff_t *tvb,
3237 int offset, int obj_length,
3238 int rsvp_class _U_, int type)
3239 {
3240 int offset2 = offset + 4;
3241 proto_item *hidden_item;
3242
3243 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3244 proto_item_set_hidden(hidden_item);
3245
3246 switch(type) {
3247 case 1:
3248 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_time_values, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3249 proto_tree_add_uint_format_value(rsvp_object_tree, hf_rsvp_refresh_interval, tvb, offset2, 4,
3250 tvb_get_ntohl(tvb, offset2), "%u ms (%u seconds)",
3251 tvb_get_ntohl(tvb, offset2),
3252 tvb_get_ntohl(tvb, offset2)/1000);
3253 proto_item_set_text(ti, "TIME VALUES: %d ms",
3254 tvb_get_ntohl(tvb, offset2));
3255 break;
3256
3257 default:
3258 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_time_values, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3259 proto_tree_add_item(rsvp_object_tree, hf_rsvp_time_values_data, tvb, offset2, obj_length - 4, ENC_NA);
3260 break;
3261 }
3262 }
3263
3264 /*------------------------------------------------------------------------------
3265 * Error value field in ERROR object
3266 *------------------------------------------------------------------------------*/
3267 static guint16
dissect_rsvp_error_value(proto_tree * ti,tvbuff_t * tvb,int offset,guint8 error_code)3268 dissect_rsvp_error_value(proto_tree *ti, tvbuff_t *tvb,
3269 int offset, guint8 error_code)
3270 {
3271 guint16 error_val;
3272 guint8 error_class, error_ctype;
3273 value_string_ext *rsvp_error_vals_ext_p = NULL;
3274
3275 error_val = tvb_get_ntohs(tvb, offset);
3276 switch (error_code) {
3277 case RSVP_ERROR_ADMISSION:
3278 rsvp_error_vals_ext_p = &rsvp_admission_control_error_vals_ext;
3279 break;
3280 case RSVP_ERROR_POLICY:
3281 rsvp_error_vals_ext_p = &rsvp_policy_control_error_vals_ext;
3282 break;
3283 case RSVP_ERROR_TRAFFIC:
3284 rsvp_error_vals_ext_p = &rsvp_traffic_control_error_vals_ext;
3285 break;
3286 case RSVP_ERROR_ROUTING:
3287 rsvp_error_vals_ext_p = &rsvp_routing_error_vals_ext;
3288 break;
3289 case RSVP_ERROR_NOTIFY:
3290 rsvp_error_vals_ext_p = &rsvp_notify_error_vals_ext;
3291 break;
3292 case RSVP_ERROR_DIFFSERV:
3293 rsvp_error_vals_ext_p = &rsvp_diffserv_error_vals_ext;
3294 break;
3295 case RSVP_ERROR_DSTE:
3296 rsvp_error_vals_ext_p = &rsvp_diffserv_aware_te_error_vals_ext;
3297 break;
3298 case RSVP_ERROR_CALL_MGMT:
3299 rsvp_error_vals_ext_p = &rsvp_call_mgmt_error_vals_ext;
3300 break;
3301 }
3302
3303 switch (error_code) {
3304 case RSVP_ERROR_ADMISSION:
3305 case RSVP_ERROR_TRAFFIC:
3306 if ((error_val & 0xc0) == 0) {
3307 DISSECTOR_ASSERT(rsvp_error_vals_ext_p != NULL);
3308 proto_tree_add_uint_format_value(ti, hf_rsvp_error_value, tvb, offset, 2,
3309 error_val, "%s (%u)",
3310 val_to_str_ext(error_val, rsvp_error_vals_ext_p, "Unknown (%d)"), error_val);
3311 }
3312 else if ((error_val & 0xc0) == 0x80) {
3313 proto_tree_add_uint_format_value(ti, hf_rsvp_error_value, tvb, offset, 2,
3314 error_val, "Organization specific subcode (%u)", error_val);
3315 }
3316 else if ((error_val & 0xc0) == 0xc0) {
3317 proto_tree_add_uint_format_value(ti, hf_rsvp_error_value, tvb, offset, 2,
3318 error_val, "Service specific subcode (%u)", error_val);
3319 }
3320 break;
3321 case RSVP_ERROR_UNKNOWN_CLASS:
3322 case RSVP_ERROR_UNKNOWN_C_TYPE:
3323 error_class = error_val / 256;
3324 error_ctype = error_val % 256;
3325 proto_tree_add_uint_format_value(ti, hf_rsvp_class, tvb, offset, 2, error_class, "%u (%s) - CType: %u",
3326 error_class, val_to_str_ext_const(error_class, &rsvp_class_vals_ext, "Unknown"),
3327 error_ctype);
3328 break;
3329 case RSVP_ERROR_POLICY:
3330 case RSVP_ERROR_NOTIFY:
3331 case RSVP_ERROR_ROUTING:
3332 case RSVP_ERROR_DIFFSERV:
3333 case RSVP_ERROR_DSTE:
3334 case RSVP_ERROR_CALL_MGMT:
3335 DISSECTOR_ASSERT(rsvp_error_vals_ext_p != NULL);
3336 proto_tree_add_uint_format_value(ti, hf_rsvp_error_value, tvb, offset, 2, error_val, "%s (%u)",
3337 val_to_str_ext(error_val, rsvp_error_vals_ext_p, "Unknown (%d)"), error_val);
3338 break;
3339 default:
3340 proto_tree_add_uint_format_value(ti, hf_rsvp_error_value, tvb, offset, 2, error_val, "%u", error_val);
3341 break;
3342 }
3343 return error_val;
3344 }
3345
3346 /*------------------------------------------------------------------------------
3347 * ERROR
3348 *------------------------------------------------------------------------------*/
3349 static void
dissect_rsvp_error(proto_item * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)3350 dissect_rsvp_error(proto_item *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
3351 tvbuff_t *tvb,
3352 int offset, int obj_length,
3353 int rsvp_class _U_, int type)
3354 {
3355 int offset2 = offset + 4;
3356 int offset3 = 0;
3357 guint8 error_flags;
3358 guint8 error_code;
3359 guint16 error_val;
3360 proto_tree *ti2 = NULL, *rsvp_error_subtree;
3361 proto_item *hidden_item;
3362
3363 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3364 proto_item_set_hidden(hidden_item);
3365
3366 switch(type) {
3367 case 1: {
3368 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_error, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3369 if(obj_length>4) {
3370 proto_tree_add_item(rsvp_object_tree, hf_rsvp_error_error_node_ipv4, tvb, offset2, 4, ENC_BIG_ENDIAN);
3371
3372 offset3 = offset2+4;
3373 }
3374 break;
3375 }
3376
3377 case 2: {
3378 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_error, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3379 if(obj_length>4) {
3380 proto_tree_add_item(rsvp_object_tree, hf_rsvp_error_error_node_ipv6, tvb, offset2, 16, ENC_NA);
3381
3382 offset3 = offset2+16;
3383 }
3384 break;
3385 }
3386
3387 case 3: {
3388 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_error, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3389 if(obj_length>4) {
3390 proto_tree_add_item(rsvp_object_tree, hf_rsvp_error_error_node_ipv4, tvb, offset2, 4, ENC_BIG_ENDIAN);
3391
3392 offset3 = offset2+4;
3393 }
3394 break;
3395 }
3396
3397 case 4: {
3398 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_error, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3399 if(obj_length>16) {
3400 proto_tree_add_item(rsvp_object_tree, hf_rsvp_error_error_node_ipv6, tvb, offset2, 16, ENC_NA);
3401
3402 offset3 = offset2+16;
3403 }
3404 break;
3405 }
3406
3407 default:
3408 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_error, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3409 if(obj_length>4) {
3410 proto_tree_add_item(rsvp_object_tree, hf_rsvp_error_data, tvb, offset2, obj_length - 4, ENC_NA);
3411 }
3412 return;
3413 }
3414
3415 if(obj_length>4) {
3416 error_flags = tvb_get_guint8(tvb, offset3);
3417 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_error_flags,
3418 tvb, offset3, 1, ENC_BIG_ENDIAN);
3419 rsvp_error_subtree = proto_item_add_subtree(ti2, TREE(TT_ERROR_FLAGS));
3420 proto_tree_add_item(rsvp_error_subtree, hf_rsvp_error_flags_path_state_removed,
3421 tvb, offset3, 1, ENC_BIG_ENDIAN);
3422 proto_tree_add_item(rsvp_error_subtree, hf_rsvp_error_flags_not_guilty,
3423 tvb, offset3, 1, ENC_BIG_ENDIAN);
3424 proto_tree_add_item(rsvp_error_subtree, hf_rsvp_error_flags_in_place,
3425 tvb, offset3, 1, ENC_BIG_ENDIAN);
3426 proto_item_append_text(ti2, " %s %s %s",
3427 (error_flags & (1U<<2)) ? "Path-State-Removed" : "",
3428 (error_flags & (1U<<1)) ? "NotGuilty" : "",
3429 (error_flags & (1U<<0)) ? "InPlace" : "");
3430 error_code = tvb_get_guint8(tvb, offset3+1);
3431 proto_tree_add_item(rsvp_object_tree, hf_rsvp_error_error_code, tvb, offset3+1, 1, ENC_BIG_ENDIAN);
3432 error_val = dissect_rsvp_error_value(rsvp_object_tree, tvb, offset3+2, error_code);
3433
3434
3435
3436 switch (type) {
3437 case 1:
3438 proto_item_set_text(ti, "ERROR: IPv4, Error code: %s, Value: %d, Error Node: %s",
3439 val_to_str_ext(error_code, &rsvp_error_codes_ext, "Unknown (%d)"),
3440 error_val, tvb_ip_to_str(pinfo->pool, tvb, offset2));
3441 break;
3442 case 3:
3443 proto_item_set_text(ti, "ERROR: IPv4 IF-ID, Error code: %s, Value: %d, Control Node: %s. ",
3444 val_to_str_ext(error_code, &rsvp_error_codes_ext, "Unknown (%d)"),
3445 error_val, tvb_ip_to_str(pinfo->pool, tvb, offset2));
3446 dissect_rsvp_ifid_tlv(ti, pinfo, rsvp_object_tree, tvb, offset+12, obj_length-12,
3447 TREE(TT_ERROR_SUBOBJ));
3448 break;
3449 }
3450 }
3451 }
3452
3453 /*------------------------------------------------------------------------------
3454 * SCOPE
3455 *------------------------------------------------------------------------------*/
3456 static void
dissect_rsvp_scope(proto_item * ti _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)3457 dissect_rsvp_scope(proto_item *ti _U_, proto_tree *rsvp_object_tree,
3458 tvbuff_t *tvb,
3459 int offset, int obj_length,
3460 int rsvp_class _U_, int type)
3461 {
3462 int offset2 = offset + 4;
3463 int mylen;
3464 proto_item *hidden_item;
3465
3466 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3467 proto_item_set_hidden(hidden_item);
3468
3469 mylen = obj_length - 4;
3470 switch(type) {
3471 case 1: {
3472 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_scope, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3473 while (mylen > 0) {
3474 proto_tree_add_item(rsvp_object_tree, hf_rsvp_scope_ipv4_address, tvb, offset2, 4, ENC_BIG_ENDIAN);
3475 offset2 += 4;
3476 mylen -= 4;
3477 }
3478 break;
3479 }
3480
3481 case 2: {
3482 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_scope, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3483 while (mylen > 0) {
3484 proto_tree_add_item(rsvp_object_tree, hf_rsvp_scope_ipv6_address, tvb, offset2, 16, ENC_NA);
3485 offset2 += 16;
3486 mylen -= 16;
3487 }
3488 break;
3489 }
3490
3491 default:
3492 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_scope, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3493 proto_tree_add_item(rsvp_object_tree, hf_rsvp_scope_data, tvb, offset2, mylen, ENC_NA);
3494 break;
3495 }
3496 }
3497
3498 /*------------------------------------------------------------------------------
3499 * STYLE
3500 *------------------------------------------------------------------------------*/
3501 static void
dissect_rsvp_style(proto_item * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)3502 dissect_rsvp_style(proto_item *ti, proto_tree *rsvp_object_tree,
3503 tvbuff_t *tvb,
3504 int offset, int obj_length,
3505 int rsvp_class _U_, int type)
3506 {
3507 int offset2 = offset + 4;
3508 proto_item *hidden_item;
3509
3510 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3511 proto_item_set_hidden(hidden_item);
3512
3513 switch(type) {
3514 case 1: {
3515 guint32 style;
3516
3517 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_style, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3518 proto_tree_add_item(rsvp_object_tree, hf_rsvp_style_flags, tvb, offset2, 1, ENC_BIG_ENDIAN);
3519 style = tvb_get_ntoh24(tvb, offset2+1);
3520 proto_tree_add_item(rsvp_object_tree, hf_rsvp_style_style, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
3521 proto_item_set_text(ti, "STYLE: %s (%d)",
3522 val_to_str_const(style, style_vals, "Unknown"),
3523 style);
3524 break;
3525 }
3526
3527 default:
3528 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_style, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3529 proto_tree_add_item(rsvp_object_tree, hf_rsvp_style_data, tvb, offset2, obj_length - 4, ENC_NA);
3530 break;
3531 }
3532 }
3533
3534 /*------------------------------------------------------------------------------
3535 * CONFIRM
3536 *------------------------------------------------------------------------------*/
3537 static void
dissect_rsvp_confirm(proto_item * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)3538 dissect_rsvp_confirm(proto_item *ti, proto_tree *rsvp_object_tree,
3539 tvbuff_t *tvb,
3540 int offset, int obj_length,
3541 int rsvp_class _U_, int type)
3542 {
3543 int offset2 = offset + 4;
3544 proto_item *hidden_item;
3545
3546 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3547 proto_item_set_hidden(hidden_item);
3548
3549 switch(type) {
3550 case 1: {
3551 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_confirm, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3552 proto_tree_add_item(rsvp_object_tree, hf_rsvp_confirm_receiver_address_ipv4, tvb, offset2, 4, ENC_BIG_ENDIAN);
3553 proto_item_set_text(ti, "CONFIRM: Receiver %s",
3554 tvb_ip_to_str(wmem_packet_scope(), tvb, offset2));
3555 break;
3556 }
3557
3558 case 2: {
3559 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_confirm, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3560 proto_tree_add_item(rsvp_object_tree, hf_rsvp_confirm_receiver_address_ipv6, tvb, offset2, 16, ENC_NA);
3561 break;
3562 }
3563
3564 default:
3565 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_confirm, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3566 proto_tree_add_item(rsvp_object_tree, hf_rsvp_confirm_data, tvb, offset2, obj_length - 4, ENC_NA);
3567 break;
3568 }
3569 }
3570
3571 /*------------------------------------------------------------------------------
3572 * SENDER TEMPLATE and FILTERSPEC
3573 *------------------------------------------------------------------------------*/
3574 static void
dissect_rsvp_template_filter(packet_info * pinfo,proto_item * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class,int type,rsvp_conversation_info * rsvph)3575 dissect_rsvp_template_filter(packet_info *pinfo, proto_item *ti, proto_tree *rsvp_object_tree,
3576 tvbuff_t *tvb,
3577 int offset, int obj_length,
3578 int rsvp_class, int type,
3579 rsvp_conversation_info *rsvph)
3580 {
3581 int offset2 = offset + 4;
3582 proto_item *hidden_item;
3583
3584 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3585 proto_item_set_hidden(hidden_item);
3586
3587 proto_item_set_text(ti, "%s", summary_template(pinfo->pool, tvb, offset));
3588 switch(type) {
3589 case 1:
3590 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_template, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3591 proto_tree_add_item(rsvp_object_tree,
3592 hf_rsvp_filter[RSVPF_SENDER_IP],
3593 tvb, offset2, 4, ENC_BIG_ENDIAN);
3594 proto_tree_add_item(rsvp_object_tree,
3595 hf_rsvp_filter[RSVPF_SENDER_PORT],
3596 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
3597
3598 /*
3599 * Save this information to build the conversation request key later.
3600 */
3601 set_address_tvb(&rsvph->source, AT_IPv4, 4, tvb, offset2);
3602 rsvph->udp_source_port = tvb_get_ntohs(tvb, offset2+6);
3603 break;
3604
3605 case 2:
3606 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_template, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3607 proto_tree_add_item(rsvp_object_tree, hf_rsvp_template_filter_source_address_ipv6, tvb, offset2, 16, ENC_NA);
3608 proto_tree_add_item(rsvp_object_tree, hf_rsvp_template_filter_source_port, tvb, offset2+18, 2, ENC_BIG_ENDIAN);
3609 break;
3610
3611 case 7:
3612 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_template, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3613 proto_tree_add_item(rsvp_object_tree,
3614 hf_rsvp_filter[RSVPF_SENDER_IP],
3615 tvb, offset2, 4, ENC_BIG_ENDIAN);
3616 /*short call ID*/
3617 if (rsvp_class == RSVP_CLASS_SENDER_TEMPLATE){
3618 proto_tree_add_item(rsvp_object_tree,
3619 hf_rsvp_filter[RSVPF_SENDER_SHORT_CALL_ID],
3620 tvb, offset2+4, 2, ENC_BIG_ENDIAN);
3621 }
3622
3623 proto_tree_add_item(rsvp_object_tree,
3624 hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
3625 tvb, offset2+6, 2, ENC_BIG_ENDIAN);
3626
3627 /*
3628 * Save this information to build the conversation request key later.
3629 */
3630 set_address_tvb(&rsvph->source, AT_IPv4, 4, tvb, offset2);
3631 rsvph->udp_source_port = tvb_get_ntohs(tvb, offset2+6);
3632 break;
3633
3634 case 8:
3635 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_template, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3636 proto_tree_add_item(rsvp_object_tree,
3637 hf_rsvp_filter[RSVPF_SENDER_IP],
3638 tvb, offset2, 16, ENC_BIG_ENDIAN);
3639 /*short call ID*/
3640 if (rsvp_class == RSVP_CLASS_SENDER_TEMPLATE){
3641 proto_tree_add_item(rsvp_object_tree,
3642 hf_rsvp_filter[RSVPF_SENDER_SHORT_CALL_ID],
3643 tvb, offset2+16, 2, ENC_BIG_ENDIAN);
3644 }
3645 proto_tree_add_item(rsvp_object_tree,
3646 hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
3647 tvb, offset2+18, 2, ENC_BIG_ENDIAN);
3648
3649 /*
3650 * Save this information to build the conversation request key later.
3651 */
3652 set_address_tvb(&rsvph->source, AT_IPv6, 16, tvb, offset2);
3653 rsvph->udp_source_port = tvb_get_ntohs(tvb, offset2+18);
3654 break;
3655
3656 case 9:
3657 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_template, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3658 proto_tree_add_item(rsvp_object_tree,
3659 hf_rsvp_filter[RSVPF_SENDER_IP],
3660 tvb, offset2, 4, ENC_BIG_ENDIAN);
3661
3662 /*
3663 * Save this information to build the conversation request key later.
3664 */
3665 set_address_tvb(&rsvph->source, AT_IPv4, 4, tvb, offset2);
3666 break;
3667
3668 case 12:
3669 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_template, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3670 proto_tree_add_item(rsvp_object_tree,
3671 hf_rsvp_template_filter_ipv4_tunnel_sender_address,
3672 tvb, offset2, 4, ENC_BIG_ENDIAN);
3673 offset2 += 4;
3674 proto_tree_add_item(rsvp_object_tree, hf_rsvp_reserved,
3675 tvb, offset2, 2, ENC_NA);
3676 offset2 += 2;
3677 proto_tree_add_item(rsvp_object_tree,
3678 hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
3679 tvb, offset2, 2, ENC_BIG_ENDIAN);
3680 offset2 += 2;
3681 proto_tree_add_item(rsvp_object_tree,
3682 hf_rsvp_template_filter_sub_group_originator_id,
3683 tvb, offset2, 4, ENC_NA);
3684 offset2 += 4;
3685 proto_tree_add_item(rsvp_object_tree, hf_rsvp_reserved,
3686 tvb, offset2, 2, ENC_NA);
3687 offset2 += 2;
3688 proto_tree_add_item(rsvp_object_tree,
3689 hf_rsvp_template_filter_sub_group_id,
3690 tvb, offset2, 2, ENC_BIG_ENDIAN);
3691 /*offset += 2;*/
3692 break;
3693
3694 case 13:
3695 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_template, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3696 proto_tree_add_item(rsvp_object_tree,
3697 hf_rsvp_template_filter_ipv6_tunnel_sender_address,
3698 tvb, offset2, 16, ENC_NA);
3699 offset2 += 16;
3700 proto_tree_add_item(rsvp_object_tree, hf_rsvp_reserved,
3701 tvb, offset2, 2, ENC_NA);
3702 offset2 += 2;
3703 proto_tree_add_item(rsvp_object_tree,
3704 hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
3705 tvb, offset2, 2, ENC_BIG_ENDIAN);
3706 offset2 += 2;
3707 proto_tree_add_item(rsvp_object_tree,
3708 hf_rsvp_template_filter_sub_group_originator_id,
3709 tvb, offset2, 16, ENC_NA);
3710 offset2 += 16;
3711 proto_tree_add_item(rsvp_object_tree, hf_rsvp_reserved,
3712 tvb, offset2, 2, ENC_NA);
3713 offset2 += 2;
3714 proto_tree_add_item(rsvp_object_tree,
3715 hf_rsvp_template_filter_sub_group_id,
3716 tvb, offset2, 2, ENC_BIG_ENDIAN);
3717 /*offset += 2;*/
3718 break;
3719
3720 default:
3721 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_template, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3722 proto_tree_add_item(rsvp_object_tree, hf_rsvp_template_filter_data, tvb, offset2, obj_length - 4, ENC_NA);
3723 break;
3724 }
3725 }
3726
3727 /*------------------------------------------------------------------------------
3728 * TLVs for Ethernet SENDER TSPEC and FLOWSPEC (RFC6003)
3729 *------------------------------------------------------------------------------*/
3730 static void
dissect_rsvp_eth_tspec_tlv(proto_item * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int tlv_length,int subtree_type)3731 dissect_rsvp_eth_tspec_tlv(proto_item *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
3732 tvbuff_t *tvb, int offset, int tlv_length,
3733 int subtree_type)
3734 {
3735 int tlv_off;
3736 int bit_offset;
3737 guint16 tlv_type;
3738 int tlv_len;
3739 guint8 profile;
3740 proto_tree *rsvp_ethspec_subtree, *ethspec_profile_subtree, *ti3;
3741
3742 for (tlv_off = 0; tlv_off < tlv_length; ) {
3743 tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
3744 tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);
3745
3746 if ((tlv_len == 0) || (tlv_off+tlv_len > tlv_length)) {
3747 proto_tree_add_expert(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length, tvb, offset+tlv_off+2, 2);
3748 return;
3749 }
3750 switch(tlv_type) {
3751 case 0:
3752 case 1:
3753
3754 /*case 2: ethernet bandwidth profile accordig to RFC 6003*/
3755 case 2:
3756 rsvp_ethspec_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
3757 offset+tlv_off, tlv_len, subtree_type, NULL,
3758 "Ethernet Bandwidth Profile TLV: CIR=%.10g, CBS=%.10g, "
3759 "EIR=%.10g, EBS=%.10g",
3760 tvb_get_ntohieee_float(tvb, offset+tlv_off+8),
3761 tvb_get_ntohieee_float(tvb, offset+tlv_off+12),
3762 tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
3763 tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
3764 proto_tree_add_uint_format_value(rsvp_ethspec_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3765 tlv_type, "%u - Ethernet Bandwidth Profile", tlv_type);
3766 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3767 profile = tvb_get_guint8(tvb, offset+tlv_off+4);
3768 ti3 = proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_profile, tvb, offset+tlv_off+4, 1, ENC_NA);
3769 ethspec_profile_subtree = proto_item_add_subtree(ti3, TREE(TT_ETHSPEC_SUBTREE));
3770 proto_tree_add_item(ethspec_profile_subtree, hf_rsvp_eth_tspec_tlv_color_mode,
3771 tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
3772 proto_tree_add_item(ethspec_profile_subtree, hf_rsvp_eth_tspec_tlv_coupling_flag,
3773 tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
3774 proto_item_append_text(ti3, " %s %s",
3775 (profile & (1U<<1)) ? "CM" : "",
3776 (profile & (1U<<0)) ? "CF" : "");
3777 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_index, tvb, offset+tlv_off+5, 1, ENC_NA);
3778 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_reserved, tvb, offset+tlv_off+6, 2, ENC_BIG_ENDIAN);
3779 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_cir, tvb, offset+tlv_off+8, 4, ENC_BIG_ENDIAN);
3780 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_cbs, tvb, offset+tlv_off+12, 4, ENC_BIG_ENDIAN);
3781 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_eir, tvb, offset+tlv_off+16, 4, ENC_BIG_ENDIAN);
3782 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_ebs, tvb, offset+tlv_off+20, 4, ENC_BIG_ENDIAN);
3783
3784 proto_item_append_text(ti, "ETH profile: CIR=%.10g, CBS=%.10g, EIR=%.10g, "
3785 "EBS=%.10g",
3786 tvb_get_ntohieee_float(tvb, offset+tlv_off+8),
3787 tvb_get_ntohieee_float(tvb, offset+tlv_off+12),
3788 tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
3789 tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
3790 break;
3791
3792 /* L2CP RFC 6004 */
3793 case 3:
3794 if (tlv_len != 8){
3795 proto_tree_add_expert_format(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length,
3796 tvb, offset+tlv_off+2, 2, "Invalid TLV length");
3797 return;
3798 }
3799 /* point to the first bit in the Ingress Layer 2 Control Processing */
3800 bit_offset = (offset<<5) + 31;
3801 proto_tree_add_bits_item(rsvp_object_tree, hf_rsvp_eth_tspec_il2cp, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3802 bit_offset += 4;
3803 proto_tree_add_bits_item(rsvp_object_tree, hf_rsvp_eth_tspec_el2cp, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3804 break;
3805
3806 case 255:
3807 rsvp_ethspec_subtree = proto_tree_add_subtree(rsvp_object_tree, tvb,
3808 offset+tlv_off, tlv_len,
3809 subtree_type, NULL, "RESERVED (RFC6003)");
3810 proto_tree_add_uint_format_value(rsvp_ethspec_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3811 tlv_type, "%u (RESERVED)", tlv_type);
3812 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3813 break;
3814
3815 case 129: /* OIF demo 2009 */
3816 rsvp_ethspec_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
3817 offset+tlv_off, tlv_len, subtree_type, NULL,
3818 "Ethernet Bandwidth Profile TLV: CIR=%.10g, CBS=%.10g, "
3819 "EIR=%.10g, EBS=%.10g",
3820 tvb_get_ntohieee_float(tvb, offset+tlv_off+8),
3821 tvb_get_ntohieee_float(tvb, offset+tlv_off+12),
3822 tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
3823 tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
3824 proto_tree_add_uint_format_value(rsvp_ethspec_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3825 tlv_type, "%u - Ethernet Bandwidth Profile", tlv_type);
3826 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
3827 profile = tvb_get_guint8(tvb, offset+tlv_off+4);
3828 ti3 = proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_profile, tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
3829 ethspec_profile_subtree = proto_item_add_subtree(ti3, TREE(TT_ETHSPEC_SUBTREE));
3830 proto_tree_add_item(ethspec_profile_subtree, hf_rsvp_eth_tspec_tlv_color_mode,
3831 tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
3832 proto_tree_add_item(ethspec_profile_subtree, hf_rsvp_eth_tspec_tlv_coupling_flag,
3833 tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
3834 proto_item_append_text(ti3, " %s %s",
3835 (profile & (1U<<1)) ? "CM" : "",
3836 (profile & (1U<<0)) ? "CF" : "");
3837 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_index, tvb, offset+tlv_off+5, 1, ENC_BIG_ENDIAN);
3838 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_reserved, tvb, offset+tlv_off+6, 2, ENC_BIG_ENDIAN);
3839 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_cir, tvb, offset+tlv_off+8, 4, ENC_BIG_ENDIAN);
3840 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_cbs, tvb, offset+tlv_off+12, 4, ENC_BIG_ENDIAN);
3841 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_eir, tvb, offset+tlv_off+16, 4, ENC_BIG_ENDIAN);
3842 proto_tree_add_item(rsvp_ethspec_subtree, hf_rsvp_eth_tspec_ebs, tvb, offset+tlv_off+20, 4, ENC_BIG_ENDIAN);
3843
3844 proto_item_append_text(ti, "ETH profile: CIR=%.10g, CBS=%.10g, EIR=%.10g, "
3845 "EBS=%.10g",
3846 tvb_get_ntohieee_float(tvb, offset+tlv_off+8),
3847 tvb_get_ntohieee_float(tvb, offset+tlv_off+12),
3848 tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
3849 tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
3850 break;
3851
3852 default:
3853 proto_tree_add_uint_format(rsvp_object_tree, hf_rsvp_type, tvb, offset+tlv_off, 2,
3854 tlv_type, "Unknown TLV: %u", tlv_type);
3855 break;
3856 }
3857 tlv_off += tlv_len;
3858 }
3859 }
3860
3861 /*------------------------------------------------------------------------------
3862 * SENDER TSPEC
3863 *------------------------------------------------------------------------------*/
3864 static const value_string rsvp_switching_granularity_vals[] = {
3865 {0, "Provided in signaling"},
3866 {1, "Ethernet port"},
3867 {2, "Ethernet frame"},
3868 {0, NULL }
3869 };
3870
3871 static void
dissect_rsvp_tspec(proto_item * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)3872 dissect_rsvp_tspec(proto_item *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
3873 tvbuff_t *tvb,
3874 int offset, int obj_length,
3875 int rsvp_class _U_, int type)
3876 {
3877 int offset2 = offset + 4;
3878 int mylen;
3879 proto_tree *tspec_tree, *ti2 = NULL;
3880 guint8 signal_type;
3881 guint16 m;
3882 proto_item *hidden_item;
3883
3884 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3885 proto_item_set_hidden(hidden_item);
3886
3887 mylen = obj_length - 4;
3888
3889 switch(type) {
3890 case 2:
3891 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3892 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_message_format_version, tvb, offset2, 1, ENC_BIG_ENDIAN);
3893 proto_tree_add_item(rsvp_object_tree, hf_rsvp_data_length, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3894
3895 mylen -= 4;
3896 offset2 += 4;
3897
3898 proto_item_set_text(ti, "SENDER TSPEC: IntServ, ");
3899
3900 while (mylen > 0) {
3901 guint8 param_id;
3902 guint param_len, raw_len;
3903 guint param_len_processed;
3904 guint length;
3905
3906 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_service_header, tvb, offset2, 1, ENC_BIG_ENDIAN);
3907 proto_tree_add_item_ret_uint(rsvp_object_tree, hf_rsvp_data_length, tvb, offset2+2, 2, ENC_BIG_ENDIAN, &length);
3908
3909 mylen -= 4;
3910 offset2 += 4;
3911
3912 /* Process all known service headers as a set of parameters */
3913 param_len_processed = 0;
3914 while (param_len_processed < length) {
3915 param_id = tvb_get_guint8(tvb, offset2);
3916 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_parameter, tvb, offset2, 1, ENC_NA);
3917 raw_len = tvb_get_ntohs(tvb, offset2+2);
3918 param_len = raw_len + 1;
3919 switch(param_id) {
3920 case 127:
3921 /* Token Bucket */
3922 proto_item_set_len(ti2, param_len*4);
3923 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
3924
3925 proto_tree_add_item(tspec_tree, hf_rsvp_parameter_flags, tvb, offset2+1, 1, ENC_NA);
3926 proto_tree_add_uint(tspec_tree, hf_rsvp_parameter_length, tvb, offset2+2, 2, raw_len);
3927 proto_tree_add_item(tspec_tree, hf_rsvp_tspec_token_bucket_rate, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
3928 proto_tree_add_item(tspec_tree, hf_rsvp_tspec_token_bucket_size, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
3929 proto_tree_add_item(tspec_tree, hf_rsvp_tspec_peak_data_rate, tvb, offset2+12, 4, ENC_BIG_ENDIAN);
3930 proto_tree_add_item(tspec_tree, hf_rsvp_minimum_policed_unit, tvb, offset2+16, 4, ENC_BIG_ENDIAN);
3931 proto_tree_add_item(tspec_tree, hf_rsvp_maximum_packet_size, tvb, offset2+20, 4, ENC_BIG_ENDIAN);
3932 proto_item_append_text(ti, "Token Bucket, %.10g bytes/sec. ",
3933 tvb_get_ntohieee_float(tvb, offset2+4));
3934 proto_item_append_text(ti2, "Rate=%.10g Burst=%.10g Peak=%.10g m=%u M=%u",
3935 tvb_get_ntohieee_float(tvb, offset2+4),
3936 tvb_get_ntohieee_float(tvb, offset2+8),
3937 tvb_get_ntohieee_float(tvb, offset2+12),
3938 tvb_get_ntohl(tvb, offset2+16),
3939 tvb_get_ntohl(tvb, offset2+20));
3940 break;
3941
3942 case 128:
3943 /* Null Service (RFC2997) */
3944 proto_item_set_len(ti2, param_len*4);
3945 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
3946
3947 proto_tree_add_item(tspec_tree, hf_rsvp_parameter_flags, tvb, offset2+1, 1, ENC_NA);
3948 proto_tree_add_uint(tspec_tree, hf_rsvp_parameter_length, tvb, offset2+2, 2, raw_len);
3949 proto_tree_add_item(tspec_tree, hf_rsvp_maximum_packet_size, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
3950 proto_item_append_text(ti, "Null Service. M=%u",
3951 tvb_get_ntohl(tvb, offset2+4));
3952 proto_item_append_text(ti2, "Max pkt size=%u",
3953 tvb_get_ntohl(tvb, offset2+4));
3954 break;
3955
3956 case 126:
3957 /* Compression hint (RFC3006) */
3958 proto_item_set_len(ti2, param_len*4);
3959 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
3960
3961 proto_tree_add_item(tspec_tree, hf_rsvp_parameter_flags, tvb, offset2+1, 1, ENC_NA);
3962 proto_tree_add_uint(tspec_tree, hf_rsvp_parameter_length, tvb, offset2+2, 2, raw_len);
3963 proto_tree_add_item(tspec_tree, hf_rsvp_tspec_hint, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
3964 proto_tree_add_item(tspec_tree, hf_rsvp_compression_factor, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
3965 proto_item_append_text(ti, "Compression Hint. Hint=%u, Factor=%u",
3966 tvb_get_ntohl(tvb, offset2+4),
3967 tvb_get_ntohl(tvb, offset2+8));
3968 proto_item_append_text(ti2, "Hint=%u, Factor=%u",
3969 tvb_get_ntohl(tvb, offset2+4),
3970 tvb_get_ntohl(tvb, offset2+8));
3971 break;
3972
3973 default:
3974 proto_item_set_len(ti2, param_len*4);
3975 expert_add_info_format(pinfo, ti2, &ei_rsvp_parameter, "Unknown parameter %d, %d words", param_id, param_len);
3976 break;
3977 }
3978 param_len_processed += param_len;
3979 offset2 += param_len*4;
3980 }
3981 mylen -= length*4;
3982 }
3983 break;
3984
3985 case 4: /* SONET/SDH Tspec */
3986 proto_item_set_text(ti, "SENDER TSPEC: SONET/SDH, ");
3987
3988 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
3989 signal_type = tvb_get_guint8(tvb, offset2);
3990 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_signal_type_sonet, tvb, offset2, 1, ENC_BIG_ENDIAN);
3991 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_requested_concatenation, tvb, offset2+1, 1, ENC_BIG_ENDIAN);
3992 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
3993 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_standard_contiguous_concatenation,
3994 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
3995 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_arbitrary_contiguous_concatenation,
3996 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
3997 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_number_of_contiguous_components, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
3998 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_number_of_virtual_components, tvb, offset2+4, 2, ENC_BIG_ENDIAN);
3999 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_multiplier, tvb, offset2+6, 2, ENC_BIG_ENDIAN);
4000 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_transparency, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4001 tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
4002
4003 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_regenerator_section,
4004 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4005 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_multiplex_section,
4006 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4007 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_J0_transparency,
4008 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4009 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_SOH_RSOH_DCC_transparency,
4010 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4011 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_LOH_MSOH_DCC_transparency,
4012 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4013 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_LOH_MSOH_extended_DCC_transparency,
4014 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4015 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_K1_K2_transparency,
4016 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4017 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_E1_transparency,
4018 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4019 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_F1_transparency,
4020 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4021 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_E2_transparency,
4022 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4023 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_B1_transparency,
4024 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4025 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_B2_transparency,
4026 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4027 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_M0_transparency,
4028 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4029 proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_M1_transparency,
4030 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4031
4032 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_profile, tvb, offset2+12, 4, ENC_BIG_ENDIAN);
4033
4034 proto_item_append_text(ti, "Signal [%s], RCC %d, NCC %d, NVC %d, MT %d, Transparency %d, Profile %d",
4035 val_to_str_ext_const(signal_type, &gmpls_sonet_signal_type_str_ext, "Unknown"),
4036 tvb_get_guint8(tvb, offset2+1), tvb_get_ntohs(tvb, offset2+2),
4037 tvb_get_ntohs(tvb, offset2+4), tvb_get_ntohs(tvb, offset2+6),
4038 tvb_get_ntohl(tvb, offset2+8), tvb_get_ntohl(tvb, offset2+12));
4039 break;
4040
4041 case 5: /* FF: G.709 TSPEC, RFC 4328 */
4042 proto_item_set_text(ti, "SENDER TSPEC: G.709, ");
4043
4044 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tspec, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
4045 signal_type = tvb_get_guint8(tvb, offset2);
4046 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_signal_type_g709, tvb, offset2, 1, ENC_BIG_ENDIAN);
4047 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_number_of_multiplexed_components, tvb, offset2 + 2, 2, ENC_BIG_ENDIAN);
4048 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_number_of_virtual_components, tvb, offset2 + 4, 2, ENC_BIG_ENDIAN);
4049
4050 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_multiplier, tvb, offset2 + 6, 2, ENC_BIG_ENDIAN);
4051 proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
4052 rval_to_str(signal_type,
4053 gmpls_g709_signal_type_rvals,
4054 "Unknown"),
4055 tvb_get_ntohs(tvb, offset2 + 2),
4056 tvb_get_ntohs(tvb, offset2 + 4),
4057 tvb_get_ntohs(tvb, offset2 + 6));
4058 break;
4059
4060 case 6: /* Ethernet TSPEC (RFC6003) */
4061 proto_item_set_text(ti, "SENDER TSPEC: Ethernet, ");
4062 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4063 proto_tree_add_item(rsvp_object_tree, hf_rsvp_switching_granularity, tvb, offset2, 2, ENC_BIG_ENDIAN);
4064 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_mtu, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
4065
4066 dissect_rsvp_eth_tspec_tlv(ti, pinfo, rsvp_object_tree, tvb, offset+8, obj_length-8,
4067 TREE(TT_TSPEC_SUBTREE));
4068 break;
4069
4070 case 8: /* SSON FOWSPEC (RFC7762)*/
4071 m = tvb_get_ntohs(tvb, offset2);
4072 proto_item_set_text(ti, "SENDER TSPEC: SSON, ");
4073 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_flowspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4074 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_m, tvb, offset2, 2, ENC_BIG_ENDIAN);
4075 proto_item_append_text(ti, "slot width (m) = %f (%d)",
4076 m*12.5,
4077 tvb_get_ntohs(tvb, offset2));
4078 break;
4079
4080 default: /* Unknown TSpec */
4081 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4082 proto_tree_add_item(rsvp_object_tree, hf_rsvp_tspec_data, tvb, offset2, obj_length - 4, ENC_NA);
4083 break;
4084
4085 }
4086 }
4087
4088 /*------------------------------------------------------------------------------
4089 * FLOWSPEC
4090 *------------------------------------------------------------------------------*/
4091 static void
dissect_rsvp_flowspec(proto_item * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)4092 dissect_rsvp_flowspec(proto_item *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
4093 tvbuff_t *tvb,
4094 int offset, int obj_length,
4095 int rsvp_class _U_, int type)
4096 {
4097 int offset2 = offset + 4;
4098 int mylen, signal_type;
4099 proto_tree *flowspec_tree, *ti2 = NULL;
4100 proto_item *hidden_item;
4101 guint16 m;
4102
4103 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4104 proto_item_set_hidden(hidden_item);
4105
4106 mylen = obj_length - 4;
4107
4108 switch(type) {
4109
4110 case 2:
4111 if (mylen < 4) {
4112 proto_tree_add_expert_format(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length, tvb, 0, 0,
4113 "Object length %u < 8", obj_length);
4114 return;
4115 }
4116 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_flowspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4117 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_message_format_version, tvb, offset2, 1, ENC_BIG_ENDIAN);
4118 proto_tree_add_item(rsvp_object_tree, hf_rsvp_data_length, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
4119
4120 proto_item_set_text(ti, "FLOWSPEC: ");
4121
4122 mylen -= 4;
4123 offset2+= 4;
4124 while (mylen > 0) {
4125 guint8 service_num;
4126 guint length;
4127 guint8 param_id;
4128 guint param_len, raw_len;
4129 guint param_len_processed;
4130
4131 if (mylen < 4) {
4132 proto_tree_add_expert_format(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length, tvb, 0, 0,
4133 "Object length %u not large enough", obj_length);
4134 return;
4135 }
4136 service_num = tvb_get_guint8(tvb, offset2);
4137 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_service_header, tvb, offset2, 1, ENC_BIG_ENDIAN);
4138 proto_tree_add_item_ret_uint(rsvp_object_tree, hf_rsvp_data_length, tvb, offset2+2, 2, ENC_BIG_ENDIAN, &length);
4139
4140 mylen -= 4;
4141 offset2 += 4;
4142
4143 proto_item_append_text(ti, "%s: ",
4144 val_to_str_ext(service_num, &intsrv_services_str_ext,
4145 "Unknown (%d)"));
4146
4147 /* Process all known service headers as a set of parameters */
4148 param_len_processed = 0;
4149 while (param_len_processed < length) {
4150 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_parameter, tvb, offset2, 1, ENC_NA);
4151 param_id = tvb_get_guint8(tvb, offset2);
4152 raw_len = tvb_get_ntohs(tvb, offset2+2);
4153 param_len = raw_len + 1;
4154 switch(param_id) {
4155 case 127:
4156 /* Token Bucket */
4157 proto_item_set_len(ti2, param_len*4);
4158 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
4159
4160 proto_tree_add_item(flowspec_tree, hf_rsvp_parameter_flags, tvb, offset2+1, 1, ENC_NA);
4161 proto_tree_add_uint(flowspec_tree, hf_rsvp_parameter_length, tvb, offset2+2, 2, raw_len);
4162 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_token_bucket_rate, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
4163 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_token_bucket_size, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4164 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_peak_data_rate, tvb, offset2+12, 4, ENC_BIG_ENDIAN);
4165 proto_tree_add_item(flowspec_tree, hf_rsvp_minimum_policed_unit, tvb, offset2+16, 4, ENC_BIG_ENDIAN);
4166 proto_tree_add_item(flowspec_tree, hf_rsvp_maximum_packet_size, tvb, offset2+20, 4, ENC_BIG_ENDIAN);
4167 proto_item_append_text(ti, "Token Bucket, %.10g bytes/sec. ",
4168 tvb_get_ntohieee_float(tvb, offset2+4));
4169 proto_item_append_text(ti2, "Rate=%.10g Burst=%.10g Peak=%.10g m=%u M=%u",
4170 tvb_get_ntohieee_float(tvb, offset2+4),
4171 tvb_get_ntohieee_float(tvb, offset2+8),
4172 tvb_get_ntohieee_float(tvb, offset2+12),
4173 tvb_get_ntohl(tvb, offset2+16),
4174 tvb_get_ntohl(tvb, offset2+20));
4175 break;
4176
4177 case 130:
4178 /* Guaranteed-rate RSpec */
4179 proto_item_set_len(ti2, param_len*4);
4180 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
4181
4182 proto_tree_add_item(flowspec_tree, hf_rsvp_parameter_flags, tvb, offset2+1, 1, ENC_NA);
4183 proto_tree_add_uint(flowspec_tree, hf_rsvp_parameter_length, tvb, offset2+2, 2, raw_len);
4184
4185 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_rate, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
4186 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_slack_term, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4187 proto_item_append_text(ti, "RSpec, %.10g bytes/sec. ",
4188 tvb_get_ntohieee_float(tvb, offset2+4));
4189 proto_item_append_text(ti2, "R=%.10g, s=%u",
4190 tvb_get_ntohieee_float(tvb, offset2+4),
4191 tvb_get_ntohl(tvb, offset2+8));
4192 break;
4193
4194 case 128:
4195 /* Null Service (RFC2997) */
4196 proto_item_set_len(ti2, param_len*4);
4197 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
4198
4199 proto_tree_add_item(flowspec_tree, hf_rsvp_parameter_flags, tvb, offset2+1, 1, ENC_NA);
4200 proto_tree_add_uint(flowspec_tree, hf_rsvp_parameter_length, tvb, offset2+2, 2, raw_len);
4201 proto_tree_add_item(flowspec_tree, hf_rsvp_maximum_packet_size, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
4202 proto_item_append_text(ti, "Null Service. M=%u",
4203 tvb_get_ntohl(tvb, offset2+4));
4204 proto_item_append_text(ti2, "Max pkt size=%u",
4205 tvb_get_ntohl(tvb, offset2+4));
4206 break;
4207
4208 default:
4209 expert_add_info_format(pinfo, ti2, &ei_rsvp_parameter, "Unknown parameter %d, %d words", param_id, param_len);
4210 break;
4211 }
4212 param_len_processed += param_len;
4213 offset2 += param_len * 4;
4214 }
4215
4216 /* offset2 += length*4; */
4217 mylen -= length*4;
4218 }
4219 break;
4220
4221 case 4:
4222 proto_item_set_text(ti, "FLOWSPEC: SONET/SDH, ");
4223
4224 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_flowspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4225 signal_type = tvb_get_guint8(tvb, offset2);
4226 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_signal_type_sonet, tvb, offset2, 1, ENC_BIG_ENDIAN);
4227 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_requested_concatenation, tvb, offset2+1, 1, ENC_BIG_ENDIAN);
4228 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
4229 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_standard_contiguous_concatenation,
4230 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
4231 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_arbitrary_contiguous_concatenation,
4232 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
4233 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_number_of_contiguous_components, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
4234 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_number_of_virtual_components, tvb, offset2+4, 2, ENC_BIG_ENDIAN);
4235 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_multiplier, tvb, offset2+6, 2, ENC_BIG_ENDIAN);
4236 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_transparency, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4237 flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
4238
4239 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_regenerator_section,
4240 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4241 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_multiplex_section,
4242 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4243 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_J0_transparency,
4244 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4245 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_SOH_RSOH_DCC_transparency,
4246 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4247 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_LOH_MSOH_DCC_transparency,
4248 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4249 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_LOH_MSOH_extended_DCC_transparency,
4250 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4251 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_K1_K2_transparency,
4252 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4253 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_E1_transparency,
4254 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4255 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_F1_transparency,
4256 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4257 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_E2_transparency,
4258 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4259 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_B1_transparency,
4260 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4261 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_B2_transparency,
4262 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4263 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_M0_transparency,
4264 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4265 proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_M1_transparency,
4266 tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4267
4268 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_profile, tvb, offset2+12, 4, ENC_BIG_ENDIAN);
4269
4270 proto_item_append_text(ti, "Signal [%s], RCC %d, NCC %d, NVC %d, MT %d, Transparency %d, Profile %d",
4271 val_to_str_ext_const(signal_type, &gmpls_sonet_signal_type_str_ext, "Unknown"),
4272 tvb_get_guint8(tvb, offset2+1), tvb_get_ntohs(tvb, offset2+2),
4273 tvb_get_ntohs(tvb, offset2+4), tvb_get_ntohs(tvb, offset2+6),
4274 tvb_get_ntohl(tvb, offset2+8), tvb_get_ntohl(tvb, offset2+12));
4275 break;
4276
4277 case 5: /* FF: G.709 FLOWSPEC, RFC 4328 */
4278 proto_item_set_text(ti, "FLOWSPEC: G.709, ");
4279
4280 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_flowspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4281 signal_type = tvb_get_guint8(tvb, offset2);
4282 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_signal_type_g709, tvb, offset2, 1, ENC_BIG_ENDIAN);
4283 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_number_of_multiplexed_components, tvb, offset2 + 2, 2, ENC_BIG_ENDIAN);
4284 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_number_of_virtual_components, tvb, offset2 + 4, 2, ENC_BIG_ENDIAN);
4285
4286 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_multiplier, tvb, offset2 + 6, 2, ENC_BIG_ENDIAN);
4287 proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
4288 rval_to_str(signal_type,
4289 gmpls_g709_signal_type_rvals,
4290 "Unknown"),
4291 tvb_get_ntohs(tvb, offset2 + 2),
4292 tvb_get_ntohs(tvb, offset2 + 4),
4293 tvb_get_ntohs(tvb, offset2 + 6));
4294 break;
4295
4296 case 6: /* Ethernet FLOWSPEC (RFC6003) */
4297 proto_item_set_text(ti, "FLOWSPEC: Ethernet, ");
4298 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_flowspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4299 proto_tree_add_item(rsvp_object_tree, hf_rsvp_switching_granularity, tvb, offset2, 2, ENC_BIG_ENDIAN);
4300 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_mtu, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
4301
4302 dissect_rsvp_eth_tspec_tlv(ti, pinfo, rsvp_object_tree, tvb, offset+8, obj_length-8,
4303 TREE(TT_FLOWSPEC_SUBTREE));
4304 break;
4305 case 8: /* SSON FOWSPEC (RFC7762)*/
4306 m = tvb_get_ntohs(tvb, offset2);
4307 proto_item_set_text(ti, "FLOWSPEC: SSON, ");
4308 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_flowspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4309 proto_tree_add_item(rsvp_object_tree, hf_rsvp_flowspec_m, tvb, offset2, 2, ENC_BIG_ENDIAN);
4310 proto_item_append_text(ti, "slot width (m) = %f (%d)",
4311 m*12.5,
4312 tvb_get_ntohs(tvb, offset2));
4313 break;
4314
4315 default:
4316 break;
4317 }
4318 }
4319
4320 /*------------------------------------------------------------------------------
4321 * ADSPEC
4322 *------------------------------------------------------------------------------*/
4323 static void
dissect_rsvp_adspec(proto_item * ti _U_,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type _U_)4324 dissect_rsvp_adspec(proto_item *ti _U_, packet_info* pinfo, proto_tree *rsvp_object_tree,
4325 tvbuff_t *tvb,
4326 int offset, int obj_length,
4327 int rsvp_class _U_, int type _U_)
4328 {
4329 int offset2 = offset + 4;
4330 int mylen, i;
4331 proto_tree *adspec_tree, *adspec_type_tree;
4332 proto_item *ti2;
4333
4334 proto_item *hidden_item;
4335
4336 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4337 proto_item_set_hidden(hidden_item);
4338
4339 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_adspec, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4340 mylen = obj_length - 4;
4341
4342 proto_tree_add_item(rsvp_object_tree, hf_rsvp_adspec_message_format_version, tvb, offset2, 1, ENC_BIG_ENDIAN);
4343 proto_tree_add_item(rsvp_object_tree, hf_rsvp_data_length, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
4344 mylen -= 4;
4345 offset2 += 4;
4346 while (mylen > 0) {
4347 guint8 service_num;
4348 guint length;
4349 const char *str;
4350
4351 service_num = tvb_get_guint8(tvb, offset2);
4352 str = val_to_str_ext_const(service_num, &intsrv_services_str_ext, "Unknown");
4353 length = tvb_get_ntohs(tvb, offset2+2);
4354 adspec_tree = proto_tree_add_subtree(rsvp_object_tree, tvb, offset2,
4355 (length+1)*4, TREE(TT_ADSPEC_SUBTREE), NULL, str);
4356
4357 proto_tree_add_item(adspec_tree, hf_rsvp_adspec_service_header, tvb, offset2, 1, ENC_BIG_ENDIAN);
4358 proto_tree_add_item(adspec_tree, hf_rsvp_hf_rsvp_adspec_break_bit, tvb, offset2+1, 1, ENC_NA);
4359 proto_tree_add_uint(adspec_tree, hf_rsvp_data_length, tvb, offset2+2, 2, length);
4360 mylen -= 4;
4361 offset2 += 4;
4362 i = length*4;
4363 while (i > 0) {
4364 guint id, phdr_length;
4365
4366 ti2 = proto_tree_add_item_ret_uint(adspec_tree, hf_rsvp_adspec_type, tvb, offset2, 1, ENC_NA, &id);
4367 adspec_type_tree = proto_item_add_subtree(ti2, TREE(TT_ADSPEC_TYPE_SUBTREE));
4368 proto_tree_add_item_ret_uint(adspec_type_tree, hf_rsvp_adspec_len, tvb, offset2+2, 2, ENC_BIG_ENDIAN, &phdr_length);
4369 proto_item_set_len(ti2, phdr_length);
4370 str = try_val_to_str_ext(id, &adspec_params_ext);
4371 if (str) {
4372 switch(id) {
4373 case 4:
4374 case 8:
4375 case 10:
4376 case 133:
4377 case 134:
4378 case 135:
4379 case 136:
4380 /* 32-bit unsigned integer */
4381 proto_tree_add_uint_format(adspec_type_tree, hf_rsvp_adspec_uint, tvb, offset2, (phdr_length+1)<<2, tvb_get_ntohl(tvb, offset2+4),
4382 "%s: %u", str, tvb_get_ntohl(tvb, offset2+4));
4383 break;
4384
4385 case 6:
4386 /* IEEE float */
4387 proto_tree_add_float_format(adspec_type_tree, hf_rsvp_adspec_float, tvb, offset2, (phdr_length+1)<<2, tvb_get_ntohieee_float(tvb, offset2+4),
4388 "%s: %.10g", str, tvb_get_ntohieee_float(tvb, offset2+4));
4389 break;
4390 default:
4391 proto_tree_add_bytes_format(adspec_tree, hf_rsvp_adspec_bytes, tvb, offset2, (phdr_length+1)<<2, NULL, "%s", str);
4392 break;
4393 }
4394 } else {
4395 expert_add_info(pinfo, ti2, &ei_rsvp_adspec_type);
4396 }
4397 offset2 += (phdr_length+1)<<2;
4398 i -= (phdr_length+1)<<2;
4399 mylen -= (phdr_length+1)<<2;
4400 }
4401 }
4402 }
4403
4404 /*------------------------------------------------------------------------------
4405 * INTEGRITY
4406 *------------------------------------------------------------------------------*/
4407 static void
dissect_rsvp_integrity(proto_item * ti _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type _U_)4408 dissect_rsvp_integrity(proto_item *ti _U_, proto_tree *rsvp_object_tree,
4409 tvbuff_t *tvb,
4410 int offset, int obj_length,
4411 int rsvp_class _U_, int type _U_)
4412 {
4413 int offset2 = offset + 4;
4414 proto_tree *ti2, *rsvp_integ_flags_tree;
4415 proto_item *hidden_item;
4416
4417 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4418 proto_item_set_hidden(hidden_item);
4419
4420 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_integrity, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4421
4422 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_integrity_flags, tvb, offset2, 1, ENC_BIG_ENDIAN);
4423 rsvp_integ_flags_tree = proto_item_add_subtree(ti2, TREE(TT_INTEGRITY_FLAGS));
4424 proto_tree_add_item(rsvp_integ_flags_tree, hf_rsvp_integrity_flags_handshake,
4425 tvb, offset2, 1, ENC_BIG_ENDIAN);
4426 proto_tree_add_item(rsvp_object_tree, hf_rsvp_integrity_key_identifier, tvb, offset2+2, 6, ENC_NA);
4427 proto_tree_add_item(rsvp_object_tree, hf_rsvp_integrity_sequence_number, tvb, offset2+8, 8, ENC_BIG_ENDIAN);
4428 proto_tree_add_item(rsvp_object_tree, hf_rsvp_integrity_hash, tvb, offset2+16, obj_length - 20, ENC_NA);
4429 }
4430
4431 /*------------------------------------------------------------------------------
4432 * POLICY
4433 *------------------------------------------------------------------------------*/
4434 static void
dissect_rsvp_policy(proto_item * ti _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type _U_)4435 dissect_rsvp_policy(proto_item *ti _U_, proto_tree *rsvp_object_tree,
4436 tvbuff_t *tvb,
4437 int offset, int obj_length,
4438 int rsvp_class _U_, int type _U_)
4439 {
4440 int offset2 = offset + 4;
4441 proto_item *hidden_item;
4442
4443 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4444 proto_item_set_hidden(hidden_item);
4445
4446 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_policy, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4447 proto_tree_add_item(rsvp_object_tree, hf_rsvp_policy_data, tvb, offset2, obj_length - 4, ENC_NA);
4448 }
4449
4450 /*------------------------------------------------------------------------------
4451 * LABEL_REQUEST
4452 *------------------------------------------------------------------------------*/
4453 static void
dissect_rsvp_label_request(proto_item * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)4454 dissect_rsvp_label_request(proto_item *ti, proto_tree *rsvp_object_tree,
4455 tvbuff_t *tvb,
4456 int offset, int obj_length,
4457 int rsvp_class _U_, int type)
4458 {
4459 int offset2 = offset + 4;
4460 proto_item *hidden_item;
4461
4462 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4463 proto_item_set_hidden(hidden_item);
4464
4465 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_label_request, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4466
4467 switch(type) {
4468 case 1: {
4469 unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
4470 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_l3pid, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
4471 proto_item_set_text(ti, "LABEL REQUEST: Basic: L3PID: %s (0x%04x)",
4472 val_to_str_const(l3pid, etype_vals, "Unknown"),
4473 l3pid);
4474 break;
4475 }
4476
4477 case 2: {
4478 unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
4479 unsigned short min_vpi, min_vci, max_vpi, max_vci;
4480 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_l3pid, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
4481 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_m, tvb, offset2+4, 1, ENC_NA);
4482 min_vpi = tvb_get_ntohs(tvb, offset2+4) & 0x7f;
4483 min_vci = tvb_get_ntohs(tvb, offset2+6);
4484 max_vpi = tvb_get_ntohs(tvb, offset2+8) & 0x7f;
4485 max_vci = tvb_get_ntohs(tvb, offset2+10);
4486 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_min_vpi, tvb, offset2+4, 2, ENC_BIG_ENDIAN);
4487 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_min_vci, tvb, offset2+6, 2, ENC_BIG_ENDIAN);
4488 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_max_vpi, tvb, offset2+8, 2, ENC_BIG_ENDIAN);
4489 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_max_vci, tvb, offset2+10, 2, ENC_BIG_ENDIAN);
4490 proto_item_set_text(ti, "LABEL REQUEST: ATM: L3PID: %s (0x%04x). VPI/VCI: Min: %d/%d, Max: %d/%d. %s Merge. ",
4491 val_to_str_const(l3pid, etype_vals, "Unknown"), l3pid,
4492 min_vpi, min_vci, max_vpi, max_vci,
4493 (tvb_get_guint8(tvb, offset2+4) & 0x80) ? "Can" : "Cannot");
4494 break;
4495 }
4496
4497 case 3: {
4498 guint16 l3pid = tvb_get_ntohs(tvb, offset2+2);
4499 guint32 min_dlci, max_dlci, dlci_len, dlci_len_code;
4500 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_l3pid, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
4501 dlci_len_code = (tvb_get_ntohs(tvb, offset2+4) & 0x0180) >> 7;
4502 min_dlci = tvb_get_ntohl(tvb, offset2+4) & 0x7fffff;
4503 max_dlci = tvb_get_ntohl(tvb, offset2+8) & 0x7fffff;
4504 switch(dlci_len_code) {
4505 case 0:
4506 /* 10-bit DLCIs */
4507 dlci_len = 10;
4508 min_dlci &= 0x3ff;
4509 max_dlci &= 0x3ff;
4510 break;
4511 case 2:
4512 dlci_len = 23;
4513 break;
4514 default:
4515 dlci_len = 0;
4516 min_dlci = 0;
4517 max_dlci = 0;
4518 break;
4519 }
4520 proto_tree_add_uint_format_value(rsvp_object_tree, hf_rsvp_dlci_length, tvb, offset2+4, 2,
4521 dlci_len, "%s (%d)",
4522 (dlci_len==10) ? "10 bits" :
4523 (dlci_len==23) ? "23 bits" :
4524 "INVALID", dlci_len_code);
4525 proto_tree_add_uint(rsvp_object_tree, hf_rsvp_min_dlci, tvb, offset2+5, 3, min_dlci);
4526 proto_tree_add_uint(rsvp_object_tree, hf_rsvp_max_dlci, tvb, offset2+8, 2, max_dlci);
4527 proto_item_set_text(ti, "LABEL REQUEST: Frame: L3PID: %s (0x%04x). DLCI Len: %s. Min DLCI: %d. Max DLCI: %d",
4528 val_to_str_const(l3pid, etype_vals, "Unknown"), l3pid,
4529 (dlci_len==10) ? "10 bits" :
4530 (dlci_len==23) ? "23 bits" :
4531 "INVALID", min_dlci, max_dlci);
4532 break;
4533 }
4534 case 4:
4535 case 5: {
4536 unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
4537 unsigned char lsp_enc = tvb_get_guint8(tvb,offset2);
4538 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_lsp_encoding_type, tvb, offset2, 1, ENC_BIG_ENDIAN);
4539 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_switching_type, tvb, offset2+1, 1, ENC_BIG_ENDIAN);
4540 proto_tree_add_item(rsvp_object_tree, hf_rsvp_g_pid, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
4541 proto_item_set_text(ti, "LABEL REQUEST: Generalized: LSP Encoding=%s, "
4542 "Switching Type=%s, G-PID=%s ",
4543 rval_to_str(lsp_enc, gmpls_lsp_enc_rvals, "Unknown (%d)"),
4544 rval_to_str(tvb_get_guint8(tvb,offset2+1),
4545 gmpls_switching_type_rvals, "Unknown (%d)"),
4546 rval_to_str_const(l3pid, gmpls_gpid_rvals,
4547 val_to_str(l3pid, etype_vals,
4548 "Unknown (0x%04x)")));
4549 break;
4550 }
4551
4552 default:
4553 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_request_data, tvb, offset2, obj_length - 4, ENC_NA);
4554 break;
4555 } /* switch(type) */
4556 }
4557
4558 /*-----------------------------------------------------------------------------
4559 * LABEL
4560 *---------------------------------------------------------------------------*/
4561
4562 /*
4563 FF: G.694 lambda label, see draft-ietf-ccamp-gmpls-g-694-lambda-labels-05
4564
4565 0 1 2 3
4566 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
4567 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4568 |Grid | C.S | Reserved | n |
4569 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4570 */
4571 static const value_string lambda_grid_vals[] = {
4572 { 1, "DWDM"},
4573 { 2, "CWDM"},
4574 { 3, "Flexi"},
4575 { 0, NULL }
4576 };
4577
4578 static const value_string grid1_cs_vals[] = {
4579 { 1, "100GHz"},
4580 { 2, "50GHz"},
4581 { 3, "25GHz"},
4582 { 4, "12.5GHz"},
4583 { 0, NULL }
4584 };
4585 static const value_string grid2_cs_vals[] = {
4586 { 1, "20nm"},
4587 { 0, NULL }
4588 };
4589 static const value_string grid3_cs_vals[] = {
4590 { 5, "6.25GHz"},
4591 { 0, NULL }
4592 };
4593
4594 static void
dissect_glabel_lambda(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset)4595 dissect_glabel_lambda(proto_tree *ti, proto_tree *rsvp_object_tree,
4596 tvbuff_t *tvb,
4597 int offset)
4598 {
4599 float freq = 0.0f;
4600 float slot_width = 0.0f;
4601 guint32 wavelength = 0;
4602 float cs_thz = 0.0f;
4603 proto_tree *wavelength_tree;
4604 guint8 grid, cs;
4605 gint16 n, m;
4606
4607
4608
4609 grid = ((tvb_get_guint8(tvb, offset) & 0xE0) >> 5);
4610 cs = ((tvb_get_guint8(tvb, offset) & 0x1E) >> 1);
4611 n = tvb_get_ntohs(tvb, offset + 2);
4612
4613 wavelength_tree = proto_tree_add_subtree(rsvp_object_tree, tvb, offset, 4, TREE(TT_WAVELENGTH), NULL, "Wavelength Label");
4614 proto_tree_add_item(wavelength_tree, hf_rsvp_wavelength_grid, tvb, offset, 1, ENC_NA);
4615
4616
4617 switch(grid) {
4618 case 1: /* DWDM grid: Frequency (THz) = 193.1 THz + n * channel spacing (THz) */
4619 cs_thz =
4620 cs == 1 ? 0.1f :
4621 cs == 2 ? 0.05f :
4622 cs == 3 ? 0.025f :
4623 cs == 4 ? 0.0125f :
4624 0.0f;
4625 freq = 193.1f + (n * cs_thz);
4626 proto_tree_add_item(wavelength_tree, hf_rsvp_wavelength_cs1, tvb, offset, 1, ENC_NA);
4627 proto_tree_add_uint_format_value(wavelength_tree, hf_rsvp_wavelength_n, tvb, offset+2, 2, n, "%d", n);
4628 proto_tree_add_float_format_value(wavelength_tree, hf_rsvp_wavelength_freq, tvb, offset, 4, freq, "%.2fTHz", freq);
4629 proto_item_append_text(ti, ": Wavelength: grid=DWDM, channel spacing=%s, central frequency=%d, freq=%.2fTHz",
4630 val_to_str_const(cs, grid1_cs_vals, "Unknown"), n, freq);
4631 break;
4632 case 2: /* CWDM grid: Wavelength (nm) = 1471 nm + n * 20 nm */
4633 wavelength = 1471 + (n * 20);
4634 proto_tree_add_item(wavelength_tree, hf_rsvp_wavelength_cs2, tvb, offset, 1, ENC_NA);
4635 proto_tree_add_item(wavelength_tree, hf_rsvp_wavelength_n, tvb, offset+2, 2, ENC_BIG_ENDIAN);
4636 proto_tree_add_uint_format_value(wavelength_tree, hf_rsvp_wavelength_wavelength, tvb, offset, 4, wavelength, "%unm", wavelength);
4637 proto_item_append_text(ti, ": Wavelength: grid=CWDM, channel spacing=%s, central frequenc=%d, wavelength=%unm",
4638 val_to_str_const(cs, grid2_cs_vals, "Unknown"), n, wavelength);
4639 break;
4640 case 3: /* flexi grid: Slot width (Ghz) = 12.5 Ghz * m, see RFC 7699 */
4641 m = tvb_get_ntohs(tvb, offset + 4);
4642 slot_width = 12.5f * m;
4643 proto_tree_add_item(wavelength_tree, hf_rsvp_wavelength_cs3, tvb, offset, 1, ENC_NA);
4644 proto_tree_add_item(wavelength_tree, hf_rsvp_wavelength_n, tvb, offset+2, 2, ENC_BIG_ENDIAN);
4645 proto_tree_add_float_format_value(wavelength_tree, hf_rsvp_wavelength_m, tvb, offset, 4, slot_width, "%.2fGHz", slot_width);
4646 proto_item_append_text(ti, ": Wavelength: grid=flexi, channel spacing=%s, central frequenc=%d, Channel Width=%.2fGhz",
4647 val_to_str_const(cs, grid3_cs_vals, "Unknown"), n, slot_width);
4648 break;
4649 default: /* unknown grid: */
4650 proto_tree_add_item(wavelength_tree, hf_rsvp_wavelength_channel_spacing, tvb, offset, 1, ENC_NA);
4651 proto_tree_add_item(wavelength_tree, hf_rsvp_wavelength_n, tvb, offset+2, 2, ENC_BIG_ENDIAN);
4652 proto_item_append_text(ti, ": Wavelength: grid=%u, channel spacing=%u, central frequenc=%d", grid, cs, n);
4653 break;
4654 }
4655 }
4656
4657 /*
4658 FF: SONET/SDH label, see RFC 4606
4659
4660 0 1 2 3
4661 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
4662 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4663 | S | U | K | L | M |
4664 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4665 */
4666 static void
dissect_glabel_sdh(proto_tree * ti _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset)4667 dissect_glabel_sdh(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
4668 tvbuff_t *tvb,
4669 int offset)
4670 {
4671 guint16 s;
4672 guint8 u, k, l, m;
4673 proto_tree* sonet_tree;
4674
4675 sonet_tree = proto_tree_add_subtree(rsvp_object_tree, tvb, offset, 4, TREE(TT_SONET_SDH), NULL, "SONET/SDH Label");
4676 proto_tree_add_item(sonet_tree, hf_rsvp_sonet_s, tvb, offset, 2, ENC_BIG_ENDIAN);
4677 proto_tree_add_item(sonet_tree, hf_rsvp_sonet_u, tvb, offset+2, 1, ENC_BIG_ENDIAN);
4678 proto_tree_add_item(sonet_tree, hf_rsvp_sonet_k, tvb, offset+2, 1, ENC_BIG_ENDIAN);
4679 proto_tree_add_item(sonet_tree, hf_rsvp_sonet_l, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4680 proto_tree_add_item(sonet_tree, hf_rsvp_sonet_m, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4681
4682 s = tvb_get_ntohs(tvb, offset);
4683 u = ((tvb_get_guint8(tvb, offset + 2) & 0xF0) >> 4);
4684 k = ((tvb_get_guint8(tvb, offset + 2) & 0x0F) >> 0);
4685 l = ((tvb_get_guint8(tvb, offset + 3) & 0xF0) >> 4);
4686 m = ((tvb_get_guint8(tvb, offset + 3) & 0x0F) >> 0);
4687 proto_item_append_text(ti, ": SONET/SDH: S=%u, U=%u, K=%u, L=%u, M=%u",
4688 s, u, k, l, m);
4689 }
4690
4691 /*
4692 FF: G.709 label (aka ODUk label), see RFC 4328
4693
4694 0 1 2 3
4695 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
4696 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4697 | Reserved | t3 | t2 |t1
4698 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4699 */
4700 static void
dissect_glabel_g709(proto_tree * ti _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset)4701 dissect_glabel_g709(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
4702 tvbuff_t *tvb,
4703 int offset)
4704 {
4705 guint8 t1, t2, t3;
4706 proto_tree* g709_tree;
4707
4708 g709_tree = proto_tree_add_subtree(rsvp_object_tree, tvb, offset, 4, TREE(TT_G709), NULL, "G.709 ODUk Label");
4709 proto_tree_add_item(g709_tree, hf_rsvp_g709_t3, tvb, offset+2, 2, ENC_BIG_ENDIAN);
4710 proto_tree_add_item(g709_tree, hf_rsvp_g709_t2, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4711 proto_tree_add_item(g709_tree, hf_rsvp_g709_t1, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4712
4713 t2 = ((tvb_get_guint8(tvb, offset + 3) & 0x0E) >> 1);
4714 t1 = ((tvb_get_guint8(tvb, offset + 3) & 0x01) >> 0);
4715 t3 = ((tvb_get_guint8(tvb, offset + 2) & 0x03) << 4);
4716 t3 |= ((tvb_get_guint8(tvb, offset + 3) & 0xF0) >> 4);
4717
4718 proto_item_append_text(ti, ": G.709 ODUk: "
4719 "t3=%u, "
4720 "t2=%u, "
4721 "t1=%u",
4722 t3, t2, t1);
4723 }
4724
4725 /*
4726 FF: EVPL Generalized Label, see RFC6004
4727 0 1
4728 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
4729 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4730 | Rsvd | VLAN ID |
4731 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4732 */
4733 static void
dissect_glabel_evpl(proto_tree * ti _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset)4734 dissect_glabel_evpl(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
4735 tvbuff_t *tvb,
4736 int offset)
4737 {
4738 int bit_offset;
4739 guint16 vlan_id = ((tvb_get_ntohs(tvb,offset) << 4) & 0xFFFF);
4740
4741 /* point to the first bit in VLAN ID */
4742 bit_offset = (offset<<2)+3;
4743 proto_tree_add_bits_item(rsvp_object_tree,hf_rsvp_label_generalized_label_evpl_vlad_id,tvb, bit_offset, 12, ENC_BIG_ENDIAN);
4744 proto_item_append_text(ti, ": EVPL Generalized Label: "
4745 "VLAN ID = %u" ,vlan_id);
4746 }
4747
4748 static void
dissect_rsvp_label(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class,int type)4749 dissect_rsvp_label(proto_tree *ti, proto_tree *rsvp_object_tree,
4750 tvbuff_t *tvb,
4751 int offset, int obj_length,
4752 int rsvp_class, int type)
4753 {
4754 int offset2 = offset + 4;
4755 int mylen, i;
4756 const char *name;
4757 proto_item *hidden_item;
4758 guint32 unassigned_upstream_label;
4759
4760 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4761 proto_item_set_hidden(hidden_item);
4762
4763 name = (rsvp_class==RSVP_CLASS_SUGGESTED_LABEL ? "SUGGESTED LABEL":
4764 (rsvp_class==RSVP_CLASS_UPSTREAM_LABEL ? "UPSTREAM LABEL":
4765 (rsvp_class==RSVP_CLASS_RECOVERY_LABEL ? "RECOVERY LABEL":
4766 "LABEL")));
4767 mylen = obj_length - 4;
4768 switch(type) {
4769 case 1:
4770 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_label, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4771 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_label, tvb, offset2, 4, ENC_BIG_ENDIAN);
4772 proto_item_set_text(ti, "%s: %u", name,
4773 tvb_get_ntohl(tvb, offset2));
4774 break;
4775
4776 case 2:
4777 unassigned_upstream_label = tvb_get_ntoh24(tvb, offset2);
4778 if(unassigned_upstream_label == 0xffffffff){ /* Unassigned upstream label, see RFC 8359 */
4779 proto_item_append_text(ti, ": Unassigned upstream label ( 0x%x )",unassigned_upstream_label);
4780 }
4781 else {
4782 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_label, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4783 if (rsvp_generalized_label_option == 1) { /* FF: no generalized label interpretation */
4784 proto_item_set_text(ti, "%s: Generalized: ", name);
4785 for (i = 0; i < mylen; i += 4) {
4786 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_generalized_label, tvb, offset2+i, 4, ENC_BIG_ENDIAN);
4787 if (i < 16) {
4788 proto_item_append_text(ti, "0x%x%s", tvb_get_ntohl(tvb, offset2+i), i+4<mylen?", ":"");
4789 }
4790 else if (i == 16) {
4791 proto_item_append_text(ti, "...");
4792 }
4793 }
4794 } else if (rsvp_generalized_label_option == 2) {
4795 dissect_glabel_sdh(ti, rsvp_object_tree, tvb, offset2);
4796 } else if (rsvp_generalized_label_option == 4) {
4797 dissect_glabel_g709(ti, rsvp_object_tree, tvb, offset2);
4798 } else if (rsvp_generalized_label_option == 3) {
4799 dissect_glabel_lambda(ti, rsvp_object_tree, tvb, offset2);
4800 } else if (rsvp_generalized_label_option == 5) {
4801 dissect_glabel_evpl(ti, rsvp_object_tree, tvb, offset2);
4802 }
4803 }
4804 break;
4805
4806 case 4:
4807 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_label, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4808 proto_item_append_text(ti, ": Generalized Channel_set");
4809 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_data, tvb, offset2, mylen, ENC_NA);
4810 break;
4811
4812 default:
4813 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_label, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4814 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_data, tvb, offset2, mylen, ENC_NA);
4815 break;
4816 }
4817 }
4818 /*------------------------------------------------------------------------------
4819 * LABEL_SET
4820 *------------------------------------------------------------------------------*/
4821 static const value_string action_type_vals[] = {
4822 { 0, "Inclusive list"},
4823 { 1, "Exclusive list"},
4824 { 2, "Inclusive range"},
4825 { 3, "Exclusive range"},
4826 { 0, NULL}
4827 };
4828
4829 static void
dissect_rsvp_label_set(proto_item * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type _U_)4830 dissect_rsvp_label_set(proto_item *ti, proto_tree *rsvp_object_tree,
4831 tvbuff_t *tvb,
4832 int offset, int obj_length,
4833 int rsvp_class _U_, int type _U_)
4834 {
4835 int offset2 = offset + 8;
4836 guint8 label_type;
4837 int len, i;
4838
4839 len = obj_length - 8;
4840 proto_item *hidden_item;
4841
4842 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4843 proto_item_set_hidden(hidden_item);
4844
4845 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_label_set, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4846 proto_tree_add_item(rsvp_object_tree, hf_rsvp_label_set_action, tvb, offset+4, 1, ENC_BIG_ENDIAN);
4847 proto_item_append_text(ti, ": %s",
4848 val_to_str(tvb_get_guint8(tvb, offset+4),
4849 action_type_vals, "Unknown (%u)"));
4850 label_type = tvb_get_guint8 (tvb, offset+7);
4851 proto_tree_add_uint_format_value(rsvp_object_tree, hf_rsvp_label_set_type, tvb, offset+7, 1, label_type,
4852 "%s", (label_type == 1) ? "Packet Label" : "Generalized Label");
4853 proto_item_append_text(ti, ", %s",
4854 (label_type == 1) ? "Packet Label: " : "Generalized Label: ");
4855
4856 for (i = 0; i < len/4; i++) {
4857 guint32 subchannel = tvb_get_ntohl(tvb, offset2+i*4);
4858 proto_tree_add_uint_format_value(rsvp_object_tree, hf_rsvp_label_set_subchannel, tvb, offset2+i*4, 4, subchannel,
4859 "Subchannel %u: %u (0x%x)", i+1, subchannel, subchannel);
4860
4861 if (i<5) {
4862 if (i!=0)
4863 proto_item_append_text(ti, ", ");
4864
4865 proto_item_append_text(ti, "%u",
4866 tvb_get_ntohl(tvb, offset2+i*4));
4867 }
4868 }
4869 }
4870
4871 /*------------------------------------------------------------------------------
4872 * SESSION ATTRIBUTE
4873 *------------------------------------------------------------------------------*/
4874 static void
dissect_rsvp_session_attribute(proto_item * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)4875 dissect_rsvp_session_attribute(proto_item *ti, proto_tree *rsvp_object_tree,
4876 tvbuff_t *tvb,
4877 int offset, int obj_length,
4878 int rsvp_class _U_, int type)
4879 {
4880 int offset2 = offset + 4;
4881 guint8 flags;
4882 guint8 name_len;
4883 proto_tree *ti2, *rsvp_sa_flags_tree;
4884 proto_item *hidden_item;
4885
4886 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4887 proto_item_set_hidden(hidden_item);
4888
4889 switch(type) {
4890 case 1:
4891 case 7:
4892
4893 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_attribute, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4894
4895 if (type == 1) {
4896 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_attribute_exclude_any, tvb, offset2, 4, ENC_BIG_ENDIAN);
4897 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_attribute_include_any, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
4898 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_attribute_include_all, tvb, offset2+8, 4, ENC_BIG_ENDIAN);
4899 offset2 = offset2+12;
4900 }
4901
4902 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_attribute_setup_priority, tvb, offset2, 1, ENC_BIG_ENDIAN);
4903 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_attribute_hold_priority, tvb, offset2+1, 1, ENC_BIG_ENDIAN);
4904 flags = tvb_get_guint8(tvb, offset2+2);
4905 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_attribute_flags, tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4906 rsvp_sa_flags_tree = proto_item_add_subtree(ti2,
4907 TREE(TT_SESSION_ATTRIBUTE_FLAGS));
4908 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_local,
4909 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4910 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_label,
4911 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4912 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_se_style,
4913 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4914 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_bandwidth,
4915 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4916 proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_node,
4917 tvb, offset2+2, 1, ENC_BIG_ENDIAN);
4918
4919 name_len = tvb_get_guint8(tvb, offset2+3);
4920 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_attribute_name_length, tvb, offset2+3, 1, ENC_BIG_ENDIAN);
4921 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_attribute_name, tvb, offset2+4, name_len, ENC_NA|ENC_ASCII);
4922 proto_item_set_text(ti, "SESSION ATTRIBUTE: SetupPrio %d, HoldPrio %d, %s%s%s%s%s [%s]",
4923 tvb_get_guint8(tvb, offset2),
4924 tvb_get_guint8(tvb, offset2+1),
4925 flags &0x01 ? "Local Protection, " : "",
4926 flags &0x02 ? "Label Recording, " : "",
4927 flags &0x04 ? "SE Style, " : "",
4928 flags &0x08 ? "Bandwidth Protection, " : "",
4929 flags &0x10 ? "Node Protection, " : "",
4930 name_len ? tvb_format_text(wmem_packet_scope(), tvb, offset2+4, name_len) : "");
4931 break;
4932
4933 default:
4934 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_attribute, tvb, offset+3, 1, ENC_BIG_ENDIAN);
4935 proto_tree_add_item(rsvp_object_tree, hf_rsvp_session_attribute_data, tvb, offset2, obj_length - 4, ENC_NA);
4936 break;
4937 }
4938 }
4939
4940 /*------------------------------------------------------------------------------
4941 * EXPLICIT ROUTE AND RECORD ROUTE SUBOBJECTS,
4942 * RFC 3209, RFC 3473, RFC 5420, RFC 4873, RFC 5553
4943 *------------------------------------------------------------------------------*/
4944 static void
dissect_rsvp_ro_subobjects(proto_tree * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class)4945 dissect_rsvp_ro_subobjects(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
4946 tvbuff_t *tvb,
4947 int offset, int obj_length, int rsvp_class)
4948 {
4949 int i, type, lbit, dbit, path_key, l, flags;
4950 proto_tree *ti2 = NULL, *rsvp_ro_subtree, *rsvp_rro_flags_subtree;
4951 int tree_type;
4952
4953 switch(rsvp_class) {
4954 case RSVP_CLASS_EXPLICIT_ROUTE:
4955 tree_type = TREE(TT_EXPLICIT_ROUTE_SUBOBJ);
4956 break;
4957 case RSVP_CLASS_RECORD_ROUTE:
4958 tree_type = TREE(TT_RECORD_ROUTE_SUBOBJ);
4959 break;
4960 case RSVP_CLASS_EXCLUDE_ROUTE:
4961 tree_type = TREE(TT_EXCLUDE_ROUTE_SUBOBJ);
4962 break;
4963 default:
4964 /* Bail out */
4965 return;
4966 }
4967 /* 0 1 2 3 */
4968 /* 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 */
4969 /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
4970 /* |L| Type | Length | Value... | */
4971 /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
4972
4973 for (i=1, l = 0; l < obj_length - 4; i++) {
4974 type = tvb_get_guint8(tvb, offset + l);
4975 if ((rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE) ||
4976 (rsvp_class == RSVP_CLASS_EXCLUDE_ROUTE))
4977 type &= 0x7f;
4978 lbit = tvb_get_guint8(tvb, offset + l) & 0x80;
4979 dbit = tvb_get_guint8(tvb, offset + l + 2) & 0x80;
4980 switch(type) {
4981 case 1: /* IPv4 */
4982 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
4983 offset+l, 8,
4984 tree_type, &ti2, "IPv4 Subobject - %s%s",
4985 tvb_ip_to_str(pinfo->pool, tvb, offset+l+2),
4986 rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE ?
4987 (lbit ? ", Loose" : ", Strict") : "");
4988
4989 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
4990 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_loose_hop, tvb, offset+l, 1, ENC_NA);
4991 if (rsvp_class == RSVP_CLASS_EXCLUDE_ROUTE){
4992 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_lbit, tvb, offset+l, 1, ENC_BIG_ENDIAN);
4993 }
4994 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type, tvb, offset+l, 1, type, "1 (IPv4)");
4995 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_length, tvb, offset+l+1, 1, ENC_BIG_ENDIAN);
4996 if(rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE || rsvp_class == RSVP_CLASS_RECORD_ROUTE){
4997 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_ipv4_hop, tvb, offset+l+2, 4, ENC_BIG_ENDIAN);
4998 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_prefix_length, tvb, offset+l+6, 1, ENC_BIG_ENDIAN);
4999 }
5000 if(rsvp_class == RSVP_CLASS_EXCLUDE_ROUTE){
5001 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_ipv4_addr, tvb, offset + l + 2, 4, ENC_BIG_ENDIAN);
5002 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_ipv4_prefix, tvb, offset + l + 6, 1, ENC_BIG_ENDIAN);
5003 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_ipv4_attr, tvb, offset + l + 7, 1, ENC_BIG_ENDIAN);
5004 }
5005 if (i < 4) {
5006 proto_item_append_text(ti, "IPv4 %s%s",
5007 tvb_ip_to_str(pinfo->pool, tvb, offset+l+2),
5008 lbit ? " [L]" : "");
5009 }
5010 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
5011 flags = tvb_get_guint8(tvb, offset+l+7);
5012 if (flags&0x20) {
5013 proto_item_append_text(ti, " (Node-id)");
5014 proto_item_append_text(ti2, " (Node-id)");
5015 }
5016 if (flags&0x01) proto_item_append_text(ti2, ", Local Protection Available");
5017 if (flags&0x02) proto_item_append_text(ti2, ", Local Protection In Use");
5018 if (flags&0x04) proto_item_append_text(ti2, ", Backup BW Avail");
5019 if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
5020 ti2 = proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_flags, tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
5021 rsvp_rro_flags_subtree =
5022 proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
5023 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_avail,
5024 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
5025 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_in_use,
5026 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
5027 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_bandwidth,
5028 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
5029 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_node,
5030 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
5031 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_node_address,
5032 tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
5033 }
5034
5035 break;
5036
5037 case 2: /* IPv6 */
5038 rsvp_ro_subtree = proto_tree_add_subtree(rsvp_object_tree, tvb,
5039 offset+l, 20, tree_type, &ti2,
5040 "IPv6 Subobject");
5041 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE){
5042 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_loose_hop, tvb, offset+l, 1, ENC_NA);
5043 }
5044
5045 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_lbit,
5046 tvb, offset + l, 1, ENC_BIG_ENDIAN);
5047 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type,
5048 tvb, offset+l, 1, type, "2 (IPv6)");
5049 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_length,
5050 tvb, offset+l+1, 1, ENC_BIG_ENDIAN);
5051 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_ipv6_hop,
5052 tvb, offset+l+2, 16, ENC_NA);
5053 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_prefix_length,
5054 tvb, offset+l+18, 1, ENC_BIG_ENDIAN);
5055 if(rsvp_class == RSVP_CLASS_EXCLUDE_ROUTE){
5056 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_ipv6_attr,
5057 tvb, offset + l + 19, 1, ENC_BIG_ENDIAN);
5058 }
5059 if (i < 4) {
5060 proto_item_append_text(ti, "IPv6 [...]%s", lbit ? " [L]":"");
5061 }
5062 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
5063 flags = tvb_get_guint8(tvb, offset+l+19);
5064 if (flags&0x20) {
5065 proto_item_append_text(ti, " (Node-id)");
5066 proto_item_append_text(ti2, " (Node-id)");
5067 }
5068 if (flags&0x01) proto_item_append_text(ti2, ", Local Protection Available");
5069 if (flags&0x02) proto_item_append_text(ti2, ", Local Protection In Use");
5070 if (flags&0x04) proto_item_append_text(ti2, ", Backup BW Avail");
5071 if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
5072 ti2 = proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_flags, tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
5073 rsvp_rro_flags_subtree =
5074 proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
5075
5076 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_avail,
5077 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
5078 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_in_use,
5079 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
5080 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_backup_tunnel_bandwidth,
5081 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
5082 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_backup_tunnel_hop,
5083 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
5084 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_node_address,
5085 tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
5086
5087 }
5088
5089 break;
5090
5091 case 3: /* Label RFC 3477 */
5092 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5093 offset+l, 8,
5094 tree_type, &ti2, "Label Subobject - %d, %s",
5095 tvb_get_ntohl(tvb, offset+l+4),
5096 rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE ?
5097 (lbit ? "Loose" : "Strict") : "");
5098 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
5099 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_loose_hop, tvb, offset+l, 1, ENC_NA);
5100
5101 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type, tvb, offset+l, 1,
5102 type, "3 (Label)");
5103 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_length, tvb, offset+l+1, 1, ENC_BIG_ENDIAN);
5104 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
5105 flags = tvb_get_guint8(tvb, offset+l+2);
5106 if (flags&0x01) proto_item_append_text(ti2, "The label will be understood if received on any interface");
5107 ti2 = proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_flags, tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
5108 rsvp_rro_flags_subtree =
5109 proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
5110
5111 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_global_label,
5112 tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
5113 }
5114 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ctype, tvb, offset+l+3, 1, ENC_BIG_ENDIAN);
5115 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_label, tvb, offset+l+4, 4, ENC_BIG_ENDIAN);
5116 if (i < 4) {
5117 proto_item_append_text(ti, "Label %d%s",
5118 tvb_get_ntohl(tvb, offset+l+4),
5119 lbit ? " [L]":"");
5120 }
5121 break;
5122
5123 case 4: /* Unnumbered Interface-ID RFC 3477, RFC 6107*/
5124 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5125 offset+l, 8, tree_type, &ti2,
5126 "Unnumbered Interface-ID - %s, %d, %s",
5127 tvb_ip_to_str(pinfo->pool, tvb, offset+l+4),
5128 tvb_get_ntohl(tvb, offset+l+8),
5129 rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE ?
5130 (lbit ? "Loose" : "Strict") : "");
5131 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
5132 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_loose_hop, tvb, offset+l, 1, ENC_NA);
5133
5134 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type, tvb, offset+l, 1,
5135 type, "4 (Unnumbered Interface-ID)");
5136 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_length, tvb, offset+l+1, 1, ENC_BIG_ENDIAN);
5137 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
5138 flags = tvb_get_guint8(tvb, offset+l+2);
5139 if (flags&0x01) proto_item_append_text(ti2, ", Local Protection Available");
5140 if (flags&0x02) proto_item_append_text(ti2, ", Local Protection In Use");
5141 ti2 = proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_flags, tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
5142 rsvp_rro_flags_subtree =
5143 proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
5144 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_avail,
5145 tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
5146 proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_in_use,
5147 tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
5148 }
5149 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_router_id, tvb, offset+l+4, 4, ENC_BIG_ENDIAN);
5150 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_interface_id, tvb, offset+l+8, 4, ENC_BIG_ENDIAN);
5151 if (i < 4) {
5152 proto_item_append_text(ti, "Unnum %s/%d%s",
5153 tvb_ip_to_str(pinfo->pool, tvb, offset+l+4),
5154 tvb_get_ntohl(tvb, offset+l+8),
5155 lbit ? " [L]":"");
5156 }
5157 break;
5158
5159 case 21:
5160
5161 case 32: /* AS */
5162 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE || rsvp_class == RSVP_CLASS_EXCLUDE_ROUTE) goto defaultsub;
5163 lbit = tvb_get_ntohs(tvb, offset+l+2);
5164 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5165 offset+l, 4, tree_type, &ti2,
5166 "Autonomous System %u",
5167 lbit);
5168 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type, tvb, offset+l, 1,
5169 type, "32 (Autonomous System Number)");
5170 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_length, tvb, offset+l+1, 1, ENC_BIG_ENDIAN);
5171 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_autonomous_system, tvb, offset+l+2, 2, ENC_BIG_ENDIAN);
5172 if (i < 4) {
5173 proto_item_append_text(ti, "AS %d",
5174 tvb_get_ntohs(tvb, offset+l+2));
5175 }
5176 break;
5177
5178
5179 case 34: /* SRLG subobject RFC 4874 */
5180 if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE) goto defaultsub;
5181 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE){
5182 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5183 offset + l, 8, tree_type, NULL,
5184 "SRLG Subobject - %u",
5185 tvb_get_ntohl(tvb, offset + l + 4));
5186
5187 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type,
5188 tvb, offset+l, 1,type, "34 (SRLG sub-object)");
5189 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_len,
5190 tvb, offset + l + 1, 1, ENC_BIG_ENDIAN);
5191 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_rro_sobj_dbit,
5192 tvb, offset + l+2, 1, ENC_BIG_ENDIAN);
5193 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_srlg_res,
5194 tvb, offset + l + 2, 2, ENC_BIG_ENDIAN);
5195 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_srlg_id,
5196 tvb, offset + l + 4, 4, ENC_BIG_ENDIAN);
5197
5198 if (i < 4) {
5199 proto_item_append_text(ti, "SRLG %u%s",
5200 tvb_get_ntohl(tvb, offset + l + 4),
5201 dbit ? " [D]" : "");
5202 }
5203 }
5204 else{
5205 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5206 offset + l, 8, tree_type, NULL,
5207 "SRLG Subobject - %u",
5208 tvb_get_ntohl(tvb, offset + l + 2));
5209 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_lbit,
5210 tvb, offset + l, 1, ENC_BIG_ENDIAN);
5211 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type,
5212 tvb, offset+l, 1,type, "34 (SRLG sub-object)");
5213 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_len,
5214 tvb, offset + l + 1, 1, ENC_BIG_ENDIAN);
5215 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_srlg_id,
5216 tvb, offset + l + 2, 4, ENC_BIG_ENDIAN);
5217 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_xro_sobj_srlg_res,
5218 tvb, offset + l + 6, 2, ENC_BIG_ENDIAN);
5219 if (i < 4) {
5220 proto_item_append_text(ti, "SRLG %u%s",
5221 tvb_get_ntohl(tvb, offset + l + 2),
5222 lbit ? " [L]" : "");
5223 }
5224 }
5225 break;
5226
5227 case 64: /* PKSv4 - RFC5520 */
5228 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE || rsvp_class == RSVP_CLASS_EXCLUDE_ROUTE) goto defaultsub;
5229 path_key = tvb_get_ntohs(tvb, offset+l+2);
5230 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5231 offset+l, 8, tree_type, &ti2,
5232 "Path Key subobject - %s, %u",
5233 tvb_ip_to_str(pinfo->pool, tvb, offset+l+4),
5234 path_key);
5235 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type, tvb, offset+l, 1,
5236 type, "64 (Path Key with IPv4 PCE-ID)");
5237 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_length, tvb, offset+l+1, 1, ENC_BIG_ENDIAN);
5238 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_path_key, tvb, offset+l+2, 2, ENC_BIG_ENDIAN);
5239 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_pce_id_ipv4, tvb, offset+l+4, 4, ENC_BIG_ENDIAN);
5240 if (i < 4) {
5241 proto_item_append_text(ti, "Path Key %d", path_key);
5242 }
5243 break;
5244
5245 case 65: /* PKSv6 - RFC5520 */
5246 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE || rsvp_class == RSVP_CLASS_EXCLUDE_ROUTE) goto defaultsub;
5247 path_key = tvb_get_ntohs(tvb, offset+l+2);
5248 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5249 offset+l, 8, tree_type, &ti2,
5250 "Path Key subobject - %s, %u",
5251 tvb_ip6_to_str(pinfo->pool, tvb, offset+l+4),
5252 path_key);
5253 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type, tvb, offset+l, 1,
5254 type, "65 (Path Key with IPv6 PCE-ID)");
5255 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_length, tvb, offset+l+1, 1, ENC_BIG_ENDIAN);
5256 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_path_key, tvb, offset+l+2, 2, ENC_BIG_ENDIAN);
5257 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_pce_id_ipv6, tvb, offset+l+4, 16, ENC_NA);
5258 if (i < 4) {
5259 proto_item_append_text(ti, "Path Key %d", path_key);
5260 }
5261 break;
5262
5263 case 124:
5264 case 125:
5265 case 126:
5266 case 127:
5267 /*
5268 * FF: Types 124 through 127 are to be reserved for Vendor
5269 * Private Use (see RFC 3936, Section 2.3.1) in case of
5270 * EXPLICIT_ROUTE (aka ERO).
5271 */
5272 if (rsvp_class == RSVP_CLASS_RECORD_ROUTE)
5273 goto defaultsub;
5274 else
5275 goto privatesub;
5276 break;
5277
5278 case 252:
5279 case 253:
5280 case 254:
5281 case 255:
5282 /*
5283 * FF: Types 252 through 255 are to be reserved for Vendor
5284 * Private Use (see RFC 3936, Section 2.3.1) in case of
5285 * RECORD_ROUTE (aka RRO).
5286 */
5287
5288 privatesub: /* Private subobject */
5289 /*
5290 * FF: The first four octets of the sub-object contents of
5291 * a Vendor Private sub-object of an EXPLICIT_ROUTE or
5292 * RECORD_ROUTE object MUST be that vendor's SMI enterprise
5293 * code in network octet order.
5294 */
5295 {
5296 guint8 private_so_len = tvb_get_guint8(tvb, offset+l+1);
5297 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb, offset+l,
5298 tvb_get_guint8(tvb, offset+l+1),
5299 tree_type, &ti2, "Private Subobject: %d", type);
5300 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_loose_hop, tvb, offset+l, 1, ENC_NA);
5301 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type, tvb, offset+l, 1,
5302 type, "%u (Private)", type);
5303 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_private_length, tvb, offset+l+1, 1, ENC_BIG_ENDIAN);
5304
5305 proto_tree_add_item(rsvp_ro_subtree,
5306 hf_rsvp_filter[RSVPF_ENT_CODE],
5307 tvb, offset+l+4, 4, ENC_BIG_ENDIAN);
5308 if (private_so_len > 8) {
5309 /* some private data */
5310 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_private_data, tvb, offset+l+8, private_so_len - 8, ENC_NA);
5311 }
5312 }
5313 break;
5314
5315 default: /* Unknown subobject */
5316 defaultsub:
5317 rsvp_ro_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5318 offset+l,
5319 tvb_get_guint8(tvb, offset+l+1),
5320 tree_type, &ti2, "Unknown subobject: %d", type);
5321 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_loose_hop, tvb, offset+l, 1, ENC_NA);
5322
5323 proto_tree_add_uint_format_value(rsvp_ro_subtree, hf_rsvp_type, tvb, offset+l, 1,
5324 type, "%u (Unknown)", type);
5325 proto_tree_add_item(rsvp_ro_subtree, hf_rsvp_ero_rro_subobjects_length, tvb, offset+l+1, 1, ENC_BIG_ENDIAN);
5326 break;
5327 }
5328
5329 if (tvb_get_guint8(tvb, offset+l+1) < 1) {
5330 proto_tree_add_expert_format(rsvp_ro_subtree, pinfo, &ei_rsvp_invalid_length, tvb, offset+l+1, 1,
5331 "Invalid length: %u", tvb_get_guint8(tvb, offset+l+1));
5332 return;
5333 }
5334 l += tvb_get_guint8(tvb, offset+l+1);
5335 if (l < obj_length - 4) {
5336 if (i < 4)
5337 proto_item_append_text(ti, ", ");
5338 else if (i==4)
5339 proto_item_append_text(ti, "...");
5340 }
5341 }
5342 }
5343
5344
5345
5346 /*------------------------------------------------------------------------------
5347 * EXPLICIT ROUTE OBJECT
5348 *------------------------------------------------------------------------------*/
5349 static void
dissect_rsvp_explicit_route(proto_item * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class,int type)5350 dissect_rsvp_explicit_route(proto_item *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
5351 tvbuff_t *tvb,
5352 int offset, int obj_length,
5353 int rsvp_class, int type)
5354 {
5355 proto_item *hidden_item;
5356
5357 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5358 proto_item_set_hidden(hidden_item);
5359
5360 switch(type) {
5361 case 1:
5362 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_explicit_route, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5363 proto_item_set_text(ti, "EXPLICIT ROUTE: ");
5364
5365 dissect_rsvp_ro_subobjects(ti, pinfo, rsvp_object_tree, tvb,
5366 offset + 4, obj_length, rsvp_class);
5367 break;
5368
5369 default:
5370 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_explicit_route, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5371 proto_tree_add_item(rsvp_object_tree, hf_rsvp_explicit_route_data, tvb, offset+4, obj_length - 4, ENC_NA);
5372 break;
5373 }
5374 }
5375
5376 /*------------------------------------------------------------------------------
5377 * RECORD ROUTE OBJECT
5378 *------------------------------------------------------------------------------*/
5379 static void
dissect_rsvp_record_route(proto_item * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class,int type)5380 dissect_rsvp_record_route(proto_item *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
5381 tvbuff_t *tvb,
5382 int offset, int obj_length,
5383 int rsvp_class, int type)
5384 {
5385 proto_item *hidden_item;
5386
5387 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5388 proto_item_set_hidden(hidden_item);
5389
5390 proto_item_set_text(ti, "RECORD ROUTE: ");
5391 switch(type) {
5392 case 1:
5393 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_record_route, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5394
5395 dissect_rsvp_ro_subobjects(ti, pinfo, rsvp_object_tree, tvb,
5396 offset + 4, obj_length, rsvp_class);
5397 break;
5398
5399 default:
5400 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_record_route, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5401 proto_tree_add_item(rsvp_object_tree, hf_rsvp_record_route_data, tvb, offset+4, obj_length - 4, ENC_NA);
5402 break;
5403 }
5404 }
5405
5406 /*------------------------------------------------------------------------------
5407 * EXCLUDE ROUTE OBJECT
5408 *------------------------------------------------------------------------------*/
5409 static void
dissect_rsvp_exclude_route(proto_item * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class,int ctype)5410 dissect_rsvp_exclude_route(proto_item *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
5411 tvbuff_t *tvb, int offset, int obj_length,
5412 int rsvp_class, int ctype)
5413 {
5414 proto_item *hidden_item;
5415
5416 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5417 proto_item_set_hidden(hidden_item);
5418
5419 proto_item_set_text(ti, "EXCLUDE ROUTE: ");
5420 switch (ctype) {
5421 case 1:
5422 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_exclude_route, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
5423 dissect_rsvp_ro_subobjects(ti, pinfo, rsvp_object_tree, tvb,
5424 offset + 4, obj_length, rsvp_class);
5425 break;
5426
5427 default:
5428 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_exclude_route, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
5429 proto_tree_add_item(rsvp_object_tree, hf_rsvp_exclude_route_data, tvb, offset + 4, obj_length - 4, ENC_NA);
5430 break;
5431 }
5432 }
5433
5434 /*------------------------------------------------------------------------------
5435 * MESSAGE ID
5436 *------------------------------------------------------------------------------*/
5437 static void
dissect_rsvp_message_id(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)5438 dissect_rsvp_message_id(proto_tree *ti, proto_tree *rsvp_object_tree,
5439 tvbuff_t *tvb,
5440 int offset, int obj_length,
5441 int rsvp_class _U_, int type)
5442 {
5443 int offset2 = offset + 4;
5444 proto_item *hidden_item;
5445
5446 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5447 proto_item_set_hidden(hidden_item);
5448
5449 switch(type) {
5450 case 1:
5451 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_message_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5452 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_flags, tvb, offset+4, 1, ENC_BIG_ENDIAN);
5453 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_epoch, tvb, offset+5, 3, ENC_BIG_ENDIAN);
5454 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_message_id, tvb, offset+8, 4, ENC_BIG_ENDIAN);
5455 proto_item_set_text(ti, "MESSAGE-ID: %d %s",
5456 tvb_get_ntohl(tvb, offset+8),
5457 tvb_get_guint8(tvb, offset+4) & 1 ? "(Ack Desired)" : "");
5458 break;
5459
5460 default:
5461 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_message_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5462 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_data, tvb, offset2, obj_length - 4, ENC_NA);
5463 break;
5464 }
5465 }
5466
5467 /*------------------------------------------------------------------------------
5468 * MESSAGE ID ACK
5469 *------------------------------------------------------------------------------*/
5470 static void
dissect_rsvp_message_id_ack(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)5471 dissect_rsvp_message_id_ack(proto_tree *ti, proto_tree *rsvp_object_tree,
5472 tvbuff_t *tvb,
5473 int offset, int obj_length,
5474 int rsvp_class _U_, int type)
5475 {
5476 int offset2 = offset + 4;
5477
5478 switch(type) {
5479 case 1:
5480 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_message_id_ack, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5481 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_ack_flags, tvb, offset+4, 1, ENC_BIG_ENDIAN);
5482 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_ack_epoch, tvb, offset+5, 3, ENC_BIG_ENDIAN);
5483 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_ack_message_id, tvb, offset+8, 4, ENC_BIG_ENDIAN);
5484 proto_item_set_text(ti, "MESSAGE-ID ACK: %d", tvb_get_ntohl(tvb, offset+8));
5485 break;
5486
5487 case 2:
5488 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_message_id_ack, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5489 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_ack_flags, tvb, offset+4, 1, ENC_BIG_ENDIAN);
5490 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_ack_epoch, tvb, offset+5, 3, ENC_BIG_ENDIAN);
5491 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_ack_message_id, tvb, offset+8, 4, ENC_BIG_ENDIAN);
5492 proto_item_set_text(ti, "MESSAGE-ID NACK: %d", tvb_get_ntohl(tvb, offset+8));
5493 break;
5494
5495 default:
5496 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_message_id_ack, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5497 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_ack_data, tvb, offset2, obj_length - 4, ENC_NA);
5498 break;
5499 }
5500 }
5501
5502 /*------------------------------------------------------------------------------
5503 * MESSAGE ID LIST
5504 *------------------------------------------------------------------------------*/
5505 static void
dissect_rsvp_message_id_list(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)5506 dissect_rsvp_message_id_list(proto_tree *ti, proto_tree *rsvp_object_tree,
5507 tvbuff_t *tvb,
5508 int offset, int obj_length,
5509 int rsvp_class _U_, int type)
5510 {
5511 int offset2 = offset + 4;
5512 int mylen;
5513 proto_item *hidden_item;
5514
5515 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5516 proto_item_set_hidden(hidden_item);
5517
5518 switch(type) {
5519 case 1:
5520 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_message_id_list, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5521 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_list_flags, tvb, offset+4, 1, ENC_BIG_ENDIAN);
5522 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_list_epoch, tvb, offset+5, 3, ENC_BIG_ENDIAN);
5523 for (mylen = 8; mylen < obj_length; mylen += 4)
5524 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_list_message_id, tvb, offset+mylen, 4, ENC_BIG_ENDIAN);
5525 proto_item_set_text(ti, "MESSAGE-ID LIST: %d IDs",
5526 (obj_length - 8)/4);
5527 break;
5528
5529 default:
5530 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_message_id_list, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5531 proto_tree_add_item(rsvp_object_tree, hf_rsvp_message_id_list_data, tvb, offset2, obj_length - 4, ENC_NA);
5532 break;
5533 }
5534 }
5535
5536 /*------------------------------------------------------------------------------
5537 * HELLO
5538 *------------------------------------------------------------------------------*/
5539 static void
dissect_rsvp_hello(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length _U_,int rsvp_class _U_,int type)5540 dissect_rsvp_hello(proto_tree *ti, proto_tree *rsvp_object_tree,
5541 tvbuff_t *tvb,
5542 int offset, int obj_length _U_,
5543 int rsvp_class _U_, int type)
5544 {
5545 proto_item *hidden_item;
5546
5547 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5548 proto_item_set_hidden(hidden_item);
5549
5550 switch(type) {
5551 case 1:
5552 case 2:
5553 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_hello, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5554 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hello_source_instance, tvb, offset+4, 4, ENC_BIG_ENDIAN);
5555 proto_tree_add_item(rsvp_object_tree, hf_rsvp_hello_destination_instance, tvb, offset+8, 4, ENC_BIG_ENDIAN);
5556 proto_item_append_text(ti, ": %s. Src Instance: 0x%0x. Dest Instance: 0x%0x. ",
5557 type==1 ? "REQUEST" : "ACK",
5558 tvb_get_ntohl(tvb, offset+4),
5559 tvb_get_ntohl(tvb, offset+8));
5560 break;
5561 default:
5562 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_hello, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5563 break;
5564 };
5565 }
5566
5567 /*------------------------------------------------------------------------------
5568 * DCLASS
5569 *------------------------------------------------------------------------------*/
5570 static void
dissect_rsvp_dclass(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)5571 dissect_rsvp_dclass(proto_tree *ti, proto_tree *rsvp_object_tree,
5572 tvbuff_t *tvb,
5573 int offset, int obj_length,
5574 int rsvp_class _U_, int type)
5575 {
5576 int offset2 = offset + 4;
5577 int mylen;
5578 proto_item *hidden_item;
5579
5580 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5581 proto_item_set_hidden(hidden_item);
5582
5583 proto_item_set_text(ti, "DCLASS: ");
5584 switch(type) {
5585 case 1:
5586 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_dclass, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5587 for (mylen = 4; mylen < obj_length; mylen += 4) {
5588 proto_tree_add_item(rsvp_object_tree, hf_rsvp_dclass_dscp, tvb, offset+mylen+3, 1, ENC_BIG_ENDIAN);
5589 proto_item_append_text(ti, "%d%s",
5590 tvb_get_guint8(tvb, offset+mylen+3)>>2,
5591 mylen==obj_length-4 ? "":
5592 mylen<16 ? ", ":
5593 mylen==16 ? ", ..." : "");
5594 }
5595 break;
5596
5597 default:
5598 mylen = obj_length - 4;
5599 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_dclass, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5600 proto_tree_add_item(rsvp_object_tree, hf_rsvp_dclass_data, tvb, offset2, mylen, ENC_NA);
5601 break;
5602 }
5603 }
5604
5605 /*------------------------------------------------------------------------------
5606 * ADMINISTRATIVE STATUS
5607 *------------------------------------------------------------------------------*/
5608 static void
dissect_rsvp_admin_status(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)5609 dissect_rsvp_admin_status(proto_tree *ti, proto_tree *rsvp_object_tree,
5610 tvbuff_t *tvb,
5611 int offset, int obj_length,
5612 int rsvp_class _U_, int type)
5613 {
5614 int offset2 = offset + 4;
5615 guint32 status;
5616 static int * const status_flags[] = {
5617 &hf_rsvp_filter[RSVPF_ADMIN_STATUS_REFLECT],
5618 &hf_rsvp_filter[RSVPF_ADMIN_STATUS_HANDOVER],
5619 &hf_rsvp_filter[RSVPF_ADMIN_STATUS_LOCKOUT],
5620 &hf_rsvp_filter[RSVPF_ADMIN_STATUS_INHIBIT],
5621 &hf_rsvp_filter[RSVPF_ADMIN_STATUS_CALL_MGMT],
5622 &hf_rsvp_filter[RSVPF_ADMIN_STATUS_TESTING],
5623 &hf_rsvp_filter[RSVPF_ADMIN_STATUS_DOWN],
5624 &hf_rsvp_filter[RSVPF_ADMIN_STATUS_DELETE],
5625 NULL
5626 };
5627 proto_item *hidden_item;
5628
5629 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5630 proto_item_set_hidden(hidden_item);
5631
5632 proto_item_set_text(ti, "ADMIN STATUS: ");
5633 switch(type) {
5634 case 1:
5635 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_admin_status, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5636 status = tvb_get_ntohl(tvb, offset2);
5637
5638 proto_tree_add_bitmask(rsvp_object_tree, tvb, offset2, hf_rsvp_admin_status_bits, TREE(TT_ADMIN_STATUS_FLAGS), status_flags, ENC_BIG_ENDIAN);
5639
5640 proto_item_set_text(ti, "ADMIN-STATUS: %s%s%s%s%s%s%s%s",
5641 (status & (1U<<31)) ? "Reflect " : "",
5642 (status & (1U<<6)) ? "Handover " : "",
5643 (status & (1U<<5)) ? "Lockout " : "",
5644 (status & (1U<<4)) ? "Inhibit " : "",
5645 (status & (1U<<3)) ? "Call " : "",
5646 (status & (1U<<2)) ? "Testing " : "",
5647 (status & (1U<<1)) ? "Admin-Down " : "",
5648 (status & (1U<<0)) ? "Deleting " : "");
5649 break;
5650
5651 default:
5652 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_admin_status, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5653 proto_tree_add_item(rsvp_object_tree, hf_rsvp_admin_status_data, tvb, offset2, obj_length - 4, ENC_NA);
5654 break;
5655 }
5656 }
5657
5658 /*------------------------------------------------------------------------------
5659 * LSP ATTRIBUTES
5660 *------------------------------------------------------------------------------*/
5661 static void
dissect_rsvp_lsp_attributes(proto_tree * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class,int type)5662 dissect_rsvp_lsp_attributes(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
5663 tvbuff_t *tvb, int offset, int obj_length,
5664 int rsvp_class, int type)
5665 {
5666 int tlv_off;
5667 guint32 attributes;
5668 guint16 tlv_type, tlv_len;
5669 proto_tree *ti2, *rsvp_lsp_attr_subtree;
5670 static int * const rsvp_lsp_attr_flags[] = {
5671 &hf_rsvp_lsp_attr_e2e,
5672 &hf_rsvp_lsp_attr_boundary,
5673 &hf_rsvp_lsp_attr_segment,
5674 &hf_rsvp_lsp_attr_integrity,
5675 &hf_rsvp_lsp_attr_contiguous,
5676 &hf_rsvp_lsp_attr_stitching,
5677 &hf_rsvp_lsp_attr_preplanned,
5678 &hf_rsvp_lsp_attr_nophp,
5679 &hf_rsvp_lsp_attr_oobmap,
5680 &hf_rsvp_lsp_attr_entropy,
5681 &hf_rsvp_lsp_attr_oammep,
5682 &hf_rsvp_lsp_attr_oammip,
5683 &hf_rsvp_lsp_attr_srlgcollect,
5684 &hf_rsvp_lsp_attr_loopback,
5685 &hf_rsvp_lsp_attr_p2mp,
5686 &hf_rsvp_lsp_attr_rtm,
5687 &hf_rsvp_lsp_attr_telinklabel,
5688 &hf_rsvp_lsp_attr_lsi,
5689 &hf_rsvp_lsp_attr_lsids2e,
5690 NULL
5691 };
5692 proto_item *hidden_item;
5693
5694 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5695 proto_item_set_hidden(hidden_item);
5696
5697 if (rsvp_class == RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES)
5698 proto_item_set_text(ti, "LSP REQUIRED ATTRIBUTES: ");
5699 else
5700 proto_item_set_text(ti, "LSP ATTRIBUTES: ");
5701
5702 switch(type) {
5703 case 1:
5704 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_lsp_attributes, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5705 for (tlv_off = 4; tlv_off < obj_length-4; ) {
5706 tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
5707 tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);
5708
5709 if ((tlv_len == 0) || (tlv_off+tlv_len > obj_length)) {
5710 proto_tree_add_expert(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length, tvb, offset+tlv_off+2, 2);
5711 return;
5712 }
5713 switch(tlv_type) {
5714 case 1:
5715 attributes = tvb_get_ntohl(tvb, offset+tlv_off+4);
5716 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_attributes_tlv, tvb, offset+tlv_off, 4, ENC_BIG_ENDIAN);
5717 rsvp_lsp_attr_subtree = proto_item_add_subtree(ti2, TREE(TT_LSP_ATTRIBUTES_FLAGS));
5718 proto_tree_add_bitmask(rsvp_lsp_attr_subtree, tvb, offset+tlv_off+4, hf_rsvp_lsp_attr, ett_treelist[TT_RSVP_LSP_ATTR], rsvp_lsp_attr_flags, ENC_NA);
5719 proto_item_append_text(ti, "LSP Attribute:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
5720 (attributes & 0x80000000) ? " End-to-end re-routing" : "",
5721 (attributes & 0x40000000) ? " Boundary re-routing" : "",
5722 (attributes & 0x20000000) ? " Segment-based re-routing" : "",
5723 (attributes & 0x10000000) ? " LSP Integrity Required" : "",
5724 (attributes & 0x08000000) ? " Contiguous LSP" : "",
5725 (attributes & 0x04000000) ? " LSP stitching desired" : "",
5726 (attributes & 0x02000000) ? " Pre-Planned LSP Flag" : "",
5727 (attributes & 0x01000000) ? " Non-PHP behavior flag" : "",
5728 (attributes & 0x00800000) ? " OOB mapping flag" : "",
5729 (attributes & 0x00400000) ? " Entropy Label Capability" : "",
5730 (attributes & 0x00200000) ? " OAM MEP entities desired" : "",
5731 (attributes & 0x00100000) ? " OAM MIP entities desired" : "",
5732 (attributes & 0x00080000) ? " SRLG Collection Flag" : "",
5733 (attributes & 0x00040000) ? " Loopback" : "",
5734 (attributes & 0x00020000) ? " P2MP-TE Tree Re-evaluation Request" : "",
5735 (attributes & 0x00010000) ? " RTM_SET" : "",
5736 (attributes & 0x00008000) ? " TE Link Label" : "",
5737 (attributes & 0x00004000) ? " LSI-D" : "",
5738 (attributes & 0x00002000) ? " LSI-D-S2E" : "");
5739
5740 break;
5741
5742 default:
5743 proto_tree_add_uint_format(rsvp_object_tree, hf_rsvp_type, tvb, offset+tlv_off, tlv_len,
5744 tlv_type, "Unknown TLV: %d", tlv_type);
5745 break;
5746 }
5747 tlv_off += tlv_len;
5748 }
5749 break;
5750
5751 default:
5752 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_lsp_attributes, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5753 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_attributes_tlv_data, tvb, offset+4, obj_length - 4, ENC_NA);
5754 break;
5755 }
5756 }
5757
5758 /*------------------------------------------------------------------------------
5759 * ASSOCIATION
5760 *------------------------------------------------------------------------------*/
5761 static const value_string association_type_vals[] = {
5762 { 0, "Reserved"},
5763 { 1, "Recovery"},
5764 { 2, "Resource Sharing"},
5765 { 3, "Segment Recovery"},
5766 { 4, "Inter-domain Recovery"},
5767 { 0, NULL}
5768 };
5769
5770 static void
dissect_rsvp_association(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)5771 dissect_rsvp_association(proto_tree *ti, proto_tree *rsvp_object_tree,
5772 tvbuff_t *tvb,
5773 int offset, int obj_length,
5774 int rsvp_class _U_, int type)
5775 {
5776 guint16 association_type;
5777 guint16 association_id;
5778 proto_item *hidden_item;
5779
5780 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5781 proto_item_set_hidden(hidden_item);
5782
5783 proto_item_set_text(ti, "ASSOCIATION ");
5784 association_type = tvb_get_ntohs (tvb, offset + 4);
5785 association_id = tvb_get_ntohs (tvb, offset + 6);
5786 switch(type) {
5787 case 1:
5788 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_association, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5789 proto_item_append_text(ti, "(IPv4): ");
5790 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_type, tvb, offset+4, 2, ENC_BIG_ENDIAN);
5791 proto_item_append_text(ti, "%s. ",
5792 val_to_str(association_type, association_type_vals, "Unknown (%u)"));
5793 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_id, tvb, offset+6, 2, ENC_BIG_ENDIAN);
5794 proto_item_append_text(ti, "ID: %u. ", association_id);
5795 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_source_ipv4, tvb, offset+8, 4, ENC_BIG_ENDIAN);
5796 proto_item_append_text(ti, "Src: %s", tvb_ip_to_str(wmem_packet_scope(), tvb, offset+8));
5797 break;
5798
5799 case 2:
5800 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_association, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5801 proto_item_append_text(ti, "(IPv6): ");
5802 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_type, tvb, offset+4, 2, ENC_BIG_ENDIAN);
5803 proto_item_append_text(ti, "%s. ",
5804 val_to_str(association_type, association_type_vals, "Unknown (%u)"));
5805 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_id, tvb, offset+6, 2, ENC_BIG_ENDIAN);
5806 proto_item_append_text(ti, "ID: %u. ", association_id);
5807 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_source_ipv6, tvb, offset+8, 16, ENC_NA);
5808 proto_item_append_text(ti, "Src: %s", tvb_ip6_to_str(wmem_packet_scope(), tvb, offset+8));
5809 break;
5810
5811 case 4: /* oif2008.389 */
5812 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_association, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5813 proto_item_append_text(ti, "(Routing Area): ");
5814 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_type, tvb, offset+4, 2, ENC_BIG_ENDIAN);
5815 proto_item_append_text(ti, "%s. ",
5816 val_to_str(association_type, association_type_vals, "Unknown (%u)"));
5817 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_id, tvb, offset+6, 2, ENC_BIG_ENDIAN);
5818 proto_item_append_text(ti, "Association ID: %u, ", association_id);
5819 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_routing_area_id, tvb, offset+8, 4, ENC_BIG_ENDIAN);
5820 proto_item_append_text(ti, "Routing Area ID: %u, ", tvb_get_ntohl (tvb, offset+8));
5821 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_node_id, tvb, offset+12, 4, ENC_BIG_ENDIAN);
5822 proto_item_append_text(ti, "Node ID: %s", tvb_ip_to_str(wmem_packet_scope(), tvb, offset+12));
5823 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_padding, tvb, offset+8, 16, ENC_NA);
5824 break;
5825
5826 default:
5827 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_association, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5828 proto_tree_add_item(rsvp_object_tree, hf_rsvp_association_data, tvb, offset+4, obj_length - 4, ENC_NA);
5829 break;
5830 }
5831 }
5832 /*------------------------------------------------------------------------------
5833 * TLVs for LSP TUNNEL IF ID object
5834 * draft-ietf-ccamp-lsp-hierarchy-bis-02
5835 *------------------------------------------------------------------------------*/
5836 static void
dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree * rsvp_object_tree,packet_info * pinfo,tvbuff_t * tvb,int offset,int tlv_length,int subtree_type)5837 dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree, packet_info* pinfo,
5838 tvbuff_t *tvb, int offset, int tlv_length,
5839 int subtree_type)
5840 {
5841 int tlv_off;
5842 guint16 tlv_type;
5843 int tlv_len;
5844 proto_tree *ti, *rsvp_lsp_tunnel_if_id_subtree;
5845
5846 for (tlv_off = 0; tlv_off < tlv_length; ) {
5847 tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
5848 tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);
5849
5850 if ((tlv_len == 0) || ((tlv_off+tlv_len) > tlv_length)) {
5851 proto_tree_add_expert(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length, tvb, offset+tlv_off+2, 2);
5852 return;
5853 }
5854 switch(tlv_type) {
5855 case 1:
5856 rsvp_lsp_tunnel_if_id_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5857 offset+tlv_off, tlv_len, subtree_type, NULL,
5858 "Unnumbered component link identifier: %u",
5859 tvb_get_ntohl(tvb, offset+tlv_off+4));
5860 proto_tree_add_uint_format_value(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
5861 tlv_type, "1 (Unnumbered component link identifier)");
5862 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
5863 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_component_link_identifier, tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
5864 break;
5865
5866 case 2:
5867 rsvp_lsp_tunnel_if_id_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5868 offset+tlv_off, tlv_len, subtree_type, NULL,
5869 "IPv4 component link identifier: %s",
5870 tvb_ip_to_str(pinfo->pool, tvb, offset+tlv_off+4));
5871 proto_tree_add_uint_format_value(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
5872 tlv_type, "2 (IPv4 component link identifier)");
5873 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
5874 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_component_link_identifier_ipv4, tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
5875 break;
5876
5877 case 32769: /* oif-p0040.002.09 demo spec */
5878 rsvp_lsp_tunnel_if_id_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
5879 offset+tlv_off, tlv_len, subtree_type, &ti,
5880 "Targeted client layer: ");
5881 proto_tree_add_uint_format_value(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_type, tvb, offset+tlv_off, 2,
5882 tlv_type, "32769 (Targeted client layer)");
5883 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_length, tvb, offset+tlv_off+2, 2, ENC_BIG_ENDIAN);
5884 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_lsp_encoding_type, tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
5885 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_switching_type, tvb, offset+tlv_off+5, 1, ENC_BIG_ENDIAN);
5886 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_signal_type, tvb, offset+tlv_off+6, 1, ENC_BIG_ENDIAN);
5887 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_connection_id, tvb, offset+tlv_off+8, 8, ENC_BIG_ENDIAN);
5888 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_sc_pc_id, tvb, offset+tlv_off+16, 4, ENC_BIG_ENDIAN);
5889 proto_tree_add_item(rsvp_lsp_tunnel_if_id_subtree, hf_rsvp_lsp_tunnel_if_id_sc_pc_scn_address, tvb, offset+tlv_off+20, 4, ENC_BIG_ENDIAN);
5890 proto_item_append_text(ti, "LSP Encoding=%s, Switching Type=%s, Signal Type=%s",
5891 rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+4),
5892 gmpls_lsp_enc_rvals, "Unknown (%d)"),
5893 rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+5),
5894 gmpls_switching_type_rvals, "Unknown (%d)"),
5895 val_to_str_ext(tvb_get_guint8(tvb,offset+tlv_off+6),
5896 &gmpls_sonet_signal_type_str_ext, "Unknown (%d)"));
5897 break;
5898
5899 default:
5900 proto_tree_add_uint_format(rsvp_object_tree, hf_rsvp_type, tvb, offset+tlv_off, 2,
5901 tlv_type, "Unknown TLV: %u", tlv_type);
5902 break;
5903 }
5904 tlv_off += tlv_len;
5905 }
5906 }
5907
5908 /*------------------------------------------------------------------------------
5909 * LSP TUNNEL INTERFACE ID
5910 *------------------------------------------------------------------------------*/
5911 static const value_string lsp_tunnel_if_id_action_str[] = {
5912 { 0, "LSP is FA (MPLS-TE topology advertisement only)"},
5913 { 1, "LSP is RA (IP network advertisement only)"},
5914 { 2, "LSP is RA (both IP and MPLS-TE topology advertisement)"},
5915 { 3, "LSP is to be used as a virtual local link"},
5916 { 0, NULL}
5917 };
5918
5919 static void
dissect_rsvp_lsp_tunnel_if_id(proto_tree * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)5920 dissect_rsvp_lsp_tunnel_if_id(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
5921 tvbuff_t *tvb,
5922 int offset, int obj_length,
5923 int rsvp_class _U_, int type)
5924 {
5925 proto_item *hidden_item;
5926
5927 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5928 proto_item_set_hidden(hidden_item);
5929
5930 proto_item_set_text(ti, "LSP INTERFACE-ID: ");
5931 switch(type) {
5932 case 1:
5933 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tunnel_if_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5934 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_router_id, tvb, offset+4, 4, ENC_BIG_ENDIAN);
5935 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_interface_id, tvb, offset+8, 4, ENC_BIG_ENDIAN);
5936 proto_item_set_text(ti, "LSP INTERFACE-ID: Unnumbered, Router-ID %s, Interface-ID %d",
5937 tvb_ip_to_str(pinfo->pool, tvb, offset+4),
5938 tvb_get_ntohl(tvb, offset+8));
5939 break;
5940
5941 case 2:
5942 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tunnel_if_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5943 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_ipv4_interface_address, tvb, offset+4, 4, ENC_BIG_ENDIAN);
5944 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_target_igp_instance, tvb, offset+8, 4, ENC_BIG_ENDIAN);
5945 proto_item_set_text(ti, "LSP INTERFACE-ID: IPv4, interface address %s,"
5946 "IGP instance %s",
5947 tvb_ip_to_str(pinfo->pool, tvb, offset+4),
5948 tvb_ip_to_str(pinfo->pool, tvb, offset+8));
5949 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_action, tvb, offset+12, 1, ENC_BIG_ENDIAN);
5950 dissect_rsvp_lsp_tunnel_if_id_tlv(rsvp_object_tree, pinfo, tvb, offset+16, obj_length-16,
5951 TREE(TT_LSP_TUNNEL_IF_ID_SUBTREE));
5952 break;
5953
5954 case 3:
5955 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tunnel_if_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5956 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_ipv6_interface_address, tvb, offset+4, 16, ENC_NA);
5957 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_target_igp_instance, tvb, offset+20, 4, ENC_BIG_ENDIAN);
5958 proto_item_set_text(ti, "LSP INTERFACE-ID: IPv6, interface address %s,"
5959 "IGP instance %s",
5960 tvb_ip6_to_str(pinfo->pool, tvb, offset+4),
5961 tvb_ip_to_str(pinfo->pool, tvb, offset+20));
5962 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_action, tvb, offset+24, 1, ENC_BIG_ENDIAN);
5963 dissect_rsvp_lsp_tunnel_if_id_tlv(rsvp_object_tree, pinfo, tvb, offset+28, obj_length-28,
5964 TREE(TT_LSP_TUNNEL_IF_ID_SUBTREE));
5965 break;
5966
5967 case 4:
5968 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tunnel_if_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5969 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_router_id, tvb, offset+4, 4, ENC_BIG_ENDIAN);
5970 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_interface_id, tvb, offset+8, 4, ENC_BIG_ENDIAN);
5971 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_target_igp_instance, tvb, offset+12, 4, ENC_BIG_ENDIAN);
5972 proto_item_set_text(ti, "LSP INTERFACE-ID: Unnumbered with target, Router-ID %s,"
5973 " Interface-ID %d, IGP instance %s",
5974 tvb_ip_to_str(pinfo->pool, tvb, offset+4),
5975 tvb_get_ntohl(tvb, offset+8),
5976 tvb_ip_to_str(pinfo->pool, tvb, offset+12));
5977 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_action, tvb, offset+16, 1, ENC_BIG_ENDIAN);
5978 dissect_rsvp_lsp_tunnel_if_id_tlv(rsvp_object_tree, pinfo, tvb, offset+20, obj_length-20,
5979 TREE(TT_LSP_TUNNEL_IF_ID_SUBTREE));
5980 break;
5981
5982 default:
5983 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_tunnel_if_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
5984 proto_tree_add_item(rsvp_object_tree, hf_rsvp_lsp_tunnel_if_id_data, tvb, offset+4, obj_length-4, ENC_NA);
5985 break;
5986 }
5987 }
5988
5989 /*------------------------------------------------------------------------------
5990 * NOTIFY REQUEST
5991 *------------------------------------------------------------------------------*/
5992 static void
dissect_rsvp_notify_request(proto_item * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)5993 dissect_rsvp_notify_request(proto_item *ti, proto_tree *rsvp_object_tree,
5994 tvbuff_t *tvb,
5995 int offset, int obj_length,
5996 int rsvp_class _U_, int type)
5997 {
5998 int offset2 = offset + 4;
5999 proto_item *hidden_item;
6000
6001 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6002 proto_item_set_hidden(hidden_item);
6003
6004 switch(type) {
6005 case 1: {
6006 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_notify_request, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6007 proto_tree_add_item(rsvp_object_tree, hf_rsvp_notify_request_notify_node_address_ipv4, tvb, offset2, 4, ENC_BIG_ENDIAN);
6008 proto_item_append_text(ti, ": Notify node: %s",
6009 tvb_ip_to_str(wmem_packet_scope(), tvb, offset2));
6010 break;
6011 }
6012
6013 case 2: {
6014 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_notify_request, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6015 proto_tree_add_item(rsvp_object_tree, hf_rsvp_notify_request_notify_node_address_ipv6, tvb, offset2, 16, ENC_NA);
6016 proto_item_append_text(ti, ": Notify node: %s",
6017 tvb_ip6_to_str(wmem_packet_scope(), tvb, offset2));
6018 break;
6019 }
6020
6021 default:
6022 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_notify_request, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6023 proto_tree_add_item(rsvp_object_tree, hf_rsvp_notify_request_data, tvb, offset2, obj_length - 4, ENC_NA);
6024 break;
6025 }
6026 }
6027
6028 /*------------------------------------------------------------------------------
6029 * GENERALIZED UNI
6030 *------------------------------------------------------------------------------*/
6031 static void
dissect_rsvp_gen_uni(proto_tree * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type,rsvp_conversation_info * rsvph)6032 dissect_rsvp_gen_uni(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
6033 tvbuff_t *tvb,
6034 int offset, int obj_length,
6035 int rsvp_class _U_, int type,
6036 rsvp_conversation_info *rsvph)
6037 {
6038 int offset2 = offset + 4;
6039 int mylen, i, j, k, l;
6040 proto_item *ti2= NULL, *len_item;
6041 proto_tree *rsvp_gen_uni_subtree, *rsvp_session_subtree, *rsvp_template_subtree;
6042 int s_len, s_class, s_type, sobj_len, nsap_len;
6043 int offset3;
6044 proto_item *hidden_item;
6045
6046 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6047 proto_item_set_hidden(hidden_item);
6048
6049 proto_item_set_text(ti, "GENERALIZED UNI: ");
6050
6051 mylen = obj_length - 4;
6052 switch(type) {
6053 case 1: {
6054 const char *c;
6055 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_generalized_uni, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6056 for (i=1, l = 0; l < mylen; i++) {
6057 sobj_len = tvb_get_ntohs(tvb, offset2+l);
6058 j = tvb_get_guint8(tvb, offset2+l+2);
6059 switch(j) {
6060 case 1:
6061 case 2: /* We do source and destination TNA together */
6062 c = (j==1) ? "Source" : "Destination";
6063 k = tvb_get_guint8(tvb, offset2+l+3);
6064 switch(k) {
6065 case 1:
6066 rsvp_gen_uni_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
6067 offset2+l, 8, TREE(TT_GEN_UNI_SUBOBJ), NULL,
6068 "%s IPv4 TNA: %s", c,
6069 tvb_ip_to_str(pinfo->pool, tvb, offset2+l+4));
6070 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_class, tvb, offset2+l+2, 1,
6071 j, "%d (%s)", j, c);
6072 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_type, tvb, offset2+l+3, 1,
6073 k, "1 (IPv4)");
6074 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_class_length, tvb, offset2+l, 2, sobj_len);
6075 if (j==1)
6076 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
6077 tvb, offset2+l+4, 4, ENC_BIG_ENDIAN);
6078 else
6079 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
6080 tvb, offset2+l+4, 4, ENC_BIG_ENDIAN);
6081 if (i < 4) {
6082 proto_item_append_text(ti, "%s IPv4 TNA: %s", c,
6083 tvb_ip_to_str(pinfo->pool, tvb, offset2+l+4));
6084 }
6085 break;
6086
6087 case 2:
6088 rsvp_gen_uni_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
6089 offset2+l, 20, TREE(TT_GEN_UNI_SUBOBJ), NULL,
6090 "%s IPv6 TNA:", c);
6091 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_class, tvb, offset2+l+2, 1,
6092 j, "%d (%s)", j, c);
6093 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_type, tvb, offset2+l+3, 1,
6094 k, "2 (IPv6)");
6095 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_class_length, tvb, offset2+l, 2, sobj_len);
6096 if (j==1)
6097 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
6098 tvb, offset2+l+4, 16, ENC_NA);
6099 else
6100 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
6101 tvb, offset2+l+4, 16, ENC_NA);
6102 if (i < 4) {
6103 proto_item_append_text(ti, "%s IPv6 TNA: %s", c,
6104 tvb_ip6_to_str(pinfo->pool, tvb, offset2+l+4));
6105 }
6106 break;
6107
6108 case 3:
6109 rsvp_gen_uni_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
6110 offset2+l, tvb_get_ntohs(tvb, offset2+l),
6111 TREE(TT_GEN_UNI_SUBOBJ), NULL, "%s NSAP TNA: ", c);
6112 nsap_len = tvb_get_guint8(tvb, offset2+l+4);
6113 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_class, tvb, offset2+l+2, 1,
6114 j, "%d (%s)", j, c);
6115 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_type, tvb, offset2+l+3, 1,
6116 k, "3 (NSAP)");
6117 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_class_length, tvb, offset2+l, 2, sobj_len);
6118 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_nsap_length, tvb, offset2+l+4, 1, ENC_BIG_ENDIAN);
6119 proto_tree_add_string(rsvp_gen_uni_subtree, hf_rsvp_nsap_address, tvb, offset2+l+5, sobj_len-4,
6120 print_nsap_net(pinfo->pool, tvb, offset2+l+5, nsap_len));
6121 if (i < 4) {
6122 proto_item_append_text(ti, "%s NSAP TNA: %s", c,
6123 print_nsap_net(pinfo->pool, tvb, offset2+l+5, nsap_len));
6124 }
6125 break;
6126
6127 default:
6128 rsvp_gen_uni_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
6129 offset2+l, tvb_get_ntohs(tvb, offset2+l),
6130 TREE(TT_GEN_UNI_SUBOBJ), NULL, "%s UNKNOWN TNA", c);
6131 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_class, tvb, offset2+l+2, 1,
6132 j, "%d (%s)", j, c);
6133 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_type, tvb, offset2+l+3, 1,
6134 k, "%d (UNKNOWN)", k);
6135 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_class_length, tvb, offset2+l, 2, sobj_len);
6136 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_gen_uni_data, tvb, offset2+l+4, sobj_len-4, ENC_NA);
6137 if (i < 4) {
6138 proto_item_append_text(ti, "%s UNKNOWN", c);
6139 }
6140 break;
6141 }
6142 break;
6143
6144 case 3: /* Diversity subobject */
6145 k = tvb_get_guint8(tvb, offset2+l+3);
6146 switch(k) {
6147 default:
6148 case 1:
6149 rsvp_gen_uni_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
6150 offset2+l, tvb_get_ntohs(tvb, offset2+l),
6151 TREE(TT_GEN_UNI_SUBOBJ), &ti2, "Diversity Subobject");
6152 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_class, tvb, offset2+l+2, 1,
6153 j, "%d (Diversity)", j);
6154 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_type, tvb, offset2+l+3, 1, k);
6155 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_class_length, tvb, offset2+l, 2, sobj_len);
6156 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_class_diversity, tvb, offset2+l+4, 1, ENC_NA);
6157 s_len = tvb_get_ntohs(tvb, offset2+l+8);
6158 s_class = tvb_get_guint8(tvb, offset2+l+10);
6159 s_type = tvb_get_guint8(tvb, offset2+l+11);
6160 rsvp_session_subtree = proto_tree_add_subtree(rsvp_gen_uni_subtree, tvb, offset2+l+8,
6161 s_len, TREE(rsvp_class_to_tree_type(s_class)), &ti2, "Session");
6162 len_item = proto_tree_add_uint(rsvp_session_subtree, hf_rsvp_length, tvb, offset2+l+8, 2, s_len);
6163 if (s_len < 4) {
6164 expert_add_info_format(pinfo, len_item, &ei_rsvp_invalid_length,
6165 "Length: %u (bogus, must be >= 4)", s_len);
6166 break;
6167 }
6168 proto_tree_add_uint(rsvp_session_subtree, hf_rsvp_filter[RSVPF_OBJECT], tvb,
6169 offset2+8+l+10, 1, s_class);
6170 dissect_rsvp_session(pinfo, ti2, rsvp_session_subtree, tvb, offset2+l+8,
6171 s_len, s_class, s_type, rsvph);
6172 offset3 = offset2 + s_len;
6173 s_len = tvb_get_ntohs(tvb, offset3+l+8);
6174 s_class = tvb_get_guint8(tvb, offset3+l+10);
6175 s_type = tvb_get_guint8(tvb, offset3+l+11);
6176 rsvp_template_subtree = proto_tree_add_subtree(rsvp_gen_uni_subtree, tvb, offset3+l+8,
6177 s_len, TREE(rsvp_class_to_tree_type(s_class)), &ti2, "Template");
6178
6179 proto_tree_add_uint(rsvp_template_subtree, hf_rsvp_length, tvb, offset3+l+8, 2, s_len);
6180 if (s_len < 4) {
6181 expert_add_info_format(pinfo, len_item, &ei_rsvp_invalid_length,
6182 "Length: %u (bogus, must be >= 4)", s_len);
6183 break;
6184 }
6185 proto_tree_add_uint(rsvp_template_subtree, hf_rsvp_filter[RSVPF_OBJECT], tvb,
6186 offset3+8+l+10, 1, s_class);
6187 dissect_rsvp_template_filter(pinfo, ti2, rsvp_template_subtree, tvb, offset3+l+8,
6188 s_len, s_class, s_type, rsvph);
6189
6190 if (i < 4) {
6191 proto_item_append_text(ti, "Diversity");
6192 }
6193 break;
6194
6195 }
6196 break;
6197
6198 case 4: /* Egress Label */
6199 k = tvb_get_guint8(tvb, offset2+l+3);
6200 if (k == 1) /* Egress label sub-type */
6201 rsvp_gen_uni_subtree = proto_tree_add_subtree(rsvp_object_tree, tvb,
6202 offset2+l, sobj_len, TREE(TT_GEN_UNI_SUBOBJ), &ti2,
6203 "Egress Label Subobject");
6204 else if (k == 2) /* SPC_label sub-type (see G.7713.2) */
6205 rsvp_gen_uni_subtree = proto_tree_add_subtree(rsvp_object_tree, tvb,
6206 offset2+l, sobj_len, TREE(TT_GEN_UNI_SUBOBJ), &ti2,
6207 "SPC Label Subobject");
6208 else
6209 rsvp_gen_uni_subtree = proto_tree_add_subtree(rsvp_object_tree, tvb,
6210 offset2+l, sobj_len, TREE(TT_GEN_UNI_SUBOBJ), &ti2,
6211 "Unknown Label Subobject");
6212 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_class, tvb, offset2+l+2, 1,
6213 j, "%d (Egress/SPC Label)", j);
6214 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_type, tvb, offset2+l+3, 1, k);
6215 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_class_length, tvb, offset2+l, 2, sobj_len);
6216 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_gen_uni_direction,
6217 tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
6218 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_egress_label_type, tvb, offset2+l+7, 1, ENC_BIG_ENDIAN);
6219 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_gen_uni_logical_port_id, tvb, offset2+l+8, 4, ENC_BIG_ENDIAN);
6220 proto_item_append_text(ti2, ": %s, Label type %d, Port ID %d, Label ",
6221 tvb_get_guint8(tvb, offset2+l+4) & 0x80 ?
6222 "Upstream" : "Downstream",
6223 tvb_get_guint8(tvb, offset2+l+7),
6224 tvb_get_ntohl(tvb, offset2+l+8));
6225 for (j=12; j < sobj_len; j+=4) {
6226 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_egress_label, tvb, offset2+l+j, 4, ENC_BIG_ENDIAN);
6227 proto_item_append_text(ti2, "%u ", tvb_get_ntohl(tvb, offset2+l+j));
6228 }
6229 if (i < 4) {
6230 if (k == 1)
6231 proto_item_append_text(ti, "Egress Label");
6232 else if (k == 2)
6233 proto_item_append_text(ti, "SPC Label");
6234 }
6235 break;
6236
6237 case 5: /* Service Level */
6238 k = tvb_get_guint8(tvb, offset2+l+3);
6239 switch(k) {
6240 default:
6241 case 1:
6242 rsvp_gen_uni_subtree = proto_tree_add_subtree(rsvp_object_tree, tvb,
6243 offset2+l, sobj_len, TREE(TT_GEN_UNI_SUBOBJ), &ti2,
6244 "Service Level Subobject");
6245 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_class, tvb, offset2+l+2, 1,
6246 j, "%d (Service Level)", j);
6247 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_type, tvb, offset2+l+3, 1, k);
6248 proto_tree_add_uint(rsvp_gen_uni_subtree, hf_rsvp_class_length, tvb, offset2+l, 2, sobj_len);
6249 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_gen_uni_service_level, tvb, offset2+l+4, 1, ENC_BIG_ENDIAN);
6250 proto_item_append_text(ti2, ": %u", tvb_get_guint8(tvb, offset2+l+4));
6251 if (i < 4) {
6252 proto_item_append_text(ti, "Service Level %d", tvb_get_guint8(tvb, offset2+l+4));
6253 }
6254 break;
6255 }
6256 break;
6257
6258 default: /* Unknown subobject */
6259 rsvp_gen_uni_subtree = proto_tree_add_subtree_format(rsvp_object_tree, tvb,
6260 offset2+l, sobj_len, TREE(TT_GEN_UNI_SUBOBJ), NULL,
6261 "Unknown subobject: %u",
6262 j);
6263 proto_tree_add_uint_format_value(rsvp_gen_uni_subtree, hf_rsvp_type, tvb, offset2+l, 1,
6264 j, "%u (Unknown)", j);
6265 proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_class_length, tvb, offset2+l+1, 1, ENC_BIG_ENDIAN);
6266 break;
6267 }
6268
6269 if (tvb_get_guint8(tvb, offset2+l+1) < 1) {
6270 proto_tree_add_expert_format(rsvp_gen_uni_subtree, pinfo, &ei_rsvp_invalid_length, tvb, offset2+l+1, 1,
6271 "Invalid length: %u", tvb_get_guint8(tvb, offset2+l+1));
6272 return;
6273 }
6274 l += tvb_get_guint8(tvb, offset2+l+1);
6275 if (l < mylen) {
6276 if (i < 4)
6277 proto_item_append_text(ti, ", ");
6278 else if (i==4)
6279 proto_item_append_text(ti, "...");
6280 }
6281 }
6282 break;
6283 }
6284
6285 default:
6286 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_generalized_uni, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6287 proto_tree_add_item(rsvp_object_tree, hf_rsvp_gen_uni_data, tvb, offset2, mylen, ENC_NA);
6288 break;
6289 }
6290 }
6291
6292 /*------------------------------------------------------------------------------
6293 * CALL_ID
6294 *------------------------------------------------------------------------------*/
6295 static const value_string address_type_vals[] = {
6296 { 1, "1 (IPv4)"},
6297 { 2, "2 (IPv6)"},
6298 { 3, "3 (NSAP)"},
6299 { 4, "4 (MAC)"},
6300 { 0x7f, "0x7f (Vendor-defined)"},
6301 { 0, NULL}
6302 };
6303
6304 static void
dissect_rsvp_call_id(proto_tree * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int c_type)6305 dissect_rsvp_call_id(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
6306 tvbuff_t *tvb,
6307 int offset, int obj_length,
6308 int rsvp_class _U_, int c_type)
6309 {
6310 int type = 0;
6311 const guint8 *str;
6312 int offset2 = offset + 4;
6313 int offset3, offset4, len;
6314 proto_tree *ti2 = NULL, *hidden_item;
6315
6316 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6317 proto_item_set_hidden(hidden_item);
6318
6319
6320 proto_item_set_text(ti, "CALL-ID: ");
6321 switch(c_type) {
6322 case 0:
6323 proto_item_append_text(ti,"Empty");
6324 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_call_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6325 if (obj_length > 4)
6326 proto_tree_add_item(rsvp_object_tree, hf_rsvp_call_id_data, tvb, offset2, obj_length-4, ENC_NA);
6327 break;
6328 case 1:
6329 case 2:
6330 type = tvb_get_guint8 (tvb, offset2);
6331 if (c_type == 1) {
6332 offset3 = offset2 + 4;
6333 len = obj_length - 16;
6334 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_call_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6335 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_call_id_address_type, tvb, offset2, 1, ENC_BIG_ENDIAN);
6336 proto_tree_add_item(rsvp_object_tree, hf_rsvp_call_id_reserved, tvb, offset2+1, 3, ENC_BIG_ENDIAN);
6337 proto_item_append_text(ti, "Operator-Specific. Addr Type: %s. ",
6338 val_to_str(type, address_type_vals, "Unknown (%u)"));
6339 }
6340 else {
6341 offset3 = offset2 + 16;
6342 len = obj_length - 28;
6343 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_call_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6344 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_call_id_address_type, tvb, offset2, 1, ENC_BIG_ENDIAN);
6345 proto_tree_add_item_ret_string(rsvp_object_tree, hf_rsvp_call_id_international_segment, tvb, offset2 + 1, 3, ENC_NA|ENC_ASCII, pinfo->pool, &str);
6346 proto_item_append_text(ti, "Globally-Unique. Addr Type: %s. Intl Segment: %s. ",
6347 val_to_str(type, address_type_vals, "Unknown (%u)"), str);
6348 proto_tree_add_item_ret_string(rsvp_object_tree, hf_rsvp_call_id_national_segment, tvb, offset2 + 4, 12, ENC_NA|ENC_ASCII, pinfo->pool, &str);
6349 proto_item_append_text(ti, "Natl Segment: %s. ", str);
6350 }
6351
6352 switch(type) {
6353 case 1:
6354 offset4 = offset3 + 4;
6355 str = tvb_ip_to_str(pinfo->pool, tvb, offset3);
6356 proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
6357 tvb, offset3, 4, ENC_BIG_ENDIAN);
6358 break;
6359
6360 case 2:
6361 offset4 = offset3 + 16;
6362 str = tvb_ip6_to_str(pinfo->pool, tvb, offset3);
6363 proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
6364 tvb, offset3, 16, ENC_NA);
6365 break;
6366
6367 case 3:
6368 offset4 = offset3 + 20;
6369 str = print_nsap_net(pinfo->pool, tvb, offset3, 20);
6370 proto_tree_add_string(rsvp_object_tree, hf_rsvp_source_transport_network_addr, tvb, offset3, 20, str);
6371 break;
6372
6373 case 4:
6374 offset4 = offset3 + 6;
6375 str = tvb_ether_to_str(pinfo->pool, tvb, offset3);
6376 proto_tree_add_item(rsvp_object_tree, hf_rsvp_callid_srcaddr_ether, tvb, offset3, 6, ENC_NA);
6377 break;
6378
6379 case 0x7F:
6380 offset4 = offset3 + len;
6381 str = tvb_bytes_to_str(pinfo->pool, tvb, offset3, len);
6382 proto_tree_add_item(rsvp_object_tree, hf_rsvp_callid_srcaddr_bytes, tvb, offset3, len, ENC_NA);
6383 break;
6384
6385 default:
6386 offset4 = offset3 + len;
6387 str = "???";
6388 expert_add_info(pinfo, ti2, &ei_rsvp_call_id_address_type);
6389 break;
6390 }
6391
6392 proto_item_append_text(ti, "Src: %s. ", str);
6393 proto_tree_add_item(rsvp_object_tree, hf_rsvp_call_id_local_identifier, tvb, offset4, 8, ENC_NA);
6394 proto_item_append_text(ti, "Local ID: %s. ", tvb_bytes_to_str(pinfo->pool, tvb, offset4, 8));
6395 break;
6396
6397 default:
6398 proto_item_append_text(ti, " Unknown");
6399 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_call_id, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6400 proto_tree_add_item(rsvp_object_tree, hf_rsvp_call_id_data, tvb, offset2, obj_length-4, ENC_NA);
6401 break;
6402 }
6403 }
6404
6405 /*------------------------------------------------------------------------------
6406 * 3GPP2_OBJECT X.S0057-0 v1.0, X.S0011-004-E v1.0
6407 *------------------------------------------------------------------------------*/
6408 static const value_string rsvp_3gpp_object_ie_type_vals[] = {
6409 { 0, "TFT IPv4"},
6410 { 1, "TFT IPv4 Error"},
6411 { 2, "TFT IPv6"},
6412 { 3, "TFT IPv6 Error"},
6413 { 4, "Header Removal"},
6414 { 5, "Header Removal Error"},
6415 { 6, "Channel Treatment"},
6416 { 7, "Channel Treatment Error"},
6417 { 0, NULL}
6418 };
6419
6420 static const value_string rsvp_3gpp_object_tft_d_vals[] = {
6421 { 0, "Forward Direction"},
6422 { 1, "Reverse Direction"},
6423 { 2, "Reserved"},
6424 { 3, "Reserved"},
6425 { 0, NULL}
6426 };
6427
6428 static const value_string rsvp_3gpp_obj_tft_opcode_vals[] = {
6429 { 0x00, "Spare"},
6430 { 0x01, "Create new TFT"},
6431 { 0x02, "Delete existing TFT"},
6432 { 0x03, "Add packet filters to existing TFT"},
6433 { 0x04, "Replace packet filters in existing TFT"},
6434 { 0x05, "Delete packet filters from existing TFT"},
6435 { 0x06, "QoS Check"},
6436 { 0x07, "Reserved"},
6437 { 0x80, "Initiate Flow Request"},
6438 { 0x81, "QoS Check Confirm"},
6439 { 0x82, "Initiate Delete Packet Filter from Existing TFT"},
6440 { 0x83, "Initiate Replace packet filters in existing TFT"},
6441 { 0, NULL}
6442 };
6443
6444 static const value_string rsvp_3gpp_obj_pf_comp_type_id_vals[] = {
6445 { 16, "IPv4 Source Address with Subnet Mask"},
6446 { 17, "IPv4 Destination Address with Subnet Mask"},
6447 { 32, "IPv6 Source Address with Prefix Length"},
6448 { 33, "IPv6 Destination Address with Prefix Length"},
6449 { 48, "Protocol /Next header"},
6450 { 64, "Single Destination Port"},
6451 { 65, "Destination Port range"},
6452 { 80, "Single Source Port"},
6453 { 81, "Source Port range"},
6454 { 96, "Security Parameter Index"},
6455 { 112, "Type of Service/Traffic Class"},
6456 { 128, "Flow label"},
6457 { 129, "Type 2 Routing Header with Prefix Length"},
6458 { 130, "Home Address Option with Prefix Length"},
6459 { 0, NULL}
6460 };
6461
6462 static const value_string rsvp_3gpp_obj_pf_treatment_vals[] = {
6463 { 0, "Header Compression"},
6464 { 1, "Maximum Buffer Timer"},
6465 { 0, NULL}
6466 };
6467
6468 #if 0
6469 static const value_string rsvp_3gpp_qos_result_vals[] = {
6470 { 0, "Successful"},
6471 { 1, "UE Initiated QoS is not authorized"},
6472 { 2, "NW initiated QoS in progress for this flow"},
6473 { 3, "Requested FlowProfileIDs failed mapping"},
6474 { 0, NULL}
6475 };
6476 #endif
6477
6478 static const value_string rsvp_3gpp_obj_traffic_class_vals[] = {
6479 { 0, "Unknown"},
6480 { 1, "Conversational"},
6481 { 2, "Streaming"},
6482 { 3, "Interactive"},
6483 { 4, "Background"},
6484 { 0, NULL}
6485 };
6486
6487 static void
dissect_rsvp_3gpp_object(proto_tree * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int c_type)6488 dissect_rsvp_3gpp_object(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
6489 tvbuff_t *tvb,
6490 int offset, int obj_length,
6491 int rsvp_class _U_, int c_type)
6492 {
6493 guint16 length, ie_type;
6494 proto_tree *hidden_item;
6495
6496 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6497 proto_item_set_hidden(hidden_item);
6498
6499 offset+=3;
6500 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_3gpp_object, tvb, offset, 1, ENC_BIG_ENDIAN);
6501 offset++;
6502 /* Set obj_length to the remaining bytes */
6503 obj_length = obj_length - 4;
6504 if(c_type==1){
6505 /* Transaction ID */
6506 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tid, tvb, offset, 4, ENC_BIG_ENDIAN);
6507 offset+=4;
6508 obj_length = obj_length - 4;
6509 /* IE List */
6510 while(obj_length>0){
6511 length = tvb_get_ntohs(tvb, offset);
6512 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ie_len, tvb, offset, 2, ENC_BIG_ENDIAN);
6513 offset+=2;
6514 ie_type = tvb_get_ntohs(tvb, offset);
6515 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ie_type, tvb, offset, 2, ENC_BIG_ENDIAN);
6516 offset+=2;
6517
6518 if ((ie_type == 0)||(ie_type==2)){
6519 guint8 tft_opcode, tft_n_pkt_flt;
6520 int i;
6521
6522 if(ie_type == 0){
6523 /*IPv4*/
6524 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ue_ipv4_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
6525 offset+=4;
6526 }else{
6527 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ue_ipv6_addr, tvb, offset, 16, ENC_NA);
6528 offset+=16;
6529 }
6530 /* D Reserved NS SR_ID Reserved P TFT Operation Code Number of Packet filters */
6531 /* D */
6532 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_d, tvb, offset, 4, ENC_BIG_ENDIAN);
6533 /* NS */
6534 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_ns, tvb, offset, 4, ENC_BIG_ENDIAN);
6535 /* SR_ID */
6536 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_sr_id, tvb, offset, 4, ENC_BIG_ENDIAN);
6537 /* P */
6538 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_p, tvb, offset, 4, ENC_BIG_ENDIAN);
6539 /* TFT Operation Code */
6540 tft_opcode = tvb_get_guint8(tvb, offset+2);
6541 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_opcode, tvb, offset, 4, ENC_BIG_ENDIAN);
6542 /* Number of Packet filters */
6543 tft_n_pkt_flt = tvb_get_guint8(tvb, offset+3);
6544 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_n_pkt_flt, tvb, offset, 4, ENC_BIG_ENDIAN);
6545 offset+=4;
6546 /* Packet filter list
6547 * The packet filter list contains a variable number of packet filters. It shall be
6548 * encoded same as defined in X.S0011-D Chapter 4 [5] except as defined
6549 * below:
6550 * For "QoS Check Confirm" operations, the packet filter list shall be empty.
6551 * For "Initiate Delete Packet Filter from Existing TFT", the packet filter list
6552 * shall contain a variable number of Flow Identifiers given in the number of
6553 * packet filters field. In this case, the packet filter evaluation precedence,
6554 * length, and contents are not included, only the Flow Identifiers are
6555 * included. See Figure B-6, X.S0011-D [5] .
6556 * For "Initiate Flow request" and "Initiate Replace Packet Filters in Existing
6557 * TFT" Replace Packet Filters in Existing TFT the packet filter list shall
6558 * contain a variable number of Flow Identifiers, along with the packet filter
6559 * contents. See Figure B-7, X.S0011-D
6560 */
6561 if((tft_opcode!=0x81)&&(tft_n_pkt_flt != 0)){
6562 /* Packet Filter List */
6563 for (i = 0; i < tft_n_pkt_flt; i++) {
6564 proto_tree *flow_tree, *t2_tree;
6565 guint16 pkt_flt_len, item_len, pf_cont_len;
6566 guint8 pf_comp_type_id;
6567
6568 flow_tree = proto_tree_add_subtree_format(rsvp_object_tree, tvb, offset, -1, ett_treelist[TT_3GPP_OBJ_FLOW], &ti, "Flow Identifier Num %u",i+1);
6569 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_flow_id, tvb, offset, 1, ENC_BIG_ENDIAN);
6570 offset++;
6571 item_len = 1;
6572 if((tft_opcode==0x05)||(tft_opcode==0x82)){
6573 /* delete packet filters from existing TFT, Initiate Delete Packet Filter from Existing TFT */
6574 proto_item_set_len(ti, item_len);
6575 continue;
6576 }
6577 /* Packet filter evaluation precedence */
6578 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ev_prec, tvb, offset, 1, ENC_BIG_ENDIAN);
6579 offset++;
6580 /* Packet filter length */
6581 pkt_flt_len = tvb_get_ntohs(tvb,offset);
6582 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_len, tvb, offset, 2, ENC_BIG_ENDIAN);
6583 item_len = item_len + pkt_flt_len +1;
6584 offset+=2;
6585 /* Packet filter contents */
6586 /* PF Type (0-1) */
6587 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_type, tvb, offset, 1, ENC_BIG_ENDIAN);
6588 offset++;
6589 /* Length */
6590 pf_cont_len = tvb_get_guint8(tvb, offset);
6591 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_cont_len, tvb, offset, 1, ENC_BIG_ENDIAN);
6592 offset++;
6593 /* Packet filter component type identifier */
6594 pf_comp_type_id = tvb_get_guint8(tvb, offset);
6595 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_comp_type_id, tvb, offset, 1, ENC_BIG_ENDIAN);
6596 offset++;
6597 /* Packet filter component */
6598 switch(pf_comp_type_id){
6599 case 16: /* IPv4 Source Address with Subnet Mask */
6600 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_src_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
6601 offset+=4;
6602 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipv4_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
6603 offset+=4;
6604 pf_cont_len-=11;
6605 break;
6606 case 17: /* IPv4 Destination Address with Subnet Mask */
6607 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_dst_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
6608 offset+=4;
6609 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipv4_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
6610 offset+=4;
6611 /* Items length (8 + 3)*/
6612 pf_cont_len-=11;
6613 break;
6614 case 32: /* IPv6 Source Address with Prefix Length */
6615 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_src_ipv6, tvb, offset, 16, ENC_NA);
6616 offset+=16;
6617 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipv6_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN);
6618 offset++;
6619 /* Items length (17 + 3)*/
6620 pf_cont_len-=20;
6621 break;
6622 case 33: /* IPv6 Destination Address with Prefix Length */
6623 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_dst_ipv6, tvb, offset, 16, ENC_NA);
6624 offset+=16;
6625 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipv6_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN);
6626 offset++;
6627 /* Items length (17 + 3)*/
6628 pf_cont_len-=20;
6629 break;
6630 case 48: /* Protocol /Next header */
6631 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_prot_next, tvb, offset, 1, ENC_BIG_ENDIAN);
6632 offset++;
6633 /* Items length (1 + 3)*/
6634 pf_cont_len-=4;
6635 break;
6636 case 64: /* Single Destination Port */
6637 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_dst_port, tvb, offset, 2, ENC_BIG_ENDIAN);
6638 offset+=2;
6639 /* Items length (2 + 3)*/
6640 pf_cont_len-=5;
6641 break;
6642 case 65: /* Destination Port range */
6643 proto_tree_add_uint_format_value(rsvp_object_tree, hf_rsvp_3gpp_obj_pf_dst_port_range, tvb, offset, 4,
6644 tvb_get_ntohs(tvb,offset), "%u-%u", tvb_get_ntohs(tvb,offset), tvb_get_ntohs(tvb,offset+2));
6645 offset+=4;
6646 break;
6647 case 80: /* Single Source Port */
6648 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_src_port, tvb, offset, 2, ENC_BIG_ENDIAN);
6649 offset+=2;
6650 /* Items length (2 + 3)*/
6651 pf_cont_len-=5;
6652 break;
6653 case 81: /* Source Port range */
6654 proto_tree_add_uint_format_value(rsvp_object_tree, hf_rsvp_3gpp_obj_pf_src_port_range, tvb, offset, 4,
6655 tvb_get_ntohs(tvb,offset), "Source Port range %u-%u", tvb_get_ntohs(tvb,offset), tvb_get_ntohs(tvb,offset+2));
6656 offset+=4;
6657 /* Items length (4 + 3)*/
6658 pf_cont_len-=7;
6659 break;
6660 case 96: /* Security Parameter Index */
6661 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipsec_spi, tvb, offset, 4, ENC_BIG_ENDIAN);
6662 offset+=4;
6663 /* Items length (4 + 3)*/
6664 pf_cont_len-=7;
6665 break;
6666 case 112: /* Type of Service/Traffic Class */
6667 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_tos_tc, tvb, offset, 1, ENC_BIG_ENDIAN);
6668 offset++;
6669 /* Items length (1 + 3)*/
6670 pf_cont_len-=4;
6671 break;
6672 case 128: /* Flow label */
6673 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_flow_lbl, tvb, offset, 3, ENC_BIG_ENDIAN);
6674 offset+=3;
6675 /* Items length (3 + 3)*/
6676 pf_cont_len-=6;
6677 break;
6678 case 129: /* Type 2 Routing Header with Prefix Length */
6679 t2_tree = proto_tree_add_subtree(flow_tree, tvb, offset, 17, ett_treelist[TT_3GPP_OBJ_T2], NULL, "Type 2 Routing Header packet filter");
6680 proto_tree_add_item(t2_tree, hf_rsvp_3gpp_obj_pf_ipv6, tvb, offset, 16, ENC_NA);
6681 offset+=16;
6682 proto_tree_add_item(t2_tree, hf_rsvp_3gpp_obj_pf_ipv6_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN);
6683 offset++;
6684 /* Items length (17 + 3)*/
6685 pf_cont_len-=20;
6686 break;
6687 case 130: /* Home Address Option with Prefix Length */
6688 t2_tree = proto_tree_add_subtree(flow_tree, tvb, offset, 17, ett_treelist[TT_3GPP_OBJ_HO], NULL, "Home address Option packet filter");
6689 proto_tree_add_item(t2_tree, hf_rsvp_3gpp_obj_pf_ipv6, tvb, offset, 16, ENC_NA);
6690 offset+=16;
6691 proto_tree_add_item(t2_tree, hf_rsvp_3gpp_obj_pf_ipv6_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN);
6692 offset++;
6693 /* Items length (17 + 3)*/
6694 pf_cont_len-=20;
6695 break;
6696
6697 default:
6698 proto_tree_add_expert(flow_tree, pinfo, &ei_rsvp_packet_filter_component, tvb, offset, pf_cont_len-2);
6699 offset = offset + pkt_flt_len - 5;
6700 pf_cont_len=0;
6701 break;
6702 }
6703 if(pf_cont_len != 0){
6704 /* Packet filter treatment */
6705 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_treatment, tvb, offset, 1, ENC_BIG_ENDIAN);
6706 offset++;
6707 /* [RFC 3006] hint */
6708 proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_hint, tvb, offset, 4, ENC_BIG_ENDIAN);
6709 offset+=4;
6710 }
6711 proto_item_set_len(ti, item_len);
6712 }
6713 }
6714 /* QoS List (QoS Check, QoS-Check Confirm Initiate Flow Request
6715 * and Initiate Replace Packet Filters in Existing TFT)
6716 * XXX
6717 * Create new TFT?
6718 */
6719 if((tft_opcode == 0x01)||(tft_opcode == 0x06)||(tft_opcode == 0x80)||(tft_opcode == 0x81)||(tft_opcode == 0x83)){
6720 /* QoS List Length */
6721 gint32 tft_qos_list_len;
6722 guint8 blob_len, item_len, padding_len;
6723 gboolean verbose;
6724 proto_tree *qos_tree, *qos_sub_blob_tree, *qos_att_tree;
6725 int num = 0, j, num_qos_att_set;
6726
6727 tft_qos_list_len = tvb_get_ntohs(tvb, offset);
6728 proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_qos_list_len, tvb, offset, 2, ENC_BIG_ENDIAN);
6729 offset+=2;
6730 tft_qos_list_len-=2;
6731 if(tft_qos_list_len > 0){
6732 while (tft_qos_list_len>0) {
6733 int bit_offset; /* offset in bits */
6734 guint8 qos_attribute_set_len;
6735
6736 num++;
6737
6738 qos_tree = proto_tree_add_subtree_format(rsvp_object_tree, tvb, offset, -1,
6739 ett_treelist[TT_3GPP_OBJ_QOS], NULL, "QOS Flow Identifier Num %u", num);
6740
6741 /* Flow Identifier */
6742 proto_tree_add_item(qos_tree, hf_rsvp_3gpp_obj_flow_id, tvb, offset, 1, ENC_BIG_ENDIAN);
6743 offset++;
6744 tft_qos_list_len--;
6745
6746 /* R_QOS_SUB_BLOB_LEN 1 */
6747 blob_len = tvb_get_guint8(tvb, offset);
6748 proto_tree_add_item(qos_tree, hf_rsvp_3gpp_r_qos_blob_len, tvb, offset, 1, ENC_BIG_ENDIAN);
6749 offset++;
6750 tft_qos_list_len--;
6751
6752 /* R_QoS_SUB_BLOB X.S0011-004-D */
6753 ti = proto_tree_add_item(qos_tree, hf_rsvp_3gpp_r_qos_blob, tvb, offset, blob_len, ENC_NA);
6754 qos_sub_blob_tree = proto_item_add_subtree(ti, ett_treelist[TT_3GPP_OBJ_QOS_SUB_BLOB]);
6755
6756 proto_tree_add_item(qos_sub_blob_tree, hf_rsvp_3gpp_r_qos_blob_flow_pri, tvb, offset, 1, ENC_BIG_ENDIAN);
6757 proto_tree_add_item(qos_sub_blob_tree, hf_rsvp_3gpp_r_qos_blob_num_qos_att_set, tvb, offset, 1, ENC_BIG_ENDIAN);
6758 num_qos_att_set = (tvb_get_guint8(tvb, offset) & 0x0e)>>1;
6759 /* point to the first bit in the QoS_ATTRIBUTE_SET */
6760 bit_offset = (offset<<3)+7;
6761 for (j = 0; j < num_qos_att_set; j++) {
6762 qos_attribute_set_len = tvb_get_bits8(tvb,bit_offset,4);
6763 qos_att_tree = proto_tree_add_subtree_format(qos_sub_blob_tree, tvb, bit_offset>>3, qos_attribute_set_len, ett_treelist[TT_3GPP_OBJ_QOS_SUB_BLOB], NULL,
6764 "QoS_ATTRIBUTE_SET %u(%u bytes)", j+1, qos_attribute_set_len);
6765 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_att_set_len, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
6766 bit_offset+=4;
6767
6768 if(qos_attribute_set_len==0){
6769 break;
6770 }
6771
6772 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_set_id, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
6773 bit_offset+=7;
6774
6775 verbose = tvb_get_bits8(tvb, bit_offset, 1);
6776 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_verbose, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
6777 bit_offset++;
6778
6779
6780 if(verbose == FALSE){
6781 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_prof_id, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
6782 bit_offset+=16;
6783 }else{
6784 /* Traffic_Class 0 or 3 */
6785 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_traff_cls, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
6786 bit_offset+=3;
6787 /* Peak_Rate 0 or 16 */
6788 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_peak_rate, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
6789 bit_offset+=16;
6790 /* Bucket_Size 0 or 16 */
6791 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_bucket_size, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
6792 bit_offset+=16;
6793 /* Token_Rate 0 or 16 */
6794 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_token_rate, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
6795 bit_offset+=16;
6796 /* Max_Latency 0 or 8 */
6797 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_max_latency, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
6798 bit_offset+=8;
6799 /* Max_Loss_Rate 0 or 8 */
6800 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_max_loss_rte, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
6801 bit_offset+=8;
6802 /* Delay_Var_Sensitive 0 or 1 */
6803 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_delay_var_sensitive, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
6804 bit_offset+=1;
6805 }
6806 /* Padd to fill up to octet boundary, Reserved 0-7 as needed */
6807 padding_len = 0;
6808 if((bit_offset & 0x07) != 0){
6809 padding_len = 8 - (bit_offset & 0x07);
6810 proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_reserved, tvb, bit_offset, padding_len, ENC_BIG_ENDIAN);
6811 }
6812 bit_offset = bit_offset + padding_len;
6813 }
6814
6815
6816 offset = offset + blob_len;
6817 tft_qos_list_len = tft_qos_list_len - blob_len;
6818
6819 /* Result Code This field is only included in the ResvConf message when
6820 * the TFT Operation Code field is set to QoS-Check Confirm.
6821 */
6822 item_len = blob_len + 2;
6823 if(tft_opcode == 0x81){
6824 proto_tree_add_item(qos_tree, hf_rsvp_3gpp_qos_result, tvb, offset, 1, ENC_BIG_ENDIAN);
6825 offset++;
6826 tft_qos_list_len--;
6827 item_len++;
6828 }
6829 proto_item_set_len(ti, item_len);
6830 }
6831 }
6832 }else{
6833 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ie_data, tvb, offset, length-2, ENC_NA);
6834 }
6835 obj_length = obj_length - length;
6836 }
6837 }
6838 }
6839 }
6840 /*------------------------------------------------------------------------------
6841 * RESTART CAPABILITY
6842 *------------------------------------------------------------------------------*/
6843 static void
dissect_rsvp_restart_cap(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)6844 dissect_rsvp_restart_cap(proto_tree *ti, proto_tree *rsvp_object_tree,
6845 tvbuff_t *tvb,
6846 int offset, int obj_length,
6847 int rsvp_class _U_, int type)
6848 {
6849 int offset2 = offset + 4;
6850 guint restart, recovery;
6851 proto_tree *hidden_item;
6852
6853 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6854 proto_item_set_hidden(hidden_item);
6855
6856 proto_item_set_text(ti, "RESTART CAPABILITY: ");
6857 switch(type) {
6858 case 1:
6859 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_restart_cap, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6860 proto_tree_add_item_ret_uint(rsvp_object_tree, hf_rsvp_restart_cap_restart_time, tvb, offset2, 4,
6861 ENC_BIG_ENDIAN, &restart);
6862 proto_tree_add_item_ret_uint(rsvp_object_tree, hf_rsvp_restart_cap_recovery_time, tvb, offset2+4, 4,
6863 ENC_BIG_ENDIAN, &recovery);
6864 proto_item_append_text(ti, "Restart Time: %d ms. Recovery Time: %d ms.",
6865 restart, recovery);
6866 break;
6867
6868 default:
6869 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_restart_cap, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6870 proto_tree_add_item(rsvp_object_tree, hf_rsvp_restart_cap_data, tvb, offset2, obj_length - 4, ENC_NA);
6871 break;
6872 }
6873 }
6874
6875 /*------------------------------------------------------------------------------
6876 * LINK CAPABILITY
6877 *------------------------------------------------------------------------------*/
6878 static void
dissect_rsvp_link_cap(proto_item * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class,int type)6879 dissect_rsvp_link_cap(proto_item *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
6880 tvbuff_t *tvb,
6881 int offset, int obj_length,
6882 int rsvp_class, int type)
6883 {
6884 proto_tree *hidden_item;
6885
6886 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6887 proto_item_set_hidden(hidden_item);
6888
6889 proto_item_set_text(ti, "LINK CAPABILITY: ");
6890 switch(type) {
6891 case 1:
6892 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_link_cap, tvb, offset+3, 1, type);
6893
6894 dissect_rsvp_ro_subobjects(ti, pinfo, rsvp_object_tree, tvb,
6895 offset + 4, obj_length, rsvp_class);
6896 break;
6897
6898 default:
6899 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_link_cap, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6900 proto_tree_add_item(rsvp_object_tree, hf_rsvp_record_route_data, tvb, offset+4, obj_length - 4, ENC_NA);
6901 break;
6902 }
6903
6904 }
6905 /*------------------------------------------------------------------------------
6906 * PROTECTION INFORMATION
6907 *------------------------------------------------------------------------------*/
6908 static void
dissect_rsvp_protection_info(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)6909 dissect_rsvp_protection_info(proto_tree *ti, proto_tree *rsvp_object_tree,
6910 tvbuff_t *tvb,
6911 int offset, int obj_length,
6912 int rsvp_class _U_, int type)
6913 {
6914 guint8 flags1, lsp_flags, link_flags, seg_flags;
6915 proto_tree *ti2, *rsvp_pi_link_flags_tree, *rsvp_pi_lsp_flags_tree, *rsvp_pi_seg_flags_tree;
6916 int offset2 = offset + 4;
6917 proto_tree *hidden_item;
6918
6919 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6920 proto_item_set_hidden(hidden_item);
6921
6922 proto_item_set_text(ti, "PROTECTION_INFO: ");
6923 switch(type) {
6924 case 1:
6925 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_protection_info, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6926 flags1 = tvb_get_guint8(tvb, offset2);
6927 proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_flags_secondary_lsp,
6928 tvb, offset2, 1, ENC_BIG_ENDIAN);
6929
6930 link_flags = tvb_get_guint8(tvb, offset2+3);
6931 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_link_flags, tvb, offset2+3, 1, ENC_BIG_ENDIAN);
6932 rsvp_pi_link_flags_tree = proto_item_add_subtree(ti2, TREE(TT_PROTECTION_INFO_LINK));
6933 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_extra_traffic,
6934 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
6935 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_unprotected,
6936 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
6937 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_shared,
6938 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
6939 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated1_1,
6940 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
6941 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated1plus1,
6942 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
6943 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_enhanced,
6944 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
6945 proto_item_append_text(ti, "%s%s%s%s%s%s%s.",
6946 flags1&0x80 ? "SecondaryLSP ":"",
6947 link_flags&0x01 ? "ExtraTraffic ":"",
6948 link_flags&0x02 ? "Unprotected ":"",
6949 link_flags&0x04 ? "Shared ":"",
6950 link_flags&0x08 ? "Dedicated1:1 ":"",
6951 link_flags&0x10 ? "Dedicated1+1 ":"",
6952 link_flags&0x20 ? "Enhanced ":"");
6953 break;
6954
6955 case 2: /* RFC4872 */
6956 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_protection_info, tvb, offset+3, 1, ENC_BIG_ENDIAN);
6957 flags1 = tvb_get_guint8(tvb, offset2);
6958 proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_secondary,
6959 tvb, offset2, 1, ENC_BIG_ENDIAN);
6960 proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_protecting,
6961 tvb, offset2, 1, ENC_BIG_ENDIAN);
6962 proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_notification_msg,
6963 tvb, offset2, 1, ENC_BIG_ENDIAN);
6964 proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_operational,
6965 tvb, offset2, 1, ENC_BIG_ENDIAN);
6966
6967 lsp_flags = tvb_get_guint8(tvb, offset2+1);
6968 rsvp_pi_lsp_flags_tree = proto_tree_add_subtree_format(rsvp_object_tree, tvb, offset2+1, 1,
6969 TREE(TT_PROTECTION_INFO_LSP), NULL, "LSP Flags: 0x%02x -%s%s%s%s%s%s", lsp_flags,
6970 lsp_flags == 0 ? " Unprotected":"",
6971 lsp_flags&0x01 ? " Rerouting":"",
6972 lsp_flags&0x02 ? " Rerouting with extra-traffic":"",
6973 lsp_flags&0x04 ? " 1:N Protection with extra-traffic":"",
6974 lsp_flags&0x08 ? " 1+1 Unidirectional protection":"",
6975 lsp_flags&0x10 ? " 1+1 Bidirectional protection":"");
6976 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_full_rerouting,
6977 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
6978 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_rerouting_extra,
6979 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
6980 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_1_n_protection,
6981 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
6982 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_1plus1_unidirectional,
6983 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
6984 proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_1plus1_bidirectional,
6985 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
6986
6987 link_flags = tvb_get_guint8(tvb, offset2+3);
6988 rsvp_pi_link_flags_tree = proto_tree_add_subtree_format(rsvp_object_tree, tvb, offset2+3, 1,
6989 TREE(TT_PROTECTION_INFO_LINK), NULL, "Link Flags: 0x%02x -%s%s%s%s%s%s", link_flags,
6990 link_flags&0x01 ? " ExtraTraffic":"",
6991 link_flags&0x02 ? " Unprotected":"",
6992 link_flags&0x04 ? " Shared":"",
6993 link_flags&0x08 ? " Dedicated1:1":"",
6994 link_flags&0x10 ? " Dedicated1+1":"",
6995 link_flags&0x20 ? " Enhanced":"");
6996 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_extra,
6997 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
6998 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_unprotected,
6999 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
7000 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_shared,
7001 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
7002 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated_1_1,
7003 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
7004 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated_1plus1,
7005 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
7006 proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_enhanced,
7007 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
7008
7009 proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_in_place,
7010 tvb, offset2+4, 1, ENC_BIG_ENDIAN);
7011 proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_required,
7012 tvb, offset2+4, 1, ENC_BIG_ENDIAN);
7013
7014 seg_flags = tvb_get_guint8(tvb, offset2+5);
7015 rsvp_pi_seg_flags_tree = proto_tree_add_subtree_format(rsvp_object_tree, tvb, offset2+5, 1,
7016 TREE(TT_PROTECTION_INFO_SEG), NULL, "Segment recovery Flags: 0x%02x - %s%s%s%s%s%s", seg_flags,
7017 seg_flags == 0 ? " Unprotected":"",
7018 seg_flags&0x01 ? " Rerouting":"",
7019 seg_flags&0x02 ? " Rerouting with extra-traffic":"",
7020 seg_flags&0x04 ? " 1:N Protection with extra-traffic":"",
7021 seg_flags&0x08 ? " 1+1 Unidirectional protection":"",
7022 seg_flags&0x10 ? " 1+1 Bidirectional protection":"");
7023 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_full_rerouting,
7024 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
7025 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_rerouting_extra,
7026 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
7027 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_1_n_protection,
7028 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
7029 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_1plus1_unidirectional,
7030 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
7031 proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_1plus1_bidirectional,
7032 tvb, offset2+1, 1, ENC_BIG_ENDIAN);
7033
7034 proto_item_append_text(ti, "%s%s%s%s Link:%s%s%s%s%s%s, LSP:%s%s%s%s%s%s.",
7035 flags1&0x80 ? "SecondaryLSP ":"",
7036 flags1&0x40 ? "ProtectingLSP ":"",
7037 flags1&0x20 ? "Notification ":"",
7038 flags1&0x10 ? "OperationalLSP ":"",
7039 link_flags&0x01 ? " ExtraTraffic":"",
7040 link_flags&0x02 ? " Unprotected":"",
7041 link_flags&0x04 ? " Shared":"",
7042 link_flags&0x08 ? " Dedicated1:1":"",
7043 link_flags&0x10 ? " Dedicated1+1":"",
7044 link_flags&0x20 ? " Enhanced":"",
7045 lsp_flags == 0 ? " Unprotected":"",
7046 lsp_flags&0x01 ? " Rerouting":"",
7047 lsp_flags&0x02 ? " Rerouting with extra-traffic":"",
7048 lsp_flags&0x04 ? " 1:N Protection with extra-traffic":"",
7049 lsp_flags&0x08 ? " 1+1 Unidirectional protection":"",
7050 lsp_flags&0x10 ? " 1+1 Bidirectional protection":"");
7051 break;
7052
7053 default:
7054 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_protection_info, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7055 proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_data, tvb, offset2, obj_length - 4, ENC_NA);
7056 break;
7057 }
7058 }
7059
7060 /*------------------------------------------------------------------------------
7061 * FAST REROUTE
7062 *------------------------------------------------------------------------------*/
7063 static void
dissect_rsvp_fast_reroute(proto_tree * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)7064 dissect_rsvp_fast_reroute(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
7065 tvbuff_t *tvb,
7066 int offset, int obj_length,
7067 int rsvp_class _U_, int type)
7068 {
7069 guint8 flags;
7070 proto_tree *ti2, *rsvp_frr_flags_tree;
7071 proto_tree *hidden_item;
7072
7073 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7074 proto_item_set_hidden(hidden_item);
7075
7076 proto_item_set_text(ti, "FAST_REROUTE: ");
7077 switch(type) {
7078 case 1:
7079 case 7:
7080 if (((type == 1) && (obj_length != 24)) || ((type == 7) && (obj_length != 20))) {
7081 proto_tree_add_expert_format(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length, tvb, offset, obj_length,
7082 "Invalid length: cannot decode");
7083 proto_item_append_text(ti, "Invalid length");
7084 break;
7085 }
7086 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_fast_reroute, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7087 proto_tree_add_item(rsvp_object_tree, hf_rsvp_fast_reroute_setup_priority, tvb, offset+4, 1, ENC_BIG_ENDIAN);
7088 proto_tree_add_item(rsvp_object_tree, hf_rsvp_fast_reroute_hold_priority, tvb, offset+5, 1, ENC_BIG_ENDIAN);
7089 proto_tree_add_item(rsvp_object_tree, hf_rsvp_fast_reroute_hop_limit, tvb, offset+6, 1, ENC_BIG_ENDIAN);
7090
7091 flags = tvb_get_guint8(tvb, offset+7);
7092 ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_fast_reroute_flags, tvb, offset+7, 1, ENC_BIG_ENDIAN);
7093 rsvp_frr_flags_tree = proto_item_add_subtree(ti2, TREE(TT_FAST_REROUTE_FLAGS));
7094 proto_tree_add_item(rsvp_frr_flags_tree, hf_rsvp_frr_flags_one2one_backup,
7095 tvb, offset+7, 1, ENC_BIG_ENDIAN);
7096 proto_tree_add_item(rsvp_frr_flags_tree, hf_rsvp_frr_flags_facility_backup,
7097 tvb, offset+7, 1, ENC_BIG_ENDIAN);
7098 proto_tree_add_item(rsvp_object_tree, hf_rsvp_fast_reroute_bandwidth, tvb, offset+8, 4, ENC_BIG_ENDIAN);
7099 proto_tree_add_item(rsvp_object_tree, hf_rsvp_fast_reroute_include_any, tvb, offset+12, 4, ENC_BIG_ENDIAN);
7100 proto_tree_add_item(rsvp_object_tree, hf_rsvp_fast_reroute_exclude_any, tvb, offset+16, 4, ENC_BIG_ENDIAN);
7101 if (type == 1) {
7102 proto_tree_add_item(rsvp_object_tree, hf_rsvp_fast_reroute_include_all, tvb, offset+20, 4, ENC_BIG_ENDIAN);
7103 }
7104
7105 proto_item_append_text(ti, "%s%s",
7106 flags &0x01 ? "One-to-One Backup, " : "",
7107 flags &0x02 ? "Facility Backup" : "");
7108 break;
7109
7110 default:
7111 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_fast_reroute, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7112 proto_tree_add_item(rsvp_object_tree, hf_rsvp_fast_reroute_data, tvb, offset+4, obj_length - 4, ENC_NA);
7113 break;
7114 }
7115 }
7116
7117 /*------------------------------------------------------------------------------
7118 * S2L_SUB_LSP
7119 *------------------------------------------------------------------------------*/
7120 static void
dissect_rsvp_s2l_sub_lsp(proto_tree * ti,packet_info * pinfo _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)7121 dissect_rsvp_s2l_sub_lsp(proto_tree *ti, packet_info* pinfo _U_, proto_tree *rsvp_object_tree,
7122 tvbuff_t *tvb,
7123 int offset, int obj_length,
7124 int rsvp_class _U_, int type)
7125 {
7126
7127 proto_tree *hidden_item;
7128
7129 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7130 proto_item_set_hidden(hidden_item);
7131
7132 proto_item_set_text(ti, "S2L SUB LSP: ");
7133 switch(type) {
7134 case 1: /* IPv4 */
7135 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_s2l_sub_lsp, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7136 offset += 4;
7137
7138 proto_tree_add_item(rsvp_object_tree, hf_rsvp_s2l_sub_lsp_destination_ipv4_address, tvb, offset, 4, ENC_BIG_ENDIAN);
7139 break;
7140
7141 case 2: /* IPv6 */
7142 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_s2l_sub_lsp, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7143 offset += 4;
7144
7145 proto_tree_add_item(rsvp_object_tree, hf_rsvp_s2l_sub_lsp_destination_ipv6_address, tvb, offset, 16, ENC_NA);
7146 break;
7147
7148 default:
7149 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_s2l_sub_lsp, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7150 proto_tree_add_item(rsvp_object_tree, hf_rsvp_s2l_sub_lsp_data, tvb, offset+4, obj_length - 4, ENC_NA);
7151 break;
7152 }
7153 }
7154
7155 /*------------------------------------------------------------------------------
7156 * DETOUR
7157 *------------------------------------------------------------------------------*/
7158 static void
dissect_rsvp_detour(proto_tree * ti,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)7159 dissect_rsvp_detour(proto_tree *ti, packet_info* pinfo, proto_tree *rsvp_object_tree,
7160 tvbuff_t *tvb,
7161 int offset, int obj_length,
7162 int rsvp_class _U_, int type)
7163 {
7164 int remaining_length, count;
7165 int iter;
7166 proto_tree *hidden_item;
7167
7168 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7169 proto_item_set_hidden(hidden_item);
7170
7171 proto_item_set_text(ti, "DETOUR: ");
7172 switch(type) {
7173 case 7:
7174 iter = 0;
7175 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_detour, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7176 for (remaining_length = obj_length - 4, count = 1;
7177 remaining_length > 0; remaining_length -= 8, count++) {
7178 if (remaining_length < 8) {
7179 proto_tree_add_expert_format(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length, tvb, offset+remaining_length,
7180 obj_length-remaining_length,
7181 "Invalid length: cannot decode");
7182 proto_item_append_text(ti, "Invalid length");
7183 break;
7184 }
7185 iter++;
7186 proto_tree_add_ipv4_format(rsvp_object_tree, hf_rsvp_detour_plr_id, tvb, offset+(4*iter), 4,
7187 tvb_get_ntohl(tvb, offset+(4*iter)), "PLR ID %d: %s", count,
7188 tvb_ip_to_str(pinfo->pool, tvb, offset+(4*iter)));
7189 iter++;
7190 proto_tree_add_ipv4_format(rsvp_object_tree, hf_rsvp_detour_avoid_node_id, tvb, offset+(4*iter), 4,
7191 tvb_get_ntohl(tvb, offset+(4*iter)), "Avoid Node ID %d: %s", count,
7192 tvb_ip_to_str(pinfo->pool, tvb, offset+(4*iter)));
7193 }
7194 break;
7195
7196 default:
7197 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_detour, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7198 proto_tree_add_item(rsvp_object_tree, hf_rsvp_detour_data, tvb, offset+4, obj_length - 4, ENC_NA);
7199 break;
7200 }
7201 }
7202
7203 /*------------------------------------------------------------------------------
7204 * DIFFSERV
7205 *------------------------------------------------------------------------------*/
7206 static void
dissect_rsvp_diffserv(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)7207 dissect_rsvp_diffserv(proto_tree *ti, proto_tree *rsvp_object_tree,
7208 tvbuff_t *tvb,
7209 int offset, int obj_length,
7210 int rsvp_class _U_, int type)
7211 {
7212 int mapnb, count;
7213 int *hfindexes[] = {
7214 &hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
7215 &hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
7216 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
7217 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
7218 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
7219 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
7220 &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15]
7221 };
7222 gint *etts[] = {
7223 &TREE(TT_DIFFSERV_MAP),
7224 &TREE(TT_DIFFSERV_MAP_PHBID)
7225 };
7226 proto_tree *hidden_item;
7227
7228 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7229 proto_item_set_hidden(hidden_item);
7230
7231 proto_item_set_text(ti, "DIFFSERV: ");
7232 offset += 3;
7233 switch (type) {
7234 case 1:
7235 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_diffserv, tvb, offset, 1, ENC_BIG_ENDIAN);
7236 proto_tree_add_uint(rsvp_object_tree, hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
7237 tvb, offset + 4, 1,
7238 mapnb = tvb_get_guint8(tvb, offset + 4) & 15);
7239 proto_item_append_text(ti, "E-LSP, %u MAP%s", mapnb,
7240 (mapnb == 0) ? "" : "s");
7241 offset += 5;
7242
7243 for (count = 0; count < mapnb; count++) {
7244 dissect_diffserv_mpls_common(tvb, rsvp_object_tree, type,
7245 offset, hfindexes, etts);
7246 offset += 4;
7247 }
7248 break;
7249 case 2:
7250 proto_item_append_text(ti, "L-LSP");
7251 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_diffserv, tvb, offset, 1, ENC_BIG_ENDIAN);
7252 dissect_diffserv_mpls_common(tvb, rsvp_object_tree, type,
7253 offset + 3, hfindexes, etts);
7254 break;
7255 default:
7256 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_diffserv, tvb, offset, 1, ENC_BIG_ENDIAN);
7257 proto_tree_add_item(rsvp_object_tree, hf_rsvp_diffserv_data, tvb, offset + 1, obj_length - 4, ENC_NA);
7258 break;
7259 }
7260 }
7261
7262 /*------------------------------------------------------------------------------
7263 * CLASSTYPE
7264 *------------------------------------------------------------------------------*/
7265 static void
dissect_rsvp_diffserv_aware_te(proto_tree * ti,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)7266 dissect_rsvp_diffserv_aware_te(proto_tree *ti, proto_tree *rsvp_object_tree,
7267 tvbuff_t *tvb,
7268 int offset, int obj_length,
7269 int rsvp_class _U_, int type)
7270 {
7271 proto_item *hidden_item;
7272 int offset2 = offset + 4;
7273 guint8 ct = 0;
7274
7275 hidden_item = proto_tree_add_item(rsvp_object_tree,
7276 hf_rsvp_filter[RSVPF_DSTE],
7277 tvb, offset, 8, ENC_NA);
7278 proto_item_set_hidden(hidden_item);
7279
7280 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7281 proto_item_set_hidden(hidden_item);
7282
7283 switch(type) {
7284 case 1:
7285 ct = tvb_get_guint8(tvb, offset2+3);
7286 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_diffserv_aware_te, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7287 proto_tree_add_item(rsvp_object_tree,
7288 hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
7289 tvb, offset2+3, 1, ENC_BIG_ENDIAN);
7290 proto_item_set_text(ti, "CLASSTYPE: CT %u", ct);
7291 break;
7292 default:
7293 proto_item_set_text(ti, "CLASSTYPE: (Unknown C-type)");
7294 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_diffserv_aware_te, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7295 proto_tree_add_item(rsvp_object_tree, hf_rsvp_diffserv_aware_te_data, tvb, offset2, obj_length - 4, ENC_NA);
7296 break;
7297 }
7298 }
7299
7300 /*----------------------------------------------------------------------------
7301 * VENDOR PRIVATE USE
7302 *---------------------------------------------------------------------------*/
7303 static void
dissect_rsvp_vendor_private_use(proto_tree * ti _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type _U_)7304 dissect_rsvp_vendor_private_use(proto_tree *ti _U_,
7305 proto_tree *rsvp_object_tree,
7306 tvbuff_t *tvb,
7307 int offset, int obj_length,
7308 int rsvp_class _U_, int type _U_)
7309 {
7310 /*
7311 * FF: from Section 2, RFC 3936
7312 *
7313 * "Organization/Vendor Private" ranges refer to values that are
7314 * enterprise-specific; these MUST NOT be registered with IANA. For
7315 * Vendor Private values, the first 4-octet word of the data field MUST
7316 * be an enterprise code [ENT: www.iana.org/assignments/enterprise-numbers]
7317 * (network order) as registered with the IANA SMI Network Management
7318 * Private Enterprise Codes, and the rest of the data thereafter is for
7319 * the private use of the registered enterprise.
7320 */
7321 proto_item *hidden_item;
7322
7323 hidden_item = proto_tree_add_item(rsvp_object_tree,
7324 hf_rsvp_filter[RSVPF_PRIVATE_OBJ],
7325 tvb, offset, obj_length, ENC_NA);
7326 proto_item_set_hidden(hidden_item);
7327
7328 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7329 proto_item_set_hidden(hidden_item);
7330
7331 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_vendor, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
7332 proto_tree_add_item(rsvp_object_tree,
7333 hf_rsvp_filter[RSVPF_ENT_CODE],
7334 tvb, offset + 4, 4, ENC_BIG_ENDIAN);
7335 proto_tree_add_item(rsvp_object_tree, hf_rsvp_private_data, tvb, offset + 8,
7336 obj_length - 8, ENC_NA);
7337 }
7338
7339 /*----------------------------------------------------------------------------
7340 * CALL ATTRIBUTES
7341 *---------------------------------------------------------------------------*/
7342 static void
dissect_rsvp_call_attributes(proto_tree * ti _U_,packet_info * pinfo,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length _U_,int rsvp_class _U_,int type _U_)7343 dissect_rsvp_call_attributes(proto_tree *ti _U_, packet_info* pinfo, proto_tree *rsvp_object_tree,
7344 tvbuff_t *tvb, int offset, int obj_length _U_, int rsvp_class _U_, int type _U_)
7345 {
7346
7347 int offset2 = offset + 4;
7348 guint16 tlv_type;
7349 guint16 tlv_len;
7350
7351 tlv_type = tvb_get_ntohs(tvb, offset2);
7352 tlv_len = tvb_get_ntohs(tvb, offset2+2);
7353
7354 if (tlv_len < 4){
7355 proto_tree_add_expert_format(rsvp_object_tree, pinfo, &ei_rsvp_invalid_length,
7356 tvb, offset2+2, 2, "Invalid TLV length");
7357 return;
7358 }
7359
7360 switch(tlv_type){
7361 case 2:
7362 proto_tree_add_item(rsvp_object_tree, hf_rsvp_call_attributes_endpont_id, tvb, offset2 + 4, tlv_len - 4, ENC_NA|ENC_ASCII);
7363 break;
7364 }
7365 }
7366
7367 /*----------------------------------------------------------------------------
7368 * JUNIPER PROPRIETARY
7369 *---------------------------------------------------------------------------*/
7370 static void
dissect_rsvp_juniper(proto_tree * ti _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type)7371 dissect_rsvp_juniper(proto_tree *ti _U_,
7372 proto_tree *rsvp_object_tree,
7373 tvbuff_t *tvb,
7374 int offset, int obj_length,
7375 int rsvp_class _U_, int type)
7376 {
7377 /*
7378 * Juniper proprietary TLVs:
7379 * According to the tcpdump code, this is of the form:
7380 * #TLVs (2 bytes)
7381 * #Padbytes (2 bytes)
7382 * per TLV:
7383 * type (1 byte)
7384 * length
7385 * value (length-2 bytes)
7386 * padbytes
7387 */
7388
7389 proto_item *hidden_item;
7390
7391 hidden_item = proto_tree_add_item(rsvp_object_tree,
7392 hf_rsvp_filter[RSVPF_JUNIPER],
7393 tvb, offset, obj_length, ENC_NA);
7394 proto_item_set_hidden(hidden_item);
7395
7396 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7397 proto_item_set_hidden(hidden_item);
7398
7399 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_juniper, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
7400 offset += 4;
7401 if (type == 1) {
7402 guint tlvs, pad;
7403 tlvs = tvb_get_ntohs(tvb, offset);
7404 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_numtlvs, tvb,
7405 offset, 2, ENC_BIG_ENDIAN);
7406 offset += 2;
7407 pad = tvb_get_ntohs(tvb, offset);
7408 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_padlength, tvb,
7409 offset, 2, ENC_BIG_ENDIAN);
7410 offset += 2;
7411 while (tlvs > 0) {
7412 guint8 t, l;
7413 t = tvb_get_guint8(tvb, offset);
7414 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_type, tvb,
7415 offset, 1, ENC_BIG_ENDIAN);
7416 offset += 1;
7417 l = tvb_get_guint8(tvb, offset);
7418 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_length, tvb,
7419 offset, 1, ENC_BIG_ENDIAN);
7420 offset += 1;
7421 switch (t) {
7422 case 0x01:
7423 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_cos, tvb,
7424 offset, l-2, ENC_BIG_ENDIAN);
7425 offset += (l-2);
7426 break;
7427 case 0x02:
7428 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_metric1, tvb,
7429 offset, l-2, ENC_BIG_ENDIAN);
7430 offset += (l-2);
7431 break;
7432 case 0x04:
7433 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_metric2, tvb,
7434 offset, l-2, ENC_BIG_ENDIAN);
7435 offset += (l-2);
7436 break;
7437 case 0x08:
7438 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_ccc_status, tvb,
7439 offset, l-2, ENC_BIG_ENDIAN);
7440 offset += (l-2);
7441 break;
7442 case 0x10:
7443 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_path, tvb,
7444 offset, l-2, ENC_BIG_ENDIAN);
7445 offset += (l-2);
7446 break;
7447 default:
7448 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_unknown, tvb,
7449 offset, l-2, ENC_NA);
7450 offset += (l-2);
7451 break;
7452 }
7453 tlvs--;
7454 }
7455 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_pad, tvb,
7456 offset, pad, ENC_NA);
7457 } else if (obj_length > 4) {
7458 proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_unknown, tvb,
7459 offset, obj_length, ENC_NA);
7460 }
7461 }
7462
7463 /*----------------------------------------------------------------------------
7464 * UNKNOWN
7465 *---------------------------------------------------------------------------*/
7466 static void
dissect_rsvp_unknown(proto_tree * ti _U_,proto_tree * rsvp_object_tree,tvbuff_t * tvb,int offset,int obj_length,int rsvp_class _U_,int type _U_)7467 dissect_rsvp_unknown(proto_tree *ti _U_,
7468 proto_tree *rsvp_object_tree,
7469 tvbuff_t *tvb,
7470 int offset, int obj_length,
7471 int rsvp_class _U_, int type _U_)
7472 {
7473 proto_tree *hidden_item;
7474
7475 hidden_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, ENC_BIG_ENDIAN);
7476 proto_item_set_hidden(hidden_item);
7477
7478 proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_unknown, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
7479 if (obj_length > 4) {
7480 proto_tree_add_item(rsvp_object_tree, hf_rsvp_unknown_data, tvb, offset + 4,
7481 obj_length - 4, ENC_NA);
7482 }
7483 }
7484
7485
7486 /*------------------------------------------------------------------------------
7487 * Dissect a single RSVP message in a tree
7488 *------------------------------------------------------------------------------*/
7489 static void
dissect_rsvp_msg_tree(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int tree_mode,rsvp_conversation_info * rsvph,gboolean e2ei)7490 dissect_rsvp_msg_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
7491 int tree_mode, rsvp_conversation_info *rsvph, gboolean e2ei)
7492 {
7493 proto_tree *rsvp_tree;
7494 proto_tree *rsvp_header_tree;
7495 proto_tree *rsvp_object_tree;
7496 proto_tree *ti, *len_item;
7497 proto_item *hidden_item, *cksum_item;
7498 guint16 cksum, computed_cksum;
7499 vec_t cksum_vec[1];
7500 int offset = 0;
7501 int len;
7502 guint8 message_type;
7503 int session_off, tempfilt_off;
7504 int msg_length;
7505 int obj_length;
7506 gboolean have_integrity_object = FALSE;
7507
7508 offset = 0;
7509 msg_length = tvb_get_ntohs(tvb, 6);
7510 message_type = tvb_get_guint8(tvb, 1);
7511
7512 ti = proto_tree_add_item(tree, proto_rsvp, tvb, offset, msg_length,
7513 ENC_NA);
7514 rsvp_tree = proto_item_add_subtree(ti, tree_mode);
7515 if (e2ei)
7516 proto_item_append_text(rsvp_tree, " (E2E-IGNORE)");
7517 proto_item_append_text(rsvp_tree, ": ");
7518 proto_item_append_text(rsvp_tree, "%s", val_to_str_ext(message_type, &message_type_vals_ext,
7519 "Unknown (%u). "));
7520 find_rsvp_session_tempfilt(tvb, 0, &session_off, &tempfilt_off);
7521 if (session_off)
7522 proto_item_append_text(rsvp_tree, "%s", summary_session(pinfo->pool, tvb, session_off));
7523 if (tempfilt_off)
7524 proto_item_append_text(rsvp_tree, "%s", summary_template(pinfo->pool, tvb, tempfilt_off));
7525
7526 rsvp_header_tree = proto_tree_add_subtree_format(rsvp_tree, tvb, offset, 8,
7527 TREE(TT_HDR), &ti, "RSVP Header. %s",
7528 val_to_str_ext(message_type, &message_type_vals_ext,
7529 "Unknown Message (%u). "));
7530 if (e2ei)
7531 proto_item_append_text(ti, " (E2E-IGNORE)");
7532
7533 proto_tree_add_item(rsvp_header_tree, hf_rsvp_version, tvb, offset, 1, ENC_BIG_ENDIAN);
7534 proto_tree_add_item(rsvp_header_tree, hf_rsvp_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
7535 proto_tree_add_uint(rsvp_header_tree, hf_rsvp_filter[RSVPF_MSG], tvb,
7536 offset+1, 1, message_type);
7537 switch (RSVPF_MSG + message_type) {
7538
7539 case RSVPF_PATH:
7540 case RSVPF_RESV:
7541 case RSVPF_PATHERR:
7542 case RSVPF_RESVERR:
7543 case RSVPF_PATHTEAR:
7544 case RSVPF_RESVTEAR:
7545 case RSVPF_RCONFIRM:
7546 case RSVPF_RTEARCONFIRM:
7547 case RSVPF_BUNDLE:
7548 case RSVPF_ACK:
7549 case RSVPF_SREFRESH:
7550 case RSVPF_HELLO:
7551 case RSVPF_NOTIFY:
7552 hidden_item = proto_tree_add_boolean(rsvp_header_tree, hf_rsvp_filter[RSVPF_MSG + message_type], tvb,
7553 offset+1, 1, 1);
7554 proto_item_set_hidden(hidden_item);
7555 break;
7556 }
7557
7558 cksum = tvb_get_ntohs(tvb, offset+2);
7559 cksum_item = proto_tree_add_item(rsvp_header_tree, hf_rsvp_message_checksum, tvb, offset+2, 2, ENC_BIG_ENDIAN);
7560
7561 proto_tree_add_item(rsvp_header_tree, hf_rsvp_sending_ttl, tvb, offset+4, 1, ENC_BIG_ENDIAN);
7562 proto_tree_add_item(rsvp_header_tree, hf_rsvp_message_length, tvb, offset+6, 2, ENC_BIG_ENDIAN);
7563
7564 offset = 8;
7565 len = 8;
7566
7567 if (message_type == RSVP_MSG_BUNDLE) {
7568 /* Bundle message. Dissect component messages */
7569 if (rsvp_bundle_dissect) {
7570 int len2 = 8;
7571 while (len2 < msg_length) {
7572 gint sub_len;
7573 tvbuff_t *tvb_sub;
7574 sub_len = tvb_get_ntohs(tvb, len2+6);
7575 tvb_sub = tvb_new_subset_length(tvb, len2, sub_len);
7576 dissect_rsvp_msg_tree(tvb_sub, pinfo, rsvp_tree, TREE(TT_BUNDLE_COMPMSG), rsvph, e2ei);
7577 len2 += sub_len;
7578 }
7579 } else {
7580 proto_tree_add_expert(rsvp_tree, pinfo, &ei_rsvp_bundle_component_msg, tvb, offset, msg_length - len);
7581 }
7582 return;
7583 }
7584
7585 while (len < msg_length) {
7586 guint8 rsvp_class;
7587 guint8 type;
7588
7589 obj_length = tvb_get_ntohs(tvb, offset);
7590 rsvp_class = tvb_get_guint8(tvb, offset+2);
7591 type = tvb_get_guint8(tvb, offset+3);
7592 ti = proto_tree_add_item(rsvp_tree, hf_rsvp_filter[rsvp_class_to_filter_num(rsvp_class)],
7593 tvb, offset, obj_length, ENC_BIG_ENDIAN);
7594 rsvp_object_tree = proto_item_add_subtree(ti, TREE(rsvp_class_to_tree_type(rsvp_class)));
7595 len_item = proto_tree_add_item(rsvp_object_tree, hf_rsvp_length, tvb, offset, 2, ENC_BIG_ENDIAN);
7596 if (obj_length < 4) {
7597 expert_add_info_format(pinfo, len_item, &ei_rsvp_invalid_length,
7598 "Length: %u (bogus, must be >= 4)", obj_length);
7599 break;
7600 }
7601 proto_tree_add_uint(rsvp_object_tree, hf_rsvp_filter[RSVPF_OBJECT], tvb,
7602 offset+2, 1, rsvp_class);
7603
7604 switch(rsvp_class) {
7605
7606 case RSVP_CLASS_SESSION:
7607 dissect_rsvp_session(pinfo, ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type, rsvph);
7608 break;
7609
7610 case RSVP_CLASS_HOP:
7611 dissect_rsvp_hop(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7612 break;
7613
7614 case RSVP_CLASS_TIME_VALUES:
7615 dissect_rsvp_time_values(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7616 break;
7617
7618 case RSVP_CLASS_ERROR:
7619 dissect_rsvp_error(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7620 break;
7621
7622 case RSVP_CLASS_SCOPE:
7623 dissect_rsvp_scope(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7624 break;
7625
7626 case RSVP_CLASS_STYLE:
7627 dissect_rsvp_style(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7628 break;
7629
7630 case RSVP_CLASS_CONFIRM:
7631 dissect_rsvp_confirm(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7632 break;
7633
7634 case RSVP_CLASS_SENDER_TEMPLATE:
7635 case RSVP_CLASS_FILTER_SPEC:
7636 dissect_rsvp_template_filter(pinfo, ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type, rsvph);
7637 break;
7638
7639 case RSVP_CLASS_SENDER_TSPEC:
7640 dissect_rsvp_tspec(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7641 break;
7642
7643 case RSVP_CLASS_FLOWSPEC:
7644 dissect_rsvp_flowspec(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7645 break;
7646
7647 case RSVP_CLASS_ADSPEC:
7648 dissect_rsvp_adspec(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7649 break;
7650
7651 case RSVP_CLASS_INTEGRITY:
7652 have_integrity_object = TRUE;
7653 dissect_rsvp_integrity(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7654 break;
7655
7656 case RSVP_CLASS_POLICY:
7657 dissect_rsvp_policy(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7658 break;
7659
7660 case RSVP_CLASS_LABEL_REQUEST:
7661 dissect_rsvp_label_request(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7662 break;
7663
7664 case RSVP_CLASS_RECOVERY_LABEL:
7665 case RSVP_CLASS_UPSTREAM_LABEL:
7666 case RSVP_CLASS_SUGGESTED_LABEL:
7667 case RSVP_CLASS_LABEL:
7668 dissect_rsvp_label(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7669 break;
7670
7671 case RSVP_CLASS_LABEL_SET:
7672 dissect_rsvp_label_set(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7673 break;
7674
7675 case RSVP_CLASS_SESSION_ATTRIBUTE:
7676 dissect_rsvp_session_attribute(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7677 break;
7678
7679 case RSVP_CLASS_EXPLICIT_ROUTE:
7680 dissect_rsvp_explicit_route(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7681 break;
7682
7683 case RSVP_CLASS_RECORD_ROUTE:
7684 dissect_rsvp_record_route(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7685 break;
7686
7687 case RSVP_CLASS_EXCLUDE_ROUTE:
7688 dissect_rsvp_exclude_route(ti, pinfo, rsvp_object_tree, tvb, offset,
7689 obj_length, rsvp_class, type);
7690 break;
7691
7692 case RSVP_CLASS_MESSAGE_ID:
7693 dissect_rsvp_message_id(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7694 break;
7695
7696 case RSVP_CLASS_MESSAGE_ID_ACK:
7697 dissect_rsvp_message_id_ack(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7698 break;
7699
7700 case RSVP_CLASS_MESSAGE_ID_LIST:
7701 dissect_rsvp_message_id_list(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7702 break;
7703
7704 case RSVP_CLASS_HELLO:
7705 dissect_rsvp_hello(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7706 break;
7707
7708 case RSVP_CLASS_DCLASS:
7709 dissect_rsvp_dclass(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7710 break;
7711
7712 case RSVP_CLASS_ADMIN_STATUS:
7713 dissect_rsvp_admin_status(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7714 break;
7715
7716 case RSVP_CLASS_LSP_ATTRIBUTES:
7717 case RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES:
7718 dissect_rsvp_lsp_attributes(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7719 break;
7720
7721 case RSVP_CLASS_ASSOCIATION:
7722 dissect_rsvp_association(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7723 break;
7724
7725 case RSVP_CLASS_LSP_TUNNEL_IF_ID:
7726 dissect_rsvp_lsp_tunnel_if_id(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7727 break;
7728
7729 case RSVP_CLASS_NOTIFY_REQUEST:
7730 dissect_rsvp_notify_request(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7731 break;
7732
7733 case RSVP_CLASS_GENERALIZED_UNI:
7734 dissect_rsvp_gen_uni(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type, rsvph);
7735 break;
7736
7737 case RSVP_CLASS_CALL_ID:
7738 dissect_rsvp_call_id(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7739 break;
7740
7741 case RSVP_CLASS_3GPP2_OBJECT:
7742 dissect_rsvp_3gpp_object(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7743 break;
7744
7745 case RSVP_CLASS_RESTART_CAP:
7746 dissect_rsvp_restart_cap(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7747 break;
7748
7749 case RSVP_CLASS_LINK_CAP:
7750 dissect_rsvp_link_cap(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7751 break;
7752
7753 case RSVP_CLASS_PROTECTION:
7754 dissect_rsvp_protection_info(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7755 break;
7756
7757 case RSVP_CLASS_FAST_REROUTE:
7758 dissect_rsvp_fast_reroute(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7759 break;
7760
7761 case RSVP_CLASS_S2L_SUB_LSP:
7762 dissect_rsvp_s2l_sub_lsp(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7763 break;
7764
7765 case RSVP_CLASS_DETOUR:
7766 dissect_rsvp_detour(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7767 break;
7768
7769 case RSVP_CLASS_DIFFSERV:
7770 dissect_rsvp_diffserv(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7771 break;
7772
7773 case RSVP_CLASS_CLASSTYPE:
7774 dissect_rsvp_diffserv_aware_te(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7775 break;
7776
7777 case RSVP_CLASS_VENDOR_PRIVATE_1:
7778 case RSVP_CLASS_VENDOR_PRIVATE_2:
7779 case RSVP_CLASS_VENDOR_PRIVATE_3:
7780 case RSVP_CLASS_VENDOR_PRIVATE_4:
7781 case RSVP_CLASS_VENDOR_PRIVATE_5:
7782 case RSVP_CLASS_VENDOR_PRIVATE_6:
7783 case RSVP_CLASS_VENDOR_PRIVATE_7:
7784 case RSVP_CLASS_VENDOR_PRIVATE_8:
7785 case RSVP_CLASS_VENDOR_PRIVATE_9:
7786 case RSVP_CLASS_VENDOR_PRIVATE_10:
7787 case RSVP_CLASS_VENDOR_PRIVATE_11:
7788 case RSVP_CLASS_VENDOR_PRIVATE_12:
7789 dissect_rsvp_vendor_private_use(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7790 break;
7791
7792 case RSVP_CLASS_CALL_ATTRIBUTES:
7793 dissect_rsvp_call_attributes(ti, pinfo, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7794 break;
7795
7796 case RSVP_CLASS_JUNIPER_PROPERTIES:
7797 dissect_rsvp_juniper(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7798 break;
7799 case RSVP_CLASS_NULL:
7800 default:
7801 dissect_rsvp_unknown(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
7802 break;
7803 }
7804
7805 offset += obj_length;
7806 len += obj_length;
7807 }
7808
7809 /* We delay the checksum check until here so we know if the message
7810 * contained an integrity object or not */
7811 if (!pinfo->fragmented && ((int) tvb_captured_length(tvb) >= msg_length)) {
7812 /* The packet isn't part of a fragmented datagram and isn't
7813 truncated, so we can checksum it. */
7814 SET_CKSUM_VEC_TVB(cksum_vec[0], tvb, 0, msg_length);
7815 computed_cksum = in_cksum(&cksum_vec[0], 1);
7816 /*
7817 * in_cksum() should never return 0xFFFF here, because, to quote
7818 * RFC 1624 section 3 "Discussion":
7819 *
7820 * In one's complement, there are two representations of
7821 * zero: the all zero and the all one bit values, often
7822 * referred to as +0 and -0. One's complement addition
7823 * of non-zero inputs can produce -0 as a result, but
7824 * never +0. Since there is guaranteed to be at least
7825 * one non-zero field in the IP header, and the checksum
7826 * field in the protocol header is the complement of the
7827 * sum, the checksum field can never contain ~(+0), which
7828 * is -0 (0xFFFF). It can, however, contain ~(-0), which
7829 * is +0 (0x0000).
7830 *
7831 * RFC 1624 is discussing the checksum of the *IPv4* header,
7832 * where the "version" field is 4, ensuring that, in a valid
7833 * IPv4 header, there is at least one non-zero field, but it
7834 * also applies to an RSVP packet, because header includes a
7835 * version field with the value 1, so at least one field in
7836 * the checksummed data is non-zero.
7837 *
7838 * in_cksum() returns the negation of the one's-complement
7839 * sum of all the data handed to it, and that data won't be
7840 * all zero, so the sum won't be 0 (+0), and thus the negation
7841 * won't be -0, i.e. won't be 0xFFFF.
7842 */
7843 if (computed_cksum == 0) {
7844 proto_item_append_text(cksum_item, " [correct]");
7845 } else if (cksum == 0 && have_integrity_object) {
7846 proto_item_append_text(cksum_item, " [ignored, integrity object used]");
7847 } else {
7848 proto_item_append_text(cksum_item, " [incorrect, should be 0x%04x]",
7849 in_cksum_shouldbe(cksum, computed_cksum));
7850 }
7851 }
7852 }
7853
7854 /*------------------------------------------------------------------------------
7855 * The main loop
7856 *------------------------------------------------------------------------------*/
7857 static void
dissect_rsvp_common(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,gboolean e2ei)7858 dissect_rsvp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean e2ei)
7859 {
7860 guint8 message_type;
7861 int session_off, tempfilt_off;
7862
7863 rsvp_conversation_info *rsvph;
7864 conversation_t *conversation;
7865 struct rsvp_request_key request_key, *new_request_key;
7866 struct rsvp_request_val *request_val;
7867
7868 col_clear(pinfo->cinfo, COL_INFO);
7869
7870 message_type = tvb_get_guint8(tvb, 1);
7871
7872 rsvph = wmem_new0(pinfo->pool, rsvp_conversation_info);
7873
7874 /* Copy over the source and destination addresses from the pinfo strucutre */
7875 set_address(&rsvph->source, pinfo->src.type, pinfo->src.len, pinfo->src.data);
7876 set_address(&rsvph->destination, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data);
7877
7878 col_add_str(pinfo->cinfo, COL_INFO,
7879 val_to_str_ext(message_type, &message_type_vals_ext, "Unknown (%u). "));
7880
7881 if (message_type == RSVP_MSG_BUNDLE) {
7882 col_set_str(pinfo->cinfo, COL_INFO,
7883 rsvp_bundle_dissect ?
7884 "Component Messages Dissected" :
7885 "Component Messages Not Dissected");
7886 } else {
7887 find_rsvp_session_tempfilt(tvb, 0, &session_off, &tempfilt_off);
7888 if (session_off)
7889 col_append_str(pinfo->cinfo, COL_INFO, summary_session(pinfo->pool, tvb, session_off));
7890 if (tempfilt_off)
7891 col_append_str(pinfo->cinfo, COL_INFO, summary_template(pinfo->pool, tvb, tempfilt_off));
7892 }
7893
7894 dissect_rsvp_msg_tree(tvb, pinfo, tree, TREE(TT_RSVP), rsvph, e2ei);
7895
7896 /* ACK, SREFRESH and HELLO messages don't have any associated SESSION and,
7897 therefore, no conversation */
7898 if ((message_type == RSVP_MSG_ACK) ||
7899 (message_type == RSVP_MSG_SREFRESH) ||
7900 (message_type == RSVP_MSG_HELLO))
7901 return;
7902
7903 /* Find out what conversation this packet is part of. */
7904 conversation = find_or_create_conversation(pinfo);
7905
7906 /* Now build the request key */
7907 memset(&request_key, 0, sizeof(request_key));
7908 request_key.conversation = conversation->conv_index;
7909 request_key.session_type = rsvph->session_type;
7910
7911 switch (request_key.session_type) {
7912 case RSVP_SESSION_TYPE_IPV4:
7913 set_address(&request_key.u.session_ipv4.destination,
7914 rsvph->destination.type, rsvph->destination.len,
7915 rsvph->destination.data);
7916 request_key.u.session_ipv4.protocol = rsvph->protocol;
7917 request_key.u.session_ipv4.udp_dest_port = rsvph->udp_dest_port;
7918 break;
7919
7920 case RSVP_SESSION_TYPE_IPV6:
7921 /* Not supported yet */
7922 break;
7923
7924 case RSVP_SESSION_TYPE_IPV4_LSP:
7925 set_address(&request_key.u.session_ipv4_lsp.destination,
7926 rsvph->destination.type, rsvph->destination.len,
7927 rsvph->destination.data);
7928 request_key.u.session_ipv4_lsp.udp_dest_port = rsvph->udp_dest_port;
7929 request_key.u.session_ipv4_lsp.ext_tunnel_id = rsvph->ext_tunnel_id;
7930 break;
7931
7932 case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
7933 set_address(&request_key.u.session_agg_ipv4.destination,
7934 rsvph->destination.type, rsvph->destination.len,
7935 rsvph->destination.data);
7936 request_key.u.session_agg_ipv4.dscp = rsvph->dscp;
7937 break;
7938
7939 case RSVP_SESSION_TYPE_IPV4_UNI:
7940 set_address(&request_key.u.session_ipv4_uni.destination,
7941 rsvph->destination.type, rsvph->destination.len,
7942 rsvph->destination.data);
7943 request_key.u.session_ipv4_uni.udp_dest_port = rsvph->udp_dest_port;
7944 request_key.u.session_ipv4_uni.ext_tunnel_id = rsvph->ext_tunnel_id;
7945 break;
7946
7947 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV4:
7948 set_address(&request_key.u.session_ipv4_p2mp_lsp.destination,
7949 rsvph->destination.type, rsvph->destination.len,
7950 rsvph->destination.data);
7951 request_key.u.session_ipv4_p2mp_lsp.udp_dest_port = rsvph->udp_dest_port;
7952 request_key.u.session_ipv4_p2mp_lsp.ext_tunnel_id = rsvph->ext_tunnel_id;
7953 break;
7954
7955 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV6:
7956 set_address(&request_key.u.session_ipv6_p2mp_lsp.destination,
7957 rsvph->destination.type, rsvph->destination.len,
7958 rsvph->destination.data);
7959 request_key.u.session_ipv6_p2mp_lsp.udp_dest_port = rsvph->udp_dest_port;
7960 request_key.u.session_ipv6_p2mp_lsp.ext_tunnel_id = rsvph->ext_tunnel_id_ipv6_pre;
7961 break;
7962
7963 case RSVP_SESSION_TYPE_IPV4_E_NNI:
7964 set_address(&request_key.u.session_ipv4_enni.destination,
7965 rsvph->destination.type, rsvph->destination.len,
7966 rsvph->destination.data);
7967 request_key.u.session_ipv4_enni.udp_dest_port = rsvph->udp_dest_port;
7968 request_key.u.session_ipv4_enni.ext_tunnel_id = rsvph->ext_tunnel_id;
7969 break;
7970 default:
7971 /* This should never happen. */
7972 proto_tree_add_expert(tree, pinfo, &ei_rsvp_session_type, tvb, 0, 0);
7973 break;
7974 }
7975
7976 copy_address_shallow(&request_key.source_info.source, &rsvph->source);
7977 request_key.source_info.udp_source_port = rsvph->udp_source_port;
7978
7979 /* See if a request with this key already exists */
7980 request_val =
7981 (struct rsvp_request_val *) wmem_map_lookup(rsvp_request_hash,
7982 &request_key);
7983
7984 /* If not, insert the new request key into the hash table */
7985 if (!request_val) {
7986 new_request_key = (struct rsvp_request_key *)wmem_memdup(
7987 wmem_file_scope(), &request_key, sizeof(struct rsvp_request_key));
7988 switch (request_key.session_type) {
7989 case RSVP_SESSION_TYPE_IPV4:
7990 copy_address_wmem(wmem_file_scope(), &new_request_key->u.session_ipv4.destination,
7991 &request_key.u.session_ipv4.destination);
7992 break;
7993 case RSVP_SESSION_TYPE_IPV4_LSP:
7994 copy_address_wmem(wmem_file_scope(), &new_request_key->u.session_ipv4_lsp.destination,
7995 &request_key.u.session_ipv4_lsp.destination);
7996 break;
7997 case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
7998 copy_address_wmem(wmem_file_scope(), &new_request_key->u.session_agg_ipv4.destination,
7999 &request_key.u.session_agg_ipv4.destination);
8000 break;
8001 case RSVP_SESSION_TYPE_IPV4_UNI:
8002 copy_address_wmem(wmem_file_scope(), &new_request_key->u.session_ipv4_uni.destination,
8003 &request_key.u.session_ipv4_uni.destination);
8004 break;
8005 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV4:
8006 copy_address_wmem(wmem_file_scope(), &new_request_key->u.session_ipv4_p2mp_lsp.destination,
8007 &request_key.u.session_ipv4_p2mp_lsp.destination);
8008 break;
8009 case RSVP_SESSION_TYPE_P2MP_LSP_TUNNEL_IPV6:
8010 copy_address_wmem(wmem_file_scope(), &new_request_key->u.session_ipv6_p2mp_lsp.destination,
8011 &request_key.u.session_ipv6_p2mp_lsp.destination);
8012 break;
8013 case RSVP_SESSION_TYPE_IPV4_E_NNI:
8014 copy_address_wmem(wmem_file_scope(), &new_request_key->u.session_ipv4_enni.destination,
8015 &request_key.u.session_ipv4_enni.destination);
8016 break;
8017 default:
8018 break;
8019 }
8020 copy_address_wmem(wmem_file_scope(), &new_request_key->source_info.source, &rsvph->source);
8021
8022 request_val = wmem_new(wmem_file_scope(), struct rsvp_request_val);
8023 request_val->value = conversation->conv_index;
8024
8025 wmem_map_insert(rsvp_request_hash, new_request_key, request_val);
8026 }
8027
8028 tap_queue_packet(rsvp_tap, pinfo, rsvph);
8029 }
8030
8031 static int
dissect_rsvp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)8032 dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8033 {
8034 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RSVP");
8035
8036 dissect_rsvp_common(tvb, pinfo, tree, FALSE);
8037 return tvb_captured_length(tvb);
8038 }
8039
8040 static int
dissect_rsvp_e2ei(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)8041 dissect_rsvp_e2ei(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8042 {
8043 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RSVP-E2EI");
8044
8045 dissect_rsvp_common(tvb, pinfo, tree, TRUE);
8046 return tvb_captured_length(tvb);
8047 }
8048
8049 static void
register_rsvp_prefs(void)8050 register_rsvp_prefs(void)
8051 {
8052 module_t *rsvp_module;
8053
8054 rsvp_module = prefs_register_protocol(proto_rsvp, NULL);
8055 prefs_register_bool_preference(
8056 rsvp_module, "process_bundle",
8057 "Dissect sub-messages in BUNDLE message",
8058 "Specifies whether Wireshark should decode and display sub-messages within BUNDLE messages",
8059 &rsvp_bundle_dissect);
8060 prefs_register_enum_preference(
8061 rsvp_module, "generalized_label_options",
8062 "Dissect generalized labels as",
8063 "Specifies how Wireshark should dissect generalized labels",
8064 (gint *)&rsvp_generalized_label_option,
8065 rsvp_generalized_label_options,
8066 FALSE);
8067 }
8068
8069 void
proto_register_rsvp(void)8070 proto_register_rsvp(void)
8071 {
8072 gint i;
8073
8074 static hf_register_info rsvpf_info[] = {
8075
8076 /* Message type number */
8077 {&hf_rsvp_filter[RSVPF_MSG],
8078 { "Message Type", "rsvp.msg",
8079 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &message_type_vals_ext, 0x0,
8080 NULL, HFILL }
8081 },
8082
8083 /* Message type shorthands */
8084 {&hf_rsvp_filter[RSVPF_PATH],
8085 { "Path Message", "rsvp.path",
8086 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8087 NULL, HFILL }
8088 },
8089
8090 {&hf_rsvp_filter[RSVPF_RESV],
8091 { "Resv Message", "rsvp.resv",
8092 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8093 NULL, HFILL }
8094 },
8095
8096 {&hf_rsvp_filter[RSVPF_PATHERR],
8097 { "Path Error Message", "rsvp.perr",
8098 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8099 NULL, HFILL }
8100 },
8101
8102 {&hf_rsvp_filter[RSVPF_RESVERR],
8103 { "Resv Error Message", "rsvp.rerr",
8104 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8105 NULL, HFILL }
8106 },
8107
8108 {&hf_rsvp_filter[RSVPF_PATHTEAR],
8109 { "Path Tear Message", "rsvp.ptear",
8110 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8111 NULL, HFILL }
8112 },
8113
8114 {&hf_rsvp_filter[RSVPF_RESVTEAR],
8115 { "Resv Tear Message", "rsvp.rtear",
8116 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8117 NULL, HFILL }
8118 },
8119
8120 {&hf_rsvp_filter[RSVPF_RCONFIRM],
8121 { "Resv Confirm Message", "rsvp.resvconf",
8122 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8123 NULL, HFILL }
8124 },
8125
8126 {&hf_rsvp_filter[RSVPF_RTEARCONFIRM],
8127 { "Resv Tear Confirm Message", "rsvp.rtearconf",
8128 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8129 NULL, HFILL }
8130 },
8131
8132 {&hf_rsvp_filter[RSVPF_BUNDLE],
8133 { "Bundle Message", "rsvp.bundle",
8134 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8135 NULL, HFILL }
8136 },
8137
8138 {&hf_rsvp_filter[RSVPF_ACK],
8139 { "Ack Message", "rsvp.ack",
8140 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8141 NULL, HFILL }
8142 },
8143
8144 {&hf_rsvp_filter[RSVPF_SREFRESH],
8145 { "Srefresh Message", "rsvp.srefresh",
8146 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8147 NULL, HFILL }
8148 },
8149
8150 {&hf_rsvp_filter[RSVPF_HELLO],
8151 { "HELLO Message", "rsvp.hello",
8152 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8153 NULL, HFILL }
8154 },
8155
8156 /* Object class */
8157 {&hf_rsvp_filter[RSVPF_OBJECT],
8158 { "Object class", "rsvp.object",
8159 FT_UINT8, BASE_DEC | BASE_EXT_STRING, &rsvp_class_vals_ext, 0x0,
8160 NULL, HFILL }
8161 },
8162
8163 {&hf_rsvp_ctype,
8164 { "C-type", "rsvp.ctype",
8165 FT_UINT32, BASE_DEC, NULL, 0x0,
8166 NULL, HFILL }
8167 },
8168
8169 {&hf_rsvp_ctype_session,
8170 { "C-type", "rsvp.ctype.session",
8171 FT_UINT32, BASE_DEC, VALS(rsvp_c_type_session_vals), 0x0,
8172 NULL, HFILL }
8173 },
8174
8175 {&hf_rsvp_ctype_3gpp_object,
8176 { "C-type", "rsvp.ctype.3gpp_object",
8177 FT_UINT32, BASE_DEC, NULL, 0x0,
8178 NULL, HFILL }
8179 },
8180
8181 {&hf_rsvp_ctype_restart_cap,
8182 { "C-type", "rsvp.ctype.restart_cap",
8183 FT_UINT32, BASE_DEC, NULL, 0x0,
8184 NULL, HFILL }
8185 },
8186
8187 {&hf_rsvp_ctype_link_cap,
8188 { "C-type", "rsvp.ctype.link_cap",
8189 FT_UINT32, BASE_DEC, NULL, 0x0,
8190 NULL, HFILL }
8191 },
8192
8193 {&hf_rsvp_ctype_protection_info,
8194 { "C-type", "rsvp.ctype.protection_info",
8195 FT_UINT32, BASE_DEC, NULL, 0x0,
8196 NULL, HFILL }
8197 },
8198
8199 {&hf_rsvp_ctype_fast_reroute,
8200 { "C-type", "rsvp.ctype.fast_reroute",
8201 FT_UINT32, BASE_DEC, NULL, 0x0,
8202 NULL, HFILL }
8203 },
8204
8205 {&hf_rsvp_ctype_detour,
8206 { "C-type", "rsvp.ctype.detour",
8207 FT_UINT32, BASE_DEC, NULL, 0x0,
8208 NULL, HFILL }
8209 },
8210
8211 {&hf_rsvp_ctype_diffserv,
8212 { "C-type", "rsvp.ctype.diffserv",
8213 FT_UINT32, BASE_DEC, VALS(rsvp_c_type_diffserv_vals), 0x0,
8214 NULL, HFILL }
8215 },
8216
8217 {&hf_rsvp_ctype_diffserv_aware_te,
8218 { "C-type", "rsvp.ctype.diffserv_aware_te",
8219 FT_UINT32, BASE_DEC, NULL, 0x0,
8220 NULL, HFILL }
8221 },
8222
8223 {&hf_rsvp_ctype_vendor,
8224 { "C-type", "rsvp.ctype.vendor",
8225 FT_UINT32, BASE_DEC, NULL, 0x0,
8226 NULL, HFILL }
8227 },
8228
8229 {&hf_rsvp_ctype_juniper,
8230 { "C-type", "rsvp.ctype.juniper",
8231 FT_UINT32, BASE_DEC, NULL, 0x0,
8232 NULL, HFILL }
8233 },
8234
8235 {&hf_rsvp_ctype_unknown,
8236 { "C-type", "rsvp.ctype.unknown",
8237 FT_UINT32, BASE_DEC, NULL, 0x0,
8238 NULL, HFILL }
8239 },
8240
8241 {&hf_rsvp_ctype_label,
8242 { "C-type", "rsvp.ctype.label",
8243 FT_UINT32, BASE_DEC, VALS(rsvp_c_type_label_vals), 0x0,
8244 NULL, HFILL }
8245 },
8246
8247 {&hf_rsvp_ctype_notify_request,
8248 { "C-type", "rsvp.ctype.notify_request",
8249 FT_UINT32, BASE_DEC, VALS(rsvp_c_type_notify_request_vals), 0x0,
8250 NULL, HFILL }
8251 },
8252
8253 {&hf_rsvp_ctype_generalized_uni,
8254 { "C-type", "rsvp.ctype.generalized_uni",
8255 FT_UINT32, BASE_DEC, NULL, 0x0,
8256 NULL, HFILL }
8257 },
8258
8259 {&hf_rsvp_parameter,
8260 { "Parameter", "rsvp.parameter",
8261 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &svc_vals_ext, 0x0,
8262 NULL, HFILL }
8263 },
8264
8265 {&hf_rsvp_parameter_flags,
8266 { "Parameter flags", "rsvp.parameter_flags",
8267 FT_UINT8, BASE_HEX, NULL, 0x0,
8268 NULL, HFILL }
8269 },
8270
8271 {&hf_rsvp_parameter_length,
8272 { "Parameter length", "rsvp.parameter_length",
8273 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_word_not_including_header, 0x0,
8274 NULL, HFILL }
8275 },
8276
8277 {&hf_rsvp_error_value,
8278 { "Error value", "rsvp.error_value",
8279 FT_UINT16, BASE_DEC, NULL, 0x0,
8280 NULL, HFILL }
8281 },
8282
8283 {&hf_rsvp_class,
8284 { "Class", "rsvp.class",
8285 FT_UINT16, BASE_DEC, NULL, 0x0,
8286 NULL, HFILL }
8287 },
8288
8289 {&hf_rsvp_class_length,
8290 { "Length", "rsvp.class_length",
8291 FT_UINT16, BASE_DEC, NULL, 0x0,
8292 NULL, HFILL }
8293 },
8294
8295 {&hf_rsvp_reserved,
8296 { "Reserved", "rsvp.ctype.reserved",
8297 FT_BYTES, BASE_NONE, NULL, 0x0,
8298 NULL, HFILL }
8299 },
8300
8301 {&hf_rsvp_switching_granularity,
8302 { "Switching granularity", "rsvp.switching_granularity",
8303 FT_UINT16, BASE_DEC, VALS(rsvp_switching_granularity_vals), 0x0,
8304 NULL, HFILL }
8305 },
8306
8307 {&hf_rsvp_filter[RSVPF_NOTIFY],
8308 { "Notify Message", "rsvp.notify",
8309 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8310 NULL, HFILL }
8311 },
8312
8313 /* Object present shorthands */
8314 {&hf_rsvp_filter[RSVPF_SESSION],
8315 { "SESSION", "rsvp.session",
8316 FT_NONE, BASE_NONE, NULL, 0x0,
8317 NULL, HFILL }
8318 },
8319
8320 {&hf_rsvp_filter[RSVPF_HOP],
8321 { "HOP", "rsvp.hop",
8322 FT_NONE, BASE_NONE, NULL, 0x0,
8323 NULL, HFILL }
8324 },
8325
8326 {&hf_rsvp_filter[RSVPF_HELLO_OBJ],
8327 { "HELLO Request/Ack", "rsvp.hello_obj",
8328 FT_NONE, BASE_NONE, NULL, 0x0,
8329 NULL, HFILL }
8330 },
8331
8332 {&hf_rsvp_filter[RSVPF_INTEGRITY],
8333 { "INTEGRITY", "rsvp.integrity",
8334 FT_NONE, BASE_NONE, NULL, 0x0,
8335 NULL, HFILL }
8336 },
8337
8338 {&hf_rsvp_filter[RSVPF_TIME_VALUES],
8339 { "TIME VALUES", "rsvp.time",
8340 FT_NONE, BASE_NONE, NULL, 0x0,
8341 NULL, HFILL }
8342 },
8343
8344 {&hf_rsvp_filter[RSVPF_ERROR],
8345 { "ERROR", "rsvp.error",
8346 FT_NONE, BASE_NONE, NULL, 0x0,
8347 NULL, HFILL }
8348 },
8349
8350 {&hf_rsvp_filter[RSVPF_SCOPE],
8351 { "SCOPE", "rsvp.scope",
8352 FT_NONE, BASE_NONE, NULL, 0x0,
8353 NULL, HFILL }
8354 },
8355
8356 {&hf_rsvp_filter[RSVPF_STYLE],
8357 { "STYLE", "rsvp.style",
8358 FT_NONE, BASE_NONE, NULL, 0x0,
8359 NULL, HFILL }
8360 },
8361
8362 {&hf_rsvp_filter[RSVPF_FLOWSPEC],
8363 { "FLOWSPEC", "rsvp.flowspec",
8364 FT_NONE, BASE_NONE, NULL, 0x0,
8365 NULL, HFILL }
8366 },
8367
8368 {&hf_rsvp_filter[RSVPF_FILTER_SPEC],
8369 { "FILTERSPEC", "rsvp.filter",
8370 FT_NONE, BASE_NONE, NULL, 0x0,
8371 NULL, HFILL }
8372 },
8373
8374 {&hf_rsvp_filter[RSVPF_SENDER],
8375 { "SENDER TEMPLATE", "rsvp.sender",
8376 FT_NONE, BASE_NONE, NULL, 0x0,
8377 NULL, HFILL }
8378 },
8379
8380 {&hf_rsvp_filter[RSVPF_TSPEC],
8381 { "SENDER TSPEC", "rsvp.tspec",
8382 FT_NONE, BASE_NONE, NULL, 0x0,
8383 NULL, HFILL }
8384 },
8385
8386 {&hf_rsvp_filter[RSVPF_ADSPEC],
8387 { "ADSPEC", "rsvp.adspec",
8388 FT_NONE, BASE_NONE, NULL, 0x0,
8389 NULL, HFILL }
8390 },
8391
8392 {&hf_rsvp_filter[RSVPF_POLICY],
8393 { "POLICY", "rsvp.policy",
8394 FT_NONE, BASE_NONE, NULL, 0x0,
8395 NULL, HFILL }
8396 },
8397
8398 {&hf_rsvp_filter[RSVPF_CONFIRM],
8399 { "CONFIRM", "rsvp.confirm",
8400 FT_NONE, BASE_NONE, NULL, 0x0,
8401 NULL, HFILL }
8402 },
8403
8404 {&hf_rsvp_filter[RSVPF_LABEL],
8405 { "LABEL", "rsvp.label",
8406 FT_NONE, BASE_NONE, NULL, 0x0,
8407 NULL, HFILL }
8408 },
8409
8410 {&hf_rsvp_filter[RSVPF_RECOVERY_LABEL],
8411 { "RECOVERY LABEL", "rsvp.recovery_label",
8412 FT_NONE, BASE_NONE, NULL, 0x0,
8413 NULL, HFILL }
8414 },
8415
8416 {&hf_rsvp_filter[RSVPF_UPSTREAM_LABEL],
8417 { "UPSTREAM LABEL", "rsvp.upstream_label",
8418 FT_NONE, BASE_NONE, NULL, 0x0,
8419 NULL, HFILL }
8420 },
8421
8422 {&hf_rsvp_filter[RSVPF_SUGGESTED_LABEL],
8423 { "SUGGESTED LABEL", "rsvp.suggested_label",
8424 FT_NONE, BASE_NONE, NULL, 0x0,
8425 NULL, HFILL }
8426 },
8427
8428 {&hf_rsvp_filter[RSVPF_LABEL_SET],
8429 { "LABEL SET", "rsvp.label_set",
8430 FT_NONE, BASE_NONE, NULL, 0x0,
8431 NULL, HFILL }
8432 },
8433
8434 {&hf_rsvp_filter[RSVPF_ACCEPTABLE_LABEL_SET],
8435 { "ACCEPTABLE LABEL SET", "rsvp.acceptable_label_set",
8436 FT_NONE, BASE_NONE, NULL, 0x0,
8437 NULL, HFILL }
8438 },
8439
8440 {&hf_rsvp_filter[RSVPF_PROTECTION],
8441 { "PROTECTION", "rsvp.protection",
8442 FT_NONE, BASE_NONE, NULL, 0x0,
8443 NULL, HFILL }
8444 },
8445
8446 {&hf_rsvp_filter[RSVPF_DIFFSERV],
8447 { "DIFFSERV", "rsvp.diffserv",
8448 FT_NONE, BASE_NONE, NULL, 0x0,
8449 NULL, HFILL }
8450 },
8451
8452 {&hf_rsvp_filter[RSVPF_DSTE],
8453 { "CLASSTYPE", "rsvp.dste",
8454 FT_NONE, BASE_NONE, NULL, 0x0,
8455 NULL, HFILL }
8456 },
8457
8458 {&hf_rsvp_filter[RSVPF_RESTART_CAP],
8459 { "RESTART CAPABILITY", "rsvp.restart",
8460 FT_NONE, BASE_NONE, NULL, 0x0,
8461 NULL, HFILL }
8462 },
8463
8464 {&hf_rsvp_filter[RSVPF_LINK_CAP],
8465 { "LINK CAPABILITY", "rsvp.link",
8466 FT_NONE, BASE_NONE, NULL, 0x0,
8467 NULL, HFILL }
8468 },
8469
8470 {&hf_rsvp_filter[RSVPF_LABEL_REQUEST],
8471 { "LABEL REQUEST", "rsvp.label_request",
8472 FT_NONE, BASE_NONE, NULL, 0x0,
8473 NULL, HFILL }
8474 },
8475
8476 {&hf_rsvp_filter[RSVPF_SESSION_ATTRIBUTE],
8477 { "SESSION ATTRIBUTE", "rsvp.session_attribute",
8478 FT_NONE, BASE_NONE, NULL, 0x0,
8479 NULL, HFILL }
8480 },
8481
8482 {&hf_rsvp_filter[RSVPF_EXPLICIT_ROUTE],
8483 { "EXPLICIT ROUTE", "rsvp.explicit_route",
8484 FT_NONE, BASE_NONE, NULL, 0x0,
8485 NULL, HFILL }
8486 },
8487
8488 {&hf_rsvp_filter[RSVPF_RECORD_ROUTE],
8489 { "RECORD ROUTE", "rsvp.record_route",
8490 FT_NONE, BASE_NONE, NULL, 0x0,
8491 NULL, HFILL }
8492 },
8493
8494 {&hf_rsvp_filter[RSVPF_MESSAGE_ID],
8495 { "MESSAGE-ID", "rsvp.msgid",
8496 FT_NONE, BASE_NONE, NULL, 0x0,
8497 NULL, HFILL }
8498 },
8499
8500 {&hf_rsvp_filter[RSVPF_MESSAGE_ID_ACK],
8501 { "MESSAGE-ID ACK", "rsvp.msgid_ack",
8502 FT_NONE, BASE_NONE, NULL, 0x0,
8503 NULL, HFILL }
8504 },
8505
8506 {&hf_rsvp_filter[RSVPF_MESSAGE_ID_LIST],
8507 { "MESSAGE-ID LIST", "rsvp.msgid_list",
8508 FT_NONE, BASE_NONE, NULL, 0x0,
8509 NULL, HFILL }
8510 },
8511
8512 {&hf_rsvp_filter[RSVPF_DCLASS],
8513 { "DCLASS", "rsvp.dclass",
8514 FT_NONE, BASE_NONE, NULL, 0x0,
8515 NULL, HFILL }
8516 },
8517
8518 {&hf_rsvp_filter[RSVPF_LSP_TUNNEL_IF_ID],
8519 { "LSP INTERFACE-ID", "rsvp.lsp_tunnel_if_id",
8520 FT_NONE, BASE_NONE, NULL, 0x0,
8521 NULL, HFILL }
8522 },
8523
8524 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS],
8525 { "ADMIN STATUS", "rsvp.admin_status",
8526 FT_NONE, BASE_NONE, NULL, 0x0,
8527 NULL, HFILL }
8528 },
8529
8530 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_REFLECT],
8531 { "Reflect", "rsvp.admin_status.reflect",
8532 FT_BOOLEAN, 32, NULL, 0x80000000,
8533 NULL, HFILL }
8534 },
8535
8536 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_HANDOVER],
8537 { "Handover", "rsvp.admin_status.handover",
8538 FT_BOOLEAN, 32, NULL, 0x40,
8539 NULL, HFILL }
8540 },
8541
8542 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_LOCKOUT],
8543 { "Lockout", "rsvp.admin_status.lockout",
8544 FT_BOOLEAN, 32, NULL, 0x20,
8545 NULL, HFILL }
8546 },
8547
8548 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_INHIBIT],
8549 { "Inhibit Alarm Communication", "rsvp.admin_status.inhibit",
8550 FT_BOOLEAN, 32, NULL, 0x10,
8551 NULL, HFILL }
8552 },
8553
8554 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_CALL_MGMT],
8555 { "Call Management", "rsvp.admin_status.callmgmt",
8556 FT_BOOLEAN, 32, NULL, 0x08,
8557 NULL, HFILL }
8558 },
8559
8560 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_TESTING],
8561 { "Testing", "rsvp.admin_status.testing",
8562 FT_BOOLEAN, 32, NULL, 0x04,
8563 NULL, HFILL }
8564 },
8565
8566 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_DOWN],
8567 { "Administratively down", "rsvp.admin_status.down",
8568 FT_BOOLEAN, 32, NULL, 0x02,
8569 NULL, HFILL }
8570 },
8571
8572 {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_DELETE],
8573 { "Delete in progress", "rsvp.admin_status.delete",
8574 FT_BOOLEAN, 32, NULL, 0x01,
8575 NULL, HFILL }
8576 },
8577
8578 {&hf_rsvp_filter[RSVPF_LSP_ATTRIBUTES],
8579 { "LSP ATTRIBUTES", "rsvp.lsp_attributes",
8580 FT_NONE, BASE_NONE, NULL, 0x0,
8581 NULL, HFILL }
8582 },
8583
8584 {&hf_rsvp_filter[RSVPF_ASSOCIATION],
8585 { "ASSOCIATION", "rsvp.association",
8586 FT_NONE, BASE_NONE, NULL, 0x0,
8587 NULL, HFILL }
8588 },
8589
8590 {&hf_rsvp_filter[RSVPF_CALL_ATTRIBUTES],
8591 { "CALL ATTRIBUTES", "rsvp.call_attributes",
8592 FT_NONE, BASE_NONE, NULL, 0x0,
8593 NULL, HFILL }
8594 },
8595
8596 {&hf_rsvp_filter[RSVPF_NOTIFY_REQUEST],
8597 { "NOTIFY REQUEST", "rsvp.notify_request",
8598 FT_NONE, BASE_NONE, NULL, 0x0,
8599 NULL, HFILL }
8600 },
8601
8602 {&hf_rsvp_filter[RSVPF_GENERALIZED_UNI],
8603 { "GENERALIZED UNI", "rsvp.generalized_uni",
8604 FT_NONE, BASE_NONE, NULL, 0x0,
8605 NULL, HFILL }
8606 },
8607
8608 {&hf_rsvp_filter[RSVPF_CALL_ID],
8609 { "CALL ID", "rsvp.call_id",
8610 FT_NONE, BASE_NONE, NULL, 0x0,
8611 NULL, HFILL }
8612 },
8613
8614 {&hf_rsvp_filter[RSVPF_3GPP2_OBJECT],
8615 { "3GPP2 OBJECT", "rsvp.3gpp2_object",
8616 FT_NONE, BASE_NONE, NULL, 0x0,
8617 NULL, HFILL }
8618 },
8619 {&hf_rsvp_filter[RSVPF_PRIVATE_OBJ],
8620 { "Private object", "rsvp.obj_private",
8621 FT_NONE, BASE_NONE, NULL, 0x0,
8622 NULL, HFILL }
8623 },
8624
8625 {&hf_rsvp_filter[RSVPF_UNKNOWN_OBJ],
8626 { "Unknown object", "rsvp.obj_unknown",
8627 FT_NONE, BASE_NONE, NULL, 0x0,
8628 NULL, HFILL }
8629 },
8630
8631 /* Session fields */
8632 {&hf_rsvp_filter[RSVPF_SESSION_IP],
8633 { "Destination address", "rsvp.session.ip",
8634 FT_IPv4, BASE_NONE, NULL, 0x0,
8635 NULL, HFILL }
8636 },
8637
8638 {&hf_rsvp_filter[RSVPF_SESSION_SHORT_CALL_ID],
8639 { "Short Call ID", "rsvp.session.short_call_id",
8640 FT_UINT16, BASE_DEC, NULL, 0x0,
8641 NULL, HFILL }
8642 },
8643
8644 {&hf_rsvp_filter[RSVPF_SESSION_PORT],
8645 { "Port number", "rsvp.session.port",
8646 FT_UINT16, BASE_DEC, NULL, 0x0,
8647 NULL, HFILL }
8648 },
8649
8650 {&hf_rsvp_filter[RSVPF_SESSION_PROTO],
8651 { "Protocol", "rsvp.session.proto",
8652 FT_UINT8, BASE_DEC, VALS(proto_vals), 0x0,
8653 NULL, HFILL }
8654 },
8655
8656 {&hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
8657 { "Tunnel ID", "rsvp.session.tunnel_id",
8658 FT_UINT16, BASE_DEC, NULL, 0x0,
8659 NULL, HFILL }
8660 },
8661
8662 {&hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
8663 { "Extended tunnel ID", "rsvp.session.ext_tunnel_id",
8664 FT_UINT32, BASE_DEC, NULL, 0x0,
8665 NULL, HFILL }
8666 },
8667
8668 {&hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID_IPV6],
8669 { "Extended tunnel ID", "rsvp.session.ext_tunnel_id_ipv6",
8670 FT_IPv6, BASE_NONE, NULL, 0x0,
8671 NULL, HFILL }
8672 },
8673
8674 {&hf_rsvp_filter[RSVPF_JUNIPER],
8675 { "Juniper", "rsvp.juniper",
8676 FT_NONE, BASE_NONE, NULL, 0x0,
8677 NULL, HFILL }
8678 },
8679
8680 /* Sender template/Filterspec fields */
8681 {&hf_rsvp_filter[RSVPF_SENDER_IP],
8682 { "Sender IPv4 address", "rsvp.sender.ip",
8683 FT_IPv4, BASE_NONE, NULL, 0x0,
8684 NULL, HFILL }
8685 },
8686
8687 {&hf_rsvp_filter[RSVPF_SENDER_PORT],
8688 { "Sender port number", "rsvp.sender.port",
8689 FT_UINT16, BASE_DEC, NULL, 0x0,
8690 NULL, HFILL }
8691 },
8692
8693 {&hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
8694 { "LSP ID", "rsvp.sender.lsp_id",
8695 FT_UINT16, BASE_DEC, NULL, 0x0,
8696 NULL, HFILL }
8697 },
8698
8699 {&hf_rsvp_filter[RSVPF_SENDER_SHORT_CALL_ID],
8700 { "Short Call ID", "rsvp.sender.short_call_id",
8701 FT_UINT16, BASE_DEC, NULL, 0x0,
8702 NULL, HFILL }
8703 },
8704
8705 /* Diffserv object fields */
8706 {&hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
8707 { "MAPnb", "rsvp.diffserv.mapnb",
8708 FT_UINT8, BASE_DEC, NULL, 0x0,
8709 MAPNB_DESCRIPTION, HFILL }
8710 },
8711
8712 {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
8713 { "MAP", "rsvp.diffserv.map",
8714 FT_NONE, BASE_NONE, NULL, 0x0,
8715 MAP_DESCRIPTION, HFILL }
8716 },
8717
8718 {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
8719 { "EXP", "rsvp.diffserv.map.exp",
8720 FT_UINT8, BASE_DEC, NULL, 0x0,
8721 EXP_DESCRIPTION, HFILL }
8722 },
8723
8724 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
8725 { PHBID_DESCRIPTION, "rsvp.diffserv.phbid",
8726 FT_NONE, BASE_NONE, NULL, 0x0,
8727 NULL, HFILL }
8728 },
8729
8730 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
8731 { PHBID_DSCP_DESCRIPTION, "rsvp.diffserv.phbid.dscp",
8732 FT_UINT16, BASE_DEC, NULL, PHBID_DSCP_MASK,
8733 NULL, HFILL }
8734 },
8735
8736 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
8737 { PHBID_CODE_DESCRIPTION, "rsvp.diffserv.phbid.code",
8738 FT_UINT16, BASE_DEC, NULL, PHBID_CODE_MASK,
8739 NULL, HFILL }
8740 },
8741
8742 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
8743 { PHBID_BIT14_DESCRIPTION, "rsvp.diffserv.phbid.bit14",
8744 FT_UINT16, BASE_DEC, VALS(phbid_bit14_vals), PHBID_BIT14_MASK,
8745 NULL, HFILL }
8746 },
8747
8748 {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15],
8749 { PHBID_BIT15_DESCRIPTION, "rsvp.diffserv.phbid.bit15",
8750 FT_UINT16, BASE_DEC, VALS(phbid_bit15_vals), PHBID_BIT15_MASK,
8751 NULL, HFILL }
8752 },
8753
8754 /* Diffserv-aware TE object field */
8755 {&hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
8756 { "CT", "rsvp.dste.classtype",
8757 FT_UINT8, BASE_DEC, NULL, 0x0,
8758 NULL, HFILL }
8759 },
8760
8761 /* Generalized UNI object field */
8762 {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
8763 { "Source TNA", "rsvp.guni.srctna.ipv4",
8764 FT_IPv4, BASE_NONE, NULL, 0x0,
8765 NULL, HFILL }
8766 },
8767
8768 {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
8769 { "Destination TNA", "rsvp.guni.dsttna.ipv4",
8770 FT_IPv4, BASE_NONE, NULL, 0x0,
8771 NULL, HFILL }
8772 },
8773
8774 {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
8775 { "Source TNA", "rsvp.guni.srctna.ipv6",
8776 FT_IPv6, BASE_NONE, NULL, 0x0,
8777 NULL, HFILL }
8778 },
8779
8780 {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
8781 { "Destination TNA", "rsvp.guni.dsttna.ipv6",
8782 FT_IPv6, BASE_NONE, NULL, 0x0,
8783 NULL, HFILL }
8784 },
8785
8786 /* Generalized UNI object field */
8787 {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
8788 { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv4",
8789 FT_IPv4, BASE_NONE, NULL, 0x0,
8790 NULL, HFILL }
8791 },
8792
8793 {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
8794 { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv6",
8795 FT_IPv6, BASE_NONE, NULL, 0x0,
8796 NULL, HFILL }
8797 },
8798
8799 {&hf_rsvp_callid_srcaddr_ether,
8800 { "Source Transport Network Address", "rsvp.callid.srcaddr.ether",
8801 FT_ETHER, BASE_NONE, NULL, 0x0,
8802 NULL, HFILL }
8803 },
8804
8805 {&hf_rsvp_callid_srcaddr_bytes,
8806 { "Source Transport Network Address", "rsvp.callid.srcaddr.bytes",
8807 FT_ETHER, BASE_NONE, NULL, 0x0,
8808 NULL, HFILL }
8809 },
8810
8811 /*
8812 * FF: Vendor Private object field, please see
8813 * http://www.iana.org/assignments/enterprise-numbers
8814 */
8815 {&hf_rsvp_filter[RSVPF_ENT_CODE],
8816 { "Enterprise Code", "rsvp.obj_private.enterprise",
8817 FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0,
8818 "IANA Network Management Private Enterprise Code", HFILL }
8819 },
8820
8821 {&hf_rsvp_error_flags,
8822 { "Flags", "rsvp.error_flags",
8823 FT_UINT8, BASE_HEX, NULL, 0x0,
8824 NULL, HFILL }
8825 },
8826
8827 {&hf_rsvp_error_flags_path_state_removed,
8828 { "Path State Removed", "rsvp.error_flags.path_state_removed",
8829 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x04,
8830 NULL, HFILL }
8831 },
8832
8833 {&hf_rsvp_error_flags_not_guilty,
8834 { "NotGuilty", "rsvp.error_flags.not_guilty",
8835 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02,
8836 NULL, HFILL }
8837 },
8838
8839 {&hf_rsvp_error_flags_in_place,
8840 { "InPlace", "rsvp.error_flags.in_place",
8841 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01,
8842 NULL, HFILL }
8843 },
8844
8845 {&hf_rsvp_eth_tspec_tlv_color_mode,
8846 { "Color Mode (CM)", "rsvp.eth_tspec_tlv.color_mode",
8847 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02,
8848 NULL, HFILL }
8849 },
8850
8851 {&hf_rsvp_eth_tspec_tlv_coupling_flag,
8852 { "Coupling Flag (CF)", "rsvp.eth_tspec_tlv.coupling_flag",
8853 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01,
8854 NULL, HFILL }
8855 },
8856
8857 {&hf_rsvp_sender_tspec_standard_contiguous_concatenation,
8858 { "Standard contiguous concatenation", "rsvp.sender_tspec.standard_contiguous_concatenation",
8859 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01,
8860 NULL, HFILL }
8861 },
8862
8863 {&hf_rsvp_sender_tspec_arbitrary_contiguous_concatenation,
8864 { "Arbitrary contiguous concatenation", "rsvp.sender_tspec.arbitrary_contiguous_concatenation",
8865 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
8866 NULL, HFILL }
8867 },
8868
8869 {&hf_rsvp_sender_tspec_regenerator_section,
8870 { "Section/Regenerator Section layer transparency", "rsvp.sender_tspec.regenerator_section",
8871 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
8872 NULL, HFILL }
8873 },
8874
8875 {&hf_rsvp_sender_tspec_multiplex_section,
8876 { "Line/Multiplex Section layer transparency", "rsvp.sender_tspec.multiplex_section",
8877 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
8878 NULL, HFILL }
8879 },
8880
8881 {&hf_rsvp_sender_tspec_J0_transparency,
8882 { "J0 transparency", "rsvp.sender_tspec.J0_transparency",
8883 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
8884 NULL, HFILL }
8885 },
8886
8887 {&hf_rsvp_sender_tspec_SOH_RSOH_DCC_transparency,
8888 { "SOH/RSOH DCC transparency", "rsvp.sender_tspec.SOH_RSOH_DCC_transparency",
8889 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
8890 NULL, HFILL }
8891 },
8892
8893 {&hf_rsvp_sender_tspec_LOH_MSOH_DCC_transparency,
8894 { "LOH/MSOH DCC transparency", "rsvp.sender_tspec.LOH_MSOH_DCC_transparency",
8895 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0010,
8896 NULL, HFILL }
8897 },
8898
8899 {&hf_rsvp_sender_tspec_LOH_MSOH_extended_DCC_transparency,
8900 { "LOH/MSOH Extended DCC transparency", "rsvp.sender_tspec.LOH_MSOH_extended_DCC_transparency",
8901 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0020,
8902 NULL, HFILL }
8903 },
8904
8905 {&hf_rsvp_sender_tspec_K1_K2_transparency,
8906 { "K1/K2 transparency", "rsvp.sender_tspec.K1_K2_transparency",
8907 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0040,
8908 NULL, HFILL }
8909 },
8910
8911 {&hf_rsvp_sender_tspec_E1_transparency,
8912 { "E1 transparency", "rsvp.sender_tspec.E1_transparency",
8913 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0080,
8914 NULL, HFILL }
8915 },
8916
8917 {&hf_rsvp_sender_tspec_F1_transparency,
8918 { "F1 transparency", "rsvp.sender_tspec.F1_transparency",
8919 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0100,
8920 NULL, HFILL }
8921 },
8922
8923 {&hf_rsvp_sender_tspec_E2_transparency,
8924 { "E2 transparency", "rsvp.sender_tspec.E2_transparency",
8925 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0200,
8926 NULL, HFILL }
8927 },
8928
8929 {&hf_rsvp_sender_tspec_B1_transparency,
8930 { "B1 transparency", "rsvp.sender_tspec.B1_transparency",
8931 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0400,
8932 NULL, HFILL }
8933 },
8934
8935 {&hf_rsvp_sender_tspec_B2_transparency,
8936 { "B2 transparency", "rsvp.sender_tspec.B2_transparency",
8937 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0800,
8938 NULL, HFILL }
8939 },
8940
8941 {&hf_rsvp_sender_tspec_M0_transparency,
8942 { "M0 transparency", "rsvp.sender_tspec.M0_transparency",
8943 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x1000,
8944 NULL, HFILL }
8945 },
8946
8947 {&hf_rsvp_sender_tspec_M1_transparency,
8948 { "M1 transparency", "rsvp.sender_tspec.M1_transparency",
8949 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x2000,
8950 NULL, HFILL }
8951 },
8952
8953 {&hf_rsvp_flowspec_standard_contiguous_concatenation,
8954 { "Standard contiguous concatenation", "rsvp.flowspec.standard_contiguous_concatenation",
8955 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01,
8956 NULL, HFILL }
8957 },
8958
8959 {&hf_rsvp_flowspec_arbitrary_contiguous_concatenation,
8960 { "Arbitrary contiguous concatenation", "rsvp.flowspec.arbitrary_contiguous_concatenation",
8961 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
8962 NULL, HFILL }
8963 },
8964
8965 {&hf_rsvp_flowspec_regenerator_section,
8966 { "Section/Regenerator Section layer transparency", "rsvp.flowspec.regenerator_section",
8967 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
8968 NULL, HFILL }
8969 },
8970
8971 {&hf_rsvp_flowspec_multiplex_section,
8972 { "Line/Multiplex Section layer transparency", "rsvp.flowspec.multiplex_section",
8973 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
8974 NULL, HFILL }
8975 },
8976
8977 {&hf_rsvp_flowspec_J0_transparency,
8978 { "J0 transparency", "rsvp.flowspec.J0_transparency",
8979 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
8980 NULL, HFILL }
8981 },
8982
8983 {&hf_rsvp_flowspec_SOH_RSOH_DCC_transparency,
8984 { "SOH/RSOH DCC transparency", "rsvp.flowspec.SOH_RSOH_DCC_transparency",
8985 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
8986 NULL, HFILL }
8987 },
8988
8989 {&hf_rsvp_flowspec_LOH_MSOH_DCC_transparency,
8990 { "LOH/MSOH DCC transparency", "rsvp.flowspec.LOH_MSOH_DCC_transparency",
8991 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0010,
8992 NULL, HFILL }
8993 },
8994
8995 {&hf_rsvp_flowspec_LOH_MSOH_extended_DCC_transparency,
8996 { "LOH/MSOH Extended DCC transparency", "rsvp.flowspec.LOH_MSOH_extended_DCC_transparency",
8997 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0020,
8998 NULL, HFILL }
8999 },
9000
9001 {&hf_rsvp_flowspec_K1_K2_transparency,
9002 { "K1/K2 transparency", "rsvp.flowspec.K1_K2_transparency",
9003 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0040,
9004 NULL, HFILL }
9005 },
9006
9007 {&hf_rsvp_flowspec_E1_transparency,
9008 { "E1 transparency", "rsvp.flowspec.E1_transparency",
9009 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0080,
9010 NULL, HFILL }
9011 },
9012
9013 {&hf_rsvp_flowspec_F1_transparency,
9014 { "F1 transparency", "rsvp.flowspec.F1_transparency",
9015 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0100,
9016 NULL, HFILL }
9017 },
9018
9019 {&hf_rsvp_flowspec_E2_transparency,
9020 { "E2 transparency", "rsvp.flowspec.E2_transparency",
9021 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0200,
9022 NULL, HFILL }
9023 },
9024
9025 {&hf_rsvp_flowspec_B1_transparency,
9026 { "B1 transparency", "rsvp.flowspec.B1_transparency",
9027 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0400,
9028 NULL, HFILL }
9029 },
9030
9031 {&hf_rsvp_flowspec_B2_transparency,
9032 { "B2 transparency", "rsvp.flowspec.B2_transparency",
9033 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0800,
9034 NULL, HFILL }
9035 },
9036
9037 {&hf_rsvp_flowspec_M0_transparency,
9038 { "M0 transparency", "rsvp.flowspec.M0_transparency",
9039 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x1000,
9040 NULL, HFILL }
9041 },
9042
9043 {&hf_rsvp_flowspec_M1_transparency,
9044 { "M1 transparency", "rsvp.flowspec.M1_transparency",
9045 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x2000,
9046 NULL, HFILL }
9047 },
9048
9049 {&hf_rsvp_integrity_flags_handshake,
9050 { "Handshake", "rsvp.integrity.flags.handshake",
9051 FT_BOOLEAN, 8, TFS(&tfs_capable_not_capable), 0x01,
9052 NULL, HFILL }
9053 },
9054
9055 {&hf_rsvp_sa_flags_local,
9056 { "Local protection", "rsvp.sa.flags.local",
9057 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
9058 NULL, HFILL }
9059 },
9060
9061 {&hf_rsvp_sa_flags_label,
9062 { "Label recording", "rsvp.sa.flags.label",
9063 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
9064 NULL, HFILL }
9065 },
9066
9067 {&hf_rsvp_sa_flags_se_style,
9068 { "SE style", "rsvp.sa.flags.se_style",
9069 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
9070 NULL, HFILL }
9071 },
9072
9073 {&hf_rsvp_sa_flags_bandwidth,
9074 { "Bandwidth protection", "rsvp.sa.flags.bandwidth",
9075 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
9076 NULL, HFILL }
9077 },
9078
9079 {&hf_rsvp_sa_flags_node,
9080 { "Node protection", "rsvp.sa.flags.node",
9081 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
9082 NULL, HFILL }
9083 },
9084
9085 {&hf_rsvp_rro_flags_local_avail,
9086 { "Local Protection", "rsvp.rro.flags.local_avail",
9087 FT_BOOLEAN, 8, TFS(&tfs_available_not_available), 0x01,
9088 NULL, HFILL }
9089 },
9090
9091 {&hf_rsvp_rro_flags_local_in_use,
9092 { "Local Protection", "rsvp.rro.flags.local_in_use",
9093 FT_BOOLEAN, 8, TFS(&tfs_used_notused), 0x02,
9094 NULL, HFILL }
9095 },
9096
9097 {&hf_rsvp_rro_flags_bandwidth,
9098 { "Bandwidth Protection", "rsvp.rro.flags.bandwidth",
9099 FT_BOOLEAN, 8, TFS(&tfs_available_not_available), 0x04,
9100 NULL, HFILL }
9101 },
9102
9103 {&hf_rsvp_rro_flags_node,
9104 { "Node Protection", "rsvp.rro.flags.node",
9105 FT_BOOLEAN, 8, TFS(&tfs_available_not_available), 0x08,
9106 NULL, HFILL }
9107 },
9108
9109 {&hf_rsvp_rro_flags_node_address,
9110 { "Address Specifies a Node-id Address", "rsvp.rro.flags.node_address",
9111 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20,
9112 NULL, HFILL }
9113 },
9114
9115 {&hf_rsvp_rro_flags_backup_tunnel_bandwidth,
9116 { "Backup Tunnel Has Bandwidth", "rsvp.rro.flags.backup_tunnel_bandwidth",
9117 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04,
9118 NULL, HFILL }
9119 },
9120
9121 {&hf_rsvp_rro_flags_backup_tunnel_hop,
9122 { "Backup Tunnel Goes To", "rsvp.rro.flags.backup_tunnel_hop",
9123 FT_BOOLEAN, 8, TFS(&tfs_next_next_hop_next_hop), 0x08,
9124 NULL, HFILL }
9125 },
9126
9127 {&hf_rsvp_rro_flags_global_label,
9128 { "Global label", "rsvp.rro.flags.global_label",
9129 FT_BOOLEAN, 8, NULL, 0x01,
9130 NULL, HFILL }
9131 },
9132
9133 {&hf_rsvp_lsp_attr,
9134 { "LSP Attributes Flags", "rsvp.lsp_attr",
9135 FT_UINT32, BASE_HEX, NULL, 0x0,
9136 NULL, HFILL}
9137 },
9138
9139 {&hf_rsvp_lsp_attr_e2e,
9140 { "End-to-end re-routing", "rsvp.lsp_attr.e2e",
9141 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x80000000, /* 0 */
9142 NULL, HFILL }
9143 },
9144
9145 {&hf_rsvp_lsp_attr_boundary,
9146 { "Boundary re-routing", "rsvp.lsp_attr.boundary",
9147 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x40000000, /* 1 */
9148 NULL, HFILL }
9149 },
9150
9151 {&hf_rsvp_lsp_attr_segment,
9152 { "Segment-based re-routing", "rsvp.lsp_attr.segment",
9153 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x20000000, /* 2 */
9154 NULL, HFILL }
9155 },
9156
9157 {&hf_rsvp_lsp_attr_integrity,
9158 { "LSP Integrity Required", "rsvp.lsp_attr.integrity",
9159 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x10000000, /* 3 */
9160 NULL, HFILL }
9161 },
9162
9163 {&hf_rsvp_lsp_attr_contiguous,
9164 { "Contiguous LSP", "rsvp.lsp_attr.contiguous",
9165 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x08000000, /* 4 */
9166 NULL, HFILL }
9167 },
9168
9169 {&hf_rsvp_lsp_attr_stitching,
9170 { "LSP stitching desired", "rsvp.lsp_attr.stitching",
9171 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x04000000, /* 5 */
9172 NULL, HFILL }
9173 },
9174
9175 {&hf_rsvp_lsp_attr_preplanned,
9176 { "Pre-Planned LSP Flag", "rsvp.lsp_attr.preplanned",
9177 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x02000000, /* 6 */
9178 NULL, HFILL }
9179 },
9180
9181 {&hf_rsvp_lsp_attr_nophp,
9182 { "Non-PHP behavior flag", "rsvp.lsp_attr.nophp",
9183 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x01000000, /* 7 */
9184 NULL, HFILL }
9185 },
9186
9187 {&hf_rsvp_lsp_attr_oobmap,
9188 { "OOB mapping flag", "rsvp.lsp_attr.oobmap",
9189 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00800000, /* 8 */
9190 NULL, HFILL }
9191 },
9192
9193 {&hf_rsvp_lsp_attr_entropy,
9194 { "Entropy Label Capability", "rsvp.lsp_attr.entropy",
9195 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00400000, /* 9 */
9196 NULL, HFILL }
9197 },
9198
9199 {&hf_rsvp_lsp_attr_oammep,
9200 { "OAM MEP entities desired", "rsvp.lsp_attr.oammep",
9201 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00200000, /* 10 */
9202 NULL, HFILL }
9203 },
9204
9205 {&hf_rsvp_lsp_attr_oammip,
9206 { "OAM MIP entities desired", "rsvp.lsp_attr.oammip",
9207 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00100000, /* 11 */
9208 NULL, HFILL }
9209 },
9210
9211 {&hf_rsvp_lsp_attr_srlgcollect,
9212 { "SRLG Collection Flag", "rsvp.lsp_attr.srlgcollect",
9213 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00080000, /* 12 */
9214 NULL, HFILL }
9215 },
9216
9217 {&hf_rsvp_lsp_attr_loopback,
9218 { "Loopback", "rsvp.lsp_attr.Loopback",
9219 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00040000, /* 13 */
9220 NULL, HFILL }
9221 },
9222
9223 {&hf_rsvp_lsp_attr_p2mp,
9224 { "P2MP-TE Tree Re-evaluation Request", "rsvp.lsp_attr.p2mp",
9225 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00020000, /* 14 */
9226 NULL, HFILL }
9227 },
9228
9229 {&hf_rsvp_lsp_attr_rtm,
9230 { "RTM_SET", "rsvp.lsp_attr.rtm",
9231 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00010000, /* 15 */
9232 NULL, HFILL }
9233 },
9234
9235 {&hf_rsvp_lsp_attr_telinklabel,
9236 { "TE Link Label", "rsvp.lsp_attr.telinklabel",
9237 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00008000, /* 16 */
9238 NULL, HFILL }
9239 },
9240
9241 {&hf_rsvp_lsp_attr_lsi,
9242 { "LSI-D", "rsvp.lsp_attr.lsi",
9243 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00004000, /* 17 */
9244 NULL, HFILL }
9245 },
9246
9247 {&hf_rsvp_lsp_attr_lsids2e,
9248 { "LSI-D-S2E", "rsvp.lsp_attr.lsids2e",
9249 FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00002000, /* 18 */
9250 NULL, HFILL }
9251 },
9252
9253 {&hf_rsvp_gen_uni_direction,
9254 { "Direction", "rsvp.gen_uni.direction",
9255 FT_BOOLEAN, 8, TFS(&tfs_gen_uni_direction), 0x80,
9256 NULL, HFILL }
9257 },
9258
9259 {&hf_rsvp_protection_info_flags_secondary_lsp,
9260 { "Secondary LSP", "rsvp.pi.flags.secondary_lsp",
9261 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
9262 NULL, HFILL }
9263 },
9264
9265 {&hf_rsvp_pi_link_flags_extra_traffic,
9266 { "Extra Traffic", "rsvp.pi_link.flags.extra_traffic",
9267 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
9268 NULL, HFILL }
9269 },
9270
9271 {&hf_rsvp_pi_link_flags_unprotected,
9272 { "Unprotected", "rsvp.pi_link.flags.unprotected",
9273 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
9274 NULL, HFILL }
9275 },
9276
9277 {&hf_rsvp_pi_link_flags_shared,
9278 { "Shared", "rsvp.pi_link.flags.shared",
9279 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
9280 NULL, HFILL }
9281 },
9282
9283 {&hf_rsvp_pi_link_flags_dedicated1_1,
9284 { "Dedicated 1:1", "rsvp.pi_link.flags.dedicated1_1",
9285 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
9286 NULL, HFILL }
9287 },
9288
9289 {&hf_rsvp_pi_link_flags_dedicated1plus1,
9290 { "Dedicated 1+1", "rsvp.pi_link.flags.dedicated1plus1",
9291 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
9292 NULL, HFILL }
9293 },
9294
9295 {&hf_rsvp_pi_link_flags_enhanced,
9296 { "Enhanced", "rsvp.pi_link.flags.enhanced",
9297 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x20,
9298 NULL, HFILL }
9299 },
9300
9301 {&hf_rsvp_pi_link_flags_extra,
9302 { "Extra Traffic", "rsvp.pi_link.flags.extra",
9303 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
9304 NULL, HFILL }
9305 },
9306
9307 {&hf_rsvp_pi_link_flags_dedicated_1_1,
9308 { "Dedicated 1:1", "rsvp.pi_link.flags.dedicated_1_1",
9309 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
9310 NULL, HFILL }
9311 },
9312
9313 {&hf_rsvp_pi_link_flags_dedicated_1plus1,
9314 { "Dedicated 1+1", "rsvp.pi_link.flags.dedicated_1plus1",
9315 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
9316 NULL, HFILL }
9317 },
9318
9319 {&hf_rsvp_rfc4872_secondary,
9320 { "Secondary LSP", "rsvp.rfc4872.secondary",
9321 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
9322 NULL, HFILL }
9323 },
9324
9325 {&hf_rsvp_rfc4872_protecting,
9326 { "Protecting LSP", "rsvp.rfc4872.protecting",
9327 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
9328 NULL, HFILL }
9329 },
9330
9331 {&hf_rsvp_rfc4872_notification_msg,
9332 { "Protecting LSP", "rsvp.rfc4872.notification_msg",
9333 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20,
9334 NULL, HFILL }
9335 },
9336
9337 {&hf_rsvp_rfc4872_operational,
9338 { "Protecting LSP", "rsvp.rfc4872.operational",
9339 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10,
9340 NULL, HFILL }
9341 },
9342
9343 {&hf_rsvp_pi_lsp_flags_full_rerouting,
9344 { "(Full) rerouting", "rsvp.pi_lsp.flags.full_rerouting",
9345 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
9346 NULL, HFILL }
9347 },
9348
9349 {&hf_rsvp_pi_lsp_flags_rerouting_extra,
9350 { "Rerouting without extra-traffic", "rsvp.pi_lsp.flags.rerouting_extra",
9351 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
9352 NULL, HFILL }
9353 },
9354
9355 {&hf_rsvp_pi_lsp_flags_1_n_protection,
9356 { "1:N protection with extra-traffic", "rsvp.pi_lsp.flags.1_n_protection",
9357 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
9358 NULL, HFILL }
9359 },
9360
9361 {&hf_rsvp_pi_lsp_flags_1plus1_unidirectional,
9362 { "1+1 unidirectional protection", "rsvp.pi_lsp.flags.1plus1_unidirectional",
9363 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
9364 NULL, HFILL }
9365 },
9366
9367 {&hf_rsvp_pi_lsp_flags_1plus1_bidirectional,
9368 { "1+1 bidirectional protection", "rsvp.pi_lsp.flags.1plus1_bidirectional",
9369 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
9370 NULL, HFILL }
9371 },
9372
9373 {&hf_rsvp_protection_info_in_place,
9374 { "In-Place", "rsvp.protection_info.in_place",
9375 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
9376 NULL, HFILL }
9377 },
9378
9379 {&hf_rsvp_protection_info_required,
9380 { "Required", "rsvp.protection_info.required",
9381 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
9382 NULL, HFILL }
9383 },
9384
9385 {&hf_rsvp_pi_seg_flags_full_rerouting,
9386 { "(Full) rerouting", "rsvp.pi_seg.flags.full_rerouting",
9387 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
9388 NULL, HFILL }
9389 },
9390
9391 {&hf_rsvp_pi_seg_flags_rerouting_extra,
9392 { "Rerouting without extra-traffic", "rsvp.pi_seg.flags.rerouting_extra",
9393 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
9394 NULL, HFILL }
9395 },
9396
9397 {&hf_rsvp_pi_seg_flags_1_n_protection,
9398 { "1:N protection with extra-traffic", "rsvp.pi_seg.flags.1_n_protection",
9399 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
9400 NULL, HFILL }
9401 },
9402
9403 {&hf_rsvp_pi_seg_flags_1plus1_unidirectional,
9404 { "1+1 unidirectional protection", "rsvp.pi_seg.flags.1plus1_unidirectional",
9405 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
9406 NULL, HFILL }
9407 },
9408
9409 {&hf_rsvp_pi_seg_flags_1plus1_bidirectional,
9410 { "1+1 bidirectional protection", "rsvp.pi_seg.flags.1plus1_bidirectional",
9411 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
9412 NULL, HFILL }
9413 },
9414
9415 {&hf_rsvp_frr_flags_one2one_backup,
9416 { "One-to-One Backup", "rsvp.frr.flags.one2one_backup",
9417 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
9418 NULL, HFILL }
9419 },
9420
9421 {&hf_rsvp_frr_flags_facility_backup,
9422 { "Facility Backup", "rsvp.frr.flags.facility_backup",
9423 FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
9424 NULL, HFILL }
9425 },
9426 {&hf_rsvp_type,
9427 { "Type", "rsvp.type",
9428 FT_UINT16, BASE_DEC, NULL, 0,
9429 NULL, HFILL }
9430 },
9431 {&hf_rsvp_3gpp_obj_tid,
9432 { "Transaction ID", "rsvp.3gpp_obj.tid",
9433 FT_UINT32, BASE_DEC, NULL, 0,
9434 NULL, HFILL }
9435 },
9436 {&hf_rsvp_3gpp_obj_ie_len,
9437 { "Length", "rsvp.3gpp_obj.length",
9438 FT_UINT32, BASE_DEC, NULL, 0,
9439 NULL, HFILL }
9440 },
9441 {&hf_rsvp_3gpp_obj_ie_type,
9442 { "IE Type", "rsvp.3gpp_obj.ie_type",
9443 FT_UINT32, BASE_DEC, VALS(rsvp_3gpp_object_ie_type_vals), 0,
9444 NULL, HFILL }
9445 },
9446 {&hf_rsvp_3gpp_obj_ue_ipv4_addr,
9447 { "UE IPv4 address", "rsvp.3gpp_obj.ue_ipv4_addr",
9448 FT_IPv4, BASE_NONE, NULL, 0,
9449 NULL, HFILL }
9450 },
9451 {&hf_rsvp_3gpp_obj_ue_ipv6_addr,
9452 { "UE IPv6 address", "rsvp.3gpp_obj.ue_ipv6_addr",
9453 FT_IPv6, BASE_NONE, NULL, 0,
9454 NULL, HFILL }
9455 },
9456 {&hf_rsvp_3gpp_obj_tft_d,
9457 { "Direction(D)", "rsvp.3gpp_obj.tft_d",
9458 FT_UINT32, BASE_DEC, VALS(rsvp_3gpp_object_tft_d_vals), 0xc0000000,
9459 NULL, HFILL }
9460 },
9461 {&hf_rsvp_3gpp_obj_tft_ns,
9462 { "Non-Specific bit(NS)", "rsvp.3gpp_obj.tft_ns",
9463 FT_UINT32, BASE_DEC, NULL, 0x08000000,
9464 NULL, HFILL }
9465 },
9466 {&hf_rsvp_3gpp_obj_tft_sr_id,
9467 { "SR_ID", "rsvp.3gpp_obj.tft_sr_id",
9468 FT_UINT32, BASE_DEC, NULL, 0x07000000,
9469 NULL, HFILL }
9470 },
9471 {&hf_rsvp_3gpp_obj_tft_p,
9472 { "Persistency(P)", "rsvp.3gpp_obj.tft_p",
9473 FT_UINT32, BASE_DEC, NULL, 0x00010000,
9474 NULL, HFILL }
9475 },
9476 {&hf_rsvp_3gpp_obj_tft_opcode,
9477 { "TFT Operation Code", "rsvp.3gpp_obj.tft_opcode",
9478 FT_UINT32, BASE_DEC, VALS(rsvp_3gpp_obj_tft_opcode_vals), 0x000ff00,
9479 NULL, HFILL }
9480 },
9481 {&hf_rsvp_3gpp_obj_tft_n_pkt_flt,
9482 { "Number of Packet filters", "rsvp.3gpp_obj.tft_n_pkt_flt",
9483 FT_UINT32, BASE_DEC, NULL, 0x00000ff,
9484 NULL, HFILL }
9485 },
9486 { &hf_rsvp_3gpp_obj_flow_id,
9487 { "Flow Identifier", "rsvp.3gpp_obj.flow_id",
9488 FT_UINT8, BASE_DEC, NULL, 0,
9489 NULL, HFILL }
9490 },
9491 { &hf_rsvp_3gpp_obj_pf_ev_prec,
9492 { "Packet filter evaluation precedence", "rsvp.3gpp_obj.pf_ev_prec",
9493 FT_UINT8, BASE_DEC, NULL, 0,
9494 NULL, HFILL }
9495 },
9496 { &hf_rsvp_3gpp_obj_pf_len,
9497 { "Packet filter length", "rsvp.3gpp_obj.pf_len",
9498 FT_UINT16, BASE_DEC, NULL, 0,
9499 NULL, HFILL }
9500 },
9501 { &hf_rsvp_3gpp_obj_pf_type,
9502 { "PF Type", "rsvp.3gpp_obj.pf_type",
9503 FT_UINT8, BASE_DEC, NULL, 0,
9504 NULL, HFILL }
9505 },
9506 { &hf_rsvp_3gpp_obj_pf_cont_len,
9507 { "Length", "rsvp.3gpp_obj.pf_cont_len",
9508 FT_UINT8, BASE_DEC, NULL, 0,
9509 NULL, HFILL }
9510 },
9511 { &hf_rsvp_3gpp_obj_pf_comp_type_id,
9512 { "PF component identifier", "rsvp.3gpp_obj.pf_comp_type_id",
9513 FT_UINT8, BASE_DEC, VALS(rsvp_3gpp_obj_pf_comp_type_id_vals), 0,
9514 NULL, HFILL }
9515 },
9516 { &hf_rsvp_3gpp_obj_pf_src_ipv4,
9517 { "IPv4 Source Address", "rsvp.3gpp_obj.pf_src_ipv4",
9518 FT_IPv4, BASE_NONE, NULL, 0,
9519 NULL, HFILL }
9520 },
9521 { &hf_rsvp_3gpp_obj_pf_dst_ipv4,
9522 { "IPv4 Destination Address", "rsvp.3gpp_obj.pf_dst_ipv4",
9523 FT_IPv4, BASE_NONE, NULL, 0,
9524 NULL, HFILL }
9525 },
9526 { &hf_rsvp_3gpp_obj_pf_ipv4_mask,
9527 { "IPv4 Mask", "rsvp.3gpp_obj.pf_ipv4_mask",
9528 FT_UINT32, BASE_HEX, NULL, 0,
9529 NULL, HFILL }
9530 },
9531 { &hf_rsvp_3gpp_obj_pf_src_ipv6,
9532 { "IPv6 Source Address", "rsvp.3gpp_obj.pf_src_ipv6",
9533 FT_IPv6, BASE_NONE, NULL, 0,
9534 NULL, HFILL }
9535 },
9536 { &hf_rsvp_3gpp_obj_pf_dst_ipv6,
9537 { "IPv6 Destination Address", "rsvp.3gpp_obj.pf_dst_ipv6",
9538 FT_IPv6, BASE_NONE, NULL, 0,
9539 NULL, HFILL }
9540 },
9541 { &hf_rsvp_3gpp_obj_pf_ipv6_prefix_length,
9542 { "IPv6 Prefix length", "rsvp.3gpp_obj.pf_ipv6_prefix_length",
9543 FT_UINT8, BASE_DEC, NULL, 0,
9544 NULL, HFILL }
9545 },
9546 { &hf_rsvp_3gpp_obj_pf_prot_next,
9547 { "Protocol field(IPv4) or Next Header(IPv6)", "rsvp.3gpp_obj.pf_prot_next",
9548 FT_UINT8, BASE_DEC, NULL, 0,
9549 NULL, HFILL }
9550 },
9551 { &hf_rsvp_3gpp_obj_pf_dst_port,
9552 { "Single Destination Port", "rsvp.3gpp_obj.pf_dst_port",
9553 FT_UINT16, BASE_DEC, NULL, 0,
9554 NULL, HFILL }
9555 },
9556 { &hf_rsvp_3gpp_obj_pf_src_port,
9557 { "Single Source Port", "rsvp.3gpp_obj.pf_src_port",
9558 FT_UINT16, BASE_DEC, NULL, 0,
9559 NULL, HFILL }
9560 },
9561 { &hf_rsvp_3gpp_obj_pf_ipsec_spi,
9562 { "IPsec SPI", "rsvp.3gpp_obj.pf_ipsec_spi",
9563 FT_UINT32, BASE_DEC, NULL, 0,
9564 NULL, HFILL }
9565 },
9566 { &hf_rsvp_3gpp_obj_pf_tos_tc,
9567 { "Type of Service (IPv4)/Traffic Class (IPv6)", "rsvp.3gpp_obj.pf_tos_tc",
9568 FT_UINT8, BASE_HEX, NULL, 0,
9569 NULL, HFILL }
9570 },
9571 { &hf_rsvp_3gpp_obj_pf_flow_lbl,
9572 { "Flow label", "rsvp.3gpp_obj.pf_flow_lbl",
9573 FT_UINT24, BASE_DEC, NULL, 0x0fffff,
9574 NULL, HFILL }
9575 },
9576 { &hf_rsvp_3gpp_obj_pf_ipv6,
9577 { "IPv6 Address", "rsvp.3gpp_obj.pf_ipv6",
9578 FT_IPv6, BASE_NONE, NULL, 0,
9579 NULL, HFILL }
9580 },
9581 { &hf_rsvp_3gpp_obj_pf_treatment,
9582 { "PF Treatment", "rsvp.3gpp_obj.pf_treatment",
9583 FT_UINT8, BASE_DEC, VALS(rsvp_3gpp_obj_pf_treatment_vals), 0,
9584 NULL, HFILL }
9585 },
9586 { &hf_rsvp_3gpp_obj_pf_hint,
9587 { "PF Hint", "rsvp.3gpp_obj.pf_hint",
9588 FT_UINT32, BASE_DEC, NULL, 0,
9589 NULL, HFILL }
9590 },
9591 { &hf_rsvp_3gpp_obj_tft_qos_list_len,
9592 { "QoS List Length", "rsvp.3gpp_obj.qos_list_len",
9593 FT_UINT16, BASE_DEC, NULL, 0,
9594 NULL, HFILL }
9595 },
9596 { &hf_rsvp_3gpp_r_qos_blob_len,
9597 { "R_QOS_SUB_BLOB_LEN", "rsvp.3gpp_obj.r_qos_blob_len",
9598 FT_UINT8, BASE_DEC, NULL, 0,
9599 NULL, HFILL }
9600 },
9601 { &hf_rsvp_3gpp_r_qos_blob_flow_pri,
9602 { "FLOW_PRIORITY", "rsvp.3gpp_obj.r_qos_blob.flow_pri",
9603 FT_UINT8, BASE_DEC, NULL, 0xf0,
9604 NULL, HFILL }
9605 },
9606 { &hf_rsvp_3gpp_r_qos_blob_num_qos_att_set,
9607 { "NUM_QoS_ATTRIBUTE_SETS", "rsvp.3gpp_obj.r_qos_blob.num_qos_att_set",
9608 FT_UINT8, BASE_DEC, NULL, 0x0e,
9609 NULL, HFILL }
9610 },
9611 { &hf_rsvp_3gpp_qos_att_set_len,
9612 { "QoS_ATTRIBUTE_SET_LEN", "rsvp.3gpp_obj.r_qos_blob.qos_att_set_len",
9613 FT_UINT8, BASE_DEC, NULL, 0x0,
9614 NULL, HFILL }
9615 },
9616 { &hf_rsvp_3gpp_qos_attribute_set_id,
9617 { "QoS_ATTRIBUTE_SET_ID", "rsvp.3gpp_obj.r_qos_blob.qos_attribute_set_id",
9618 FT_UINT8, BASE_DEC, NULL, 0x0,
9619 NULL, HFILL }
9620 },
9621 { &hf_rsvp_3gpp_qos_attribute_verbose,
9622 { "VERBOSE", "rsvp.3gpp_obj.r_qos_blob.verbose",
9623 FT_BOOLEAN, 8, NULL, 0x0,
9624 NULL, HFILL }
9625 },
9626 { &hf_rsvp_3gpp_qos_attribute_prof_id,
9627 { "ProfileID", "rsvp.3gpp_obj.r_qos_blob.prof_id",
9628 FT_UINT8, BASE_DEC, NULL, 0x0,
9629 NULL, HFILL }
9630 },
9631 { &hf_rsvp_3gpp_qos_attribute_traff_cls,
9632 { "Traffic_Class", "rsvp.3gpp_obj.r_qos_blob.traff_cls",
9633 FT_UINT8, BASE_DEC, VALS(rsvp_3gpp_obj_traffic_class_vals), 0x0,
9634 NULL, HFILL }
9635 },
9636 { &hf_rsvp_3gpp_qos_attribute_peak_rate,
9637 { "Peak_Rate", "rsvp.3gpp_obj.r_qos_blob.peak_rate",
9638 FT_UINT16, BASE_DEC, NULL, 0x0,
9639 NULL, HFILL }
9640 },
9641 { &hf_rsvp_3gpp_qos_attribute_bucket_size,
9642 { "Bucket_Size", "rsvp.3gpp_obj.r_qos_blob.bucket_size",
9643 FT_UINT16, BASE_DEC, NULL, 0x0,
9644 NULL, HFILL }
9645 },
9646 { &hf_rsvp_3gpp_qos_attribute_token_rate,
9647 { "Token_Rate", "rsvp.3gpp_obj.r_qos_blob.token_rate",
9648 FT_UINT16, BASE_DEC, NULL, 0x0,
9649 NULL, HFILL }
9650 },
9651 { &hf_rsvp_3gpp_qos_attribute_max_latency,
9652 { "Max_Latency", "rsvp.3gpp_obj.r_qos_blob.max_latency",
9653 FT_UINT8, BASE_DEC, NULL, 0x0,
9654 NULL, HFILL }
9655 },
9656 { &hf_rsvp_3gpp_qos_attribute_max_loss_rte,
9657 { "Max_Loss_Rate", "rsvp.3gpp_obj.r_qos_blob.max_loss_rte",
9658 FT_UINT8, BASE_DEC, NULL, 0x0,
9659 NULL, HFILL }
9660 },
9661 { &hf_rsvp_3gpp_qos_attribute_delay_var_sensitive,
9662 { "Delay_Var_Sensitive", "rsvp.3gpp_obj.r_qos_blob.delay_var_sensitive",
9663 FT_UINT8, BASE_DEC, NULL, 0x0,
9664 NULL, HFILL }
9665 },
9666 { &hf_rsvp_3gpp_qos_attribute_reserved,
9667 { "Reserved", "rsvp.3gpp_obj.r_qos_blob.reserved",
9668 FT_UINT8, BASE_DEC, NULL, 0x0,
9669 NULL, HFILL }
9670 },
9671 { &hf_rsvp_3gpp_r_qos_blob,
9672 { "R_QOS_SUB_BLOB", "rsvp.3gpp_obj.r_qos_blob",
9673 FT_BYTES, BASE_NONE, NULL, 0,
9674 NULL, HFILL }
9675 },
9676 { &hf_rsvp_3gpp_qos_result,
9677 { "Result Code", "rsvp.3gpp_obj.qos_result_code",
9678 FT_UINT8, BASE_DEC, NULL, 0,
9679 NULL, HFILL }
9680 },
9681
9682 { &hf_rsvp_xro_sobj_lbit,
9683 { "L(oose) bit", "rsvp.xro.sobj.lbit",
9684 FT_UINT8, BASE_DEC,VALS(rsvp_xro_sobj_lbit_vals), 0x80,
9685 NULL, HFILL
9686 }
9687 },
9688 { &hf_rsvp_rro_sobj_dbit,
9689 { "D(irection) bit", "rsvp.rro.sobj.dbit",
9690 FT_UINT8, BASE_DEC,VALS(rsvp_rro_sobj_dbit_vals), 0x80,
9691 NULL, HFILL
9692 }
9693 },
9694
9695 { &hf_rsvp_xro_sobj_len,
9696 { "Length", "rsvp.xro.sobj.len",
9697 FT_UINT8, BASE_DEC, NULL, 0,
9698 NULL, HFILL
9699 }
9700 },
9701
9702 { &hf_rsvp_xro_sobj_ipv4_addr,
9703 { "IPv4 prefix", "rsvp.xro.sobj.ipv4.addr",
9704 FT_IPv4, BASE_NONE, NULL, 0,
9705 NULL, HFILL
9706 }
9707 },
9708
9709 { &hf_rsvp_xro_sobj_ipv4_prefix,
9710 { "Prefix Length", "rsvp.xro.sobj.ipv4.prefix",
9711 FT_UINT8, BASE_DEC, NULL, 0,
9712 NULL, HFILL
9713 }
9714 },
9715
9716 { &hf_rsvp_xro_sobj_ipv4_attr,
9717 { "Attribute", "rsvp.xro.sobj.ipv4.attr",
9718 FT_UINT8, BASE_DEC, VALS(rsvp_xro_sobj_ip_attr_vals), 0,
9719 NULL, HFILL
9720 }
9721 },
9722
9723 { &hf_rsvp_xro_sobj_ipv6_attr,
9724 { "Attribute", "rsvp.xro.sobj.ipv6.attr",
9725 FT_UINT8, BASE_DEC, VALS(rsvp_xro_sobj_ip_attr_vals), 0,
9726 NULL, HFILL
9727 }
9728 },
9729
9730 { &hf_rsvp_xro_sobj_srlg_id,
9731 { "SRLG Id", "rsvp.xro.sobj.srlg.id",
9732 FT_UINT32, BASE_DEC, NULL, 0,
9733 NULL, HFILL
9734 }
9735 },
9736
9737 { &hf_rsvp_xro_sobj_srlg_res,
9738 { "Reserved", "rsvp.xro.sobj.srlg.res",
9739 FT_UINT16, BASE_DEC, NULL, 0,
9740 NULL, HFILL
9741 }
9742 },
9743
9744 { &hf_rsvp_private_data,
9745 { "Data", "rsvp.private.data",
9746 FT_BYTES, BASE_NONE, NULL, 0,
9747 NULL, HFILL
9748 }
9749 },
9750
9751 { &hf_rsvp_juniper_numtlvs,
9752 { "Num TLVs", "rsvp.juniper.tlvs",
9753 FT_UINT16, BASE_DEC, NULL, 0,
9754 NULL, HFILL
9755 }
9756 },
9757
9758 { &hf_rsvp_juniper_padlength,
9759 { "Padlength", "rsvp.juniper.padlength",
9760 FT_UINT16, BASE_DEC, NULL, 0,
9761 NULL, HFILL
9762 }
9763 },
9764
9765 { &hf_rsvp_juniper_type,
9766 { "Juniper type", "rsvp.juniper.type",
9767 FT_UINT8, BASE_HEX, VALS(rsvp_juniper_attr_vals), 0,
9768 NULL, HFILL
9769 }
9770 },
9771
9772 { &hf_rsvp_juniper_length,
9773 { "Juniper length", "rsvp.juniper.length",
9774 FT_UINT8, BASE_DEC, NULL, 0,
9775 NULL, HFILL
9776 }
9777 },
9778
9779 { &hf_rsvp_juniper_attrib_cos,
9780 { "Cos", "rsvp.juniper.attrib.cos",
9781 FT_UINT16, BASE_HEX, NULL, 0,
9782 NULL, HFILL
9783 }
9784 },
9785
9786 { &hf_rsvp_juniper_attrib_metric1,
9787 { "Metric 1", "rsvp.juniper.attrib.metric1",
9788 FT_UINT16, BASE_HEX, NULL, 0,
9789 NULL, HFILL
9790 }
9791 },
9792
9793 { &hf_rsvp_juniper_attrib_metric2,
9794 { "Metric 2", "rsvp.juniper.attrib.metric2",
9795 FT_UINT16, BASE_HEX, NULL, 0,
9796 NULL, HFILL
9797 }
9798 },
9799
9800 { &hf_rsvp_juniper_attrib_ccc_status,
9801 { "CCC Status", "rsvp.juniper.attrib.ccc_status",
9802 FT_UINT16, BASE_HEX, NULL, 0,
9803 NULL, HFILL
9804 }
9805 },
9806
9807 { &hf_rsvp_juniper_attrib_path,
9808 { "Path type", "rsvp.juniper.attrib.path",
9809 FT_UINT16, BASE_HEX, VALS(rsvp_juniper_path_attr_vals), 0,
9810 NULL, HFILL
9811 }
9812 },
9813
9814 { &hf_rsvp_juniper_attrib_unknown,
9815 { "Unknown", "rsvp.juniper.attrib.unknown",
9816 FT_BYTES, BASE_NONE, NULL, 0,
9817 NULL, HFILL
9818 }
9819 },
9820
9821 { &hf_rsvp_juniper_pad,
9822 { "Pad", "rsvp.juniper.pad",
9823 FT_BYTES, BASE_NONE, NULL, 0,
9824 NULL, HFILL
9825 }
9826 },
9827
9828 { &hf_rsvp_juniper_unknown,
9829 { "Unknown", "rsvp.juniper.unknown",
9830 FT_BYTES, BASE_NONE, NULL, 0,
9831 NULL, HFILL
9832 }
9833 },
9834
9835 { &hf_rsvp_unknown_data,
9836 { "Data", "rsvp.unknown.data",
9837 FT_BYTES, BASE_NONE, NULL, 0,
9838 NULL, HFILL
9839 }
9840 },
9841
9842 {&hf_rsvp_loose_hop,
9843 { "Hop", "rsvp.loose_hop",
9844 FT_BOOLEAN, 8, TFS(&tfs_loose_strict_hop), 0x80,
9845 NULL, HFILL }
9846 },
9847
9848 { &hf_rsvp_data_length,
9849 { "Data length", "rsvp.data_length",
9850 FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_word_not_including_header, 0,
9851 NULL, HFILL
9852 }
9853 },
9854
9855 { &hf_rsvp_ctype_s2l_sub_lsp,
9856 { "C-Type", "rsvp.ctype.s2l_sub_lsp",
9857 FT_UINT32, BASE_DEC, VALS(rsvp_c_type_s2l_sub_lsp_vals), 0,
9858 NULL, HFILL
9859 }
9860 },
9861 { &hf_rsvp_s2l_sub_lsp_destination_ipv4_address,
9862 { "IPv4 S2L Sub-LSP destination address", "rsvp.s2l_sub_lsp.destination_ipv4_address",
9863 FT_IPv4, BASE_NONE, NULL, 0,
9864 NULL, HFILL
9865 }
9866 },
9867 { &hf_rsvp_s2l_sub_lsp_destination_ipv6_address,
9868 { "IPv6 S2L Sub-LSP destination address", "rsvp.s2l_sub_lsp.destination_ipv6_address",
9869 FT_IPv6, BASE_NONE, NULL, 0,
9870 NULL, HFILL
9871 }
9872 },
9873 { &hf_rsvp_s2l_sub_lsp_data,
9874 { "Data", "rsvp.s2l_sub_lsp.data",
9875 FT_BYTES, BASE_NONE, NULL, 0,
9876 NULL, HFILL
9877 }
9878 },
9879
9880
9881 /* Generated from convert_proto_tree_add_text.pl */
9882 { &hf_rsvp_session_flags, { "Flags", "rsvp.session.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
9883 { &hf_rsvp_session_destination_address, { "Destination address", "rsvp.session.destination_address", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9884 { &hf_rsvp_session_protocol, { "Protocol", "rsvp.session.protocol", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9885 { &hf_rsvp_session_destination_port, { "Destination port", "rsvp.session.destination_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9886 { &hf_rsvp_session_dscp, { "DSCP", "rsvp.session.dscp", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &dscp_vals_ext, 0x0, NULL, HFILL }},
9887 { &hf_rsvp_session_extended_ipv4_address, { "Extended IPv4 Address", "rsvp.session.extended_ipv4_address", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9888 { &hf_rsvp_session_p2mp_id, { "P2MP ID", "rsvp.session.p2mp_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9889 { &hf_rsvp_session_data, { "Data", "rsvp.session.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9890 { &hf_rsvp_ifid_tlv_length, { "Length", "rsvp.ifid_tlv.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9891 { &hf_rsvp_ifid_tlv_ipv4_address, { "IPv4 address", "rsvp.ifid_tlv.ipv4_address", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9892 { &hf_rsvp_ifid_tlv_ipv6_address, { "IPv6 address", "rsvp.ifid_tlv.ipv6_address", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9893 { &hf_rsvp_ifid_tlvinterface_id, { "Interface-ID", "rsvp.ifid_tlv.interface_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL }},
9894 { &hf_rsvp_ifid_tlv_label, { "Label", "rsvp.ifid_tlv.label", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9895 { &hf_rsvp_ifid_tlv_node_id, { "Node ID", "rsvp.ifid_tlv.node_id", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9896 { &hf_rsvp_ifid_tlv_area, { "Area", "rsvp.ifid_tlv.area", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9897 { &hf_rsvp_ifid_tlv_autonomous_system, { "Autonomous System", "rsvp.ifid_tlv.autonomous_system", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9898 { &hf_rsvp_ifid_tlv_error_string, { "Error String", "rsvp.ifid_tlv.error_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9899 { &hf_rsvp_ifid_tlv_data, { "Data", "rsvp.ifid_tlv.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9900 { &hf_rsvp_ifid_tlv_padding, { "Padding", "rsvp.ifid_tlv.padding", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9901 { &hf_rsvp_ctype_hop, { "C-Type", "rsvp.ctype.hop", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_hop_vals), 0x0, NULL, HFILL }},
9902 { &hf_rsvp_hop_neighbor_address_ipv4, { "Neighbor address", "rsvp.hop.neighbor_address_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9903 { &hf_rsvp_hop_logical_interface, { "Logical interface", "rsvp.hop.logical_interface", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9904 { &hf_rsvp_hop_neighbor_address_ipv6, { "Neighbor address", "rsvp.neighbor_address_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9905 { &hf_rsvp_hop_data, { "Data", "rsvp.hop.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9906 { &hf_rsvp_ctype_time_values, { "C-Type", "rsvp.ctype.time_values", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_time_values_vals), 0x0, NULL, HFILL }},
9907 { &hf_rsvp_time_values_data, { "Data", "rsvp.time_values.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9908 { &hf_rsvp_ctype_error, { "C-Type", "rsvp.ctype.error", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_error_vals), 0x0, NULL, HFILL }},
9909 { &hf_rsvp_error_error_node_ipv4, { "Error node", "rsvp.error.error_node_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9910 { &hf_rsvp_error_error_node_ipv6, { "Error node", "rsvp.error.error_node_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9911 { &hf_rsvp_error_data, { "Data", "rsvp.error.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9912 { &hf_rsvp_error_error_code, { "Error code", "rsvp.error.error_code", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &rsvp_error_codes_ext, 0x0, NULL, HFILL }},
9913 { &hf_rsvp_ctype_scope, { "C-Type", "rsvp.ctype.scope", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_scope_vals), 0x0, NULL, HFILL }},
9914 { &hf_rsvp_scope_ipv4_address, { "IPv4 Address", "rsvp.scope.ipv4_address", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9915 { &hf_rsvp_scope_ipv6_address, { "IPv6 Address", "rsvp.scope.ipv6_address", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9916 { &hf_rsvp_scope_data, { "Data", "rsvp.scope.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9917 { &hf_rsvp_ctype_style, { "C-Type", "rsvp.ctype.style", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_style_vals), 0x0, NULL, HFILL }},
9918 { &hf_rsvp_style_flags, { "Flags", "rsvp.style.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
9919 { &hf_rsvp_style_style, { "Style", "rsvp.style.style", FT_UINT24, BASE_HEX, VALS(style_vals), 0x0, NULL, HFILL }},
9920 { &hf_rsvp_style_data, { "Data", "rsvp.style.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9921 { &hf_rsvp_ctype_confirm, { "C-Type", "rsvp.ctype.confirm", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_confirm_vals), 0x0, NULL, HFILL }},
9922 { &hf_rsvp_confirm_receiver_address_ipv4, { "Receiver address", "rsvp.confirm.receiver_address_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9923 { &hf_rsvp_confirm_receiver_address_ipv6, { "Receiver address", "rsvp.confirm.receiver_address_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9924 { &hf_rsvp_confirm_data, { "Data", "rsvp.confirm.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9925 { &hf_rsvp_ctype_template, { "C-Type", "rsvp.ctype.template", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_template_vals), 0x0, NULL, HFILL }},
9926 { &hf_rsvp_template_filter_source_address_ipv6, { "Source address", "rsvp.template_filter.source_address_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9927 { &hf_rsvp_template_filter_source_port, { "Source port", "rsvp.template_filter.source_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9928 { &hf_rsvp_template_filter_ipv4_tunnel_sender_address, { "IPv4 Tunnel Sender Address", "rsvp.template_filter.ipv4_tunnel_sender_address", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9929 { &hf_rsvp_template_filter_ipv6_tunnel_sender_address, { "IPv6 Tunnel Sender Address", "rsvp.template_filter.ipv6_tunnel_sender_address", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9930 { &hf_rsvp_template_filter_sub_group_originator_id, { "Sub-Group Originator ID", "rsvp.template_filter.sub_group_originator_id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9931 { &hf_rsvp_template_filter_sub_group_id, { "Sub-Group ID", "rsvp.template_filter.sub_group_id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9932 { &hf_rsvp_template_filter_data, { "Data", "rsvp.template_filter.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9933 { &hf_rsvp_eth_tspec_length, { "Length", "rsvp.eth_tspec.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9934 { &hf_rsvp_eth_tspec_profile, { "Profile", "rsvp.eth_tspec.profile", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
9935 { &hf_rsvp_eth_tspec_index, { "Index", "rsvp.eth_tspec.index", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
9936 { &hf_rsvp_eth_tspec_reserved, { "Reserved", "rsvp.eth_tspec.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
9937 { &hf_rsvp_eth_tspec_el2cp, { "EL2CP", "rsvp.eth_tspec.el2cp", FT_UINT8, BASE_DEC, VALS(el2cp_val_str), 0x0, NULL, HFILL }},
9938 { &hf_rsvp_eth_tspec_il2cp, { "IL2CP", "rsvp.eth_tspec.il2cp", FT_UINT8, BASE_DEC, VALS(il2cp_val_str), 0x0, NULL, HFILL }},
9939 { &hf_rsvp_eth_tspec_cir, { "CIR", "rsvp.eth_tspec.cir", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9940 { &hf_rsvp_eth_tspec_cbs, { "CBS", "rsvp.eth_tspec.cbs", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9941 { &hf_rsvp_eth_tspec_eir, { "EIR", "rsvp.eth_tspec.eir", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9942 { &hf_rsvp_eth_tspec_ebs, { "EBS", "rsvp.eth_tspec.ebs", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9943 { &hf_rsvp_ctype_tspec, { "C-Type", "rsvp.ctype.tspec", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_tspec_vals), 0x0, NULL, HFILL }},
9944 { &hf_rsvp_tspec_message_format_version, { "Message format version", "rsvp.tspec.message_format_version", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL }},
9945 { &hf_rsvp_tspec_service_header, { "Service header", "rsvp.tspec.service_header", FT_UINT8, BASE_DEC, VALS(qos_vals), 0x0, NULL, HFILL }},
9946 { &hf_rsvp_tspec_token_bucket_rate, { "Token bucket rate", "rsvp.tspec.token_bucket_rate", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9947 { &hf_rsvp_tspec_token_bucket_size, { "Token bucket size", "rsvp.tspec.token_bucket_size", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9948 { &hf_rsvp_tspec_peak_data_rate, { "Peak data rate", "rsvp.tspec.peak_data_rate", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9949 { &hf_rsvp_tspec_hint, { "Hint", "rsvp.tspec.hint", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9950 { &hf_rsvp_compression_factor, { "Compression Factor", "rsvp.tspec.compression_factor", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9951 { &hf_rsvp_tspec_signal_type_sonet, { "Signal Type", "rsvp.tspec.signal_type", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &gmpls_sonet_signal_type_str_ext, 0x0, NULL, HFILL }},
9952 { &hf_rsvp_tspec_requested_concatenation, { "Requested Concatenation (RCC)", "rsvp.tspec.requested_concatenation", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9953 { &hf_rsvp_tspec_number_of_contiguous_components, { "Number of Contiguous Components (NCC)", "rsvp.tspec.number_of_contiguous_components", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9954 { &hf_rsvp_tspec_number_of_virtual_components, { "Number of Virtual Components (NVC)", "rsvp.tspec.number_of_virtual_components", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9955 { &hf_rsvp_tspec_multiplier, { "Multiplier (MT)", "rsvp.tspec.multiplier", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9956 { &hf_rsvp_tspec_transparency, { "Transparency (T)", "rsvp.tspec.transparency", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
9957 { &hf_rsvp_tspec_profile, { "Profile (P)", "rsvp.tspec.profile", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9958 { &hf_rsvp_tspec_signal_type_g709, { "Signal Type", "rsvp.tspec.signal_type", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmpls_g709_signal_type_rvals), 0x0, NULL, HFILL }},
9959 { &hf_rsvp_tspec_number_of_multiplexed_components, { "Number of Multiplexed Components (NMC)", "rsvp.number_of_multiplexed_components", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9960 { &hf_rsvp_tspec_mtu, { "MTU", "rsvp.tspec.mtu", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9961 { &hf_rsvp_tspec_data, { "Data", "rsvp.tspec.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9962 { &hf_rsvp_ctype_flowspec, { "C-Type", "rsvp.ctype.flowspec", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_flowspec_vals), 0x0, NULL, HFILL }},
9963 { &hf_rsvp_flowspec_message_format_version, { "Message format version", "rsvp.flowspec.message_format_version", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL }},
9964 { &hf_rsvp_flowspec_service_header, { "Service header", "rsvp.flowspec.service_header", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &intsrv_services_str_ext, 0x0, NULL, HFILL }},
9965 { &hf_rsvp_flowspec_token_bucket_rate, { "Token bucket rate", "rsvp.flowspec.token_bucket_rate", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9966 { &hf_rsvp_flowspec_token_bucket_size, { "Token bucket size", "rsvp.flowspec.token_bucket_size", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9967 { &hf_rsvp_flowspec_peak_data_rate, { "Peak data rate", "rsvp.flowspec.peak_data_rate", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9968 { &hf_rsvp_flowspec_rate, { "Rate", "rsvp.flowspec.rate", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9969 { &hf_rsvp_flowspec_slack_term, { "Slack term", "rsvp.flowspec.slack_term", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9970 { &hf_rsvp_flowspec_signal_type_sonet, { "Signal Type", "rsvp.flowspec.signal_type", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &gmpls_sonet_signal_type_str_ext, 0x0, NULL, HFILL }},
9971 { &hf_rsvp_flowspec_requested_concatenation, { "Requested Concatenation (RCC)", "rsvp.flowspec.requested_concatenation", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9972 { &hf_rsvp_flowspec_number_of_contiguous_components, { "Number of Contiguous Components (NCC)", "rsvp.flowspec.number_of_contiguous_components", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9973 { &hf_rsvp_flowspec_number_of_virtual_components, { "Number of Virtual Components (NVC)", "rsvp.flowspec.number_of_virtual_components", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9974 { &hf_rsvp_flowspec_multiplier, { "Multiplier (MT)", "rsvp.flowspec.multiplier", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9975 { &hf_rsvp_flowspec_transparency, { "Transparency (T)", "rsvp.flowspec.transparency", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
9976 { &hf_rsvp_flowspec_profile, { "Profile (P)", "rsvp.flowspec.profile", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9977 { &hf_rsvp_flowspec_signal_type_g709, { "Signal Type", "rsvp.flowspec.signal_type", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmpls_g709_signal_type_rvals), 0x0, NULL, HFILL }},
9978 { &hf_rsvp_flowspec_number_of_multiplexed_components, { "Number of Multiplexed Components (NMC)", "rsvp.flowspec.number_of_multiplexed_components", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9979 { &hf_rsvp_flowspec_mtu, { "MTU", "rsvp.flowspec.mtu", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9980 { &hf_rsvp_flowspec_m, { "m", "rsvp.flowspec.m", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9981 { &hf_rsvp_ctype_adspec, { "C-Type", "rsvp.ctype.adspec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9982 { &hf_rsvp_adspec_message_format_version, { "Message format version", "rsvp.adspec.message_format_version", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL }},
9983 { &hf_rsvp_adspec_service_header, { "Service header", "rsvp.adspec.service_header", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &intsrv_services_str_ext, 0x0, NULL, HFILL }},
9984 { &hf_rsvp_ctype_integrity, { "C-Type", "rsvp.ctype.integrity", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9985 { &hf_rsvp_integrity_flags, { "Flags", "rsvp.integrity.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
9986 { &hf_rsvp_integrity_key_identifier, { "Key Identifier", "rsvp.integrity.key_identifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9987 { &hf_rsvp_integrity_sequence_number, { "Sequence Number", "rsvp.integrity.sequence_number", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9988 { &hf_rsvp_integrity_hash, { "Hash", "rsvp.integrity.hash", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9989 { &hf_rsvp_ctype_policy, { "C-Type", "rsvp.ctype.policy", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9990 { &hf_rsvp_policy_data, { "Data", "rsvp.policy.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
9991 { &hf_rsvp_ctype_label_request, { "C-Type", "rsvp.ctype.label_request", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_label_request_vals), 0x0, NULL, HFILL }},
9992 { &hf_rsvp_label_request_l3pid, { "L3PID", "rsvp.label_request.l3pid", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, NULL, HFILL }},
9993 { &hf_rsvp_label_request_min_vpi, { "Min VPI", "rsvp.label_request.min_vpi", FT_UINT16, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
9994 { &hf_rsvp_label_request_min_vci, { "Min VCI", "rsvp.label_request.min_vci", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9995 { &hf_rsvp_label_request_max_vpi, { "Max VPI", "rsvp.label_request.max_vpi", FT_UINT16, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
9996 { &hf_rsvp_label_request_max_vci, { "Max VCI", "rsvp.label_request.max_vci", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
9997 { &hf_rsvp_label_request_lsp_encoding_type, { "LSP Encoding Type", "rsvp.label_request.lsp_encoding_type", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmpls_lsp_enc_rvals), 0x0, NULL, HFILL }},
9998 { &hf_rsvp_label_request_switching_type, { "Switching Type", "rsvp.label_request.switching_type", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmpls_switching_type_rvals), 0x0, NULL, HFILL }},
9999 { &hf_rsvp_g_pid, { "G-PID", "rsvp.label_request.g_pid", FT_UINT16, BASE_HEX|BASE_RANGE_STRING, RVALS(gmpls_gpid_rvals), 0x0, NULL, HFILL }},
10000 { &hf_rsvp_label_request_data, { "Data", "rsvp.label_request.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10001 { &hf_rsvp_label_label, { "Label", "rsvp.label.label", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10002 { &hf_rsvp_label_generalized_label, { "Generalized Label", "rsvp.label.generalized_label", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL }},
10003 { &hf_rsvp_label_generalized_label_evpl_vlad_id, { "VLAN ID", "rsvp.label.generalized_label_evpl_vlad_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10004 { &hf_rsvp_label_data, { "Data", "rsvp.label.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10005 { &hf_rsvp_label_set_action, { "Action", "rsvp.label_set.action", FT_UINT8, BASE_DEC, VALS(action_type_vals), 0x0, NULL, HFILL }},
10006 { &hf_rsvp_ctype_attribute, { "C-Type", "rsvp.ctype.attribute", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_attribute_vals), 0x0, NULL, HFILL }},
10007 { &hf_rsvp_session_attribute_exclude_any, { "Exclude-Any", "rsvp.session_attribute.exclude_any", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10008 { &hf_rsvp_session_attribute_include_any, { "Include-Any", "rsvp.session_attribute.include_any", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10009 { &hf_rsvp_session_attribute_include_all, { "Include-All", "rsvp.session_attribute.include_all", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10010 { &hf_rsvp_session_attribute_setup_priority, { "Setup priority", "rsvp.session_attribute.setup_priority", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10011 { &hf_rsvp_session_attribute_hold_priority, { "Hold priority", "rsvp.session_attribute.hold_priority", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10012 { &hf_rsvp_session_attribute_flags, { "Flags", "rsvp.session_attribute.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10013 { &hf_rsvp_session_attribute_name_length, { "Name length", "rsvp.session_attribute.name_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10014 { &hf_rsvp_session_attribute_name, { "Name", "rsvp.session_attribute.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10015 { &hf_rsvp_session_attribute_data, { "Data", "rsvp.session_attribute.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10016 { &hf_rsvp_ero_rro_subobjects_length, { "Length", "rsvp.ero_rro_subobjects.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10017 { &hf_rsvp_ero_rro_subobjects_ipv4_hop, { "IPv4 hop", "rsvp.ero_rro_subobjects.ipv4_hop", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10018 { &hf_rsvp_ero_rro_subobjects_prefix_length, { "Prefix length", "rsvp.ero_rro_subobjects.prefix_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10019 { &hf_rsvp_ero_rro_subobjects_flags, { "Flags", "rsvp.ero_rro_subobjects.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10020 { &hf_rsvp_ero_rro_subobjects_ipv6_hop, { "IPv6 hop", "rsvp.ero_rro_subobjects.ipv6_hop", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10021 { &hf_rsvp_ero_rro_subobjects_label, { "Label", "rsvp.ero_rro_subobjects.label", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10022 { &hf_rsvp_ero_rro_subobjects_router_id, { "Router-ID", "rsvp.ero_rro_subobjects.router_id", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10023 { &hf_rsvp_ero_rro_subobjects_interface_id, { "Interface-ID", "rsvp.ero_rro_subobjects.interface_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10024 { &hf_rsvp_ero_rro_subobjects_path_key, { "Path Key", "rsvp.ero_rro_subobjects.path_key", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10025 { &hf_rsvp_ero_rro_subobjects_pce_id_ipv4, { "PCE-ID", "rsvp.ero_rro_subobjects.pce_id_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10026 { &hf_rsvp_ero_rro_subobjects_pce_id_ipv6, { "PCE-ID", "rsvp.ero_rro_subobjects.pce_id_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10027 { &hf_rsvp_ero_rro_subobjects_private_length, { "Length", "rsvp.ero_rro_subobjects.private_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10028 { &hf_rsvp_ero_rro_subobjects_private_data, { "Data", "rsvp.ero_rro_subobjects.private_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10029 { &hf_rsvp_ctype_explicit_route, { "C-Type", "rsvp.ctype.explicit_route", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10030 { &hf_rsvp_explicit_route_data, { "Data", "rsvp.explicit_route.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10031 { &hf_rsvp_ctype_record_route, { "C-Type", "rsvp.ctype.record_route", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10032 { &hf_rsvp_record_route_data, { "Data", "rsvp.record_route.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10033 { &hf_rsvp_ctype_exclude_route, { "C-Type", "rsvp.ctype.exclude_route", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10034 { &hf_rsvp_exclude_route_data, { "Data", "rsvp.exclude_route.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10035 { &hf_rsvp_ctype_message_id, { "C-Type", "rsvp.ctype.message_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10036 { &hf_rsvp_message_id_flags, { "Flags", "rsvp.message_id.flags", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10037 { &hf_rsvp_message_id_epoch, { "Epoch", "rsvp.message_id.epoch", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10038 { &hf_rsvp_message_id_message_id, { "Message-ID", "rsvp.message_id.message_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10039 { &hf_rsvp_message_id_data, { "Data", "rsvp.message_id.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10040 { &hf_rsvp_ctype_message_id_ack, { "C-Type", "rsvp.ctype.message_id_ack", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10041 { &hf_rsvp_message_id_ack_flags, { "Flags", "rsvp.message_id_ack.flags", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10042 { &hf_rsvp_message_id_ack_epoch, { "Epoch", "rsvp.message_id_ack.epoch", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10043 { &hf_rsvp_message_id_ack_message_id, { "Message-ID", "rsvp.message_id_ack.message_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10044 { &hf_rsvp_message_id_ack_data, { "Data", "rsvp.message_id_ack.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10045 { &hf_rsvp_ctype_message_id_list, { "C-Type", "rsvp.ctype.message_id_list", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10046 { &hf_rsvp_message_id_list_flags, { "Flags", "rsvp.message_id_list.flags", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10047 { &hf_rsvp_message_id_list_epoch, { "Epoch", "rsvp.message_id_list.epoch", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10048 { &hf_rsvp_message_id_list_message_id, { "Message-ID", "rsvp.message_id_list.message_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10049 { &hf_rsvp_message_id_list_data, { "Data", "rsvp.message_id_list.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10050 { &hf_rsvp_ctype_hello, { "C-Type", "rsvp.ctype.hello", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10051 { &hf_rsvp_hello_source_instance, { "Source Instance", "rsvp.hello.source_instance", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10052 { &hf_rsvp_hello_destination_instance, { "Destination Instance", "rsvp.hello.destination_instance", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10053 { &hf_rsvp_ctype_dclass, { "C-Type", "rsvp.ctype.dclass", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10054 { &hf_rsvp_dclass_dscp, { "DSCP", "rsvp.dclass.dscp", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &dscp_vals_ext, 0x0, NULL, HFILL }},
10055 { &hf_rsvp_dclass_data, { "Data", "rsvp.dclass.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10056 { &hf_rsvp_ctype_admin_status, { "C-Type", "rsvp.ctype.admin_status", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10057 { &hf_rsvp_admin_status_bits, { "Admin Status", "rsvp.admin_status.bits", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10058 { &hf_rsvp_admin_status_data, { "Data", "rsvp.admin_status.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10059 { &hf_rsvp_ctype_lsp_attributes, { "C-Type", "rsvp.ctype.lsp_attributes", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10060 { &hf_rsvp_lsp_attributes_tlv, { "LSP attributes TLV", "rsvp.lsp_attributes_tlv", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10061 { &hf_rsvp_lsp_attributes_tlv_data, { "Data", "rsvp.lsp_attributes_tlv.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10062 { &hf_rsvp_ctype_association, { "C-Type", "rsvp.ctype.association", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_association_vals), 0x0, NULL, HFILL }},
10063 { &hf_rsvp_association_type, { "Association type", "rsvp.association.type", FT_UINT16, BASE_DEC, VALS(association_type_vals), 0x0, NULL, HFILL }},
10064 { &hf_rsvp_association_id, { "Association ID", "rsvp.association.id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10065 { &hf_rsvp_association_source_ipv4, { "Association source", "rsvp.association.source_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10066 { &hf_rsvp_association_source_ipv6, { "Association source", "rsvp.association.source_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10067 { &hf_rsvp_association_routing_area_id, { "Routing Area ID", "rsvp.association.routing_area_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10068 { &hf_rsvp_association_node_id, { "Node ID", "rsvp.association.node_id", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10069 { &hf_rsvp_association_padding, { "Padding", "rsvp.association.padding", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10070 { &hf_rsvp_association_data, { "Data", "rsvp.association.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10071 { &hf_rsvp_ctype_tunnel_if_id, { "C-Type", "rsvp.ctype.tunnel_if_id", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_tunnel_if_vals), 0x0, NULL, HFILL }},
10072 { &hf_rsvp_lsp_tunnel_if_id_length, { "Length", "rsvp.lsp_tunnel_if_id.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10073 { &hf_rsvp_lsp_tunnel_if_id_component_link_identifier, { "Component link identifier", "rsvp.lsp_tunnel_if_id.component_link_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10074 { &hf_rsvp_lsp_tunnel_if_id_component_link_identifier_ipv4, { "Component link identifier", "rsvp.lsp_tunnel_if_id.component_link_identifier_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10075 { &hf_rsvp_lsp_tunnel_if_id_lsp_encoding_type, { "LSP Encoding Type", "rsvp.lsp_tunnel_if_id.lsp_encoding_type", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmpls_lsp_enc_rvals), 0x0, NULL, HFILL }},
10076 { &hf_rsvp_lsp_tunnel_if_id_switching_type, { "Switching Type", "rsvp.lsp_tunnel_if_id.switching_type", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmpls_switching_type_rvals), 0x0, NULL, HFILL }},
10077 { &hf_rsvp_lsp_tunnel_if_id_signal_type, { "Signal Type", "rsvp.lsp_tunnel_if_id.signal_type", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &gmpls_sonet_signal_type_str_ext, 0x0, NULL, HFILL }},
10078 { &hf_rsvp_lsp_tunnel_if_id_connection_id, { "Sub Interface/Connection ID", "rsvp.lsp_tunnel_if_id.connection_id", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10079 { &hf_rsvp_lsp_tunnel_if_id_sc_pc_id, { "SC PC ID", "rsvp.lsp_tunnel_if_id.sc_pc_id", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10080 { &hf_rsvp_lsp_tunnel_if_id_sc_pc_scn_address, { "SC PC SCN Address", "rsvp.lsp_tunnel_if_id.sc_pc_scn_address", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10081 { &hf_rsvp_lsp_tunnel_if_id_router_id, { "Router ID", "rsvp.lsp_tunnel_if_id.router_id", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10082 { &hf_rsvp_lsp_tunnel_if_id_interface_id, { "Interface ID", "rsvp.lsp_tunnel_if_id.interface_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10083 { &hf_rsvp_lsp_tunnel_if_id_ipv4_interface_address, { "IPv4 interface address", "rsvp.lsp_tunnel_if_id.ipv4_interface_address", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10084 { &hf_rsvp_lsp_tunnel_if_id_target_igp_instance, { "Target IGP instance", "rsvp.lsp_tunnel_if_id.target_igp_instance", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10085 { &hf_rsvp_lsp_tunnel_if_id_action, { "Action", "rsvp.lsp_tunnel_if_id.action", FT_UINT8, BASE_DEC, VALS(lsp_tunnel_if_id_action_str), 0xF0, NULL, HFILL }},
10086 { &hf_rsvp_lsp_tunnel_if_id_ipv6_interface_address, { "IPv6 interface address", "rsvp.lsp_tunnel_if_id.ipv6_interface_address", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10087 { &hf_rsvp_lsp_tunnel_if_id_data, { "Data", "rsvp.lsp_tunnel_if_id.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10088 { &hf_rsvp_notify_request_notify_node_address_ipv4, { "Notify node address", "rsvp.notify_request.notify_node_address_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10089 { &hf_rsvp_notify_request_notify_node_address_ipv6, { "Notify node address", "rsvp.notify_request.notify_node_address_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10090 { &hf_rsvp_notify_request_data, { "Data", "rsvp.notify_request.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10091 { &hf_rsvp_ctype_call_id, { "C-Type", "rsvp.ctype.call_id", FT_UINT32, BASE_DEC, VALS(rsvp_c_type_call_id_vals), 0x0, NULL, HFILL }},
10092 { &hf_rsvp_call_id_data, { "Data", "rsvp.call_id.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10093 { &hf_rsvp_call_id_address_type, { "Address type", "rsvp.call_id.address_type", FT_UINT8, BASE_DEC, VALS(address_type_vals), 0x0, NULL, HFILL }},
10094 { &hf_rsvp_call_id_reserved, { "Reserved", "rsvp.call_id.reserved", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10095 { &hf_rsvp_call_id_international_segment, { "International Segment", "rsvp.call_id.international_segment", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10096 { &hf_rsvp_call_id_national_segment, { "National Segment", "rsvp.call_id.national_segment", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10097 { &hf_rsvp_call_id_local_identifier, { "Local Identifier", "rsvp.call_id.local_identifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10098 { &hf_rsvp_restart_cap_data, { "Data", "rsvp.restart_cap.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10099 { &hf_rsvp_protection_info_link_flags, { "Link Flags", "rsvp.protection_info.link_flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10100 { &hf_rsvp_protection_info_data, { "Data", "rsvp.protection_info.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10101 { &hf_rsvp_fast_reroute_setup_priority, { "Setup Priority", "rsvp.fast_reroute.setup_priority", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10102 { &hf_rsvp_fast_reroute_hold_priority, { "Hold Priority", "rsvp.fast_reroute.hold_priority", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10103 { &hf_rsvp_fast_reroute_hop_limit, { "Hop Limit", "rsvp.fast_reroute.hop_limit", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10104 { &hf_rsvp_fast_reroute_flags, { "Flags", "rsvp.fast_reroute.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10105 { &hf_rsvp_fast_reroute_bandwidth, { "Bandwidth", "rsvp.fast_reroute.bandwidth", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10106 { &hf_rsvp_fast_reroute_include_any, { "Include-Any", "rsvp.fast_reroute.include_any", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10107 { &hf_rsvp_fast_reroute_exclude_any, { "Exclude-Any", "rsvp.fast_reroute.exclude_any", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10108 { &hf_rsvp_fast_reroute_include_all, { "Include-All", "rsvp.fast_reroute.include_all", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10109 { &hf_rsvp_fast_reroute_data, { "Data", "rsvp.fast_reroute.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10110 { &hf_rsvp_detour_data, { "Data", "rsvp.detour.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10111 { &hf_rsvp_diffserv_data, { "Data", "rsvp.diffserv.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10112 { &hf_rsvp_diffserv_aware_te_data, { "Data", "rsvp.diffserv_aware_te.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10113 { &hf_rsvp_version, { "RSVP Version", "rsvp.version", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL }},
10114 { &hf_rsvp_flags, { "Flags", "rsvp.flags", FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }},
10115 { &hf_rsvp_sending_ttl, { "Sending TTL", "rsvp.sending_ttl", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10116 { &hf_rsvp_message_length, { "Message length", "rsvp.message_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10117 { &hf_rsvp_length, { "Length", "rsvp.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10118 { &hf_rsvp_extended_tunnel_id, { "Extended Tunnel ID", "rsvp.extended_tunnel_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10119 { &hf_rsvp_extended_tunnel_ipv6, { "Extended Tunnel ID", "rsvp.extended_tunnel_id_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10120 { &hf_rsvp_extended_tunnel, { "Extended Tunnel ID", "rsvp.extended_tunnel", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10121 { &hf_rsvp_refresh_interval, { "Refresh interval", "rsvp.refresh_interval", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10122 { &hf_rsvp_minimum_policed_unit, { "Minimum policed unit [m]", "rsvp.minimum_policed_unit", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10123 { &hf_rsvp_maximum_packet_size, { "Maximum packet size [M]", "rsvp.maximum_packet_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10124 { &hf_rsvp_hf_rsvp_adspec_break_bit, { "Break bit", "rsvp.adspec.break_bit", FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, NULL, HFILL }},
10125 { &hf_rsvp_label_request_m, { "M (Merge in Data Plane)", "rsvp.label_request.m", FT_BOOLEAN, 8, TFS(&tfs_can_cannot), 0x80, NULL, HFILL }},
10126 { &hf_rsvp_dlci_length, { "DLCI Length", "rsvp.label_request.dlci_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10127 { &hf_rsvp_min_dlci, { "Min DLCI", "rsvp.label_request.min_dlci", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10128 { &hf_rsvp_max_dlci, { "Max DLCI", "rsvp.label_request.max_dlci", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10129 { &hf_rsvp_ero_rro_autonomous_system, { "Autonomous System", "rsvp.ero_rro_subobjects.autonomous_system", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10130 { &hf_rsvp_nsap_length, { "NSAP Length", "rsvp.nsap_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10131 { &hf_rsvp_gen_uni_data, { "Data", "rsvp.gen_uni.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10132 { &hf_rsvp_gen_uni_logical_port_id, { "Logical Port ID", "rsvp.gen_uni.logical_port_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10133 { &hf_rsvp_gen_uni_service_level, { "Service Level", "rsvp.gen_uni.service_level", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10134 { &hf_rsvp_restart_cap_restart_time, { "Restart Time", "rsvp.restart_cap.restart_time", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_milliseconds, 0x0, NULL, HFILL }},
10135 { &hf_rsvp_restart_cap_recovery_time, { "Recovery Time", "rsvp.restart_cap.recovery_time", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_milliseconds, 0x0, NULL, HFILL }},
10136 { &hf_rsvp_detour_plr_id, { "PLR ID", "rsvp.detour.plr_id", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10137 { &hf_rsvp_detour_avoid_node_id, { "Avoid Node ID", "rsvp.detour.avoid_node_id", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10138 { &hf_rsvp_message_checksum, { "Message Checksum", "rsvp.message_checksum", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10139 { &hf_rsvp_call_attributes_endpont_id, { "Endpoint ID", "rsvp.call_attributes.endpoint_id", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10140 { &hf_rsvp_isis_area_id, { "IS-IS Area Identifier", "rsvp.isis_area_id", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10141 { &hf_rsvp_adspec_type, { "Adspec Type", "rsvp.adspec.type", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &adspec_params_ext, 0x0, NULL, HFILL }},
10142 { &hf_rsvp_adspec_len, { "Length", "rsvp.adspec.len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10143 { &hf_rsvp_adspec_uint, { "Adspec uint", "rsvp.adspec.uint", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10144 { &hf_rsvp_adspec_float, { "Adspec float", "rsvp.adspec.float", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10145 { &hf_rsvp_adspec_bytes, { "Adspec bytes", "rsvp.adspec.bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10146 { &hf_rsvp_wavelength_freq, { "Freq", "rsvp.wavelength.freq", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10147 { &hf_rsvp_wavelength_grid, { "Grid", "rsvp.wavelength.grid", FT_UINT8, BASE_DEC, VALS(lambda_grid_vals), 0xE0, NULL, HFILL }},
10148 { &hf_rsvp_wavelength_cs1, { "Channel Spacing", "rsvp.wavelength.cs1", FT_UINT8, BASE_DEC, VALS(grid1_cs_vals), 0x1E, NULL, HFILL }},
10149 { &hf_rsvp_wavelength_cs2, { "Channel Spacing", "rsvp.wavelength.cs2", FT_UINT8, BASE_DEC, VALS(grid2_cs_vals), 0x1E, NULL, HFILL }},
10150 { &hf_rsvp_wavelength_cs3, { "Channel Spacing", "rsvp.wavelength.cs3", FT_UINT8, BASE_DEC, VALS(grid3_cs_vals), 0x1E, NULL, HFILL }},
10151 { &hf_rsvp_wavelength_channel_spacing, { "Channel Spacing", "rsvp.wavelength.channel_spacing", FT_UINT8, BASE_DEC, NULL, 0x1E, NULL, HFILL }},
10152 { &hf_rsvp_wavelength_n, { "Central Frequency", "rsvp.wavelength.n", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10153 { &hf_rsvp_wavelength_m, { "Channel Width (m)", "rsvp.wavelength.m", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10154 { &hf_rsvp_wavelength_wavelength, { "Wavelength", "rsvp.wavelength.wavelength", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_nanometers, 0x0, NULL, HFILL }},
10155 { &hf_rsvp_sonet_s, { "S", "rsvp.sonet.s", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10156 { &hf_rsvp_sonet_u, { "U", "rsvp.sonet.u", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL }},
10157 { &hf_rsvp_sonet_k, { "K", "rsvp.sonet.k", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL }},
10158 { &hf_rsvp_sonet_l, { "L", "rsvp.sonet.l", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL }},
10159 { &hf_rsvp_sonet_m, { "M", "rsvp.sonet.m", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL }},
10160 { &hf_rsvp_g709_t3, { "t3", "rsvp.g709.t3", FT_UINT16, BASE_DEC, NULL, 0x03F0, NULL, HFILL }},
10161 { &hf_rsvp_g709_t2, { "t2", "rsvp.g709.t2", FT_UINT8, BASE_DEC, NULL, 0x0E, NULL, HFILL }},
10162 { &hf_rsvp_g709_t1, { "t1", "rsvp.g709.t1", FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL }},
10163 { &hf_rsvp_ctype_label_set, { "C-Type", "rsvp.ctype.label_set", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10164 { &hf_rsvp_label_set_type, { "Label type", "rsvp.label_set.type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10165 { &hf_rsvp_label_set_subchannel, { "Subchannel", "rsvp.label_set.subchannel", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL }},
10166 { &hf_rsvp_nsap_address, { "NSAP address", "rsvp.nsap_address", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10167 { &hf_rsvp_class_diversity, { "Diversity", "rsvp.class_diversity", FT_UINT8, BASE_DEC, VALS(ouni_guni_diversity_str), 0xF0, NULL, HFILL }},
10168 { &hf_rsvp_egress_label_type, { "Label type", "rsvp.egress.label_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10169 { &hf_rsvp_egress_label, { "Label", "rsvp.egress.label", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10170 { &hf_rsvp_source_transport_network_addr, { "Source Transport Network addr", "rsvp.source_transport_network_addr", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10171 { &hf_rsvp_ie_data, { "IE Data", "rsvp.ie_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10172 { &hf_rsvp_3gpp_obj_pf_dst_port_range, { "Destination Port range", "rsvp.3gpp_obj.pf_dst_port_range", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10173 { &hf_rsvp_3gpp_obj_pf_src_port_range, { "Source Port range", "rsvp.3gpp_obj.pf_src_port_range", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10174 };
10175
10176 static ei_register_info ei[] = {
10177 { &ei_rsvp_invalid_length, { "rsvp.invalid_length", PI_MALFORMED, PI_ERROR, "Invalid length", EXPFILL }},
10178 { &ei_rsvp_packet_filter_component, { "rsvp.packet_filter_component", PI_UNDECODED, PI_WARN, "Not dissected Packet filter component", EXPFILL }},
10179 { &ei_rsvp_bundle_component_msg, { "rsvp.bundle_component_msg", PI_UNDECODED, PI_WARN, "Bundle Component Messages Not Dissected", EXPFILL }},
10180 { &ei_rsvp_parameter, { "rsvp.parameter.unknown", PI_PROTOCOL, PI_WARN, "Unknown parameter", EXPFILL }},
10181 { &ei_rsvp_adspec_type, { "rsvp.adspec.type.unknown", PI_PROTOCOL, PI_WARN, "Unknown type", EXPFILL }},
10182 { &ei_rsvp_call_id_address_type, { "rsvp.call_id.address_type.unknown", PI_PROTOCOL, PI_WARN, "Unknown Transport Network type", EXPFILL }},
10183 { &ei_rsvp_session_type, { "rsvp.session_type.unknown", PI_PROTOCOL, PI_WARN, "Unknown session type", EXPFILL }},
10184 };
10185
10186 expert_module_t* expert_rsvp;
10187
10188 gint *ett_tree[TT_MAX];
10189
10190 /* Build the tree array */
10191 for (i=0; i<TT_MAX; i++) {
10192 ett_treelist[i] = -1;
10193 ett_tree[i] = &(ett_treelist[i]);
10194 }
10195 proto_rsvp = proto_register_protocol("Resource ReserVation Protocol (RSVP)", "RSVP", "rsvp");
10196 /* Created to remove Decode As confusion */
10197 proto_rsvp_e2e1 = proto_register_protocol_in_name_only("Resource ReserVation Protocol (RSVP-E2EI)", "RSVP-E2EI", "rsvp-e2ei", proto_rsvp, FT_PROTOCOL);
10198
10199 proto_register_field_array(proto_rsvp, rsvpf_info, array_length(rsvpf_info));
10200 proto_register_subtree_array(ett_tree, array_length(ett_tree));
10201 expert_rsvp = expert_register_protocol(proto_rsvp);
10202 expert_register_field_array(expert_rsvp, ei, array_length(ei));
10203 register_rsvp_prefs();
10204
10205 rsvp_request_hash = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), rsvp_hash, rsvp_equal);
10206
10207 register_conversation_table(proto_rsvp, TRUE, rsvp_conversation_packet, rsvp_hostlist_packet);
10208 }
10209
10210 void
proto_reg_handoff_rsvp(void)10211 proto_reg_handoff_rsvp(void)
10212 {
10213 dissector_handle_t rsvp_handle, rsvpe2ei_handle;
10214
10215 rsvp_handle = create_dissector_handle(dissect_rsvp, proto_rsvp);
10216 rsvpe2ei_handle = create_dissector_handle(dissect_rsvp_e2ei, proto_rsvp_e2e1);
10217 dissector_add_uint("ip.proto", IP_PROTO_RSVP, rsvp_handle);
10218 dissector_add_uint("ip.proto", IP_PROTO_RSVPE2EI, rsvpe2ei_handle);
10219 dissector_add_uint_with_preference("udp.port", UDP_PORT_PRSVP, rsvp_handle);
10220 rsvp_tap = register_tap("rsvp");
10221 }
10222
10223 /*
10224 * Editor modelines - https://www.wireshark.org/tools/modelines.html
10225 *
10226 * Local variables:
10227 * c-basic-offset: 4
10228 * tab-width: 8
10229 * indent-tabs-mode: nil
10230 * End:
10231 *
10232 * vi: set shiftwidth=4 tabstop=8 expandtab:
10233 * :indentSize=4:tabSize=8:noTabs=true:
10234 */
10235