/src/wireshark/epan/dissectors/packet-isis-lsp.c
Line | Count | Source |
1 | | /* packet-isis-lsp.c |
2 | | * Routines for decoding isis lsp packets and their CLVs |
3 | | * |
4 | | * Stuart Stanley <stuarts@mxmail.net> |
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 | | * Copyright 2011, Malgi Nikitha Vivekananda <malgi.nikitha@ipinfusion.com> |
14 | | * Krishnamurthy Mayya <krishnamurthy.mayya@ipinfusion.com> |
15 | | * - Decoding for Router Capability TLV and associated subTLVs as per RFC 6326 |
16 | | * - Decoding for Group Address TLV and associated subTLVs as per RFC 6326 |
17 | | * |
18 | | * Copyright 2019, Rohan Saini <rohan.saini@nokia.com> |
19 | | * - Support for dissecting BIER Info Sub-TLV (RFC 8401) |
20 | | */ |
21 | | |
22 | | #include "config.h" |
23 | | |
24 | | #include <epan/expert.h> |
25 | | #include <epan/packet.h> |
26 | | #include <epan/tfs.h> |
27 | | #include <wsutil/array.h> |
28 | | |
29 | | #include "packet-osi.h" |
30 | | #include "packet-isis.h" |
31 | | #include "packet-isis-clv.h" |
32 | | #include <epan/addr_resolv.h> |
33 | | |
34 | | /* |
35 | | * Declarations for L1/L2 LSP base header. |
36 | | */ |
37 | | |
38 | | /* P | ATT | HIPPITY | DS FIELD description */ |
39 | 809 | #define ISIS_LSP_PARTITION_MASK 0x80 |
40 | 793 | #define ISIS_LSP_PARTITION_SHIFT 7 |
41 | 793 | #define ISIS_LSP_PARTITION(info) (((info) & ISIS_LSP_PARTITION_MASK) >> ISIS_LSP_PARTITION_SHIFT) |
42 | | |
43 | 809 | #define ISIS_LSP_ATT_MASK 0x78 |
44 | 793 | #define ISIS_LSP_ATT_SHIFT 3 |
45 | 793 | #define ISIS_LSP_ATT(info) (((info) & ISIS_LSP_ATT_MASK) >> ISIS_LSP_ATT_SHIFT) |
46 | | |
47 | | #define ISIS_LSP_ATT_ERROR(info) ((info) >> 3) |
48 | | #define ISIS_LSP_ATT_EXPENSE(info) (((info) >> 2) & 1) |
49 | | #define ISIS_LSP_ATT_DELAY(info) (((info) >> 1) & 1) |
50 | | #define ISIS_LSP_ATT_DEFAULT(info) ((info) & 1) |
51 | | |
52 | 809 | #define ISIS_LSP_HIPPITY_MASK 0x04 |
53 | 793 | #define ISIS_LSP_HIPPITY_SHIFT 2 |
54 | 793 | #define ISIS_LSP_HIPPITY(info) (((info) & ISIS_LSP_HIPPITY_MASK) >> ISIS_LSP_HIPPITY_SHIFT) |
55 | | |
56 | 809 | #define ISIS_LSP_IS_TYPE_MASK 0x03 |
57 | 793 | #define ISIS_LSP_IS_TYPE(info) ((info) & ISIS_LSP_IS_TYPE_MASK) |
58 | | |
59 | 16 | #define ISIS_LSP_MT_MSHIP_RES_MASK 0xF000 |
60 | | #define ISIS_LSP_MT_MSHIP_ID_MASK 0x0FFF |
61 | | |
62 | | |
63 | | #define ISIS_LSP_TYPE_UNUSED0 0 |
64 | | #define ISIS_LSP_TYPE_LEVEL_1 1 |
65 | | #define ISIS_LSP_TYPE_UNUSED2 2 |
66 | | #define ISIS_LSP_TYPE_LEVEL_2 3 |
67 | | |
68 | | #define ISIS_LSP_ATTACHED_NONE 0 |
69 | | #define ISIS_LSP_ATTACHED_DEFAULT 1 |
70 | | #define ISIS_LSP_ATTACHED_DELAY 2 |
71 | | #define ISIS_LSP_ATTACHED_EXPENSE 4 |
72 | | #define ISIS_LSP_ATTACHED_ERROR 8 |
73 | | |
74 | | /* |
75 | | * The "supported" bit in a metric is actually the "not supported" bit; |
76 | | * if it's *clear*, the metric is supported, and if it's *set*, the |
77 | | * metric is not supported. |
78 | | */ |
79 | 2.63k | #define ISIS_LSP_CLV_METRIC_SUPPORTED(x) (!((x)&0x80)) |
80 | | #define ISIS_LSP_CLV_METRIC_IE(x) ((x)&0x40) |
81 | 1.31k | #define ISIS_LSP_CLV_METRIC_RESERVED(x) ((x)&0x40) |
82 | | #define ISIS_LSP_CLV_METRIC_UPDOWN(x) ((x)&0x80) |
83 | | #define ISIS_LSP_CLV_METRIC_VALUE(x) ((x)&0x3f) |
84 | | |
85 | | /* Sub-TLVs under Router Capability and MT Capability TLVs |
86 | | As per RFC 7176 section 2.3 |
87 | | http://www.iana.org/assignments/isis-tlv-codepoints/isis-tlv-codepoints.xhtml#isis-tlv-codepoints-242 |
88 | | */ |
89 | 35 | #define ISIS_TE_NODE_CAP_DESC 1 |
90 | 28 | #define SEGMENT_ROUTING_CAP 2 /* draft-ietf-isis-segment-routing-extensions-03 */ |
91 | 40 | #define NICKNAME 6 |
92 | 19 | #define TREES 7 |
93 | 27 | #define TREE_IDENTIFIER 8 |
94 | 3 | #define TREES_USED_IDENTIFIER 9 |
95 | 36 | #define INTERESTED_VLANS 10 |
96 | 11 | #define IPV6_TE_ROUTER_ID 12 |
97 | 12 | #define TRILL_VERSION 13 |
98 | 28 | #define VLAN_GROUP 14 |
99 | 7 | #define SEGMENT_ROUTING_ALG 19 |
100 | 46 | #define SEGMENT_ROUTING_LB 22 |
101 | 10 | #define NODE_MSD 23 /* rfc8491 */ |
102 | 1 | #define SRV6_CAP 25 /* rfc9352 */ |
103 | 24 | #define FLEX_ALGO_DEF 26 /* rfc9350 */ |
104 | | |
105 | | |
106 | | /*Sub-TLVs under Group Address TLV*/ |
107 | 213 | #define GRP_MAC_ADDRESS 1 |
108 | 31 | #define GRP_IPV4_ADDRESS 2 |
109 | 110 | #define GRP_IPV6_ADDRESS 3 |
110 | | |
111 | | /* sub-TLV's under SID/Label binding TLV */ |
112 | 55 | #define ISIS_LSP_SL_SUB_SID_LABEL 1 |
113 | 38 | #define ISIS_LSP_SL_SUB_PREFIX_SID 3 |
114 | | #define ISIS_LSP_SL_SUB_ADJ_SID 31 |
115 | | #define ISIS_LSP_SL_SUB_LAN_ADJ_SID 32 |
116 | | |
117 | | /* Segment Routing Sub-TLV */ |
118 | 181 | #define ISIS_SR_SID_LABEL 1 |
119 | | |
120 | | /* |
121 | | From: https://www.iana.org/assignments/igp-parameters/igp-parameters.xhtml |
122 | | IGP Algorithm Types |
123 | | */ |
124 | | #define ISIS_ALG_SPF 0 |
125 | | #define ISIS_ALG_SSPF 1 |
126 | | |
127 | | /* IGP MSD Type (rfc8491/rfc9352) */ |
128 | | #define IGP_MSD_TYPE_RESERVED 0 |
129 | | #define IGP_MSD_TYPE_MPLS 1 |
130 | | #define IGP_MSD_TYPE_SEGMENT_LEFT 41 |
131 | | #define IGP_MSD_TYPE_END_POP 42 |
132 | | #define IGP_MSD_TYPE_H_ENCAP 44 |
133 | | #define IGP_MSD_TYPE_END_D 45 |
134 | | |
135 | | /* Flex Algo Definition Sub-TLV (rfc9350/rfc9843) */ |
136 | 22 | #define FAD_EXCLUDE_AG 1 |
137 | 22 | #define FAD_INCLUDE_ANY_AG 2 |
138 | 44 | #define FAD_INCLUDE_ALL_AG 3 |
139 | 4 | #define FAD_DEF_FLAGS 4 |
140 | 5 | #define FAD_EXCLUDE_SRLG 5 |
141 | 0 | #define FAD_EXCLUDE_MIN_BANDWIDTH 6 |
142 | 5 | #define FAD_EXCLUDE_MAX_DELAY 7 |
143 | 0 | #define FAD_REFERENCE_BANDWIDTH 8 |
144 | | |
145 | | /* Flex Algo Definition Flags (rfc9350) */ |
146 | 19 | #define FAD_DEF_FLAGS_M 0x80 |
147 | | |
148 | | /* Flex Algo Reference Bandwidth Flags (rfc9843) */ |
149 | 16 | #define FAD_REFERENCE_BANDWIDTH_FLAGS_G 0x80 |
150 | | |
151 | | /* Prefix Attribute Flags Sub-TLV (rfc7794)*/ |
152 | 18 | #define ISIS_LSP_PFX_ATTR_FLAG_X 0x80 |
153 | 18 | #define ISIS_LSP_PFX_ATTR_FLAG_R 0x40 |
154 | 18 | #define ISIS_LSP_PFX_ATTR_FLAG_N 0x20 |
155 | | |
156 | | const range_string isis_mtid_strings[] = { |
157 | | { 0, 0, "Standard topology" }, |
158 | | { 1, 1, "IPv4 In-Band Management" }, |
159 | | { 2, 2, "IPv6 routing topology" }, |
160 | | { 3, 3, "IPv4 multicast routing topology" }, |
161 | | { 4, 4, "IPv6 multicast routing topology" }, |
162 | | { 5, 5, "IPv6 in-band management" }, |
163 | | { 6, 3995, "Reserved for IETF Consensus" }, |
164 | | { 3996, 4095, "Development, Experimental and Proprietary features" }, |
165 | | { 0, 0, NULL } |
166 | | } ; |
167 | | |
168 | | void proto_register_isis_lsp(void); |
169 | | void proto_reg_handoff_isis_lsp(void); |
170 | | |
171 | | static int proto_isis_lsp; |
172 | | |
173 | | /* lsp packets */ |
174 | | static int hf_isis_lsp_pdu_length; |
175 | | static int hf_isis_lsp_remaining_life; |
176 | | static int hf_isis_lsp_sequence_number; |
177 | | static int hf_isis_lsp_lsp_id; |
178 | | static int hf_isis_lsp_hostname; |
179 | | static int hf_isis_lsp_srlg_system_id; |
180 | | static int hf_isis_lsp_srlg_pseudo_num; |
181 | | static int hf_isis_lsp_srlg_flags_numbered; |
182 | | static int hf_isis_lsp_srlg_ipv4_local; |
183 | | static int hf_isis_lsp_srlg_ipv4_remote; |
184 | | static int hf_isis_lsp_srlg_value; |
185 | | static int hf_isis_lsp_appspec_srlg_system_id; |
186 | | static int hf_isis_lsp_appspec_srlg_pseudo_num; |
187 | | static int hf_isis_lsp_appspec_srlg_sub_tlv_length; |
188 | | static int hf_isis_lsp_appspec_srlg_value; |
189 | | static int hf_isis_lsp_appspec_srlg_link_local_id; |
190 | | static int hf_isis_lsp_appspec_srlg_link_remote_id; |
191 | | static int hf_isis_lsp_checksum; |
192 | | static int hf_isis_lsp_checksum_status; |
193 | | static int hf_isis_lsp_clv_ipv4_int_addr; |
194 | | static int hf_isis_lsp_clv_ipv6_int_addr; |
195 | | static int hf_isis_lsp_clv_te_router_id; |
196 | | static int hf_isis_lsp_clv_mt; |
197 | | static int hf_isis_lsp_p; |
198 | | static int hf_isis_lsp_att; |
199 | | static int hf_isis_lsp_hippity; |
200 | | static int hf_isis_lsp_is_type; |
201 | | static int hf_isis_lsp_clv_type; |
202 | | static int hf_isis_lsp_clv_length; |
203 | | static int hf_isis_lsp_root_id; |
204 | | static int hf_isis_lsp_bw_ct_model; |
205 | | static int hf_isis_lsp_bw_ct_reserved; |
206 | | static int hf_isis_lsp_bw_ct0; |
207 | | static int hf_isis_lsp_bw_ct1; |
208 | | static int hf_isis_lsp_bw_ct2; |
209 | | static int hf_isis_lsp_bw_ct3; |
210 | | static int hf_isis_lsp_bw_ct4; |
211 | | static int hf_isis_lsp_bw_ct5; |
212 | | static int hf_isis_lsp_bw_ct6; |
213 | | static int hf_isis_lsp_bw_ct7; |
214 | | static int hf_isis_lsp_spb_link_metric; |
215 | | static int hf_isis_lsp_spb_port_count; |
216 | | static int hf_isis_lsp_spb_port_id; |
217 | | static int hf_isis_lsp_adj_sid_flags; |
218 | | static int hf_isis_lsp_adj_sid_family_flag; |
219 | | static int hf_isis_lsp_adj_sid_backup_flag; |
220 | | static int hf_isis_lsp_adj_sid_value_flag; |
221 | | static int hf_isis_lsp_adj_sid_local_flag; |
222 | | static int hf_isis_lsp_adj_sid_set_flag; |
223 | | static int hf_isis_lsp_adj_sid_weight; |
224 | | static int hf_isis_lsp_adj_sid_system_id; |
225 | | static int hf_isis_lsp_sid_sli_label; |
226 | | static int hf_isis_lsp_sid_sli_index; |
227 | | static int hf_isis_lsp_sid_sli_ipv6; |
228 | | static int hf_isis_lsp_spb_reserved; |
229 | | static int hf_isis_lsp_spb_sr_bit; |
230 | | static int hf_isis_lsp_spb_spvid; |
231 | | static int hf_isis_lsp_spb_short_mac_address_t; |
232 | | static int hf_isis_lsp_spb_short_mac_address_r; |
233 | | static int hf_isis_lsp_spb_short_mac_address_reserved; |
234 | | static int hf_isis_lsp_spb_short_mac_address; |
235 | | /* TLV 149 items draft-previdi-isis-segment-routing-extensions */ |
236 | | static int hf_isis_lsp_sl_binding_flags; |
237 | | static int hf_isis_lsp_sl_binding_flags_f; |
238 | | static int hf_isis_lsp_sl_binding_flags_m; |
239 | | static int hf_isis_lsp_sl_binding_flags_s; |
240 | | static int hf_isis_lsp_sl_binding_flags_d; |
241 | | static int hf_isis_lsp_sl_binding_flags_a; |
242 | | static int hf_isis_lsp_sl_binding_flags_rsv; |
243 | | static int hf_isis_lsp_sl_binding_weight; |
244 | | static int hf_isis_lsp_sl_binding_range; |
245 | | static int hf_isis_lsp_sl_binding_prefix_length; |
246 | | static int hf_isis_lsp_sl_binding_fec_prefix_ipv4; |
247 | | static int hf_isis_lsp_sl_binding_fec_prefix_ipv6; |
248 | | static int hf_isis_lsp_sl_sub_tlv; |
249 | | static int hf_isis_lsp_sl_sub_tlv_type; |
250 | | static int hf_isis_lsp_sl_sub_tlv_length; |
251 | | static int hf_isis_lsp_sl_sub_tlv_label_20; |
252 | | static int hf_isis_lsp_sl_sub_tlv_label_32; |
253 | | static int hf_isis_lsp_sl_sub_tlv_flags; |
254 | | static int hf_isis_lsp_sl_sub_tlv_flags_r; |
255 | | static int hf_isis_lsp_sl_sub_tlv_flags_n; |
256 | | static int hf_isis_lsp_sl_sub_tlv_flags_p; |
257 | | static int hf_isis_lsp_sl_sub_tlv_flags_e; |
258 | | static int hf_isis_lsp_sl_sub_tlv_flags_v; |
259 | | static int hf_isis_lsp_sl_sub_tlv_flags_l; |
260 | | static int hf_isis_lsp_sl_sub_tlv_flags_rsv; |
261 | | static int hf_isis_lsp_sl_sub_tlv_algorithm; |
262 | | static int hf_isis_lsp_mt_cap_spb_instance_v; |
263 | | static int hf_isis_lsp_mt_cap_spb_instance_cist_external_root_path_cost; |
264 | | static int hf_isis_lsp_rt_capable_tree_used_id_starting_tree_no; |
265 | | static int hf_isis_lsp_mt_cap_spb_instance_bridge_priority; |
266 | | static int hf_isis_lsp_mt_cap_spbm_service_identifier_base_vid; |
267 | | static int hf_isis_lsp_mt_cap_spbm_service_identifier_t; |
268 | | static int hf_isis_lsp_mt_cap_spbm_service_identifier_r; |
269 | | static int hf_isis_lsp_mt_cap_spbm_service_identifier_reserved; |
270 | | static int hf_isis_lsp_mt_cap_spbm_service_identifier_i_sid; |
271 | | static int hf_isis_lsp_64_bit_administrative_tag; |
272 | | static int hf_isis_lsp_grp_type; |
273 | | static int hf_isis_lsp_grp_macaddr_length; |
274 | | static int hf_isis_lsp_grp_ipv4addr_length; |
275 | | static int hf_isis_lsp_grp_ipv6addr_length; |
276 | | static int hf_isis_lsp_grp_unknown_length; |
277 | | static int hf_isis_lsp_grp_macaddr_number_of_sources; |
278 | | static int hf_isis_lsp_grp_ipv4addr_number_of_sources; |
279 | | static int hf_isis_lsp_grp_ipv6addr_number_of_sources; |
280 | | static int hf_isis_lsp_ext_is_reachability_traffic_engineering_default_metric; |
281 | | static int hf_isis_lsp_grp_macaddr_group_address; |
282 | | static int hf_isis_lsp_grp_ipv4addr_group_address; |
283 | | static int hf_isis_lsp_grp_ipv6addr_group_address; |
284 | | static int hf_isis_lsp_rt_capable_tree_root_id_nickname; |
285 | | static int hf_isis_lsp_ext_is_reachability_ipv4_interface_address; |
286 | | static int hf_isis_lsp_ext_ip_reachability_metric; |
287 | | static int hf_isis_lsp_ext_ip_reachability_ipv4_prefix; |
288 | | static int hf_isis_lsp_eis_neighbors_es_neighbor_id; |
289 | | static int hf_isis_lsp_expense_metric; |
290 | | static int hf_isis_lsp_ext_is_reachability_link_remote_identifier; |
291 | | static int hf_isis_lsp_rt_capable_vlan_group_secondary_vlan_id; |
292 | | static int hf_isis_lsp_grp_macaddr_vlan_id; |
293 | | static int hf_isis_lsp_grp_ipv4addr_vlan_id; |
294 | | static int hf_isis_lsp_grp_ipv6addr_vlan_id; |
295 | | static int hf_isis_lsp_rt_capable_trill_affinity_tlv; |
296 | | static int hf_isis_lsp_rt_capable_trill_fgl_safe; |
297 | | static int hf_isis_lsp_rt_capable_trill_caps; |
298 | | static int hf_isis_lsp_rt_capable_trill_flags; |
299 | | static int hf_isis_lsp_rt_capable_tree_root_id_starting_tree_no; |
300 | | static int hf_isis_lsp_rt_capable_interested_vlans_nickname; |
301 | | static int hf_isis_lsp_ip_reachability_ipv4_prefix; |
302 | | static int hf_isis_lsp_grp_macaddr_topology_id; |
303 | | static int hf_isis_lsp_grp_ipv4addr_topology_id; |
304 | | static int hf_isis_lsp_grp_ipv6addr_topology_id; |
305 | | static int hf_isis_lsp_ext_is_reachability_ipv4_neighbor_address; |
306 | | static int hf_isis_lsp_ipv6_reachability_reserved_bits; |
307 | | static int hf_isis_lsp_eis_neighbors_default_metric; |
308 | | static int hf_isis_lsp_mt_cap_spb_instance_cist_root_identifier; |
309 | | static int hf_isis_lsp_rt_capable_tree_used_id_nickname; |
310 | | static int hf_isis_lsp_grp_macaddr_source_address; |
311 | | static int hf_isis_lsp_grp_ipv4addr_source_address; |
312 | | static int hf_isis_lsp_grp_ipv6addr_source_address; |
313 | | static int hf_isis_lsp_delay_metric; |
314 | | static int hf_isis_lsp_ext_is_reachability_link_local_identifier; |
315 | | static int hf_isis_lsp_mt_cap_mtid; |
316 | | static int hf_isis_lsp_32_bit_administrative_tag; |
317 | | static int hf_isis_lsp_ext_is_reachability_is_neighbor_id; |
318 | | static int hf_isis_lsp_reservable_link_bandwidth; |
319 | | static int hf_isis_lsp_rt_capable_vlan_group_primary_vlan_id; |
320 | | static int hf_isis_lsp_rt_capable_interested_vlans_multicast_ipv4; |
321 | | static int hf_isis_lsp_rt_capable_interested_vlans_multicast_ipv6; |
322 | | static int hf_isis_lsp_mt_cap_spb_instance_number_of_trees; |
323 | | static int hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_u; |
324 | | static int hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_m; |
325 | | static int hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_a; |
326 | | static int hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_reserved; |
327 | | static int hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_ect; |
328 | | static int hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_base_vid; |
329 | | static int hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_spvid; |
330 | | static int hf_isis_lsp_mt_cap_spb_opaque_algorithm; |
331 | | static int hf_isis_lsp_mt_cap_spb_opaque_information; |
332 | | static int hf_isis_lsp_mt_cap_spbm_service_identifier_b_mac; |
333 | | static int hf_isis_lsp_ipv6_reachability_subclvs_len; |
334 | | static int hf_isis_lsp_ipv6_reachability_distribution; |
335 | | static int hf_isis_lsp_ipv6_reachability_distribution_internal; |
336 | | static int hf_isis_lsp_ipv6_reachability_subtlv; |
337 | | static int hf_isis_lsp_ipv6_reachability_metric; |
338 | | static int hf_isis_lsp_ipv6_reachability_prefix_length; |
339 | | static int hf_isis_lsp_prefix_attr_flags; |
340 | | static int hf_isis_lsp_prefix_attr_flags_x; |
341 | | static int hf_isis_lsp_prefix_attr_flags_r; |
342 | | static int hf_isis_lsp_prefix_attr_flags_n; |
343 | | static int hf_isis_lsp_rt_capable_trees_maximum_nof_trees_to_compute; |
344 | | static int hf_isis_lsp_rt_capable_interested_vlans_vlan_start_id; |
345 | | static int hf_isis_lsp_rt_capable_nickname_nickname_priority; |
346 | | static int hf_isis_lsp_ext_is_reachability_metric; |
347 | | static int hf_isis_lsp_ext_is_reachability_subclvs_len; |
348 | | static int hf_isis_lsp_ext_is_reachability_code; |
349 | | static int hf_isis_lsp_ext_is_reachability_len; |
350 | | static int hf_isis_lsp_ext_is_reachability_value; |
351 | | static int hf_isis_lsp_default_metric; |
352 | | static int hf_isis_lsp_ext_is_reachability_unidir_link_flags; |
353 | | static int hf_isis_lsp_ext_is_reachability_unidir_link_flags_a; |
354 | | static int hf_isis_lsp_ext_is_reachability_unidir_link_reserved; |
355 | | static int hf_isis_lsp_ext_is_reachability_unidir_link_delay; |
356 | | static int hf_isis_lsp_ext_is_reachability_unidir_link_delay_min; |
357 | | static int hf_isis_lsp_ext_is_reachability_unidir_link_delay_max; |
358 | | static int hf_isis_lsp_ext_is_reachability_unidir_delay_variation; |
359 | | static int hf_isis_lsp_ext_is_reachability_unidir_link_loss; |
360 | | static int hf_isis_lsp_ext_is_reachability_unidir_residual_bandwidth; |
361 | | static int hf_isis_lsp_ext_is_reachability_unidir_available_bandwidth; |
362 | | static int hf_isis_lsp_ext_is_reachability_unidir_utilized_bandwidth; |
363 | | static int hf_isis_lsp_ext_ip_reachability_distribution; |
364 | | static int hf_isis_lsp_ext_ip_reachability_subtlv; |
365 | | static int hf_isis_lsp_ext_ip_reachability_prefix_length; |
366 | | static int hf_isis_lsp_ext_ip_reachability_subclvs_len; |
367 | | static int hf_isis_lsp_ext_ip_reachability_code; |
368 | | static int hf_isis_lsp_ext_ip_reachability_len; |
369 | | static int hf_isis_lsp_ext_ip_reachability_prefix_flags; |
370 | | static int hf_isis_lsp_ext_ip_reachability_prefix_re_adv_flag; |
371 | | static int hf_isis_lsp_ext_ip_reachability_prefix_node_sid_flag; |
372 | | static int hf_isis_lsp_ext_ip_reachability_prefix_nophp_flag; |
373 | | static int hf_isis_lsp_ext_ip_reachability_prefix_expl_null_flag; |
374 | | static int hf_isis_lsp_ext_ip_reachability_prefix_value_flag; |
375 | | static int hf_isis_lsp_ext_ip_reachability_prefix_local_flag; |
376 | | static int hf_isis_lsp_maximum_link_bandwidth; |
377 | | static int hf_isis_lsp_rt_capable_nickname_tree_root_priority; |
378 | | static int hf_isis_lsp_eis_neighbors_delay_metric; |
379 | | static int hf_isis_lsp_rt_capable_trill_maximum_version; |
380 | | static int hf_isis_lsp_rt_capable_interested_vlans_afs_lost_counter; |
381 | | static int hf_isis_lsp_ipv6_reachability_ipv6_prefix; |
382 | | static int hf_isis_lsp_eis_neighbors_error_metric; |
383 | | static int hf_isis_lsp_rt_capable_interested_vlans_vlan_end_id; |
384 | | static int hf_isis_lsp_error_metric; |
385 | | static int hf_isis_lsp_grp_macaddr_number_of_records; |
386 | | static int hf_isis_lsp_grp_ipv4addr_number_of_records; |
387 | | static int hf_isis_lsp_grp_ipv6addr_number_of_records; |
388 | | static int hf_isis_lsp_rt_capable_nickname_nickname; |
389 | | static int hf_isis_lsp_mt_id_reserved; |
390 | | static int hf_isis_lsp_eis_neighbors_is_neighbor_id; |
391 | | static int hf_isis_lsp_mt_id; |
392 | | static int hf_isis_lsp_eis_neighbors_reserved; |
393 | | static int hf_isis_lsp_ip_reachability_error_metric; |
394 | | static int hf_isis_lsp_ip_reachability_delay_metric; |
395 | | static int hf_isis_lsp_ip_reachability_expense_metric; |
396 | | static int hf_isis_lsp_rt_capable_trees_nof_trees_to_use; |
397 | | static int hf_isis_lsp_ip_reachability_default_metric; |
398 | | static int hf_isis_lsp_rt_capable_trees_nof_trees_to_compute; |
399 | | static int hf_isis_lsp_eis_neighbors_expense_metric; |
400 | | static int hf_isis_lsp_partition_designated_l2_is; |
401 | | static int hf_isis_lsp_originating_lsp_buffer_size; |
402 | | static int hf_isis_lsp_ip_reachability_default_metric_ie; |
403 | | static int hf_isis_lsp_eis_neighbors_default_metric_ie; |
404 | | static int hf_isis_lsp_eis_neighbors_error_metric_supported; |
405 | | static int hf_isis_lsp_unrsv_bw_priority_level; |
406 | | static int hf_isis_lsp_ip_reachability_expense_metric_support; |
407 | | static int hf_isis_lsp_mt_cap_overload; |
408 | | static int hf_isis_lsp_eis_neighbors_expense_metric_supported; |
409 | | static int hf_isis_lsp_ip_reachability_delay_metric_support; |
410 | | static int hf_isis_lsp_ip_reachability_error_metric_support; |
411 | | static int hf_isis_lsp_mt_cap_spsourceid; |
412 | | static int hf_isis_lsp_eis_neighbors_delay_metric_supported; |
413 | | static int hf_isis_lsp_eis_neighbors_error_metric_ie; |
414 | | static int hf_isis_lsp_eis_neighbors_expense_metric_ie; |
415 | | static int hf_isis_lsp_eis_neighbors_delay_metric_ie; |
416 | | static int hf_isis_lsp_ip_reachability_delay_metric_ie; |
417 | | static int hf_isis_lsp_ip_reachability_distribution; |
418 | | static int hf_isis_lsp_ip_reachability_error_metric_ie; |
419 | | static int hf_isis_lsp_ip_reachability_expense_metric_ie; |
420 | | static int hf_isis_lsp_rt_capable_router_id; |
421 | | static int hf_isis_lsp_rt_capable_flag_s; |
422 | | static int hf_isis_lsp_rt_capable_flag_d; |
423 | | static int hf_isis_lsp_clv_te_node_cap_b_bit; |
424 | | static int hf_isis_lsp_clv_te_node_cap_e_bit; |
425 | | static int hf_isis_lsp_clv_te_node_cap_m_bit; |
426 | | static int hf_isis_lsp_clv_te_node_cap_g_bit; |
427 | | static int hf_isis_lsp_clv_te_node_cap_p_bit; |
428 | | static int hf_isis_lsp_clv_sr_cap_i_flag; |
429 | | static int hf_isis_lsp_clv_sr_cap_v_flag; |
430 | | static int hf_isis_lsp_clv_sr_cap_range; |
431 | | static int hf_isis_lsp_clv_sr_cap_sid; |
432 | | static int hf_isis_lsp_clv_sr_cap_label; |
433 | | static int hf_isis_lsp_clv_sr_alg; |
434 | | static int hf_isis_lsp_clv_sr_lb_flags; |
435 | | static int hf_isis_lsp_clv_srv6_cap_flags; |
436 | | static int hf_isis_lsp_clv_srv6_cap_flags_o; |
437 | | static int hf_isis_lsp_clv_srv6_cap_flags_reserved; |
438 | | static int hf_isis_lsp_clv_igp_msd_type; |
439 | | static int hf_isis_lsp_clv_igp_msd_value; |
440 | | static int hf_isis_lsp_clv_ext_admin_group; |
441 | | static int hf_isis_lsp_clv_app_sabm_legacy; |
442 | | static int hf_isis_lsp_clv_app_sabm_length; |
443 | | static int hf_isis_lsp_clv_app_sabm_bits; |
444 | | static int hf_isis_lsp_clv_app_sabm_bits_r; |
445 | | static int hf_isis_lsp_clv_app_sabm_bits_s; |
446 | | static int hf_isis_lsp_clv_app_sabm_bits_f; |
447 | | static int hf_isis_lsp_clv_app_sabm_bits_x; |
448 | | static int hf_isis_lsp_clv_app_udabm_reserved; |
449 | | static int hf_isis_lsp_clv_app_udabm_length; |
450 | | static int hf_isis_lsp_clv_app_udabm_bits; |
451 | | static int hf_isis_lsp_clv_flex_algo_algorithm; |
452 | | static int hf_isis_lsp_clv_flex_algo_metric_type; |
453 | | static int hf_isis_lsp_clv_flex_algo_calc_type; |
454 | | static int hf_isis_lsp_clv_flex_algo_priority; |
455 | | static int hf_isis_lsp_clv_flex_algo_def_flags; |
456 | | static int hf_isis_lsp_clv_flex_algo_def_flags_m; |
457 | | static int hf_isis_lsp_clv_flex_algo_srlg_value; |
458 | | static int hf_isis_lsp_clv_flex_algo_prefix_metric; |
459 | | static int hf_isis_lsp_clv_flex_algo_exclude_min_bandwidth; |
460 | | static int hf_isis_lsp_clv_flex_algo_exclude_max_delay; |
461 | | static int hf_isis_lsp_clv_flex_algo_ref_bw_flags; |
462 | | static int hf_isis_lsp_clv_flex_algo_ref_bw_flags_g; |
463 | | static int hf_isis_lsp_clv_flex_algo_ref_bw_reference_bandwidth; |
464 | | static int hf_isis_lsp_clv_flex_algo_ref_bw_granularity_bandwidth; |
465 | | static int hf_isis_lsp_clv_flex_algo_generic_metric_type; |
466 | | static int hf_isis_lsp_clv_flex_algo_generic_metric_value; |
467 | | static int hf_isis_lsp_clv_srv6_endx_sid_system_id; |
468 | | static int hf_isis_lsp_clv_srv6_endx_sid_flags; |
469 | | static int hf_isis_lsp_clv_srv6_endx_sid_flags_b; |
470 | | static int hf_isis_lsp_clv_srv6_endx_sid_flags_s; |
471 | | static int hf_isis_lsp_clv_srv6_endx_sid_flags_p; |
472 | | static int hf_isis_lsp_clv_srv6_endx_sid_flags_reserved; |
473 | | static int hf_isis_lsp_clv_srv6_endx_sid_alg; |
474 | | static int hf_isis_lsp_clv_srv6_endx_sid_weight; |
475 | | static int hf_isis_lsp_clv_srv6_endx_sid_endpoint_behavior; |
476 | | static int hf_isis_lsp_clv_srv6_endx_sid_sid; |
477 | | static int hf_isis_lsp_clv_srv6_endx_sid_subsubclvs_len; |
478 | | static int hf_isis_lsp_area_address; |
479 | | static int hf_isis_lsp_instance_identifier; |
480 | | static int hf_isis_lsp_supported_itid; |
481 | | static int hf_isis_lsp_clv_nlpid_nlpid; |
482 | | static int hf_isis_lsp_ip_authentication; |
483 | | static int hf_isis_lsp_authentication; |
484 | | static int hf_isis_lsp_area_address_str; |
485 | | static int hf_isis_lsp_is_virtual; |
486 | | static int hf_isis_lsp_group; |
487 | | static int hf_isis_lsp_default; |
488 | | static int hf_isis_lsp_default_support; |
489 | | static int hf_isis_lsp_delay; |
490 | | static int hf_isis_lsp_delay_support; |
491 | | static int hf_isis_lsp_expense; |
492 | | static int hf_isis_lsp_expense_support; |
493 | | static int hf_isis_lsp_error; |
494 | | static int hf_isis_lsp_error_support; |
495 | | static int hf_isis_lsp_clv_ipv6_te_router_id; |
496 | | static int hf_isis_lsp_ext_is_reachability_ipv6_interface_address; |
497 | | static int hf_isis_lsp_ext_is_reachability_ipv6_neighbor_address; |
498 | | static int hf_isis_lsp_clv_bier_alg; |
499 | | static int hf_isis_lsp_clv_bier_igp_alg; |
500 | | static int hf_isis_lsp_clv_bier_subdomain; |
501 | | static int hf_isis_lsp_clv_bier_bfrid; |
502 | | static int hf_isis_lsp_clv_bier_subsub_type; |
503 | | static int hf_isis_lsp_clv_bier_subsub_len; |
504 | | static int hf_isis_lsp_clv_bier_subsub_mplsencap_maxsi; |
505 | | static int hf_isis_lsp_clv_bier_subsub_mplsencap_bslen; |
506 | | static int hf_isis_lsp_clv_bier_subsub_mplsencap_label; |
507 | | static int hf_isis_lsp_srv6_loc_metric; |
508 | | static int hf_isis_lsp_srv6_loc_flags; |
509 | | static int hf_isis_lsp_srv6_loc_flags_d; |
510 | | static int hf_isis_lsp_srv6_loc_flags_reserved; |
511 | | static int hf_isis_lsp_srv6_loc_alg; |
512 | | static int hf_isis_lsp_srv6_loc_size; |
513 | | static int hf_isis_lsp_srv6_loc_locator; |
514 | | static int hf_isis_lsp_srv6_loc_subclvs_len; |
515 | | static int hf_isis_lsp_srv6_loc_sub_tlv_type; |
516 | | static int hf_isis_lsp_srv6_loc_sub_tlv_length; |
517 | | static int hf_isis_lsp_clv_srv6_end_sid_flags; |
518 | | static int hf_isis_lsp_clv_srv6_end_sid_endpoint_behavior; |
519 | | static int hf_isis_lsp_clv_srv6_end_sid_sid; |
520 | | static int hf_isis_lsp_clv_srv6_end_sid_subsubclvs_len; |
521 | | static int hf_isis_lsp_clv_srv6_sid_struct_lb_len; |
522 | | static int hf_isis_lsp_clv_srv6_sid_struct_ln_len; |
523 | | static int hf_isis_lsp_clv_srv6_sid_struct_fun_len; |
524 | | static int hf_isis_lsp_clv_srv6_sid_struct_arg_len; |
525 | | static int hf_isis_lsp_purge_orig_id_num; |
526 | | static int hf_isis_lsp_purge_orig_id_system_id; |
527 | | /* rfc 6165: MAC Reachability */ |
528 | | static int hf_isis_lsp_mac_reachability_topoid_nick; |
529 | | static int hf_isis_lsp_mac_reachability_confidence; |
530 | | static int hf_isis_lsp_mac_reachability_reserved; |
531 | | static int hf_isis_lsp_mac_reachability_vlan; |
532 | | static int hf_isis_lsp_mac_reachability_mac; |
533 | | static int hf_isis_lsp_mac_reachability_chassismac; |
534 | | static int hf_isis_lsp_mac_reachability_fanmcast; |
535 | | /* Avaya proprietary */ |
536 | | static int hf_isis_lsp_avaya_ipvpn_unknown; |
537 | | static int hf_isis_lsp_avaya_ipvpn_system_id; |
538 | | static int hf_isis_lsp_avaya_ipvpn_vrfsid; |
539 | | static int hf_isis_lsp_avaya_ipvpn_subtlvbytes; |
540 | | static int hf_isis_lsp_avaya_ipvpn_subtlvtype; |
541 | | static int hf_isis_lsp_avaya_ipvpn_subtlvlength; |
542 | | static int hf_isis_lsp_avaya_ipvpn_unknown_sub; |
543 | | static int hf_isis_lsp_avaya_ipvpn_ipv4_metric; |
544 | | static int hf_isis_lsp_avaya_ipvpn_ipv4_metrictype; |
545 | | static int hf_isis_lsp_avaya_ipvpn_ipv4_addr; |
546 | | static int hf_isis_lsp_avaya_ipvpn_ipv4_mask; |
547 | | static int hf_isis_lsp_avaya_ipvpn_ipv6_metric; |
548 | | static int hf_isis_lsp_avaya_ipvpn_ipv6_prefixlen; |
549 | | static int hf_isis_lsp_avaya_ipvpn_ipv6_prefix; |
550 | | static int hf_isis_lsp_avaya_185_unknown; |
551 | | static int hf_isis_lsp_avaya_186_unknown; |
552 | | |
553 | | static int ett_isis_lsp; |
554 | | static int ett_isis_lsp_info; |
555 | | static int ett_isis_lsp_att; |
556 | | static int ett_isis_lsp_cksum; |
557 | | static int ett_isis_lsp_clv_area_addr; |
558 | | static int ett_isis_lsp_clv_is_neighbors; |
559 | | static int ett_isis_lsp_clv_instance_identifier; |
560 | | static int ett_isis_lsp_clv_ext_is_reachability; /* CLV 22 */ |
561 | | static int ett_isis_lsp_part_of_clv_ext_is_reachability; |
562 | | static int ett_isis_lsp_part_of_clv_ext_is_reachability_subtlv; |
563 | | static int ett_isis_lsp_subclv_admin_group; |
564 | | static int ett_isis_lsp_subclv_unrsv_bw; |
565 | | static int ett_isis_lsp_subclv_bw_ct; |
566 | | static int ett_isis_lsp_subclv_spb_link_metric; |
567 | | static int ett_isis_lsp_adj_sid_flags; |
568 | | static int ett_isis_lsp_clv_unknown; |
569 | | static int ett_isis_lsp_clv_partition_dis; |
570 | | static int ett_isis_lsp_clv_prefix_neighbors; |
571 | | static int ett_isis_lsp_clv_nlpid_nlpid; |
572 | | static int ett_isis_lsp_clv_hostname; |
573 | | static int ett_isis_lsp_clv_srlg; |
574 | | static int ett_isis_lsp_clv_appspec_srlg; |
575 | | static int ett_isis_lsp_clv_appspec_srlg_subtlv; |
576 | | static int ett_isis_lsp_clv_te_router_id; |
577 | | static int ett_isis_lsp_clv_authentication; |
578 | | static int ett_isis_lsp_clv_ip_authentication; |
579 | | static int ett_isis_lsp_clv_ipv4_int_addr; |
580 | | static int ett_isis_lsp_clv_ipv6_int_addr; /* CLV 232 */ |
581 | | static int ett_isis_lsp_clv_mt_cap; |
582 | | static int ett_isis_lsp_clv_mt_cap_spb_instance; |
583 | | static int ett_isis_lsp_clv_mt_cap_spbm_service_identifier; |
584 | | static int ett_isis_lsp_clv_mt_cap_spbv_mac_address; |
585 | | static int ett_isis_lsp_clv_sid_label_binding; |
586 | | static int ett_isis_lsp_clv_ip_reachability; |
587 | | static int ett_isis_lsp_clv_ip_reach_subclv; |
588 | | static int ett_isis_lsp_clv_ext_ip_reachability; /* CLV 135 */ |
589 | | static int ett_isis_lsp_part_of_clv_ext_ip_reachability; |
590 | | static int ett_isis_lsp_clv_ipv6_reachability; /* CLV 236 */ |
591 | | static int ett_isis_lsp_part_of_clv_ipv6_reachability; |
592 | | static int ett_isis_lsp_prefix_sid_flags; |
593 | | static int ett_isis_lsp_prefix_attr_flags; |
594 | | static int ett_isis_lsp_clv_mt; |
595 | | static int ett_isis_lsp_clv_mt_is; |
596 | | static int ett_isis_lsp_part_of_clv_mt_is; |
597 | | static int ett_isis_lsp_clv_mt_reachable_IPv4_prefx; /* CLV 235 */ |
598 | | static int ett_isis_lsp_clv_mt_reachable_IPv6_prefx; /* CLV 237 */ |
599 | | static int ett_isis_lsp_clv_rt_capable; /* CLV 242 */ |
600 | | static int ett_isis_lsp_clv_te_node_cap_desc; |
601 | | static int ett_isis_lsp_clv_sr_cap; |
602 | | static int ett_isis_lsp_clv_sr_sid_label; |
603 | | static int ett_isis_lsp_clv_sr_alg; |
604 | | static int ett_isis_lsp_clv_sr_lb; |
605 | | static int ett_isis_lsp_clv_node_msd; |
606 | | static int ett_isis_lsp_clv_srv6_cap; |
607 | | static int ett_isis_lsp_clv_srv6_cap_flags; |
608 | | static int ett_isis_lsp_clv_flex_algo_def; |
609 | | static int ett_isis_lsp_clv_flex_algo_def_sub_tlv; |
610 | | static int ett_isis_lsp_clv_flex_algo_ref_bw_flags; |
611 | | static int ett_isis_lsp_clv_app_sabm_bits; |
612 | | static int ett_isis_lsp_clv_ipv6_te_rtrid; |
613 | | static int ett_isis_lsp_clv_trill_version; |
614 | | static int ett_isis_lsp_clv_trees; |
615 | | static int ett_isis_lsp_clv_root_id; |
616 | | static int ett_isis_lsp_clv_nickname; |
617 | | static int ett_isis_lsp_clv_interested_vlans; |
618 | | static int ett_isis_lsp_clv_tree_used; |
619 | | static int ett_isis_lsp_clv_vlan_group; |
620 | | static int ett_isis_lsp_clv_grp_address; /* CLV 142 */ |
621 | | static int ett_isis_lsp_clv_grp_macaddr; |
622 | | static int ett_isis_lsp_clv_grp_ipv4addr; |
623 | | static int ett_isis_lsp_clv_grp_ipv6addr; |
624 | | static int ett_isis_lsp_clv_grp_unknown; |
625 | | static int ett_isis_lsp_clv_purge_orig_id; /* CLV 13 */ |
626 | | static int ett_isis_lsp_clv_originating_buff_size; /* CLV 14 */ |
627 | | static int ett_isis_lsp_sl_flags; |
628 | | static int ett_isis_lsp_sl_sub_tlv; |
629 | | static int ett_isis_lsp_sl_sub_tlv_flags; |
630 | | static int ett_isis_lsp_clv_ipv6_te_router_id; |
631 | | static int ett_isis_lsp_clv_bier_subsub_tlv; |
632 | | static int ett_isis_lsp_clv_srv6_locator; |
633 | | static int ett_isis_lsp_clv_srv6_loc_entry; |
634 | | static int ett_isis_lsp_clv_srv6_loc_flags; |
635 | | static int ett_isis_lsp_clv_srv6_loc_sub_tlv; |
636 | | static int ett_isis_lsp_clv_srv6_loc_end_sid_sub_sub_tlv; |
637 | | static int ett_isis_lsp_clv_srv6_endx_sid_flags; |
638 | | static int ett_isis_lsp_clv_srv6_endx_sid_sub_sub_tlv; |
639 | | static int ett_isis_lsp_clv_unidir_link_flags; |
640 | | static int ett_isis_lsp_clv_mac_reachability; |
641 | | static int ett_isis_lsp_clv_avaya_ipvpn; |
642 | | static int ett_isis_lsp_clv_avaya_ipvpn_subtlv; |
643 | | static int ett_isis_lsp_clv_avaya_ipvpn_mc; |
644 | | static int ett_isis_lsp_clv_avaya_ip_grt_mc; |
645 | | |
646 | | |
647 | | static expert_field ei_isis_lsp_short_pdu; |
648 | | static expert_field ei_isis_lsp_long_pdu; |
649 | | static expert_field ei_isis_lsp_bad_checksum; |
650 | | static expert_field ei_isis_lsp_unknown_subtlv; |
651 | | static expert_field ei_isis_lsp_authentication; |
652 | | static expert_field ei_isis_lsp_short_clv; |
653 | | static expert_field ei_isis_lsp_long_clv; |
654 | | static expert_field ei_isis_lsp_length_clv; |
655 | | static expert_field ei_isis_lsp_clv_mt; |
656 | | static expert_field ei_isis_lsp_clv_unknown; |
657 | | static expert_field ei_isis_lsp_malformed_subtlv; |
658 | | static expert_field ei_isis_lsp_reserved_not_zero; |
659 | | static expert_field ei_isis_lsp_length_invalid; |
660 | | |
661 | | static const value_string isis_lsp_istype_vals[] = { |
662 | | { ISIS_LSP_TYPE_UNUSED0, "Unused 0x0 (invalid)"}, |
663 | | { ISIS_LSP_TYPE_LEVEL_1, "Level 1"}, |
664 | | { ISIS_LSP_TYPE_UNUSED2, "Unused 0x2 (invalid)"}, |
665 | | { ISIS_LSP_TYPE_LEVEL_2, "Level 2"}, |
666 | | { 0, NULL } }; |
667 | | |
668 | | static const value_string isis_lsp_sl_sub_tlv_vals[] = { |
669 | | { ISIS_LSP_SL_SUB_SID_LABEL, "SID/Label"}, |
670 | | { ISIS_LSP_SL_SUB_PREFIX_SID, "Prefix SID"}, |
671 | | { ISIS_LSP_SL_SUB_ADJ_SID, "Adjacency SID"}, |
672 | | { ISIS_LSP_SL_SUB_LAN_ADJ_SID,"LAN-Adjacency SID"}, |
673 | | { 0, NULL } }; |
674 | | |
675 | | /* rfc8986 */ |
676 | | /* draft-filsfils-spring-net-pgm-extension-srv6-usid-15 */ |
677 | | static const value_string srv6_endpoint_type_vals[] = { |
678 | | { 1, "End" }, |
679 | | { 2, "End (PSP)" }, |
680 | | { 3, "End (USP)" }, |
681 | | { 4, "End (PSP/USP)" }, |
682 | | { 5, "End.X" }, |
683 | | { 6, "End.X (PSP)" }, |
684 | | { 7, "End.X (USP)" }, |
685 | | { 8, "End.X (PSP/USP)" }, |
686 | | { 9, "End.T" }, |
687 | | { 10, "End.T (PSP)" }, |
688 | | { 11, "End.T (USP)" }, |
689 | | { 12, "End.T (PSP/USP)" }, |
690 | | { 13, "Unassigned" }, |
691 | | { 14, "End.B6.Encaps" }, |
692 | | { 15, "End.BM" }, |
693 | | { 16, "End.DX6" }, |
694 | | { 17, "End.DX4" }, |
695 | | { 18, "End.DT6" }, |
696 | | { 19, "End.DT4" }, |
697 | | { 20, "End.DT46" }, |
698 | | { 21, "End.DX2" }, |
699 | | { 22, "End.DX2V" }, |
700 | | { 23, "End.DT2U" }, |
701 | | { 24, "End.DT2M" }, |
702 | | { 25, "Reserved" }, |
703 | | { 26, "Unassigned" }, |
704 | | { 27, "End.B6.Encaps.Red" }, |
705 | | { 28, "End (USD)" }, |
706 | | { 29, "End (PSP/USD)" }, |
707 | | { 30, "End (USP/USD)" }, |
708 | | { 31, "End (PSP/USP/USD)" }, |
709 | | { 32, "End.X (USD)" }, |
710 | | { 33, "End.X (PSP/USD)" }, |
711 | | { 34, "End.X (USP/USD)" }, |
712 | | { 35, "End.X (PSP/USP/USD)" }, |
713 | | { 36, "End.T (USD)" }, |
714 | | { 37, "End.T (PSP/USD)" }, |
715 | | { 38, "End.T (USP/USD)" }, |
716 | | { 39, "End.T (PSP/USP/USD)" }, |
717 | | { 42, "End (NEXT-ONLY-CSID)" }, |
718 | | { 43, "End (NEXT-CSID)" }, |
719 | | { 44, "End (NEXT-CSID/PSP)" }, |
720 | | { 45, "End (NEXT-CSID/USP)" }, |
721 | | { 46, "End (NEXT-CSID/PSP/USP)" }, |
722 | | { 47, "End (NEXT-CSID/USD)" }, |
723 | | { 48, "End (NEXT-CSID/PSP/USD)" }, |
724 | | { 49, "End (NEXT-CSID/USP/USD)" }, |
725 | | { 50, "End (NEXT-CSID/PSP/USP/USD)" }, |
726 | | { 51, "End.X (NEXT-ONLY-CSID)" }, |
727 | | { 52, "End.X (NEXT-CSID)" }, |
728 | | { 53, "End.X (NEXT-CSID/PSP)" }, |
729 | | { 54, "End.X (NEXT-CSID/USP)" }, |
730 | | { 55, "End.X (NEXT-CSID/PSP/USP)" }, |
731 | | { 56, "End.X (NEXT-CSID/USD)" }, |
732 | | { 57, "End.X (NEXT-CSID/PSP/USD)" }, |
733 | | { 58, "End.X (NEXT-CSID/USP/USD)" }, |
734 | | { 59, "End.X (NEXT-CSID/PSP/USP/USD)" }, |
735 | | { 60, "End.DX6 (NEXT-CSID)" }, |
736 | | { 61, "End.DX4 (NEXT-CSID)" }, |
737 | | { 62, "End.DT6 (NEXT-CSID)" }, |
738 | | { 63, "End.DT4 (NEXT-CSID)" }, |
739 | | { 64, "End.DT46 (NEXT-CSID)" }, |
740 | | { 65, "End.DX2 (NEXT-CSID)" }, |
741 | | { 66, "End.DX2V (NEXT-CSID)" }, |
742 | | { 67, "End.DT2U (NEXT-CSID)" }, |
743 | | { 68, "End.DT2M (NEXT-CSID)" }, |
744 | | { 0, NULL } |
745 | | }; |
746 | | |
747 | | static const value_string isis_lsp_srv6_loc_sub_tlv_vals[] = { |
748 | | { 4, "Prefix Attribute Flags"}, |
749 | | { 5, "SRv6 End SID"}, |
750 | | { 0, NULL } }; |
751 | | |
752 | | static const value_string isis_lsp_srv6_loc_end_sid_sub_sub_tlv_vals[] = { |
753 | | { 1, "SRv6 SID Structure"}, |
754 | | { 0, NULL } }; |
755 | | |
756 | | static int * const adj_sid_flags[] = { |
757 | | &hf_isis_lsp_adj_sid_family_flag, |
758 | | &hf_isis_lsp_adj_sid_backup_flag, |
759 | | &hf_isis_lsp_adj_sid_value_flag, |
760 | | &hf_isis_lsp_adj_sid_local_flag, |
761 | | &hf_isis_lsp_adj_sid_set_flag, |
762 | | NULL, |
763 | | }; |
764 | | |
765 | | static int * const srv6_cap_flags[] = { |
766 | | &hf_isis_lsp_clv_srv6_cap_flags_o, |
767 | | &hf_isis_lsp_clv_srv6_cap_flags_reserved, |
768 | | NULL, |
769 | | }; |
770 | | |
771 | | static int * const srv6_locator_flags[] = { |
772 | | &hf_isis_lsp_srv6_loc_flags_d, |
773 | | &hf_isis_lsp_srv6_loc_flags_reserved, |
774 | | NULL, |
775 | | }; |
776 | | |
777 | | static int * const srv6_endx_sid_flags[] = { |
778 | | &hf_isis_lsp_clv_srv6_endx_sid_flags_b, |
779 | | &hf_isis_lsp_clv_srv6_endx_sid_flags_s, |
780 | | &hf_isis_lsp_clv_srv6_endx_sid_flags_p, |
781 | | &hf_isis_lsp_clv_srv6_endx_sid_flags_reserved, |
782 | | NULL, |
783 | | }; |
784 | | |
785 | | static int * const prefix_sid_flags[] = { |
786 | | &hf_isis_lsp_ext_ip_reachability_prefix_re_adv_flag, |
787 | | &hf_isis_lsp_ext_ip_reachability_prefix_node_sid_flag, |
788 | | &hf_isis_lsp_ext_ip_reachability_prefix_nophp_flag, |
789 | | &hf_isis_lsp_ext_ip_reachability_prefix_expl_null_flag, |
790 | | &hf_isis_lsp_ext_ip_reachability_prefix_value_flag, |
791 | | &hf_isis_lsp_ext_ip_reachability_prefix_local_flag, |
792 | | NULL, |
793 | | }; |
794 | | |
795 | | static int * const prefix_attr_flags[] = { |
796 | | &hf_isis_lsp_prefix_attr_flags_x, |
797 | | &hf_isis_lsp_prefix_attr_flags_r, |
798 | | &hf_isis_lsp_prefix_attr_flags_n, |
799 | | NULL, |
800 | | }; |
801 | | |
802 | | static const true_false_string tfs_ipv6_ipv4 = { "IPv6", "IPv4" }; |
803 | | |
804 | | static const value_string isis_igp_alg_vals[] = { |
805 | | { ISIS_ALG_SPF, "Shortest Path First (SPF)" }, |
806 | | { ISIS_ALG_SSPF, "Strict Shortest Path First (SPF)" }, |
807 | | { 0, NULL } |
808 | | }; |
809 | | |
810 | | static const value_string isis_lsp_igp_msd_types[] = { |
811 | | { IGP_MSD_TYPE_RESERVED, "Reserved" }, |
812 | | { IGP_MSD_TYPE_MPLS, "Base MPLS Imposition" }, |
813 | | { IGP_MSD_TYPE_SEGMENT_LEFT, "Maximum Segments Left" }, |
814 | | { IGP_MSD_TYPE_END_POP, "Maximum End Pop" }, |
815 | | { IGP_MSD_TYPE_H_ENCAP, "Maximum H.Encaps" }, |
816 | | { IGP_MSD_TYPE_END_D, "Maximum End D" }, |
817 | | { 0, NULL } |
818 | | }; |
819 | | |
820 | | static const value_string isis_lsp_flex_algo_metric_type_vals[] = { |
821 | | { 0, "IGP Metric"}, |
822 | | { 1, "Min Unidirectional Link Delay"}, |
823 | | { 2, "TE Default Metric"}, |
824 | | { 3, "Bandwidth Metric"}, |
825 | | { 0, NULL } |
826 | | }; |
827 | | |
828 | | static const value_string isis_lsp_flex_algo_sub_tlv_vals[] = { |
829 | | { FAD_EXCLUDE_AG, "Flexible Algorithm Exclude Admin Group"}, |
830 | | { FAD_INCLUDE_ANY_AG, "Flexible Algorithm Include-Any Admin Group"}, |
831 | | { FAD_INCLUDE_ALL_AG, "Flexible Algorithm Include-All Admin Group"}, |
832 | | { FAD_DEF_FLAGS, "Flexible Algorithm Definition Flags"}, |
833 | | { FAD_EXCLUDE_SRLG, "Flexible Algorithm Exclude SRLG"}, |
834 | | { FAD_EXCLUDE_MIN_BANDWIDTH, "Exclude Minimum Bandwidth"}, |
835 | | { FAD_EXCLUDE_MAX_DELAY, "Exclude Maximum Delay"}, |
836 | | { FAD_REFERENCE_BANDWIDTH, "Reference Bandwidth"}, |
837 | | { 0, NULL } }; |
838 | | |
839 | | static int * const isis_lsp_fad_ref_bw_flags[] = { |
840 | | &hf_isis_lsp_clv_flex_algo_ref_bw_flags_g, |
841 | | NULL, |
842 | | }; |
843 | | |
844 | | static int * const isis_lsp_app_sabm_bits[] = { |
845 | | &hf_isis_lsp_clv_app_sabm_bits_r, |
846 | | &hf_isis_lsp_clv_app_sabm_bits_s, |
847 | | &hf_isis_lsp_clv_app_sabm_bits_f, |
848 | | &hf_isis_lsp_clv_app_sabm_bits_x, |
849 | | NULL, |
850 | | }; |
851 | | |
852 | | static const value_string isis_lsp_appspec_srlg_sub_tlv_vals[] = { |
853 | | { 4, "Link Local/Remote Identifiers" }, |
854 | | { 6, "IPv4 Interface Address" }, |
855 | | { 8, "IPv4 Neighbor Address" }, |
856 | | { 12, "IPv6 Interface Address" }, |
857 | | { 13, "IPv6 Neighbor Address" }, |
858 | | { 0, NULL } }; |
859 | | |
860 | | static const value_string isis_lsp_grp_types[] = { |
861 | | { GRP_MAC_ADDRESS, "MAC address" }, |
862 | | { GRP_IPV4_ADDRESS, "IPv4 address" }, |
863 | | { GRP_IPV6_ADDRESS, "IPv6 address" }, |
864 | | { 0, NULL } |
865 | | }; |
866 | | |
867 | | static int * const unidir_link_flags[] = { |
868 | | &hf_isis_lsp_ext_is_reachability_unidir_link_flags_a, |
869 | | NULL, |
870 | | }; |
871 | | |
872 | | /* |
873 | | http://www.iana.org/assignments/isis-tlv-codepoints/isis-tlv-codepoints.xhtml#isis-tlv-codepoints-22-23-141-222-223 |
874 | | https://tools.ietf.org/html/rfc8667 |
875 | | */ |
876 | | static const value_string isis_lsp_ext_is_reachability_code_vals[] = { |
877 | | { 3, "Administrative group (color)" }, |
878 | | { 4, "Link Local/Remote Identifiers" }, |
879 | | { 6, "IPv4 interface address" }, |
880 | | { 8, "IPv4 neighbor address" }, |
881 | | { 9, "Maximum link bandwidth" }, |
882 | | { 10, "Maximum reservable link bandwidth" }, |
883 | | { 11, "Unreserved bandwidth" }, |
884 | | { 12, "IPv6 Interface Address" }, |
885 | | { 13, "IPv6 Neighbor Address" }, |
886 | | { 14, "Extended Administrative Group" }, |
887 | | { 15, "Link Maximum SID Depth" }, |
888 | | { 16, "Application-Specific Link Attributes" }, |
889 | | { 17, "Generic Metric" }, |
890 | | { 18, "TE Default metric" }, |
891 | | { 19, "Link-attributes" }, |
892 | | { 20, "Link Protection Type" }, |
893 | | { 21, "Interface Switching Capability Descriptor" }, |
894 | | { 22, "Bandwidth Constraints" }, |
895 | | { 23, "Unconstrained TE LSP Count (sub-)TLV" }, |
896 | | { 24, "Remote AS number" }, |
897 | | { 25, "IPv4 remote ASBR Identifier" }, |
898 | | { 26, "IPv6 remote ASBR Identifier" }, |
899 | | { 27, "Interface Adjustment Capability Descriptor (IACD)" }, |
900 | | { 28, "MTU" }, |
901 | | { 29, "SPB-Metric" }, |
902 | | { 30, "SPB-A-OALG" }, |
903 | | { 31, "Adj-SID" }, |
904 | | { 32, "LAN-Adj-SID" }, |
905 | | { 33, "Unidirectional Link Delay"}, |
906 | | { 34, "Min/Max Unidirectional Link Delay"}, |
907 | | { 35, "Unidirectional Delay Variation"}, |
908 | | { 36, "Unidirectional Link Loss"}, |
909 | | { 37, "Unidirectional Residual Bandwidth"}, |
910 | | { 38, "Unidirectional Available Bandwidth"}, |
911 | | { 39, "Unidirectional Utilized Bandwidth"}, |
912 | | { 43, "SRv6 End.X SID" }, /* Suggested Value */ |
913 | | { 44, "SRv6 LAN End.X SID" }, /* Suggested Value */ |
914 | | { 250, "Reserved for Cisco-specific extensions" }, |
915 | | { 251, "Reserved for Cisco-specific extensions" }, |
916 | | { 252, "Reserved for Cisco-specific extensions" }, |
917 | | { 253, "Reserved for Cisco-specific extensions" }, |
918 | | { 254, "Reserved for Cisco-specific extensions" }, |
919 | | { 0, NULL } |
920 | | }; |
921 | | |
922 | | /* |
923 | | From: https://www.iana.org/assignments/isis-tlv-codepoints/isis-tlv-codepoints.xhtml |
924 | | Sub-TLVs for TLVs 135, 235, 236, and 237 |
925 | | */ |
926 | 136 | #define IP_REACH_SUBTLV_32BIT_ADMIN_TAG 1 |
927 | 39 | #define IP_REACH_SUBTLV_64BIT_ADMIN_TAG 2 |
928 | 33 | #define IP_REACH_SUBTLV_PFX_SID 3 |
929 | 33 | #define IP_REACH_SUBTLV_PFX_ATTRIB_FLAG 4 |
930 | 11 | #define IP_REACH_SUBTLV_FAPM 6 |
931 | 28 | #define IP_REACH_SUBTLV_BIER_INFO 32 |
932 | | |
933 | | static const value_string isis_lsp_ext_ip_reachability_code_vals[] = { |
934 | | { IP_REACH_SUBTLV_32BIT_ADMIN_TAG, "32-bit Administrative Tag" }, |
935 | | { IP_REACH_SUBTLV_64BIT_ADMIN_TAG, "64-bit Administrative Tag" }, |
936 | | { IP_REACH_SUBTLV_PFX_SID, "Prefix-SID" }, |
937 | | { IP_REACH_SUBTLV_PFX_ATTRIB_FLAG, "Prefix Attribute Flags" }, |
938 | | { IP_REACH_SUBTLV_FAPM, "Flexible Algorithm Prefix Metric" }, |
939 | | { IP_REACH_SUBTLV_BIER_INFO, "BIER Info" }, |
940 | | { 0, NULL } |
941 | | }; |
942 | | |
943 | | /* |
944 | | From: https://www.iana.org/assignments/bier/bier.xhtml |
945 | | BIER Algorithm |
946 | | */ |
947 | | static const range_string isis_lsp_bier_alg_vals[] = { |
948 | | { 0, 0, "No BIER specific algorithm is used" }, |
949 | | { 240, 255, "Experimental Use" }, |
950 | | { 0, 0, NULL } |
951 | | }; |
952 | | |
953 | | /* |
954 | | From: https://www.iana.org/assignments/isis-tlv-codepoints/isis-tlv-codepoints.xhtml |
955 | | sub-sub-TLVs for BIER Info sub-TLV |
956 | | */ |
957 | | static const value_string isis_lsp_bier_subsubtlv_type_vals[] = { |
958 | | { 1, "BIER MPLS Encapsulation" }, |
959 | | { 0, NULL } |
960 | | }; |
961 | | |
962 | | /* Avaya specific sub-TLV types */ |
963 | | static const value_string isis_lsp_avaya_ipvpn_subtlv_code_vals[] = { |
964 | | { 1, "IPv4 Metric Type" }, |
965 | | { 135, "IPv4 Reachability" }, |
966 | | { 236, "IPv6 Reachability" }, |
967 | | { 0, NULL } |
968 | | }; |
969 | | |
970 | | /* |
971 | | * Name: dissect_lsp_mt_id() |
972 | | * |
973 | | * Description: |
974 | | * dissect and display the multi-topology ID value |
975 | | * |
976 | | * Input: |
977 | | * tvbuff_t * : tvbuffer for packet data |
978 | | * proto_tree * : protocol display tree to fill out. CAN'T BE NULL |
979 | | * int : offset into packet data where we are. |
980 | | * |
981 | | * Output: |
982 | | * void, but we will add to proto tree. |
983 | | */ |
984 | | static void |
985 | | dissect_lsp_mt_id(tvbuff_t *tvb, proto_tree *tree, int offset) |
986 | 237 | { |
987 | | |
988 | 237 | proto_tree_add_item(tree, hf_isis_lsp_mt_id_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); |
989 | | |
990 | 237 | proto_tree_add_item(tree, hf_isis_lsp_mt_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
991 | | |
992 | 237 | } |
993 | | |
994 | | /* |
995 | | * Name: dissect_metric() |
996 | | * |
997 | | * Description: |
998 | | * Display a metric prefix portion. ISIS has the concept of multiple |
999 | | * metric per prefix (default, delay, expense, and error). This |
1000 | | * routine assists other dissectors by adding a single one of |
1001 | | * these to the display tree.. |
1002 | | * |
1003 | | * The 8th(msbit) bit in the metric octet is the "supported" bit. The |
1004 | | * "default" support is required, so we support a "force_supported" |
1005 | | * flag that tells us that it MUST be zero (zero==supported, |
1006 | | * so it really should be a "not supported" in the boolean sense) |
1007 | | * and to display a protocol failure accordingly. Notably, |
1008 | | * Cisco IOS 12(6) blows this! |
1009 | | * The 7th bit must be zero (reserved). |
1010 | | * |
1011 | | * Input: |
1012 | | * tvbuff_t * : tvbuffer for packet data |
1013 | | * proto_tree * : protocol display tree to fill out. May be NULL |
1014 | | * int : offset into packet data where we are. |
1015 | | * int : hf of the metric. |
1016 | | * int : hf_support of the metric. |
1017 | | * int : force supported. True is the supported bit MUST be zero. |
1018 | | * |
1019 | | * Output: |
1020 | | * void, but we will add to proto tree if !NULL. |
1021 | | */ |
1022 | | static void |
1023 | | dissect_metric(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
1024 | | int hf, int hf_support, int force_supported ) |
1025 | 1.31k | { |
1026 | 1.31k | uint8_t metric; |
1027 | 1.31k | proto_item *item, *support_item; |
1028 | | |
1029 | 1.31k | metric = tvb_get_uint8(tvb, offset); |
1030 | 1.31k | support_item = proto_tree_add_boolean(tree, hf_support, tvb, offset, 1, metric); |
1031 | 1.31k | item = proto_tree_add_uint(tree, hf, tvb, offset, 1, metric); |
1032 | | |
1033 | 1.31k | if (!ISIS_LSP_CLV_METRIC_SUPPORTED(metric) && force_supported) |
1034 | 26 | proto_item_append_text(support_item, " (but is required to be)"); |
1035 | | |
1036 | 1.31k | if (ISIS_LSP_CLV_METRIC_RESERVED(metric)) |
1037 | 121 | expert_add_info(pinfo, item, &ei_isis_lsp_reserved_not_zero); |
1038 | 1.31k | } |
1039 | | |
1040 | | /* |
1041 | | * Name: dissect_lsp_ip_reachability_clv() |
1042 | | * |
1043 | | * Description: |
1044 | | * Decode an IP reachability CLV. This can be either internal or |
1045 | | * external (the clv format does not change and which type we are |
1046 | | * displaying is put there by the dispatcher). All of these |
1047 | | * are a metric block followed by an IP addr and mask. |
1048 | | * |
1049 | | * Input: |
1050 | | * tvbuff_t * : tvbuffer for packet data |
1051 | | * proto_tree * : proto tree to build on (may be null) |
1052 | | * int : current offset into packet data |
1053 | | * int : length of IDs in packet. |
1054 | | * int : length of this clv |
1055 | | * |
1056 | | * Output: |
1057 | | * void, will modify proto_tree if not null. |
1058 | | */ |
1059 | | static void |
1060 | | dissect_lsp_ip_reachability_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
1061 | | isis_data_t *isis _U_, int length) |
1062 | 133 | { |
1063 | 133 | proto_item *ti; |
1064 | 133 | proto_tree *ntree = NULL; |
1065 | 133 | uint32_t src, mask, bitmask; |
1066 | 133 | int prefix_len; |
1067 | 133 | bool found_mask = false; |
1068 | | |
1069 | 1.23k | while ( length > 0 ) { |
1070 | 1.18k | if (length<12) { |
1071 | 79 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
1072 | 79 | "short IP reachability (%d vs 12)", length ); |
1073 | 79 | return; |
1074 | 79 | } |
1075 | | /* |
1076 | | * Gotta build a sub-tree for all our pieces |
1077 | | */ |
1078 | 1.10k | if ( tree ) { |
1079 | 1.10k | src = tvb_get_ipv4(tvb, offset+4); |
1080 | 1.10k | mask = tvb_get_ntohl(tvb, offset+8); |
1081 | | |
1082 | | /* find out if the mask matches one of 33 possible prefix lengths */ |
1083 | 1.10k | bitmask = 0xffffffff; |
1084 | 31.2k | for(prefix_len = 32; prefix_len >= 0; prefix_len--) { |
1085 | 30.4k | if (bitmask==mask) { |
1086 | 310 | found_mask = true; |
1087 | 310 | break; |
1088 | 310 | } |
1089 | 30.1k | bitmask = bitmask << 1; |
1090 | 30.1k | } |
1091 | | |
1092 | | /* If we have a discontiguous netmask, dump the mask, otherwise print the prefix_len */ |
1093 | | /* XXX - We should probably have some sort of netmask_to_str() routine in to_str.c that does this. */ |
1094 | | |
1095 | 1.10k | if(found_mask) { |
1096 | 743 | ti = proto_tree_add_ipv4_format_value( tree, hf_isis_lsp_ip_reachability_ipv4_prefix, tvb, offset, 12, |
1097 | 743 | src, "%s/%d", tvb_ip_to_str(pinfo->pool, tvb, offset+4), prefix_len ); |
1098 | 743 | } else { |
1099 | 358 | ti = proto_tree_add_ipv4_format_value( tree, hf_isis_lsp_ip_reachability_ipv4_prefix, tvb, offset, 12, |
1100 | 358 | src, "%s mask %s", tvb_ip_to_str(pinfo->pool, tvb, offset+4), tvb_ip_to_str(pinfo->pool, tvb, offset+8)); |
1101 | 358 | }; |
1102 | | |
1103 | 1.10k | ntree = proto_item_add_subtree(ti, ett_isis_lsp_clv_ip_reachability); |
1104 | | |
1105 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_default_metric, tvb, offset, 1, ENC_BIG_ENDIAN); |
1106 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_default_metric_ie, tvb, offset, 1, ENC_NA); |
1107 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_distribution, tvb, offset, 1, ENC_NA); |
1108 | | |
1109 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_delay_metric, tvb, offset+1, 1, ENC_BIG_ENDIAN); |
1110 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_delay_metric_support, tvb, offset+1, 1, ENC_NA); |
1111 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_delay_metric_ie, tvb, offset+1, 1, ENC_NA); |
1112 | | |
1113 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_expense_metric, tvb, offset+2, 1, ENC_BIG_ENDIAN); |
1114 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_expense_metric_support, tvb, offset+2, 1, ENC_NA); |
1115 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_expense_metric_ie, tvb, offset+2, 1, ENC_NA); |
1116 | | |
1117 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_error_metric, tvb, offset+3, 1, ENC_BIG_ENDIAN); |
1118 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_error_metric_support, tvb, offset+3, 1, ENC_NA); |
1119 | 1.10k | proto_tree_add_item(ntree, hf_isis_lsp_ip_reachability_error_metric_ie, tvb, offset+3, 1, ENC_NA); |
1120 | 1.10k | } |
1121 | 1.10k | offset += 12; |
1122 | 1.10k | length -= 12; |
1123 | 1.10k | } |
1124 | 133 | } |
1125 | | |
1126 | | |
1127 | | /* |
1128 | | * Name: dissect_bierinfo_subsubtlv() |
1129 | | * |
1130 | | * Description: |
1131 | | * Decodes a BIER Info sub-sub-TLV (RFC 8401) |
1132 | | * |
1133 | | * Input: |
1134 | | * tvbuff_t * : tvbuffer for packet data |
1135 | | * proto_tree * : proto tree to build on (may be null) |
1136 | | * int : current offset into packet data |
1137 | | * |
1138 | | * Output: |
1139 | | * void, will modify proto_tree if not null. |
1140 | | */ |
1141 | | static void |
1142 | | dissect_bierinfo_subsubtlv (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
1143 | | int offset, int tlv_type, int tlv_len) |
1144 | 174 | { |
1145 | 174 | switch (tlv_type) { |
1146 | 19 | case 1: |
1147 | 19 | if (tlv_len != 4) { |
1148 | 19 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, |
1149 | 19 | tvb, offset, tlv_len, "TLV length (%d) != 4 bytes", tlv_len); |
1150 | 19 | return; |
1151 | 19 | } |
1152 | 0 | proto_tree_add_item(tree, hf_isis_lsp_clv_bier_subsub_mplsencap_maxsi, tvb, offset, 1, ENC_BIG_ENDIAN); |
1153 | 0 | proto_tree_add_item(tree, hf_isis_lsp_clv_bier_subsub_mplsencap_bslen, tvb, offset+1, 1, ENC_BIG_ENDIAN); |
1154 | 0 | proto_tree_add_item(tree, hf_isis_lsp_clv_bier_subsub_mplsencap_label, tvb, offset+1, 3, ENC_BIG_ENDIAN); |
1155 | 0 | break; |
1156 | 155 | default: |
1157 | 155 | break; |
1158 | 174 | } |
1159 | | |
1160 | 155 | return; |
1161 | 174 | } |
1162 | | |
1163 | | |
1164 | | /* |
1165 | | * Name: dissect_bierinfo_subtlv() |
1166 | | * |
1167 | | * Description: |
1168 | | * Decodes a BIER Info sub-TLV (RFC 8401) |
1169 | | * |
1170 | | * Input: |
1171 | | * tvbuff_t * : tvbuffer for packet data |
1172 | | * proto_tree * : proto tree to build on (may be null) |
1173 | | * int : current offset into packet data |
1174 | | * |
1175 | | * Output: |
1176 | | * void, will modify proto_tree if not null. |
1177 | | */ |
1178 | | static void |
1179 | | dissect_bierinfo_subtlv (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
1180 | | int offset, int tlv_len) |
1181 | 28 | { |
1182 | 28 | int min_tlv_len = 5; |
1183 | 28 | int len = tlv_len; |
1184 | 28 | unsigned subsub_type, subsub_len; |
1185 | 28 | proto_tree *subsub_tree = NULL; |
1186 | 28 | proto_item *ti_subsub = NULL; |
1187 | | |
1188 | 28 | if (tlv_len < min_tlv_len) { |
1189 | 1 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, |
1190 | 1 | tvb, offset-2, tlv_len+2, |
1191 | 1 | "Invalid length (%d) bytes for BIER Info sub-TLV: Minimum length (%d) bytes", |
1192 | 1 | tlv_len+2, min_tlv_len+2); |
1193 | 1 | return; |
1194 | 1 | } |
1195 | 27 | proto_tree_add_item(tree, hf_isis_lsp_clv_bier_alg, tvb, offset, 1, ENC_BIG_ENDIAN); |
1196 | 27 | offset += 1; |
1197 | 27 | proto_tree_add_item(tree, hf_isis_lsp_clv_bier_igp_alg, tvb, offset, 1, ENC_BIG_ENDIAN); |
1198 | 27 | offset += 1; |
1199 | 27 | proto_tree_add_item(tree, hf_isis_lsp_clv_bier_subdomain, tvb, offset, 1, ENC_BIG_ENDIAN); |
1200 | 27 | offset += 1; |
1201 | 27 | proto_tree_add_item(tree, hf_isis_lsp_clv_bier_bfrid, tvb, offset, 2, ENC_BIG_ENDIAN); |
1202 | 27 | offset += 2; |
1203 | 27 | len -= 5; |
1204 | | |
1205 | | /* Dissect sub-sub-TLVs if present */ |
1206 | 27 | min_tlv_len = 2; |
1207 | 204 | while (len > 0) { |
1208 | 183 | if (len < min_tlv_len) { |
1209 | 6 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, |
1210 | 6 | tvb, offset, len, |
1211 | 6 | "Invalid data length (%d) bytes for BIER Info sub-sub-TLV: Minimum length (%d) bytes", |
1212 | 6 | len, min_tlv_len); |
1213 | 6 | return; |
1214 | 6 | } |
1215 | 177 | subsub_type = tvb_get_uint8(tvb, offset); |
1216 | 177 | subsub_len = tvb_get_uint8(tvb, offset+1); |
1217 | 177 | subsub_tree = proto_tree_add_subtree(tree, tvb, offset, subsub_len+2, |
1218 | 177 | ett_isis_lsp_clv_bier_subsub_tlv, |
1219 | 177 | &ti_subsub, "sub-subTLV"); |
1220 | 177 | proto_tree_add_item(subsub_tree, hf_isis_lsp_clv_bier_subsub_type, |
1221 | 177 | tvb, offset, 1, ENC_BIG_ENDIAN); |
1222 | 177 | offset += 1; |
1223 | 177 | proto_tree_add_item(subsub_tree, hf_isis_lsp_clv_bier_subsub_len, |
1224 | 177 | tvb, offset, 1, ENC_BIG_ENDIAN); |
1225 | 177 | offset += 1; |
1226 | 177 | len -= 2; |
1227 | 177 | proto_item_append_text(ti_subsub, ": %s (t=%u, l=%u)", |
1228 | 177 | val_to_str_const(subsub_type, isis_lsp_bier_subsubtlv_type_vals, "Unknown"), |
1229 | 177 | subsub_type, subsub_len); |
1230 | 177 | dissect_bierinfo_subsubtlv(tvb, pinfo, subsub_tree, offset, subsub_type, subsub_len); |
1231 | 177 | offset += subsub_len; |
1232 | 177 | len -= subsub_len; |
1233 | 177 | } |
1234 | | |
1235 | 21 | return; |
1236 | 27 | } |
1237 | | |
1238 | | /* |
1239 | | * Name: dissect_prefix_attr_flags_subclv() |
1240 | | * |
1241 | | * Description: |
1242 | | * Decodes a Prefix Attribute Flags sub-TLV (RFC 7794) |
1243 | | * |
1244 | | * Input: |
1245 | | * tvbuff_t * : tvbuffer for packet data |
1246 | | * packet_info * : expert error misuse reporting |
1247 | | * proto_tree * : proto tree to build on |
1248 | | * tree_item * : proto tree item to build on (may be null) |
1249 | | * int : current offset into packet data |
1250 | | * int : type of this clv |
1251 | | * int : length of this clv |
1252 | | * |
1253 | | * Output: |
1254 | | * void, will modify proto_tree if not null. |
1255 | | */ |
1256 | | static void |
1257 | | dissect_prefix_attr_flags_subclv(tvbuff_t *tvb, packet_info *pinfo, |
1258 | | proto_tree *tree, proto_item *tree_item, |
1259 | | int offset, int clv_code _U_, int clv_len) |
1260 | 46 | { |
1261 | 46 | uint8_t flags; |
1262 | | |
1263 | 46 | if (clv_len != 1) { |
1264 | 44 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, |
1265 | 44 | tvb, offset-2, 2, |
1266 | 44 | "Invalid Sub-TLV Length %d (should be 1)", clv_len); |
1267 | 44 | return; |
1268 | 44 | } |
1269 | 2 | flags = tvb_get_uint8(tvb, offset); |
1270 | 2 | proto_tree_add_bitmask(tree, tvb, offset, hf_isis_lsp_prefix_attr_flags, |
1271 | 2 | ett_isis_lsp_prefix_attr_flags, prefix_attr_flags, ENC_BIG_ENDIAN); |
1272 | 2 | if (tree_item) { |
1273 | 2 | proto_item_append_text(tree_item, ": Flags:%c%c%c", |
1274 | 2 | ((flags & ISIS_LSP_PFX_ATTR_FLAG_X) != 0) ? 'X' : '-', |
1275 | 2 | ((flags & ISIS_LSP_PFX_ATTR_FLAG_R) != 0) ? 'R' : '-', |
1276 | 2 | ((flags & ISIS_LSP_PFX_ATTR_FLAG_N) != 0) ? 'N' : '-'); |
1277 | 2 | } |
1278 | 2 | } |
1279 | | |
1280 | | /* |
1281 | | * Name: dissect_flex_algo_prefix_metric_subclv() |
1282 | | * |
1283 | | * Description: |
1284 | | * Decodes a Flexible Algorithm Prefix Metric (FAPM) sub-TLV (RFC 9350) |
1285 | | * |
1286 | | * Input: |
1287 | | * tvbuff_t * : tvbuffer for packet data |
1288 | | * packet_info * : expert error misuse reporting |
1289 | | * proto_tree * : proto tree to build on |
1290 | | * int : current offset into packet data |
1291 | | * int : type of this clv |
1292 | | * int : length of this clv |
1293 | | * |
1294 | | * Output: |
1295 | | * void, will modify proto_tree if not null. |
1296 | | */ |
1297 | | static void |
1298 | | dissect_flex_algo_prefix_metric_subclv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
1299 | | int offset, int clv_code _U_, int clv_len) |
1300 | 11 | { |
1301 | 11 | if (clv_len != 5) { |
1302 | 11 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, |
1303 | 11 | tvb, offset-2, 2, |
1304 | 11 | "Invalid Sub-TLV Length %d (should be 5)", clv_len); |
1305 | 11 | return; |
1306 | 11 | } |
1307 | 0 | proto_tree_add_item(tree, hf_isis_lsp_clv_flex_algo_algorithm, tvb, offset, 1, ENC_NA); |
1308 | 0 | proto_tree_add_item(tree, hf_isis_lsp_clv_flex_algo_prefix_metric, tvb, offset+1, 4, ENC_BIG_ENDIAN); |
1309 | 0 | } |
1310 | | |
1311 | | /* |
1312 | | * Name: dissect_ipreach_subclv () |
1313 | | * |
1314 | | * Description: parses IP reach subTLVs |
1315 | | * Called by various IP Reachability dissectors. |
1316 | | * |
1317 | | * Input: |
1318 | | * tvbuff_t * : tvbuffer for packet data |
1319 | | * proto_tree * : protocol display tree to fill out. |
1320 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
1321 | | * |
1322 | | * Output: |
1323 | | * void |
1324 | | */ |
1325 | | static void |
1326 | | dissect_ipreach_subclv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *tree_item, int offset, int clv_code, int clv_len) |
1327 | 799 | { |
1328 | 799 | uint8_t flags; |
1329 | | |
1330 | 799 | switch (clv_code) { |
1331 | 136 | case IP_REACH_SUBTLV_32BIT_ADMIN_TAG: |
1332 | 272 | while (clv_len >= 4) { |
1333 | 136 | proto_tree_add_item(tree, hf_isis_lsp_32_bit_administrative_tag, tvb, offset, 4, ENC_BIG_ENDIAN); |
1334 | 136 | offset+=4; |
1335 | 136 | clv_len-=4; |
1336 | 136 | } |
1337 | 136 | break; |
1338 | 39 | case IP_REACH_SUBTLV_64BIT_ADMIN_TAG: |
1339 | 142 | while (clv_len >= 8) { |
1340 | 103 | proto_tree_add_item(tree, hf_isis_lsp_64_bit_administrative_tag, tvb, offset, 8, ENC_BIG_ENDIAN); |
1341 | 103 | offset+=8; |
1342 | 103 | clv_len-=8; |
1343 | 103 | } |
1344 | 39 | break; |
1345 | 33 | case IP_REACH_SUBTLV_PFX_SID: |
1346 | 33 | flags = tvb_get_uint8(tvb, offset); |
1347 | 33 | proto_tree_add_bitmask(tree, tvb, offset, hf_isis_lsp_ext_ip_reachability_prefix_flags, |
1348 | 33 | ett_isis_lsp_prefix_sid_flags, prefix_sid_flags, ENC_BIG_ENDIAN); |
1349 | 33 | offset++; |
1350 | | |
1351 | 33 | proto_tree_add_item(tree, hf_isis_lsp_clv_sr_alg, tvb, offset, 1, ENC_BIG_ENDIAN); |
1352 | 33 | offset++; |
1353 | | |
1354 | 33 | if (clv_len == 5) { |
1355 | 1 | if (!((flags & 0x0C) == 0x0C)) |
1356 | 1 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, |
1357 | 1 | offset-2, clv_len, "V & L flags must be set"); |
1358 | 1 | proto_tree_add_item(tree, hf_isis_lsp_sid_sli_label, tvb, offset, 3, ENC_BIG_ENDIAN); |
1359 | 32 | } else if (clv_len == 6) { |
1360 | 0 | if (flags & 0x0C) |
1361 | 0 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, |
1362 | 0 | offset-2, clv_len, "V & L flags must be unset"); |
1363 | 0 | proto_tree_add_item(tree, hf_isis_lsp_sid_sli_index, tvb, offset, 4, ENC_BIG_ENDIAN); |
1364 | 32 | } else { |
1365 | 32 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, |
1366 | 32 | offset-2, clv_len, "Unknown SID/Index/Label format"); |
1367 | 32 | } |
1368 | 33 | break; |
1369 | 33 | case IP_REACH_SUBTLV_PFX_ATTRIB_FLAG: |
1370 | | /* Prefix Attribute Flags */ |
1371 | 33 | dissect_prefix_attr_flags_subclv(tvb, pinfo, tree, tree_item, offset, clv_code, clv_len); |
1372 | 33 | break; |
1373 | 11 | case IP_REACH_SUBTLV_FAPM: |
1374 | | /* Flexible Algorithm Prefix Metric (FAPM) */ |
1375 | 11 | dissect_flex_algo_prefix_metric_subclv(tvb, pinfo, tree, offset, clv_code, clv_len); |
1376 | 11 | break; |
1377 | 28 | case IP_REACH_SUBTLV_BIER_INFO: |
1378 | 28 | dissect_bierinfo_subtlv(tvb, pinfo, tree, offset, clv_len); |
1379 | 28 | break; |
1380 | 519 | default : |
1381 | 519 | break; |
1382 | 799 | } |
1383 | 799 | } |
1384 | | |
1385 | | |
1386 | | /* |
1387 | | * Name: dissect_lsp_ext_ip_reachability_clv() |
1388 | | * |
1389 | | * Description: Decode an Extended IP Reachability CLV - code 135. |
1390 | | * |
1391 | | * The extended IP reachability TLV is an extended version |
1392 | | * of the IP reachability TLVs (codes 128 and 130). It encodes |
1393 | | * the metric as a 32-bit unsigned integer and allows to add |
1394 | | * sub-CLV(s). |
1395 | | * |
1396 | | * CALLED BY TLV 235 DISSECTOR |
1397 | | * |
1398 | | * |
1399 | | * Input: |
1400 | | * tvbuff_t * : tvbuffer for packet data |
1401 | | * proto_tree * : proto tree to build on (may be null) |
1402 | | * int : current offset into packet data |
1403 | | * int : length of IDs in packet. |
1404 | | * int : length of this clv |
1405 | | * |
1406 | | * Output: |
1407 | | * void, will modify proto_tree if not null. |
1408 | | */ |
1409 | | static void |
1410 | | dissect_lsp_ext_ip_reachability_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, |
1411 | | int offset, isis_data_t *isis _U_, int length) |
1412 | 73 | { |
1413 | 73 | proto_tree *subtree = NULL; |
1414 | 73 | proto_tree *subclv_tree = NULL; |
1415 | 73 | proto_item *ti_subtree = NULL; |
1416 | 73 | proto_item *ti_subclvs = NULL; |
1417 | 73 | uint8_t ctrl_info; |
1418 | 73 | unsigned bit_length; |
1419 | 73 | int byte_length; |
1420 | 73 | ws_in4_addr prefix; |
1421 | 73 | address prefix_addr; |
1422 | 73 | unsigned len,i; |
1423 | 73 | unsigned subclvs_len; |
1424 | 73 | unsigned clv_code, clv_len; |
1425 | 73 | int clv_offset; |
1426 | 73 | char *prefix_str; |
1427 | | |
1428 | 445 | while (length > 0) { |
1429 | 404 | ctrl_info = tvb_get_uint8(tvb, offset+4); |
1430 | 404 | bit_length = ctrl_info & 0x3f; |
1431 | 404 | byte_length = tvb_get_ipv4_addr_with_prefix_len(tvb, offset+5, &prefix, bit_length); |
1432 | 404 | if (byte_length == -1) { |
1433 | 32 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
1434 | 32 | "IPv4 prefix has an invalid length: %d bits", bit_length ); |
1435 | 32 | return; |
1436 | 32 | } |
1437 | 372 | subclvs_len = 0; |
1438 | 372 | if ((ctrl_info & 0x40) != 0) |
1439 | 62 | subclvs_len = 1+tvb_get_uint8(tvb, offset+5+byte_length); |
1440 | | |
1441 | | /* open up a new tree per prefix */ |
1442 | 372 | subtree = proto_tree_add_subtree(tree, tvb, offset, 5+byte_length+subclvs_len, |
1443 | 372 | ett_isis_lsp_part_of_clv_ext_ip_reachability, &ti_subtree, "Ext. IP Reachability"); |
1444 | | |
1445 | 372 | set_address(&prefix_addr, AT_IPv4, 4, &prefix); |
1446 | 372 | prefix_str = address_to_str(pinfo->pool, &prefix_addr); |
1447 | 372 | proto_item_append_text(ti_subtree, ": %s/%u", prefix_str, bit_length); |
1448 | | |
1449 | 372 | proto_tree_add_item(subtree, hf_isis_lsp_ext_ip_reachability_metric, tvb, offset, 4, ENC_BIG_ENDIAN); |
1450 | 372 | proto_tree_add_item(subtree, hf_isis_lsp_ext_ip_reachability_distribution, tvb, offset+4, 1, ENC_NA); |
1451 | 372 | proto_tree_add_item(subtree, hf_isis_lsp_ext_ip_reachability_subtlv, tvb, offset+4, 1, ENC_NA); |
1452 | 372 | proto_tree_add_item(subtree, hf_isis_lsp_ext_ip_reachability_prefix_length, tvb, offset+4, 1, ENC_NA); |
1453 | | |
1454 | 372 | proto_tree_add_ipv4(subtree, hf_isis_lsp_ext_ip_reachability_ipv4_prefix, tvb, offset + 5, byte_length, prefix); |
1455 | | |
1456 | 372 | len = 5 + byte_length; |
1457 | 372 | if ((ctrl_info & 0x40) != 0) { |
1458 | 62 | proto_tree_add_item_ret_uint(subtree, hf_isis_lsp_ext_ip_reachability_subclvs_len, tvb, offset+len, 1, ENC_BIG_ENDIAN, &subclvs_len); |
1459 | 62 | i =0; |
1460 | 504 | while (i < subclvs_len) { |
1461 | 442 | clv_offset = offset + len + 1 + i; /* skip the total subtlv len indicator */ |
1462 | 442 | clv_code = tvb_get_uint8(tvb, clv_offset); |
1463 | 442 | clv_len = tvb_get_uint8(tvb, clv_offset+1); |
1464 | 442 | subclv_tree = proto_tree_add_subtree(subtree, tvb, clv_offset, clv_len + 2, |
1465 | 442 | ett_isis_lsp_clv_ip_reach_subclv, |
1466 | 442 | &ti_subclvs, "subTLV"); |
1467 | 442 | proto_tree_add_item(subclv_tree, hf_isis_lsp_ext_ip_reachability_code, |
1468 | 442 | tvb, clv_offset, 1, ENC_BIG_ENDIAN); |
1469 | 442 | proto_tree_add_item(subclv_tree, hf_isis_lsp_ext_ip_reachability_len, tvb, clv_offset+1, 1, ENC_BIG_ENDIAN); |
1470 | 442 | proto_item_append_text(ti_subclvs, ": %s (c=%u, l=%u)", val_to_str_const(clv_code, isis_lsp_ext_ip_reachability_code_vals, "Unknown"), clv_code, clv_len); |
1471 | | |
1472 | | /* |
1473 | | * we pass on now the raw data to the ipreach_subtlv dissector |
1474 | | * therefore we need to skip 3 bytes |
1475 | | * (total subtlv len, subtlv type, subtlv len) |
1476 | | */ |
1477 | 442 | dissect_ipreach_subclv(tvb, pinfo, subclv_tree, ti_subclvs, clv_offset+2, clv_code, clv_len); |
1478 | 442 | i += clv_len + 2; |
1479 | 442 | } |
1480 | 62 | len += 1 + subclvs_len; |
1481 | 310 | } else { |
1482 | 310 | proto_tree_add_uint_format(subtree, hf_isis_lsp_ext_ip_reachability_subclvs_len, tvb, offset+len, 0, 0, "no sub-TLVs present"); |
1483 | 310 | } |
1484 | | |
1485 | 372 | offset += len; |
1486 | 372 | length -= len; |
1487 | 372 | } |
1488 | 73 | } |
1489 | | |
1490 | | /* |
1491 | | * Name: dissect_isis_grp_address_clv() |
1492 | | * |
1493 | | * Description: Decode GROUP ADDRESS subTLVs |
1494 | | * The Group Address TLV is composed of 1 octet for the type, |
1495 | | * 1 octet that specifies the number of bytes in the value field, and a |
1496 | | * Variable length value field that can have any or all of the subTLVs that are listed in the |
1497 | | * - below section |
1498 | | * |
1499 | | *Input: |
1500 | | * tvbuff_t * : tvbuffer for packet data |
1501 | | * proto_tree * : proto tree to build on (may be null) |
1502 | | * int : current offset into packet data |
1503 | | * int : length of IDs in packet. |
1504 | | * int : length of this clv |
1505 | | * |
1506 | | * Output: |
1507 | | * void, will modify proto_tree if not null. |
1508 | | */ |
1509 | | |
1510 | | static void |
1511 | | dissect_isis_grp_address_clv(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree, int offset, |
1512 | | isis_data_t *isis _U_, int length) |
1513 | 70 | { |
1514 | 70 | int source_num; |
1515 | 70 | uint8_t subtlv_type; |
1516 | 70 | int subtlv_len; |
1517 | | |
1518 | 70 | proto_tree *rt_tree=NULL; |
1519 | | |
1520 | 745 | while (length>0) { |
1521 | 691 | subtlv_type = tvb_get_uint8(tvb, offset); |
1522 | 691 | subtlv_len = tvb_get_uint8(tvb, offset+1); |
1523 | 691 | switch(subtlv_type) { |
1524 | | |
1525 | | |
1526 | 213 | case GRP_MAC_ADDRESS: |
1527 | 213 | rt_tree = proto_tree_add_subtree(tree, tvb, offset, subtlv_len+2, |
1528 | 213 | ett_isis_lsp_clv_grp_macaddr, NULL, "Group MAC Address Sub-TLV"); |
1529 | | |
1530 | 213 | proto_tree_add_uint(rt_tree, hf_isis_lsp_grp_type, tvb, offset, 1, subtlv_type); |
1531 | | |
1532 | 213 | length--; |
1533 | 213 | offset++; |
1534 | | |
1535 | 213 | proto_tree_add_uint(rt_tree, hf_isis_lsp_grp_macaddr_length, tvb, offset, 1, subtlv_len); |
1536 | | |
1537 | 213 | if(subtlv_len < 5) { |
1538 | 175 | length -= subtlv_len; |
1539 | 175 | offset += subtlv_len; |
1540 | 175 | break; |
1541 | 175 | } |
1542 | | |
1543 | 38 | length--; |
1544 | 38 | offset++; |
1545 | | |
1546 | 38 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_macaddr_topology_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1547 | | |
1548 | 38 | length -= 2; |
1549 | 38 | offset += 2; |
1550 | 38 | subtlv_len -= 2; |
1551 | | |
1552 | 38 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_macaddr_vlan_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1553 | | |
1554 | 38 | length -= 2; |
1555 | 38 | offset += 2; |
1556 | 38 | subtlv_len -= 2; |
1557 | | |
1558 | 38 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_macaddr_number_of_records, tvb, offset, 1, ENC_BIG_ENDIAN); |
1559 | | |
1560 | 38 | length--; |
1561 | 38 | offset++; |
1562 | 38 | subtlv_len--; |
1563 | | |
1564 | 187 | while(subtlv_len > 0) { |
1565 | | |
1566 | 149 | source_num=tvb_get_uint8(tvb, offset); |
1567 | 149 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_macaddr_number_of_sources, tvb, offset, 1, ENC_BIG_ENDIAN); |
1568 | | |
1569 | 149 | length--; |
1570 | 149 | offset++; |
1571 | 149 | subtlv_len--; |
1572 | | |
1573 | 149 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_macaddr_group_address, tvb, offset, 6, ENC_NA); |
1574 | | |
1575 | 149 | length -= 6; |
1576 | 149 | offset += 6; |
1577 | 149 | subtlv_len -= 6; |
1578 | | |
1579 | | |
1580 | 384 | while((subtlv_len > 0) && (source_num > 0)) { |
1581 | 235 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_macaddr_source_address, tvb, offset, 6, ENC_NA); |
1582 | | |
1583 | 235 | length -= 6; |
1584 | 235 | offset += 6; |
1585 | 235 | subtlv_len -= 6; |
1586 | 235 | source_num--; |
1587 | 235 | } |
1588 | 149 | } |
1589 | | |
1590 | 38 | break; |
1591 | | |
1592 | 31 | case GRP_IPV4_ADDRESS: |
1593 | 31 | rt_tree = proto_tree_add_subtree(tree, tvb, offset, subtlv_len+2, |
1594 | 31 | ett_isis_lsp_clv_grp_ipv4addr, NULL, "Group IPv4 Address Sub-TLV"); |
1595 | | |
1596 | 31 | proto_tree_add_uint(rt_tree, hf_isis_lsp_grp_type, tvb, offset, 1, subtlv_type); |
1597 | | |
1598 | 31 | length--; |
1599 | 31 | offset++; |
1600 | | |
1601 | 31 | proto_tree_add_uint(rt_tree, hf_isis_lsp_grp_ipv4addr_length, tvb, offset, 1, subtlv_len); |
1602 | | |
1603 | 31 | if(subtlv_len < 5) { |
1604 | 22 | length -= subtlv_len; |
1605 | 22 | offset += subtlv_len; |
1606 | 22 | break; |
1607 | 22 | } |
1608 | | |
1609 | 9 | length--; |
1610 | 9 | offset++; |
1611 | | |
1612 | 9 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv4addr_topology_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1613 | | |
1614 | 9 | length -= 2; |
1615 | 9 | offset += 2; |
1616 | 9 | subtlv_len -= 2; |
1617 | | |
1618 | 9 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv4addr_vlan_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1619 | | |
1620 | 9 | length -= 2; |
1621 | 9 | offset += 2; |
1622 | 9 | subtlv_len -= 2; |
1623 | | |
1624 | 9 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv4addr_number_of_records, tvb, offset, 1, ENC_BIG_ENDIAN); |
1625 | | |
1626 | 9 | length--; |
1627 | 9 | offset++; |
1628 | 9 | subtlv_len--; |
1629 | | |
1630 | 70 | while(subtlv_len > 0) { |
1631 | | |
1632 | 61 | source_num=tvb_get_uint8(tvb, offset); |
1633 | 61 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv4addr_number_of_sources, tvb, offset, 1, ENC_BIG_ENDIAN); |
1634 | | |
1635 | 61 | length--; |
1636 | 61 | offset++; |
1637 | 61 | subtlv_len--; |
1638 | | |
1639 | 61 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv4addr_group_address, tvb, offset, 4, ENC_BIG_ENDIAN); |
1640 | | |
1641 | 61 | length -= 4; |
1642 | 61 | offset += 4; |
1643 | 61 | subtlv_len -= 4; |
1644 | | |
1645 | | |
1646 | 276 | while((subtlv_len > 0) && (source_num > 0)) { |
1647 | 215 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv4addr_source_address, tvb, offset, 4, ENC_BIG_ENDIAN); |
1648 | | |
1649 | 215 | length -= 4; |
1650 | 215 | offset += 4; |
1651 | 215 | subtlv_len -= 4; |
1652 | 215 | source_num--; |
1653 | 215 | } |
1654 | 61 | } |
1655 | | |
1656 | 9 | break; |
1657 | | |
1658 | 110 | case GRP_IPV6_ADDRESS: |
1659 | 110 | rt_tree = proto_tree_add_subtree(tree, tvb, offset, subtlv_len+2, |
1660 | 110 | ett_isis_lsp_clv_grp_ipv6addr, NULL, "Group IPv6 Address Sub-TLV"); |
1661 | | |
1662 | 110 | proto_tree_add_uint(rt_tree, hf_isis_lsp_grp_type, tvb, offset, 1, subtlv_type); |
1663 | | |
1664 | 110 | length--; |
1665 | 110 | offset++; |
1666 | | |
1667 | 110 | proto_tree_add_uint(rt_tree, hf_isis_lsp_grp_ipv6addr_length, tvb, offset, 1, subtlv_len); |
1668 | | |
1669 | 110 | if(subtlv_len < 5) { |
1670 | 92 | length -= subtlv_len; |
1671 | 92 | offset += subtlv_len; |
1672 | 92 | break; |
1673 | 92 | } |
1674 | | |
1675 | 18 | length--; |
1676 | 18 | offset++; |
1677 | | |
1678 | 18 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv6addr_topology_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1679 | | |
1680 | 18 | length -= 2; |
1681 | 18 | offset += 2; |
1682 | 18 | subtlv_len -= 2; |
1683 | | |
1684 | 18 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv6addr_vlan_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1685 | | |
1686 | 18 | length -= 2; |
1687 | 18 | offset += 2; |
1688 | 18 | subtlv_len -= 2; |
1689 | | |
1690 | 18 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv6addr_number_of_records, tvb, offset, 1, ENC_BIG_ENDIAN); |
1691 | | |
1692 | 18 | length--; |
1693 | 18 | offset++; |
1694 | 18 | subtlv_len--; |
1695 | | |
1696 | 65 | while(subtlv_len > 0) { |
1697 | | |
1698 | 47 | source_num=tvb_get_uint8(tvb, offset); |
1699 | 47 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv6addr_number_of_sources, tvb, offset, 1, ENC_BIG_ENDIAN); |
1700 | | |
1701 | 47 | length--; |
1702 | 47 | offset++; |
1703 | 47 | subtlv_len--; |
1704 | | |
1705 | 47 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv6addr_group_address, tvb, offset, 16, ENC_NA); |
1706 | | |
1707 | 47 | length -= 16; |
1708 | 47 | offset += 16; |
1709 | 47 | subtlv_len -= 16; |
1710 | | |
1711 | | |
1712 | 112 | while((subtlv_len > 0) && (source_num > 0)) { |
1713 | 65 | proto_tree_add_item(rt_tree, hf_isis_lsp_grp_ipv6addr_source_address, tvb, offset, 16, ENC_NA); |
1714 | | |
1715 | 65 | length -= 16; |
1716 | 65 | offset += 16; |
1717 | 65 | subtlv_len -= 16; |
1718 | 65 | source_num--; |
1719 | 65 | } |
1720 | 47 | } |
1721 | | |
1722 | 18 | break; |
1723 | | |
1724 | 332 | default: |
1725 | 332 | rt_tree = proto_tree_add_subtree(tree, tvb, offset, subtlv_len+2, |
1726 | 332 | ett_isis_lsp_clv_grp_unknown, NULL, "Unknown Sub-TLV"); |
1727 | | |
1728 | 332 | proto_tree_add_uint(rt_tree, hf_isis_lsp_grp_type, tvb, offset, 1, subtlv_type); |
1729 | | |
1730 | 332 | length--; |
1731 | 332 | offset++; |
1732 | | |
1733 | 332 | proto_tree_add_uint(rt_tree, hf_isis_lsp_grp_unknown_length, tvb, offset, 1, subtlv_len); |
1734 | | |
1735 | 332 | length--; |
1736 | 332 | offset++; |
1737 | | |
1738 | 332 | length -= subtlv_len; |
1739 | 332 | offset += subtlv_len; |
1740 | 332 | break; |
1741 | 691 | } |
1742 | 691 | } |
1743 | 70 | } |
1744 | | |
1745 | | /** |
1746 | | * Decode the Segment Routing "SID/Label" Sub-TLV |
1747 | | * |
1748 | | * This Sub-TLV is used in the Segment Routing Capability TLV (2) |
1749 | | * It's called by the TLV 242 dissector (dissect_isis_trill_clv) |
1750 | | * |
1751 | | * @param tvb the buffer of the current data |
1752 | | * @param pinfo the packet info of the current data |
1753 | | * @param tree the tree to append this item |
1754 | | * @param offset the offset in the tvb |
1755 | | * @param tlv_len the length of tlv |
1756 | | */ |
1757 | | static void |
1758 | | dissect_lsp_sr_sid_label_clv(tvbuff_t *tvb, packet_info* pinfo _U_, |
1759 | | proto_tree *tree, int offset, uint8_t tlv_len) |
1760 | 18 | { |
1761 | 18 | proto_tree *subtree; |
1762 | | |
1763 | 18 | subtree = proto_tree_add_subtree_format(tree, tvb, offset-2, tlv_len+2, ett_isis_lsp_clv_sr_sid_label, |
1764 | 18 | NULL, "SID/Label (t=1, l=%u)", tlv_len); |
1765 | | |
1766 | 18 | switch (tlv_len) { /* The length determines the type of info */ |
1767 | 1 | case 4: /* Then it's a SID */ |
1768 | 1 | proto_tree_add_item(subtree, hf_isis_lsp_clv_sr_cap_sid, tvb, offset, tlv_len, ENC_BIG_ENDIAN); |
1769 | 1 | break; |
1770 | 3 | case 3: /* Then it's a Label */ |
1771 | 3 | proto_tree_add_item(subtree, hf_isis_lsp_clv_sr_cap_label, tvb, offset, tlv_len, ENC_BIG_ENDIAN); |
1772 | 3 | break; |
1773 | 14 | default: |
1774 | 14 | proto_tree_add_expert_format(subtree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, offset, tlv_len, |
1775 | 14 | "SID/Label SubTlv - Bad length: Type: %d, Length: %d", ISIS_SR_SID_LABEL, tlv_len); |
1776 | 14 | break; |
1777 | 18 | } |
1778 | 18 | } |
1779 | | |
1780 | | static void dissect_subclv_ext_admin_group(tvbuff_t *tvb, proto_tree *tree, |
1781 | | int offset, int subtype _U_, int sublen); |
1782 | | |
1783 | | static int |
1784 | | dissect_isis_trill_clv(tvbuff_t *tvb, packet_info* pinfo _U_, |
1785 | | proto_tree *tree, int offset, int subtype, int sublen) |
1786 | 1.06k | { |
1787 | 1.06k | uint16_t rt_block; |
1788 | 1.06k | proto_tree *rt_tree, *cap_tree, *subtree; |
1789 | 1.06k | proto_item *tree_item = NULL; |
1790 | 1.06k | uint16_t root_id; |
1791 | 1.06k | uint8_t tlv_type, tlv_len; |
1792 | 1.06k | int i; |
1793 | 1.06k | int local_offset, local_len; |
1794 | 1.06k | uint8_t flags; |
1795 | 1.06k | uint32_t max_delay; |
1796 | 1.06k | float bytes_per_sec; |
1797 | | |
1798 | 1.06k | switch (subtype) { |
1799 | | |
1800 | 35 | case ISIS_TE_NODE_CAP_DESC: |
1801 | | /* 1 TE Node Capability Descriptor [RFC5073] */ |
1802 | 35 | cap_tree = proto_tree_add_subtree(tree, tvb, offset-2, sublen+2, |
1803 | 35 | ett_isis_lsp_clv_te_node_cap_desc, NULL, "TE Node Capability Descriptor"); |
1804 | | /* |
1805 | | * 0 B bit: P2MP Branch LSR capability [RFC5073] |
1806 | | * 1 E bit: P2MP Bud LSR capability [RFC5073] |
1807 | | * 2 M bit: MPLS-TE support [RFC5073] |
1808 | | * 3 G bit: GMPLS support [RFC5073] |
1809 | | * 4 P bit: P2MP RSVP-TE support [RFC5073] |
1810 | | * 5-7 Unassigned [RFC5073] |
1811 | | */ |
1812 | | |
1813 | 35 | proto_tree_add_item(cap_tree, hf_isis_lsp_clv_te_node_cap_b_bit, tvb, offset, 1, ENC_NA); |
1814 | 35 | proto_tree_add_item(cap_tree, hf_isis_lsp_clv_te_node_cap_e_bit, tvb, offset, 1, ENC_NA); |
1815 | 35 | proto_tree_add_item(cap_tree, hf_isis_lsp_clv_te_node_cap_m_bit, tvb, offset, 1, ENC_NA); |
1816 | 35 | proto_tree_add_item(cap_tree, hf_isis_lsp_clv_te_node_cap_g_bit, tvb, offset, 1, ENC_NA); |
1817 | 35 | proto_tree_add_item(cap_tree, hf_isis_lsp_clv_te_node_cap_p_bit, tvb, offset, 1, ENC_NA); |
1818 | 35 | return 0; |
1819 | | |
1820 | 28 | case SEGMENT_ROUTING_CAP: |
1821 | 28 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, ett_isis_lsp_clv_sr_cap, |
1822 | 28 | NULL, "Segment Routing - Capability (t=%u, l=%u)", subtype, sublen); |
1823 | | |
1824 | | /* |
1825 | | * 0 I-Flag: IPv4 flag [draft-ietf-isis-segment-routing-extensions] |
1826 | | * 1 V-Flag: IPv6 flag [draft-ietf-isis-segment-routing-extensions] |
1827 | | * 2-7 Unassigned |
1828 | | */ |
1829 | | |
1830 | 28 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_sr_cap_i_flag, tvb, offset, 1, ENC_NA); |
1831 | 28 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_sr_cap_v_flag, tvb, offset, 1, ENC_NA); |
1832 | 28 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_sr_cap_range, tvb, offset+1, 3, ENC_BIG_ENDIAN); |
1833 | | |
1834 | 28 | tlv_type = tvb_get_uint8(tvb, offset+4); |
1835 | 28 | tlv_len = tvb_get_uint8(tvb, offset+5); |
1836 | 28 | if (tlv_type == ISIS_SR_SID_LABEL) { |
1837 | 10 | dissect_lsp_sr_sid_label_clv(tvb, pinfo, rt_tree, offset+6, tlv_len); |
1838 | 10 | } else |
1839 | 18 | proto_tree_add_expert_format(rt_tree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, offset+4, tlv_len+2, |
1840 | 18 | "Unknown SubTlv: Type: %d, Length: %d", tlv_type, tlv_len); |
1841 | | |
1842 | 28 | return 0; |
1843 | | |
1844 | 11 | case IPV6_TE_ROUTER_ID: |
1845 | | /* 12: IPv6 TE Router ID (rfc5316) */ |
1846 | 11 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1847 | 11 | ett_isis_lsp_clv_ipv6_te_rtrid, |
1848 | 11 | NULL, "IPv6 TE Router ID (t=%u, l=%u)", |
1849 | 11 | subtype, sublen); |
1850 | 11 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_ipv6_te_router_id, tvb, offset, 16, ENC_NA); |
1851 | 11 | return 0; |
1852 | | |
1853 | 12 | case TRILL_VERSION: |
1854 | 12 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1855 | 12 | ett_isis_lsp_clv_trill_version, NULL, "TRILL version (t=%u, l=%u)", subtype, sublen); |
1856 | | |
1857 | 12 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_trill_maximum_version, tvb, offset, 1, ENC_BIG_ENDIAN); |
1858 | | |
1859 | 12 | if ( sublen == 5 ) { |
1860 | 0 | offset++; |
1861 | 0 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_trill_affinity_tlv, tvb, offset, 4, ENC_BIG_ENDIAN); |
1862 | 0 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_trill_fgl_safe, tvb, offset, 4, ENC_BIG_ENDIAN); |
1863 | 0 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_trill_caps, tvb, offset, 4, ENC_BIG_ENDIAN); |
1864 | 0 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_trill_flags, tvb, offset, 4, ENC_BIG_ENDIAN); |
1865 | 0 | } |
1866 | | |
1867 | 12 | return 0; |
1868 | | |
1869 | 19 | case TREES: |
1870 | 19 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1871 | 19 | ett_isis_lsp_clv_trees, NULL, "Trees (t=%u, l=%u)", subtype, sublen); |
1872 | | |
1873 | 19 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_trees_nof_trees_to_compute, tvb, offset, 2, ENC_BIG_ENDIAN); |
1874 | 19 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_trees_maximum_nof_trees_to_compute, tvb, offset+2, 2, ENC_BIG_ENDIAN); |
1875 | 19 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_trees_nof_trees_to_use, tvb, offset+4, 2, ENC_BIG_ENDIAN); |
1876 | | |
1877 | 19 | return 0; |
1878 | | |
1879 | 27 | case TREE_IDENTIFIER: |
1880 | 27 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1881 | 27 | ett_isis_lsp_clv_root_id, NULL, "Tree root identifiers (t=%u, l=%u)", subtype, sublen); |
1882 | | |
1883 | 27 | root_id = tvb_get_ntohs(tvb, offset); |
1884 | 27 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_tree_root_id_starting_tree_no, tvb, offset, 2, ENC_BIG_ENDIAN); |
1885 | | |
1886 | 27 | sublen -= 2; |
1887 | 27 | offset += 2; |
1888 | | |
1889 | 252 | while (sublen>=2) { |
1890 | 225 | rt_block = tvb_get_ntohs(tvb, offset); |
1891 | 225 | proto_tree_add_uint_format(rt_tree, hf_isis_lsp_rt_capable_tree_root_id_nickname, tvb, offset, 2, |
1892 | 225 | rt_block, "Nickname(%dth root): 0x%04x (%d)", root_id, rt_block, rt_block); |
1893 | 225 | root_id++; |
1894 | 225 | sublen -= 2; |
1895 | 225 | offset += 2; |
1896 | 225 | } |
1897 | | |
1898 | 27 | return 0; |
1899 | | |
1900 | 40 | case NICKNAME: |
1901 | 40 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1902 | 40 | ett_isis_lsp_clv_nickname, NULL, "Nickname (t=%u, l=%u)", subtype, sublen); |
1903 | | |
1904 | 102 | while (sublen>=5) { |
1905 | 62 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_nickname_nickname_priority, tvb, offset, 1, ENC_BIG_ENDIAN); |
1906 | 62 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_nickname_tree_root_priority, tvb, offset+1, 2, ENC_BIG_ENDIAN); |
1907 | 62 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_nickname_nickname, tvb, offset+3, 2, ENC_BIG_ENDIAN); |
1908 | 62 | sublen -= 5; |
1909 | 62 | offset += 5; |
1910 | 62 | } |
1911 | | |
1912 | 40 | return 0; |
1913 | | |
1914 | 36 | case INTERESTED_VLANS: |
1915 | 36 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1916 | 36 | ett_isis_lsp_clv_interested_vlans, NULL, "Interested VLANs and spanning tree roots (t=%u, l=%u)", subtype, sublen); |
1917 | | |
1918 | 36 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_interested_vlans_nickname, tvb, offset, 2, ENC_BIG_ENDIAN); |
1919 | 36 | sublen -= 2; |
1920 | 36 | offset += 2; |
1921 | | |
1922 | 36 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_interested_vlans_multicast_ipv4, tvb, offset, 2, ENC_BIG_ENDIAN); |
1923 | 36 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_interested_vlans_multicast_ipv6, tvb, offset, 2, ENC_BIG_ENDIAN); |
1924 | 36 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_interested_vlans_vlan_start_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1925 | 36 | sublen -= 2; |
1926 | 36 | offset += 2; |
1927 | | |
1928 | 36 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_interested_vlans_vlan_end_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1929 | 36 | sublen -= 2; |
1930 | 36 | offset += 2; |
1931 | | |
1932 | 36 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_interested_vlans_afs_lost_counter, tvb, offset, 4, ENC_BIG_ENDIAN); |
1933 | 36 | sublen -= 4; |
1934 | 36 | offset += 4; |
1935 | | |
1936 | 52 | while (sublen>=6) { |
1937 | 16 | proto_tree_add_item(rt_tree, hf_isis_lsp_root_id, tvb, offset, 6, ENC_NA); |
1938 | 16 | sublen -= 6; |
1939 | 16 | offset += 6; |
1940 | 16 | } |
1941 | | |
1942 | 36 | return 0; |
1943 | | |
1944 | 3 | case TREES_USED_IDENTIFIER: |
1945 | 3 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1946 | 3 | ett_isis_lsp_clv_tree_used, NULL, "Trees used identifiers (t=%u, l=%u)", subtype, sublen); |
1947 | | |
1948 | 3 | root_id = tvb_get_ntohs(tvb, offset); |
1949 | 3 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_tree_used_id_starting_tree_no, tvb, offset, 2, ENC_BIG_ENDIAN); |
1950 | | |
1951 | 3 | sublen -= 2; |
1952 | 3 | offset += 2; |
1953 | | |
1954 | 23 | while (sublen>=2) { |
1955 | 20 | rt_block = tvb_get_ntohs(tvb, offset); |
1956 | 20 | proto_tree_add_uint_format(rt_tree, hf_isis_lsp_rt_capable_tree_used_id_nickname, tvb, offset,2, |
1957 | 20 | rt_block, "Nickname(%dth root): 0x%04x (%d)", root_id, rt_block, rt_block); |
1958 | 20 | root_id++; |
1959 | 20 | offset += 2; |
1960 | 20 | sublen -= 2; |
1961 | 20 | } |
1962 | | |
1963 | 3 | return 0; |
1964 | | |
1965 | 28 | case VLAN_GROUP: |
1966 | 28 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1967 | 28 | ett_isis_lsp_clv_vlan_group, NULL, "VLAN group (t=%u, l=%u)", subtype, sublen); |
1968 | | |
1969 | 28 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_vlan_group_primary_vlan_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1970 | | |
1971 | 28 | offset += 2; |
1972 | 28 | sublen -= 2; |
1973 | | |
1974 | 194 | while (sublen>=2) { |
1975 | | |
1976 | 166 | proto_tree_add_item(rt_tree, hf_isis_lsp_rt_capable_vlan_group_secondary_vlan_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1977 | 166 | sublen -= 2; |
1978 | 166 | offset += 2; |
1979 | 166 | } |
1980 | | |
1981 | 28 | return 0; |
1982 | | |
1983 | 7 | case SEGMENT_ROUTING_ALG: |
1984 | 7 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1985 | 7 | ett_isis_lsp_clv_sr_alg, NULL, "Segment Routing - Algorithms (t=%u, l=%u)", |
1986 | 7 | subtype, sublen); |
1987 | 7 | i = 0; |
1988 | 332 | while (i < sublen) { |
1989 | 325 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_sr_alg, tvb, offset+i, 1, ENC_NA); |
1990 | 325 | i++; |
1991 | 325 | } |
1992 | 7 | return 0; |
1993 | | |
1994 | 46 | case SEGMENT_ROUTING_LB: |
1995 | 46 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
1996 | 46 | ett_isis_lsp_clv_sr_lb, NULL, "Segment Routing - Local Block (t=%u, l=%u)", |
1997 | 46 | subtype, sublen); |
1998 | 46 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_sr_lb_flags, tvb, offset, 1, ENC_NA); |
1999 | 46 | offset += 1; |
2000 | 46 | sublen -= 1; |
2001 | 46 | i = 0; |
2002 | 185 | while (i < sublen) { |
2003 | 139 | local_offset = offset + i; |
2004 | 139 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_sr_cap_range, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
2005 | 139 | tlv_type = tvb_get_uint8(tvb, local_offset+3); |
2006 | 139 | tlv_len = tvb_get_uint8(tvb, local_offset+4); |
2007 | 139 | if (tlv_type == ISIS_SR_SID_LABEL) { |
2008 | 8 | dissect_lsp_sr_sid_label_clv(tvb, pinfo, rt_tree, local_offset+5, tlv_len); |
2009 | 131 | } else { |
2010 | 131 | proto_tree_add_expert_format(rt_tree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, local_offset+3, tlv_len+2, |
2011 | 131 | "Unknown Sub-TLV: Type: %d, Length: %d", tlv_type, tlv_len); |
2012 | 131 | } |
2013 | 139 | i += (5 + tlv_len); |
2014 | 139 | } |
2015 | 46 | return 0; |
2016 | | |
2017 | 1 | case SRV6_CAP: |
2018 | 1 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
2019 | 1 | ett_isis_lsp_clv_srv6_cap, |
2020 | 1 | NULL, "SRv6 Capability (t=%u, l=%u)", |
2021 | 1 | subtype, sublen); |
2022 | 1 | proto_tree_add_bitmask(rt_tree, tvb, offset, hf_isis_lsp_clv_srv6_cap_flags, |
2023 | 1 | ett_isis_lsp_clv_srv6_cap_flags, srv6_cap_flags, ENC_BIG_ENDIAN); |
2024 | 1 | return 0; |
2025 | | |
2026 | 10 | case NODE_MSD: |
2027 | 10 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
2028 | 10 | ett_isis_lsp_clv_node_msd, |
2029 | 10 | NULL, "Node Maximum SID Depth (t=%u, l=%u)", |
2030 | 10 | subtype, sublen); |
2031 | 145 | while (sublen >= 2) { |
2032 | 135 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_igp_msd_type, tvb, offset, 1, ENC_NA); |
2033 | 135 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_igp_msd_value, tvb, offset+1, 1, ENC_NA); |
2034 | 135 | sublen -= 2; |
2035 | 135 | offset += 2; |
2036 | 135 | } |
2037 | 10 | return 0; |
2038 | | |
2039 | 24 | case FLEX_ALGO_DEF: |
2040 | 24 | rt_tree = proto_tree_add_subtree_format(tree, tvb, offset-2, sublen+2, |
2041 | 24 | ett_isis_lsp_clv_flex_algo_def, |
2042 | 24 | NULL, "Flexible Algorithm Definition (t=%u, l=%u)", |
2043 | 24 | subtype, sublen); |
2044 | 24 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_flex_algo_algorithm, tvb, offset, 1, ENC_NA); |
2045 | 24 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_flex_algo_metric_type, tvb, offset+1, 1, ENC_NA); |
2046 | 24 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_flex_algo_calc_type, tvb, offset+2, 1, ENC_NA); |
2047 | 24 | proto_tree_add_item(rt_tree, hf_isis_lsp_clv_flex_algo_priority, tvb, offset+3, 1, ENC_NA); |
2048 | 24 | sublen -= 4; |
2049 | 24 | offset += 4; |
2050 | 183 | while (sublen >= 2) { |
2051 | 167 | tlv_type = tvb_get_uint8(tvb, offset); |
2052 | 167 | tlv_len = tvb_get_uint8(tvb, offset+1); |
2053 | 167 | sublen -= 2; |
2054 | 167 | offset += 2; |
2055 | 167 | subtree = proto_tree_add_subtree_format(rt_tree, tvb, offset-2, tlv_len+2, |
2056 | 167 | ett_isis_lsp_clv_flex_algo_def_sub_tlv, |
2057 | 167 | &tree_item, "%s (t=%u, l=%u)", |
2058 | 167 | val_to_str_const(tlv_type, isis_lsp_flex_algo_sub_tlv_vals, "Unknown"), |
2059 | 167 | tlv_type, tlv_len); |
2060 | 167 | switch (tlv_type) { |
2061 | 22 | case FAD_EXCLUDE_AG: |
2062 | 22 | case FAD_INCLUDE_ANY_AG: |
2063 | 44 | case FAD_INCLUDE_ALL_AG: |
2064 | 44 | dissect_subclv_ext_admin_group(tvb, subtree, offset, tlv_type, tlv_len); |
2065 | 44 | break; |
2066 | 4 | case FAD_DEF_FLAGS: |
2067 | 4 | flags = tvb_get_uint8(tvb, offset); |
2068 | 4 | proto_tree_add_item(subtree, hf_isis_lsp_clv_flex_algo_def_flags_m, tvb, offset, 1, ENC_NA); |
2069 | 4 | if (tree_item) { |
2070 | 3 | proto_item_append_text(tree_item, ": Flags:%c", |
2071 | 3 | ((flags & FAD_DEF_FLAGS_M) != 0) ? 'M' : '-'); |
2072 | 3 | } |
2073 | 4 | break; |
2074 | 5 | case FAD_EXCLUDE_SRLG: |
2075 | 5 | local_offset = offset; |
2076 | 5 | local_len = tlv_len; |
2077 | 9 | while (local_len >= 4) { |
2078 | 4 | proto_tree_add_item(subtree, hf_isis_lsp_clv_flex_algo_srlg_value, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
2079 | 4 | local_len -= 4; |
2080 | 4 | local_offset += 4; |
2081 | 4 | } |
2082 | 5 | break; |
2083 | 0 | case FAD_EXCLUDE_MIN_BANDWIDTH: |
2084 | 0 | bytes_per_sec = tvb_get_ntohieee_float(tvb, offset); |
2085 | 0 | proto_tree_add_float_format_value(subtree, hf_isis_lsp_clv_flex_algo_exclude_min_bandwidth, |
2086 | 0 | tvb, offset, 4, |
2087 | 0 | bytes_per_sec, "%.0f (%.3f Mbps)", |
2088 | 0 | bytes_per_sec, (double)bytes_per_sec*8/1000000); |
2089 | 0 | break; |
2090 | 5 | case FAD_EXCLUDE_MAX_DELAY: |
2091 | 5 | max_delay = tvb_get_uint24(tvb, offset, ENC_BIG_ENDIAN); |
2092 | 5 | proto_tree_add_uint_format_value(subtree, hf_isis_lsp_clv_flex_algo_exclude_max_delay, |
2093 | 5 | tvb, offset, 3, max_delay, "%u (usec)", max_delay); |
2094 | 5 | break; |
2095 | 0 | case FAD_REFERENCE_BANDWIDTH: |
2096 | 0 | proto_tree_add_bitmask(subtree, tvb, offset, hf_isis_lsp_clv_flex_algo_ref_bw_flags, |
2097 | 0 | ett_isis_lsp_clv_flex_algo_ref_bw_flags, isis_lsp_fad_ref_bw_flags, ENC_NA); |
2098 | 0 | bytes_per_sec = tvb_get_ntohieee_float(tvb, offset+1); |
2099 | 0 | proto_tree_add_float_format_value(subtree, hf_isis_lsp_clv_flex_algo_ref_bw_reference_bandwidth, |
2100 | 0 | tvb, offset+1, 4, |
2101 | 0 | bytes_per_sec, "%.0f (%.3f Mbps)", |
2102 | 0 | bytes_per_sec, (double)bytes_per_sec*8/1000000); |
2103 | 0 | bytes_per_sec = tvb_get_ntohieee_float(tvb, offset+5); |
2104 | 0 | proto_tree_add_float_format_value(subtree, hf_isis_lsp_clv_flex_algo_ref_bw_granularity_bandwidth, |
2105 | 0 | tvb, offset+5, 4, |
2106 | 0 | bytes_per_sec, "%.0f (%.3f Mbps)", |
2107 | 0 | bytes_per_sec, (double)bytes_per_sec*8/1000000); |
2108 | 0 | break; |
2109 | 106 | default: |
2110 | 106 | break; |
2111 | 167 | } |
2112 | 159 | sublen -= tlv_len; |
2113 | 159 | offset += tlv_len; |
2114 | 159 | } |
2115 | 16 | return 0; |
2116 | | |
2117 | 741 | default: |
2118 | 741 | return -1; |
2119 | 1.06k | } |
2120 | 1.06k | } |
2121 | | |
2122 | | /* |
2123 | | * Name: dissect_isis_rt_capable_clv() |
2124 | | * |
2125 | | * Description: Decode RouterCapability subTLVs |
2126 | | * |
2127 | | * The Router Capability TLV is composed of 1 octet for the type, |
2128 | | * 1 octet that specifies the number of bytes in the value field, and a |
2129 | | * variable length value field that can have any or all of the subTLVs |
2130 | | * that are listed in the below section |
2131 | | * |
2132 | | * Input: |
2133 | | * tvbuff_t * : tvbuffer for packet data |
2134 | | * proto_tree * : proto tree to build on (may be null) |
2135 | | * int : current offset into packet data |
2136 | | * int : length of IDs in packet. |
2137 | | * int : length of this clv |
2138 | | * len : local variable described to handle the length of the subTLV |
2139 | | * |
2140 | | * Output: |
2141 | | * void, will modify proto_tree if not null. |
2142 | | */ |
2143 | | |
2144 | | /* As per RFC 7176 section 2.3 */ |
2145 | | static void |
2146 | | dissect_isis_rt_capable_clv(tvbuff_t *tvb, packet_info* pinfo _U_, |
2147 | | proto_tree *tree, int offset, isis_data_t *isis _U_, int length) |
2148 | 68 | { |
2149 | 68 | uint8_t subtype, subtlvlen; |
2150 | | |
2151 | 68 | proto_tree_add_item(tree, hf_isis_lsp_rt_capable_router_id, tvb, offset, 4, ENC_BIG_ENDIAN); |
2152 | 68 | offset += 4; |
2153 | 68 | length -= 4; |
2154 | 68 | proto_tree_add_item(tree, hf_isis_lsp_rt_capable_flag_s, tvb, offset, 1, ENC_BIG_ENDIAN); |
2155 | 68 | proto_tree_add_item(tree, hf_isis_lsp_rt_capable_flag_d, tvb, offset, 1, ENC_BIG_ENDIAN); |
2156 | 68 | length -= 1; |
2157 | 68 | offset += 1; |
2158 | | |
2159 | 666 | while (length>=2) { |
2160 | 625 | subtype = tvb_get_uint8(tvb, offset); |
2161 | 625 | subtlvlen = tvb_get_uint8(tvb, offset+1); |
2162 | 625 | length -= 2; |
2163 | 625 | offset += 2; |
2164 | | |
2165 | 625 | if (subtlvlen > length) { |
2166 | 27 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset-2, |
2167 | 27 | "Short type %d TLV (%d vs %d)", subtype, subtlvlen, length); |
2168 | 27 | return; |
2169 | 27 | } |
2170 | | |
2171 | 598 | if (dissect_isis_trill_clv(tvb, pinfo, tree, offset, subtype, subtlvlen)==-1) { |
2172 | | |
2173 | 348 | proto_tree_add_expert_format( tree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, offset-2, subtlvlen+2, |
2174 | 348 | "Unknown SubTlv: Type: %d, Length: %d", subtype, subtlvlen); |
2175 | 348 | } |
2176 | 598 | length -= subtlvlen; |
2177 | 598 | offset += subtlvlen; |
2178 | 598 | } |
2179 | 68 | } |
2180 | | |
2181 | | /* |
2182 | | * Name: dissect_lsp_ipv6_reachability_clv() |
2183 | | * |
2184 | | * Description: Decode an IPv6 reachability CLV - code 236. |
2185 | | * |
2186 | | * CALLED BY TLV 237 DISSECTOR |
2187 | | * |
2188 | | * Input: |
2189 | | * tvbuff_t * : tvbuffer for packet data |
2190 | | * proto_tree * : proto tree to build on (may be null) |
2191 | | * int : current offset into packet data |
2192 | | * int : length of IDs in packet. |
2193 | | * int : length of this clv |
2194 | | * |
2195 | | * Output: |
2196 | | * void, will modify proto_tree if not null. |
2197 | | */ |
2198 | | static void |
2199 | | dissect_lsp_ipv6_reachability_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
2200 | | isis_data_t *isis _U_, int length) |
2201 | 72 | { |
2202 | 72 | proto_tree *subtree = NULL; |
2203 | 72 | proto_tree *subtree2 = NULL; |
2204 | 72 | proto_item *ti_subtree = NULL; |
2205 | 72 | proto_item *ti_subclvs = NULL; |
2206 | 72 | uint8_t ctrl_info; |
2207 | 72 | unsigned bit_length; |
2208 | 72 | int byte_length; |
2209 | 72 | ws_in6_addr prefix; |
2210 | 72 | address prefix_addr; |
2211 | 72 | unsigned len,i; |
2212 | 72 | unsigned subclvs_len; |
2213 | 72 | unsigned clv_code, clv_len; |
2214 | 72 | int clv_offset; |
2215 | 72 | char *prefix_str; |
2216 | | |
2217 | 72 | if (!tree) return; |
2218 | | |
2219 | 523 | while (length > 0) { |
2220 | 467 | ctrl_info = tvb_get_uint8(tvb, offset+4); |
2221 | 467 | bit_length = tvb_get_uint8(tvb, offset+5); |
2222 | 467 | byte_length = tvb_get_ipv6_addr_with_prefix_len(tvb, offset+6, &prefix, bit_length); |
2223 | 467 | if (byte_length == -1) { |
2224 | 16 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
2225 | 16 | "IPv6 prefix has an invalid length: %d bits", bit_length ); |
2226 | 16 | return; |
2227 | 16 | } |
2228 | 451 | subclvs_len = 0; |
2229 | 451 | if ((ctrl_info & 0x20) != 0) |
2230 | 87 | subclvs_len = 1+tvb_get_uint8(tvb, offset+6+byte_length); |
2231 | | |
2232 | 451 | subtree = proto_tree_add_subtree(tree, tvb, offset, 6+byte_length+subclvs_len, |
2233 | 451 | ett_isis_lsp_part_of_clv_ipv6_reachability, &ti_subtree, "IPv6 Reachability"); |
2234 | | |
2235 | 451 | set_address(&prefix_addr, AT_IPv6, 16, prefix.bytes); |
2236 | 451 | prefix_str = address_to_str(pinfo->pool, &prefix_addr); |
2237 | 451 | proto_item_append_text(ti_subtree, ": %s/%u", prefix_str, bit_length); |
2238 | | |
2239 | 451 | proto_tree_add_item(subtree, hf_isis_lsp_ipv6_reachability_metric, tvb, offset, 4, ENC_BIG_ENDIAN); |
2240 | 451 | proto_tree_add_item(subtree, hf_isis_lsp_ipv6_reachability_distribution, tvb, offset+4, 1, ENC_NA); |
2241 | 451 | proto_tree_add_item(subtree, hf_isis_lsp_ipv6_reachability_distribution_internal, tvb, offset+4, 1, ENC_NA); |
2242 | 451 | proto_tree_add_item(subtree, hf_isis_lsp_ipv6_reachability_subtlv, tvb, offset+4, 1, ENC_NA); |
2243 | | |
2244 | 451 | if ((ctrl_info & 0x1f) != 0) { |
2245 | 210 | proto_tree_add_item(subtree, hf_isis_lsp_ipv6_reachability_reserved_bits, tvb, offset+4, 1, ENC_BIG_ENDIAN); |
2246 | 210 | } |
2247 | 451 | proto_tree_add_item(subtree, hf_isis_lsp_ipv6_reachability_prefix_length, tvb, offset+5, 1, ENC_NA); |
2248 | 451 | proto_tree_add_ipv6_format_value(subtree, hf_isis_lsp_ipv6_reachability_ipv6_prefix, tvb, offset+6, byte_length, |
2249 | 451 | &prefix, "%s", prefix_str); |
2250 | | |
2251 | 451 | len = 6 + byte_length; |
2252 | 451 | if ((ctrl_info & 0x20) != 0) { |
2253 | 87 | proto_tree_add_item_ret_uint(subtree, hf_isis_lsp_ipv6_reachability_subclvs_len, tvb, offset+len, 1, ENC_BIG_ENDIAN, &subclvs_len); |
2254 | | |
2255 | 87 | i =0; |
2256 | 453 | while (i < subclvs_len) { |
2257 | 366 | clv_offset = offset + len + 1 + i; /* skip the total subtlv len indicator */ |
2258 | 366 | clv_code = tvb_get_uint8(tvb, clv_offset); |
2259 | 366 | clv_len = tvb_get_uint8(tvb, clv_offset+ 1); |
2260 | 366 | subtree2 = proto_tree_add_subtree_format(subtree, tvb, clv_offset, clv_len + 2, |
2261 | 366 | ett_isis_lsp_clv_ip_reach_subclv, |
2262 | 366 | &ti_subclvs, "subTLV"); |
2263 | 366 | proto_tree_add_item(subtree2, hf_isis_lsp_ext_ip_reachability_code, |
2264 | 366 | tvb, clv_offset, 1, ENC_BIG_ENDIAN); |
2265 | 366 | proto_tree_add_item(subtree2, hf_isis_lsp_ext_ip_reachability_len, |
2266 | 366 | tvb, clv_offset+1, 1, ENC_BIG_ENDIAN); |
2267 | 366 | proto_item_append_text(ti_subclvs, ": %s (c=%u, l=%u)", |
2268 | 366 | val_to_str_const(clv_code, isis_lsp_ext_ip_reachability_code_vals, "Unknown"), |
2269 | 366 | clv_code, clv_len); |
2270 | | |
2271 | 366 | dissect_ipreach_subclv(tvb, pinfo, subtree2, ti_subclvs, clv_offset+2, clv_code, clv_len); |
2272 | 366 | i += clv_len + 2; |
2273 | 366 | } |
2274 | 87 | len += 1 + subclvs_len; |
2275 | 364 | } else { |
2276 | 364 | proto_tree_add_uint_format(subtree, hf_isis_lsp_ext_ip_reachability_subclvs_len, tvb, offset, len, 0, "no sub-TLVs present"); |
2277 | 364 | } |
2278 | 451 | offset += len; |
2279 | 451 | length -= len; |
2280 | 451 | } |
2281 | 72 | } |
2282 | | |
2283 | | /* |
2284 | | * Name: dissect_lsp_nlpid_clv() |
2285 | | * |
2286 | | * Description: |
2287 | | * Decode for a lsp packets NLPID clv. Calls into the |
2288 | | * clv common one. |
2289 | | * |
2290 | | * Input: |
2291 | | * tvbuff_t * : tvbuffer for packet data |
2292 | | * proto_tree * : proto tree to build on (may be null) |
2293 | | * int : current offset into packet data |
2294 | | * int : length of IDs in packet. |
2295 | | * int : length of this clv |
2296 | | * |
2297 | | * Output: |
2298 | | * void, will modify proto_tree if not null. |
2299 | | */ |
2300 | | static void |
2301 | | dissect_lsp_nlpid_clv(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree, int offset, |
2302 | | isis_data_t *isis _U_, int length) |
2303 | 43 | { |
2304 | 43 | isis_dissect_nlpid_clv(tvb, tree, ett_isis_lsp_clv_nlpid_nlpid, hf_isis_lsp_clv_nlpid_nlpid, offset, length); |
2305 | 43 | } |
2306 | | |
2307 | | /* |
2308 | | * Name: dissect_lsp_mt_clv() |
2309 | | * |
2310 | | * Description: - code 229 |
2311 | | * Decode for a lsp packets Multi Topology clv. Calls into the |
2312 | | * clv common one. |
2313 | | * |
2314 | | * Input: |
2315 | | * tvbuff_t * : tvbuffer for packet data |
2316 | | * proto_tree * : proto tree to build on (may be null) |
2317 | | * int : current offset into packet data |
2318 | | * unsigned : length of this clv |
2319 | | * int : length of IDs in packet. |
2320 | | * |
2321 | | * Output: |
2322 | | * void, will modify proto_tree if not null. |
2323 | | */ |
2324 | | static void |
2325 | | dissect_lsp_mt_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
2326 | | isis_data_t *isis _U_, int length) |
2327 | 16 | { |
2328 | 16 | isis_dissect_mt_clv(tvb, pinfo, tree, offset, length, hf_isis_lsp_clv_mt, &ei_isis_lsp_clv_mt ); |
2329 | 16 | } |
2330 | | |
2331 | | /* |
2332 | | * Name: dissect_lsp_hostname_clv() |
2333 | | * |
2334 | | * Description: |
2335 | | * Decode for a lsp packets hostname clv. Calls into the |
2336 | | * clv common one. |
2337 | | * |
2338 | | * Input: |
2339 | | * tvbuff_t * : tvbuffer for packet data |
2340 | | * proto_tree * : proto tree to build on (may be null) |
2341 | | * int : current offset into packet data |
2342 | | * int : length of IDs in packet. |
2343 | | * int : length of this clv |
2344 | | * |
2345 | | * Output: |
2346 | | * void, will modify proto_tree if not null. |
2347 | | */ |
2348 | | static void |
2349 | | dissect_lsp_hostname_clv(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree, int offset, |
2350 | | isis_data_t *isis _U_, int length) |
2351 | 28 | { |
2352 | 28 | isis_dissect_hostname_clv(tvb, tree, offset, length, |
2353 | 28 | hf_isis_lsp_hostname); |
2354 | 28 | } |
2355 | | |
2356 | | /* |
2357 | | * Name: dissect_lsp_srlg_clv() |
2358 | | * |
2359 | | * Description: |
2360 | | * Decode for a lsp packets Shared Risk Link Group (SRLG) clv (138). Calls into the |
2361 | | * clv common one. |
2362 | | * |
2363 | | * Input: |
2364 | | * tvbuff_t * : tvbuffer for packet data |
2365 | | * proto_tree * : proto tree to build on (may be null) |
2366 | | * int : current offset into packet data |
2367 | | * int : length of IDs in packet. |
2368 | | * int : length of this clv |
2369 | | * |
2370 | | * Output: |
2371 | | * void, will modify proto_tree if not null. |
2372 | | */ |
2373 | | static void |
2374 | | dissect_lsp_srlg_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
2375 | | isis_data_t *isis _U_, int length) |
2376 | 18 | { |
2377 | 18 | if (length < 16) { |
2378 | 2 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, length, |
2379 | 2 | "Short SRLG TLV (%d vs 16)", length); |
2380 | 2 | return; |
2381 | 2 | } |
2382 | | |
2383 | 16 | proto_tree_add_item(tree, hf_isis_lsp_srlg_system_id, tvb, offset, 6, ENC_NA); |
2384 | 16 | offset += 6; |
2385 | | |
2386 | 16 | proto_tree_add_item(tree, hf_isis_lsp_srlg_pseudo_num, tvb, offset, 1, ENC_BIG_ENDIAN); |
2387 | 16 | offset += 1; |
2388 | | |
2389 | 16 | proto_tree_add_item(tree, hf_isis_lsp_srlg_flags_numbered, tvb, offset, 1, ENC_BIG_ENDIAN); |
2390 | 16 | offset += 1; |
2391 | | |
2392 | 16 | proto_tree_add_item(tree, hf_isis_lsp_srlg_ipv4_local, tvb, offset, 4, ENC_BIG_ENDIAN); |
2393 | 16 | offset += 4; |
2394 | | |
2395 | 16 | proto_tree_add_item(tree, hf_isis_lsp_srlg_ipv4_remote, tvb, offset, 4, ENC_BIG_ENDIAN); |
2396 | 16 | offset += 4; |
2397 | | |
2398 | 16 | length -= 16; |
2399 | 296 | while(length >= 4){ |
2400 | 280 | proto_tree_add_item(tree, hf_isis_lsp_srlg_value, tvb, offset, 4, ENC_BIG_ENDIAN); |
2401 | 280 | offset += 4; |
2402 | 280 | length -= 4; |
2403 | 280 | } |
2404 | 16 | } |
2405 | | |
2406 | | |
2407 | | /* |
2408 | | * Name: dissect_lsp_appspec_srlg_clv() |
2409 | | * |
2410 | | * Description: |
2411 | | * Decode for a lsp packets Application-Specific SRLG clv (238). Calls into the |
2412 | | * clv common one. |
2413 | | * |
2414 | | * Input: |
2415 | | * tvbuff_t * : tvbuffer for packet data |
2416 | | * proto_tree * : proto tree to build on (may be null) |
2417 | | * int : current offset into packet data |
2418 | | * int : length of IDs in packet. |
2419 | | * int : length of this clv |
2420 | | * |
2421 | | * Output: |
2422 | | * void, will modify proto_tree if not null. |
2423 | | */ |
2424 | | static void |
2425 | | dissect_lsp_appspec_srlg_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
2426 | | isis_data_t *isis _U_, int length) |
2427 | 56 | { |
2428 | 56 | proto_tree *subtree; |
2429 | 56 | proto_item *tree_item = NULL; |
2430 | 56 | uint8_t sabm_length = 0, udabm_length = 0; |
2431 | 56 | int sabm_length_offset, udabm_length_offset; |
2432 | 56 | int local_offset, local_len; |
2433 | 56 | uint8_t sub_tlv_len = 0; |
2434 | 56 | uint8_t tlv_type, tlv_len; |
2435 | | |
2436 | 56 | if (length < 10) { |
2437 | 6 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, length, |
2438 | 6 | "Too short Application-Specific SRLG TLV length (%d vs min 10)", length); |
2439 | 6 | return; |
2440 | 6 | } |
2441 | | |
2442 | 50 | proto_tree_add_item(tree, hf_isis_lsp_appspec_srlg_system_id, tvb, offset, 6, ENC_NA); |
2443 | 50 | offset += 6; |
2444 | 50 | length -= 6; |
2445 | | |
2446 | 50 | proto_tree_add_item(tree, hf_isis_lsp_appspec_srlg_pseudo_num, tvb, offset, 1, ENC_BIG_ENDIAN); |
2447 | 50 | offset += 1; |
2448 | 50 | length -= 1; |
2449 | | |
2450 | 50 | proto_tree_add_item(tree, hf_isis_lsp_clv_app_sabm_legacy, tvb, offset, 1, ENC_NA); |
2451 | 50 | sabm_length = tvb_get_uint8(tvb, offset) & 0x7f; |
2452 | 50 | sabm_length_offset = offset; |
2453 | 50 | proto_tree_add_uint(tree, hf_isis_lsp_clv_app_sabm_length, tvb, offset, 1, sabm_length); |
2454 | 50 | offset += 1; |
2455 | 50 | length -= 1; |
2456 | | |
2457 | 50 | proto_tree_add_item(tree, hf_isis_lsp_clv_app_udabm_reserved, tvb, offset, 1, ENC_NA); |
2458 | 50 | udabm_length = tvb_get_uint8(tvb, offset) & 0x7f; |
2459 | 50 | udabm_length_offset = offset; |
2460 | 50 | proto_tree_add_uint(tree, hf_isis_lsp_clv_app_udabm_length, tvb, offset, 1, udabm_length); |
2461 | 50 | offset += 1; |
2462 | 50 | length -= 1; |
2463 | | |
2464 | 50 | if (sabm_length > 0) { |
2465 | 26 | if (sabm_length > 8 || sabm_length > length) { |
2466 | 18 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, sabm_length_offset, 1, |
2467 | 18 | "Invalid SABM length (%u vs %d bytes left)", |
2468 | 18 | sabm_length, length); |
2469 | 18 | return; |
2470 | 18 | } |
2471 | 8 | proto_tree_add_bitmask(tree, tvb, offset, hf_isis_lsp_clv_app_sabm_bits, |
2472 | 8 | ett_isis_lsp_clv_app_sabm_bits, isis_lsp_app_sabm_bits, ENC_NA); |
2473 | 8 | offset += sabm_length; |
2474 | 8 | length -= sabm_length; |
2475 | 8 | } |
2476 | 32 | if (udabm_length > 0) { |
2477 | 8 | if (udabm_length > 8 || udabm_length > length) { |
2478 | 5 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, udabm_length_offset, 1, |
2479 | 5 | "Invalid UDABM length (%u vs %d bytes left)", |
2480 | 5 | udabm_length, length); |
2481 | 5 | return; |
2482 | 5 | } |
2483 | 3 | proto_tree_add_item(tree, hf_isis_lsp_clv_app_udabm_bits, tvb, offset, udabm_length, ENC_NA); |
2484 | 3 | offset += udabm_length; |
2485 | 3 | length -= udabm_length; |
2486 | 3 | } |
2487 | | |
2488 | 27 | proto_tree_add_item_ret_uint8(tree, hf_isis_lsp_appspec_srlg_sub_tlv_length, tvb, offset, 1, ENC_NA, &sub_tlv_len); |
2489 | 27 | if (sub_tlv_len > length) { |
2490 | 7 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, 1, |
2491 | 7 | "Invalid Application-Specific SRLG sub-TLV length (%u vs %d bytes left)", |
2492 | 7 | sub_tlv_len, length); |
2493 | 7 | return; |
2494 | 7 | } |
2495 | 20 | offset += 1; |
2496 | 20 | length -= 1; |
2497 | | |
2498 | 20 | local_offset = offset; |
2499 | 20 | local_len = sub_tlv_len; |
2500 | 94 | while (local_len >= 2) { |
2501 | 76 | tlv_type = tvb_get_uint8(tvb, local_offset); |
2502 | 76 | tlv_len = tvb_get_uint8(tvb, local_offset + 1); |
2503 | 76 | subtree = proto_tree_add_subtree_format(tree, tvb, local_offset, tlv_len+2, |
2504 | 76 | ett_isis_lsp_clv_appspec_srlg_subtlv, |
2505 | 76 | &tree_item, "%s (t=%u, l=%u)", |
2506 | 76 | val_to_str_const(tlv_type, isis_lsp_appspec_srlg_sub_tlv_vals, "Unknown"), |
2507 | 76 | tlv_type, tlv_len); |
2508 | 76 | local_offset += 2; |
2509 | 76 | local_len -= 2; |
2510 | 76 | switch (tlv_type) { |
2511 | 12 | case 4: |
2512 | | /* Link Local/Remote Identifiers */ |
2513 | 12 | proto_tree_add_item(subtree, hf_isis_lsp_appspec_srlg_link_local_id, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
2514 | 12 | proto_tree_add_item(subtree, hf_isis_lsp_appspec_srlg_link_remote_id, tvb, local_offset+4, 4, ENC_BIG_ENDIAN); |
2515 | 12 | break; |
2516 | 64 | default: |
2517 | 64 | proto_tree_add_expert_format(subtree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, local_offset-2, tlv_len+2, |
2518 | 64 | "Unknown Application-Specific SRLG subTLV (%u)", tlv_type); |
2519 | 64 | break; |
2520 | 76 | } |
2521 | 74 | local_offset += tlv_len; |
2522 | 74 | local_len -= tlv_len; |
2523 | 74 | } |
2524 | | |
2525 | 18 | local_offset = offset + sub_tlv_len; |
2526 | 18 | local_len = length - sub_tlv_len; |
2527 | 255 | while (local_len >= 4) { |
2528 | 237 | proto_tree_add_item(tree, hf_isis_lsp_appspec_srlg_value, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
2529 | 237 | local_offset += 4; |
2530 | 237 | local_len -= 4; |
2531 | 237 | } |
2532 | 18 | } |
2533 | | |
2534 | | |
2535 | | /* |
2536 | | * Name: dissect_lsp_te_router_id_clv() |
2537 | | * |
2538 | | * Description: |
2539 | | * Decode for a lsp packets Traffic Engineering ID clv. Calls into the |
2540 | | * clv common one. |
2541 | | * |
2542 | | * Input: |
2543 | | * tvbuff_t * : tvbuffer for packet data |
2544 | | * proto_tree * : proto tree to build on (may be null) |
2545 | | * int : current offset into packet data |
2546 | | * int : length of IDs in packet. |
2547 | | * int : length of this clv |
2548 | | * |
2549 | | * Output: |
2550 | | * void, will modify proto_tree if not null. |
2551 | | */ |
2552 | | static void |
2553 | | dissect_lsp_te_router_id_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
2554 | | isis_data_t *isis _U_, int length) |
2555 | 29 | { |
2556 | 29 | isis_dissect_te_router_id_clv(tree, pinfo, tvb, &ei_isis_lsp_short_clv, offset, length, |
2557 | 29 | hf_isis_lsp_clv_te_router_id ); |
2558 | 29 | } |
2559 | | |
2560 | | |
2561 | | /* |
2562 | | * Name: dissect_lsp_ip_int_addr_clv() |
2563 | | * |
2564 | | * Description: |
2565 | | * Decode for a lsp packets ip interface addr clv. Calls into the |
2566 | | * clv common one. |
2567 | | * |
2568 | | * Input: |
2569 | | * tvbuff_t * : tvbuffer for packet data |
2570 | | * proto_tree * : proto tree to build on (may be null) |
2571 | | * int : current offset into packet data |
2572 | | * int : length of IDs in packet. |
2573 | | * int : length of this clv |
2574 | | * |
2575 | | * Output: |
2576 | | * void, will modify proto_tree if not null. |
2577 | | */ |
2578 | | static void |
2579 | | dissect_lsp_ip_int_addr_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
2580 | | isis_data_t *isis _U_, int length) |
2581 | 40 | { |
2582 | 40 | isis_dissect_ip_int_clv(tree, pinfo, tvb, &ei_isis_lsp_short_clv, offset, length, |
2583 | 40 | hf_isis_lsp_clv_ipv4_int_addr ); |
2584 | 40 | } |
2585 | | |
2586 | | /* |
2587 | | * Name: dissect_lsp_ipv6_int_addr_clv() |
2588 | | * |
2589 | | * Description: Decode an IPv6 interface addr CLV - code 232. |
2590 | | * |
2591 | | * Calls into the clv common one. |
2592 | | * |
2593 | | * Input: |
2594 | | * tvbuff_t * : tvbuffer for packet data |
2595 | | * proto_tree * : proto tree to build on (may be null) |
2596 | | * int : current offset into packet data |
2597 | | * int : length of IDs in packet. |
2598 | | * int : length of this clv |
2599 | | * |
2600 | | * Output: |
2601 | | * void, will modify proto_tree if not null. |
2602 | | */ |
2603 | | static void |
2604 | | dissect_lsp_ipv6_int_addr_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
2605 | | isis_data_t *isis _U_, int length) |
2606 | 18 | { |
2607 | 18 | isis_dissect_ipv6_int_clv(tree, pinfo, tvb, &ei_isis_lsp_short_clv, offset, length, |
2608 | 18 | hf_isis_lsp_clv_ipv6_int_addr ); |
2609 | 18 | } |
2610 | | |
2611 | | static void |
2612 | | dissect_isis_lsp_clv_mt_cap_spb_instance(tvbuff_t *tvb, packet_info *pinfo, |
2613 | | proto_tree *tree, int offset, int subtype, int sublen) |
2614 | 81 | { |
2615 | 81 | const int CIST_ROOT_ID_LEN = 8; /* CIST Root Identifier */ |
2616 | 81 | const int CIST_EXT_ROOT_PATH_COST_LEN = 4; /* CIST External Root Path Cost */ |
2617 | 81 | const int BRIDGE_PRI_LEN = 2; /* Bridge Priority */ |
2618 | 81 | const int V_SPSOURCEID_LEN = 4; /* v | SPSourceID */ |
2619 | 81 | const int NUM_TREES_LEN = 1; /* num of trees */ |
2620 | | |
2621 | 81 | const int CIST_ROOT_ID_OFFSET = 0; |
2622 | 81 | const int CIST_EXT_ROOT_PATH_COST_OFFSET = CIST_ROOT_ID_OFFSET + CIST_ROOT_ID_LEN; |
2623 | 81 | const int BRIDGE_PRI_OFFSET = CIST_EXT_ROOT_PATH_COST_OFFSET + CIST_EXT_ROOT_PATH_COST_LEN; |
2624 | 81 | const int V_SPSOURCEID_OFFSET = BRIDGE_PRI_OFFSET + BRIDGE_PRI_LEN; |
2625 | 81 | const int NUM_TREES_OFFSET = V_SPSOURCEID_OFFSET + V_SPSOURCEID_LEN; |
2626 | 81 | const int FIXED_LEN = NUM_TREES_OFFSET + NUM_TREES_LEN; |
2627 | 81 | const int VLAN_ID_TUPLE_LEN = 8; |
2628 | | |
2629 | 81 | static int * const lsp_cap_spb_instance_vlanid_tuple[] = { |
2630 | 81 | &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_u, |
2631 | 81 | &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_m, |
2632 | 81 | &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_a, |
2633 | 81 | &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_reserved, |
2634 | 81 | NULL |
2635 | 81 | }; |
2636 | | |
2637 | 81 | if (sublen < FIXED_LEN) { |
2638 | 75 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
2639 | 75 | "Short SPB Digest subTLV (%d vs %d)", sublen, FIXED_LEN); |
2640 | 75 | return; |
2641 | 75 | } |
2642 | 6 | else { |
2643 | 6 | proto_tree *subtree, *ti; |
2644 | 6 | int subofs = offset; |
2645 | 6 | uint8_t num_trees = tvb_get_uint8(tvb, subofs + NUM_TREES_OFFSET); |
2646 | | |
2647 | | /*************************/ |
2648 | 6 | subtree = proto_tree_add_subtree_format( tree, tvb, offset-2, sublen+2, ett_isis_lsp_clv_mt_cap_spb_instance, NULL, |
2649 | 6 | "SPB Instance: Type: 0x%02x, Length: %d", subtype, sublen); |
2650 | | |
2651 | | /*************************/ |
2652 | 6 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spb_instance_cist_root_identifier, tvb, subofs + CIST_ROOT_ID_OFFSET, CIST_ROOT_ID_LEN, ENC_NA); |
2653 | 6 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spb_instance_cist_external_root_path_cost, tvb, subofs + CIST_EXT_ROOT_PATH_COST_OFFSET, CIST_EXT_ROOT_PATH_COST_LEN, ENC_BIG_ENDIAN); |
2654 | 6 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spb_instance_bridge_priority, tvb, subofs + BRIDGE_PRI_OFFSET, BRIDGE_PRI_LEN, ENC_BIG_ENDIAN); |
2655 | | |
2656 | 6 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spb_instance_v, tvb, subofs + V_SPSOURCEID_OFFSET, V_SPSOURCEID_LEN, ENC_BIG_ENDIAN); |
2657 | | |
2658 | 6 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spsourceid, tvb, subofs + V_SPSOURCEID_OFFSET, V_SPSOURCEID_LEN, ENC_BIG_ENDIAN); |
2659 | 6 | ti = proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spb_instance_number_of_trees, tvb, subofs + NUM_TREES_OFFSET, NUM_TREES_LEN, ENC_BIG_ENDIAN); |
2660 | 6 | if (num_trees == 0) |
2661 | 1 | proto_item_append_text(ti, " Invalid subTLV: zero trees"); |
2662 | | |
2663 | 6 | subofs += FIXED_LEN; |
2664 | 6 | sublen -= FIXED_LEN; |
2665 | | |
2666 | | /*************************/ |
2667 | 6 | if (sublen != (num_trees * VLAN_ID_TUPLE_LEN)) { |
2668 | 5 | proto_tree_add_expert_format( subtree, pinfo, &ei_isis_lsp_short_clv, tvb, subofs, 0, "SubTLV length doesn't match number of trees"); |
2669 | 5 | return; |
2670 | 5 | } |
2671 | 1 | while (sublen > 0 && num_trees > 0) { |
2672 | 0 | if (sublen < VLAN_ID_TUPLE_LEN) { |
2673 | 0 | proto_tree_add_expert_format_remaining(subtree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
2674 | 0 | "Short VLAN_ID entry (%d vs %d)", sublen, VLAN_ID_TUPLE_LEN); |
2675 | 0 | return; |
2676 | 0 | } |
2677 | 0 | else { |
2678 | 0 | proto_tree_add_bitmask_list(subtree, tvb, subofs, 1, lsp_cap_spb_instance_vlanid_tuple, ENC_BIG_ENDIAN); |
2679 | 0 | subofs += 1; |
2680 | |
|
2681 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_ect, tvb, subofs, 4, ENC_BIG_ENDIAN); |
2682 | 0 | subofs += 4; |
2683 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_base_vid, tvb, subofs, 3, ENC_BIG_ENDIAN); |
2684 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_spvid, tvb, subofs, 3, ENC_BIG_ENDIAN); |
2685 | 0 | subofs += 3; |
2686 | |
|
2687 | 0 | sublen -= VLAN_ID_TUPLE_LEN; |
2688 | 0 | --num_trees; |
2689 | 0 | } |
2690 | 0 | } |
2691 | 1 | if (num_trees) { |
2692 | 0 | proto_tree_add_expert_format_remaining(subtree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
2693 | 0 | "Short subTLV (%d vs %d)", sublen, num_trees * VLAN_ID_TUPLE_LEN); |
2694 | 0 | return; |
2695 | 0 | } |
2696 | 1 | } |
2697 | 81 | } |
2698 | | static void |
2699 | | dissect_isis_lsp_clv_mt_cap_spb_oalg(tvbuff_t *tvb, |
2700 | | proto_tree *tree, int offset, int subtype _U_, int sublen _U_) |
2701 | 84 | { |
2702 | | |
2703 | 84 | proto_tree_add_item(tree, hf_isis_lsp_mt_cap_spb_opaque_algorithm, tvb, offset, 4, ENC_BIG_ENDIAN); |
2704 | 84 | offset += 4; |
2705 | 84 | proto_tree_add_item(tree, hf_isis_lsp_mt_cap_spb_opaque_information, tvb, offset, -1, ENC_NA); |
2706 | | |
2707 | 84 | } |
2708 | | static void |
2709 | | dissect_isis_lsp_clv_mt_cap_spbm_service_identifier(tvbuff_t *tvb, packet_info *pinfo, |
2710 | | proto_tree *tree, int offset, int subtype, int sublen) |
2711 | 64 | { |
2712 | 64 | const int BMAC_LEN = 6; /* B-MAC Address */ |
2713 | 64 | const int BVID_LEN = 2; /* Base-VID */ |
2714 | | |
2715 | 64 | const int BMAC_OFFSET = 0; |
2716 | 64 | const int BVID_OFFSET = BMAC_OFFSET + BMAC_LEN; |
2717 | 64 | const int FIXED_LEN = BVID_OFFSET + BVID_LEN; |
2718 | | |
2719 | 64 | const int ISID_LEN = 4; |
2720 | | |
2721 | 64 | static int * const lsp_cap_spbm_service_identifier[] = { |
2722 | 64 | &hf_isis_lsp_mt_cap_spbm_service_identifier_t, |
2723 | 64 | &hf_isis_lsp_mt_cap_spbm_service_identifier_r, |
2724 | 64 | &hf_isis_lsp_mt_cap_spbm_service_identifier_reserved, |
2725 | 64 | NULL |
2726 | 64 | }; |
2727 | | |
2728 | 64 | if (sublen < FIXED_LEN) { |
2729 | 55 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
2730 | 55 | "Short SPBM Service Identifier and Unicast Address subTLV (%d vs %d)", sublen, FIXED_LEN); |
2731 | 55 | return; |
2732 | 55 | } |
2733 | 9 | else { |
2734 | 9 | proto_tree *subtree; |
2735 | 9 | int subofs = offset; |
2736 | | |
2737 | | /*************************/ |
2738 | 9 | subtree = proto_tree_add_subtree_format( tree, tvb, offset-2, sublen+2, ett_isis_lsp_clv_mt_cap_spbm_service_identifier, NULL, |
2739 | 9 | "SPB Service ID and Unicast Address: Type: 0x%02x, Length: %d", subtype, sublen); |
2740 | | |
2741 | | /*************************/ |
2742 | 9 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spbm_service_identifier_b_mac, tvb, subofs + BMAC_OFFSET, BMAC_LEN, ENC_NA); |
2743 | 9 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spbm_service_identifier_base_vid, tvb, subofs + BVID_OFFSET, BVID_LEN, ENC_BIG_ENDIAN); |
2744 | | |
2745 | 9 | subofs += FIXED_LEN; |
2746 | 9 | sublen -= FIXED_LEN; |
2747 | | |
2748 | | /*************************/ |
2749 | 78 | while (sublen > 0) { |
2750 | 71 | if (sublen < ISID_LEN) { |
2751 | 2 | proto_tree_add_expert_format_remaining(subtree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
2752 | 2 | "Short ISID entry (%d vs %d)", sublen, 4); |
2753 | 2 | return; |
2754 | 2 | } |
2755 | 69 | else { |
2756 | 69 | proto_tree_add_bitmask_list(subtree, tvb, subofs, 1, lsp_cap_spbm_service_identifier, ENC_BIG_ENDIAN); |
2757 | 69 | subofs += 1; |
2758 | 69 | sublen -= 1; |
2759 | | |
2760 | 69 | proto_tree_add_item(subtree, hf_isis_lsp_mt_cap_spbm_service_identifier_i_sid, tvb, subofs, 3, ENC_BIG_ENDIAN); |
2761 | 69 | subofs += 3; |
2762 | 69 | sublen -= 3; |
2763 | 69 | } |
2764 | 71 | } |
2765 | 9 | } |
2766 | 64 | } |
2767 | | static void |
2768 | | dissect_isis_lsp_clv_mt_cap_spbv_mac_address(tvbuff_t *tvb, packet_info *pinfo, |
2769 | | proto_tree *tree, int offset, int subtype, int sublen) |
2770 | 32 | { |
2771 | | |
2772 | 32 | static int * const lsp_spb_short_mac_address[] = { |
2773 | 32 | &hf_isis_lsp_spb_short_mac_address_t, |
2774 | 32 | &hf_isis_lsp_spb_short_mac_address_r, |
2775 | 32 | &hf_isis_lsp_spb_short_mac_address_reserved, |
2776 | 32 | NULL |
2777 | 32 | }; |
2778 | | |
2779 | | |
2780 | 32 | if (sublen < 2) { |
2781 | 1 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
2782 | 1 | "Short SPBV Mac Address subTLV (%d vs %d)", sublen, 2); |
2783 | 1 | return; |
2784 | 1 | } |
2785 | 31 | else { |
2786 | 31 | proto_tree *subtree; |
2787 | 31 | int subofs = offset; |
2788 | | |
2789 | | /*************************/ |
2790 | 31 | subtree = proto_tree_add_subtree_format( tree, tvb, offset-2, sublen+2, ett_isis_lsp_clv_mt_cap_spbv_mac_address, NULL, |
2791 | 31 | "SPBV Mac Address: Type: 0x%02x, Length: %d", subtype, sublen); |
2792 | | |
2793 | | /*************************/ |
2794 | 31 | proto_tree_add_item(subtree, hf_isis_lsp_spb_reserved, tvb, subofs, 2, ENC_BIG_ENDIAN); |
2795 | 31 | proto_tree_add_item(subtree, hf_isis_lsp_spb_sr_bit, tvb, subofs, 2, ENC_BIG_ENDIAN); |
2796 | 31 | proto_tree_add_item(subtree, hf_isis_lsp_spb_spvid, tvb, subofs, 2, ENC_BIG_ENDIAN); |
2797 | | |
2798 | 31 | subofs += 2; |
2799 | 31 | sublen -= 2; |
2800 | | |
2801 | | /*************************/ |
2802 | 86 | while (sublen > 0) { |
2803 | 84 | if (sublen < 7) { |
2804 | 29 | proto_tree_add_expert_format_remaining(subtree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
2805 | 29 | "Short MAC Address entry (%d vs %d)", sublen, 7); |
2806 | 29 | return; |
2807 | 29 | } |
2808 | 55 | else { |
2809 | 55 | proto_tree_add_bitmask_list(subtree, tvb, subofs, 1, lsp_spb_short_mac_address, ENC_BIG_ENDIAN); |
2810 | 55 | subofs += 1; |
2811 | 55 | sublen -= 1; |
2812 | | |
2813 | 55 | proto_tree_add_item(subtree, hf_isis_lsp_spb_short_mac_address, tvb, subofs, 6, ENC_NA); |
2814 | | |
2815 | 55 | subofs += 6; |
2816 | 55 | sublen -= 6; |
2817 | 55 | } |
2818 | 84 | } |
2819 | 31 | } |
2820 | 32 | } |
2821 | | |
2822 | | |
2823 | | |
2824 | | |
2825 | | /* |
2826 | | * Name: dissect_lsp_clv_mt_cap() |
2827 | | * |
2828 | | * Description: Decode an ISIS MT-CAP CLV - code 144. |
2829 | | * |
2830 | | * Input: |
2831 | | * tvbuff_t * : tvbuffer for packet data |
2832 | | * proto_tree * : proto tree to build on (may be null) |
2833 | | * int : current offset into packet data |
2834 | | * int : length of IDs in packet. |
2835 | | * int : length of this clv |
2836 | | * |
2837 | | * Output: |
2838 | | * void, will modify proto_tree if not null. |
2839 | | */ |
2840 | | static void |
2841 | | dissect_isis_lsp_clv_mt_cap(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
2842 | | isis_data_t *isis _U_, int length) |
2843 | 85 | { |
2844 | 85 | if (length >= 2) { |
2845 | | /* mtid */ |
2846 | 84 | proto_tree_add_item( tree, hf_isis_lsp_mt_cap_mtid, tvb, offset, 2, ENC_BIG_ENDIAN); |
2847 | 84 | proto_tree_add_item(tree, hf_isis_lsp_mt_cap_overload, tvb, offset, 2, ENC_BIG_ENDIAN); |
2848 | 84 | length -= 2; |
2849 | 84 | offset += 2; |
2850 | 829 | while (length >= 2) { |
2851 | 795 | uint8_t subtype = tvb_get_uint8(tvb, offset); |
2852 | 795 | uint8_t subtlvlen = tvb_get_uint8(tvb, offset+1); |
2853 | 795 | length -= 2; |
2854 | 795 | offset += 2; |
2855 | 795 | if (subtlvlen > length) { |
2856 | 50 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset-2, |
2857 | 50 | "Short type %d TLV (%d vs %d)", subtype, subtlvlen, length); |
2858 | 50 | return; |
2859 | 50 | } |
2860 | 745 | if (subtype == 0x01) { /* SPB Instance */ |
2861 | 81 | dissect_isis_lsp_clv_mt_cap_spb_instance(tvb, pinfo, tree, offset, subtype, subtlvlen); |
2862 | 81 | } |
2863 | 664 | else if (subtype == 0x02) { /* OALG */ |
2864 | 84 | dissect_isis_lsp_clv_mt_cap_spb_oalg(tvb, tree, offset, subtype, subtlvlen); |
2865 | 84 | } |
2866 | 580 | else if (subtype == 0x03) { /* SPBM Service Identifier */ |
2867 | 64 | dissect_isis_lsp_clv_mt_cap_spbm_service_identifier(tvb, pinfo, tree, offset, subtype, subtlvlen); |
2868 | 64 | } |
2869 | 516 | else if (subtype == 0x04) { /* SPBV Mac Address */ |
2870 | 32 | dissect_isis_lsp_clv_mt_cap_spbv_mac_address(tvb, pinfo, tree, offset, subtype, subtlvlen); |
2871 | 32 | } |
2872 | 484 | else if (dissect_isis_trill_clv(tvb, pinfo, tree, offset, subtype, subtlvlen)==-1) { |
2873 | 393 | proto_tree_add_expert_format( tree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, offset-2, subtlvlen+2, |
2874 | 393 | "Unknown SubTlv: Type: %d, Length: %d", subtype, subtlvlen); |
2875 | 393 | } |
2876 | 745 | length -= subtlvlen; |
2877 | 745 | offset += subtlvlen; |
2878 | 745 | } |
2879 | | |
2880 | 84 | } |
2881 | 85 | } |
2882 | | |
2883 | | |
2884 | | /* |
2885 | | * Name: dissect_isis_lsp_clv_sid_label_binding() |
2886 | | * |
2887 | | * Description: Decode an ISIS SID/LABEL binding - code 149. |
2888 | | * |
2889 | | * Input: |
2890 | | * tvbuff_t * : tvbuffer for packet data |
2891 | | * proto_tree * : proto tree to build on (may be null) |
2892 | | * int : current offset into packet data |
2893 | | * int : length of IDs in packet. |
2894 | | * int : length of this clv |
2895 | | * |
2896 | | * Output: |
2897 | | * void, will modify proto_tree if not null. |
2898 | | */ |
2899 | | static void |
2900 | | dissect_isis_lsp_clv_sid_label_binding(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
2901 | | isis_data_t *isis _U_, int length) |
2902 | 58 | { |
2903 | 58 | proto_item *ti_subclvs = NULL; |
2904 | 58 | proto_tree *subtree = NULL; |
2905 | 58 | int tlv_offset = 0; |
2906 | 58 | int sub_tlv_len = 0; |
2907 | 58 | int i = 0; |
2908 | 58 | uint8_t clv_pref_l = 0; |
2909 | 58 | unsigned clv_code; |
2910 | 58 | unsigned clv_len; |
2911 | | |
2912 | 58 | static int * const lsp_sl_flags[] = { |
2913 | 58 | &hf_isis_lsp_sl_binding_flags_f, |
2914 | 58 | &hf_isis_lsp_sl_binding_flags_m, |
2915 | 58 | &hf_isis_lsp_sl_binding_flags_s, |
2916 | 58 | &hf_isis_lsp_sl_binding_flags_d, |
2917 | 58 | &hf_isis_lsp_sl_binding_flags_a, |
2918 | 58 | &hf_isis_lsp_sl_binding_flags_rsv, |
2919 | 58 | NULL |
2920 | 58 | }; |
2921 | | |
2922 | 58 | static int * const lsp_sl_sub_tlv_flags[] = { |
2923 | 58 | &hf_isis_lsp_sl_sub_tlv_flags_r, |
2924 | 58 | &hf_isis_lsp_sl_sub_tlv_flags_n, |
2925 | 58 | &hf_isis_lsp_sl_sub_tlv_flags_p, |
2926 | 58 | &hf_isis_lsp_sl_sub_tlv_flags_e, |
2927 | 58 | &hf_isis_lsp_sl_sub_tlv_flags_v, |
2928 | 58 | &hf_isis_lsp_sl_sub_tlv_flags_l, |
2929 | 58 | &hf_isis_lsp_sl_sub_tlv_flags_rsv, |
2930 | 58 | NULL |
2931 | 58 | }; |
2932 | | |
2933 | 58 | if ( length <= 0 ) { |
2934 | 9 | return; |
2935 | 9 | } |
2936 | | |
2937 | | |
2938 | 49 | tlv_offset = offset; |
2939 | | |
2940 | 49 | proto_tree_add_bitmask(tree, tvb, tlv_offset, |
2941 | 49 | hf_isis_lsp_sl_binding_flags, ett_isis_lsp_sl_flags, lsp_sl_flags, ENC_NA); |
2942 | 49 | tlv_offset++; |
2943 | 49 | proto_tree_add_item(tree, hf_isis_lsp_sl_binding_weight, tvb, tlv_offset, 1, ENC_BIG_ENDIAN); |
2944 | 49 | tlv_offset++; |
2945 | 49 | proto_tree_add_item(tree, hf_isis_lsp_sl_binding_range, tvb, tlv_offset, 2, ENC_BIG_ENDIAN); |
2946 | 49 | tlv_offset = tlv_offset+2; |
2947 | 49 | proto_tree_add_item(tree, hf_isis_lsp_sl_binding_prefix_length, tvb, tlv_offset, 1, ENC_BIG_ENDIAN); |
2948 | 49 | clv_pref_l = tvb_get_uint8(tvb, tlv_offset); |
2949 | 49 | tlv_offset++; |
2950 | 49 | if (clv_pref_l == 32) { |
2951 | 1 | proto_tree_add_item(tree, hf_isis_lsp_sl_binding_fec_prefix_ipv4, tvb, tlv_offset, clv_pref_l/8, ENC_BIG_ENDIAN); |
2952 | 1 | } |
2953 | 48 | else if (clv_pref_l == 128) { |
2954 | 1 | proto_tree_add_item(tree, hf_isis_lsp_sl_binding_fec_prefix_ipv6, tvb, tlv_offset, clv_pref_l/8, ENC_NA); |
2955 | 1 | } |
2956 | 47 | else { |
2957 | 47 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, tlv_offset, |
2958 | 47 | "Prefix address format unknown length : %d",clv_pref_l); |
2959 | 47 | } |
2960 | 49 | tlv_offset = tlv_offset+(clv_pref_l/8); |
2961 | 49 | sub_tlv_len = length - (5+clv_pref_l/8); |
2962 | 316 | while (i < sub_tlv_len) { |
2963 | 274 | clv_code = tvb_get_uint8(tvb, i+tlv_offset); |
2964 | 274 | clv_len = tvb_get_uint8(tvb, i+1+tlv_offset); |
2965 | 274 | ti_subclvs = proto_tree_add_item(tree, hf_isis_lsp_sl_sub_tlv, tvb, i+tlv_offset, clv_len+2, ENC_NA); |
2966 | 274 | proto_item_append_text(ti_subclvs, " %s", |
2967 | 274 | val_to_str_const(clv_code, isis_lsp_sl_sub_tlv_vals, "Unknown capability sub-tlv type")); |
2968 | 274 | subtree = proto_item_add_subtree(ti_subclvs, ett_isis_lsp_sl_sub_tlv); |
2969 | 274 | proto_tree_add_item(subtree, hf_isis_lsp_sl_sub_tlv_type, tvb, i+tlv_offset, 1, ENC_BIG_ENDIAN); |
2970 | 274 | proto_tree_add_item(subtree, hf_isis_lsp_sl_sub_tlv_length, tvb, i+1+tlv_offset, 1, ENC_BIG_ENDIAN); |
2971 | 274 | switch (clv_code) { |
2972 | 55 | case ISIS_LSP_SL_SUB_SID_LABEL: |
2973 | 55 | switch (clv_len) { |
2974 | 0 | case 3 : |
2975 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_sl_sub_tlv_label_20, |
2976 | 0 | tvb, i+2+tlv_offset, clv_len, ENC_BIG_ENDIAN); |
2977 | 0 | break; |
2978 | 1 | case 4 : |
2979 | 1 | proto_tree_add_item(subtree, hf_isis_lsp_sl_sub_tlv_label_32, |
2980 | 1 | tvb, i+2+tlv_offset, clv_len, ENC_BIG_ENDIAN); |
2981 | 1 | break; |
2982 | 54 | default : |
2983 | 54 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, i+2+tlv_offset, |
2984 | 54 | "Label badly formatted"); |
2985 | 54 | break; |
2986 | 55 | } |
2987 | 55 | break; |
2988 | 55 | case ISIS_LSP_SL_SUB_PREFIX_SID: { |
2989 | 38 | proto_tree_add_bitmask(subtree, tvb, i+2+tlv_offset, hf_isis_lsp_sl_sub_tlv_flags, |
2990 | 38 | ett_isis_lsp_sl_sub_tlv_flags, lsp_sl_sub_tlv_flags, ENC_NA); |
2991 | 38 | proto_tree_add_item(subtree, hf_isis_lsp_sl_sub_tlv_algorithm, |
2992 | 38 | tvb, i+2+tlv_offset+1, 1, ENC_BIG_ENDIAN); |
2993 | 38 | switch (clv_len-2) { |
2994 | 0 | case 3 : |
2995 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_sl_sub_tlv_label_20, |
2996 | 0 | tvb, i+2+tlv_offset+2, clv_len-2, ENC_BIG_ENDIAN); |
2997 | 0 | break; |
2998 | 0 | case 4 : |
2999 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_sl_sub_tlv_label_32, |
3000 | 0 | tvb, i+2+tlv_offset+2, clv_len-2, ENC_BIG_ENDIAN); |
3001 | 0 | break; |
3002 | 38 | default : |
3003 | 38 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, i+2+tlv_offset+2, |
3004 | 38 | "Label badly formatted"); |
3005 | 38 | break; |
3006 | 38 | } |
3007 | 38 | } |
3008 | 38 | break; |
3009 | 174 | default: |
3010 | 174 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, i+2+tlv_offset, |
3011 | 174 | "Sub TLV badly formatted, type unknown %d", clv_code); |
3012 | 174 | break; |
3013 | 274 | } |
3014 | 267 | i += clv_len + 2; |
3015 | 267 | } |
3016 | 49 | } |
3017 | | |
3018 | | /* |
3019 | | * Name: dissect_lsp_authentication_clv() |
3020 | | * |
3021 | | * Description: |
3022 | | * Decode for a lsp packets authentication clv. Calls into the |
3023 | | * clv common one. |
3024 | | * |
3025 | | * Input: |
3026 | | * tvbuff_t * : tvbuffer for packet data |
3027 | | * proto_tree * : proto tree to build on (may be null) |
3028 | | * int : current offset into packet data |
3029 | | * int : length of IDs in packet. |
3030 | | * int : length of this clv |
3031 | | * |
3032 | | * Output: |
3033 | | * void, will modify proto_tree if not null. |
3034 | | */ |
3035 | | static void |
3036 | | dissect_lsp_authentication_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
3037 | | isis_data_t *isis _U_, int length) |
3038 | 127 | { |
3039 | 127 | isis_dissect_authentication_clv(tree, pinfo, tvb, hf_isis_lsp_authentication, hf_isis_clv_key_id, &ei_isis_lsp_authentication, offset, length); |
3040 | 127 | } |
3041 | | |
3042 | | /* |
3043 | | * Name: dissect_lsp_ip_authentication_clv() |
3044 | | * |
3045 | | * Description: |
3046 | | * Decode for a lsp packets authentication clv. Calls into the |
3047 | | * clv common one. |
3048 | | * |
3049 | | * Input: |
3050 | | * tvbuff_t * : tvbuffer for packet data |
3051 | | * proto_tree * : proto tree to build on (may be null) |
3052 | | * int : current offset into packet data |
3053 | | * int : length of IDs in packet. |
3054 | | * int : length of this clv |
3055 | | * |
3056 | | * Output: |
3057 | | * void, will modify proto_tree if not null. |
3058 | | */ |
3059 | | static void |
3060 | | dissect_lsp_ip_authentication_clv(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree, int offset, |
3061 | | isis_data_t *isis _U_, int length) |
3062 | 17 | { |
3063 | 17 | if ( length != 0 ) { |
3064 | 10 | proto_tree_add_item(tree, hf_isis_lsp_ip_authentication, tvb, offset, length, ENC_ASCII); |
3065 | 10 | } |
3066 | 17 | } |
3067 | | |
3068 | | /* |
3069 | | * Name: dissect_lsp_area_address_clv() |
3070 | | * |
3071 | | * Description: |
3072 | | * Decode for a lsp packet's area address clv. Call into clv common |
3073 | | * one. |
3074 | | * |
3075 | | * Input: |
3076 | | * tvbuff_t * : tvbuffer for packet data |
3077 | | * proto_tree * : protocol display tree to fill out. May be NULL |
3078 | | * int : offset into packet data where we are. |
3079 | | * int : length of IDs in packet. |
3080 | | * int : length of clv we are decoding |
3081 | | * |
3082 | | * Output: |
3083 | | * void, but we will add to proto tree if !NULL. |
3084 | | */ |
3085 | | static void |
3086 | | dissect_lsp_area_address_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
3087 | | isis_data_t *isis _U_, int length) |
3088 | 735 | { |
3089 | 735 | isis_dissect_area_address_clv(tree, pinfo, tvb, &ei_isis_lsp_short_clv, hf_isis_lsp_area_address, offset, length); |
3090 | 735 | } |
3091 | | |
3092 | | /* |
3093 | | * Name: dissect_lsp_eis_neighbors_clv_inner() |
3094 | | * |
3095 | | * Description: |
3096 | | * Real work horse for showing neighbors. This means we decode the |
3097 | | * first octet as either virtual/!virtual (if show_virtual param is |
3098 | | * set), or as a must == 0 reserved value. |
3099 | | * |
3100 | | * Once past that, we decode n neighbor elements. Each neighbor |
3101 | | * is comprised of a metric block (is dissect_metric) and the |
3102 | | * addresses. |
3103 | | * |
3104 | | * Input: |
3105 | | * tvbuff_t * : tvbuffer for packet data |
3106 | | * proto_tree * : protocol display tree to fill out. May be NULL |
3107 | | * int : offset into packet data where we are. |
3108 | | * int : length of IDs in packet. |
3109 | | * int : length of clv we are decoding |
3110 | | * int : set to decode first octet as virtual vs reserved == 0 |
3111 | | * int : set to indicate EIS instead of IS (6 octet per addr instead of 7) |
3112 | | * |
3113 | | * Output: |
3114 | | * void, but we will add to proto tree if !NULL. |
3115 | | */ |
3116 | | static void |
3117 | | dissect_lsp_eis_neighbors_clv_inner(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
3118 | | int offset, int length, unsigned id_length, int show_virtual, int is_eis) |
3119 | 877 | { |
3120 | 877 | proto_item *ti; |
3121 | 877 | proto_tree *ntree = NULL; |
3122 | 877 | int tlen; |
3123 | | |
3124 | 877 | if (!is_eis) { |
3125 | 464 | id_length++; /* IDs are one octet longer in IS neighbours */ |
3126 | 464 | if ( tree ) { |
3127 | 464 | if ( show_virtual ) { |
3128 | | /* virtual path flag */ |
3129 | 197 | proto_tree_add_item( tree, hf_isis_lsp_is_virtual, tvb, offset, 1, ENC_NA); |
3130 | 267 | } else { |
3131 | 267 | proto_tree_add_item(tree, hf_isis_lsp_eis_neighbors_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); |
3132 | 267 | } |
3133 | 464 | } |
3134 | 464 | offset++; |
3135 | 464 | length--; |
3136 | 464 | } |
3137 | 877 | tlen = 4 + id_length; |
3138 | | |
3139 | 2.15k | while ( length > 0 ) { |
3140 | 2.00k | if (length<tlen) { |
3141 | 733 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
3142 | 733 | "short E/IS reachability (%d vs %d)", length, tlen ); |
3143 | 733 | return; |
3144 | 733 | } |
3145 | | /* |
3146 | | * Gotta build a sub-tree for all our pieces |
3147 | | */ |
3148 | 1.27k | if ( tree ) { |
3149 | 1.27k | if ( is_eis ) { |
3150 | 637 | ntree = proto_tree_add_subtree(tree, tvb, offset, tlen, ett_isis_lsp_clv_is_neighbors, &ti, "ES Neighbor"); |
3151 | 637 | } else { |
3152 | 636 | ntree = proto_tree_add_subtree(tree, tvb, offset, tlen, ett_isis_lsp_clv_is_neighbors, &ti, "IS Neighbor"); |
3153 | 636 | } |
3154 | | |
3155 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_default_metric, tvb, offset, 1, ENC_BIG_ENDIAN); |
3156 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_default_metric_ie, tvb, offset, 1, ENC_NA); |
3157 | | |
3158 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_delay_metric, tvb, offset, 1, ENC_BIG_ENDIAN); |
3159 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_delay_metric_supported, tvb, offset, 1, ENC_NA); |
3160 | | |
3161 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_delay_metric_ie, tvb, offset+1, 1, ENC_NA); |
3162 | | |
3163 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_expense_metric, tvb, offset, 1, ENC_BIG_ENDIAN); |
3164 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_expense_metric_supported, tvb, offset, 1, ENC_NA); |
3165 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_expense_metric_ie, tvb, offset+2, 1, ENC_NA); |
3166 | | |
3167 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_error_metric, tvb, offset, 1, ENC_BIG_ENDIAN); |
3168 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_error_metric_supported, tvb, offset, 1, ENC_NA); |
3169 | 1.27k | proto_tree_add_item(ntree, hf_isis_lsp_eis_neighbors_error_metric_ie, tvb, offset+3, 1, ENC_NA); |
3170 | 1.27k | proto_tree_add_item(ntree, is_eis ? hf_isis_lsp_eis_neighbors_es_neighbor_id : hf_isis_lsp_eis_neighbors_is_neighbor_id, |
3171 | 1.27k | tvb, offset+4, id_length, ENC_NA); |
3172 | 1.27k | proto_item_append_text(ti, ": %s", tvb_print_system_id(pinfo->pool, tvb, offset+4, id_length)); |
3173 | 1.27k | } |
3174 | 1.27k | offset += tlen; |
3175 | 1.27k | length -= tlen; |
3176 | 1.27k | } |
3177 | 877 | } |
3178 | | |
3179 | | /* |
3180 | | * Name: dissect_lsp_l1_is_neighbors_clv() |
3181 | | * |
3182 | | * Description: |
3183 | | * Dispatch a l1 intermediate system neighbor by calling |
3184 | | * the inner function with show virtual set to true and is es set to false. |
3185 | | * |
3186 | | * Input: |
3187 | | * tvbuff_t * : tvbuffer for packet data |
3188 | | * proto_tree * : protocol display tree to fill out. May be NULL |
3189 | | * int : offset into packet data where we are. |
3190 | | * int : length of IDs in packet. |
3191 | | * int : length of clv we are decoding |
3192 | | * |
3193 | | * Output: |
3194 | | * void, but we will add to proto tree if !NULL. |
3195 | | */ |
3196 | | static void |
3197 | | dissect_lsp_l1_is_neighbors_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
3198 | | isis_data_t *isis, int length) |
3199 | 197 | { |
3200 | 197 | dissect_lsp_eis_neighbors_clv_inner(tvb, pinfo, tree, offset, |
3201 | 197 | length, isis->system_id_len, true, false); |
3202 | 197 | } |
3203 | | |
3204 | | /* |
3205 | | * Name: dissect_lsp_l1_es_neighbors_clv() |
3206 | | * |
3207 | | * Description: |
3208 | | * Dispatch a l1 end or intermediate system neighbor by calling |
3209 | | * the inner function with show virtual set to true and es set to true. |
3210 | | * |
3211 | | * Input: |
3212 | | * tvbuff_t * : tvbuffer for packet data |
3213 | | * proto_tree * : protocol display tree to fill out. May be NULL |
3214 | | * int : offset into packet data where we are. |
3215 | | * int : length of IDs in packet. |
3216 | | * int : length of clv we are decoding |
3217 | | * |
3218 | | * Output: |
3219 | | * void, but we will add to proto tree if !NULL. |
3220 | | */ |
3221 | | static void |
3222 | | dissect_lsp_l1_es_neighbors_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
3223 | | isis_data_t *isis, int length) |
3224 | 413 | { |
3225 | 413 | dissect_lsp_eis_neighbors_clv_inner(tvb, pinfo, tree, offset, |
3226 | 413 | length, isis->system_id_len, true, true); |
3227 | 413 | } |
3228 | | |
3229 | | /* |
3230 | | * Name: dissect_lsp_l2_is_neighbors_clv() |
3231 | | * |
3232 | | * Description: |
3233 | | * Dispatch a l2 intermediate system neighbor by calling |
3234 | | * the inner function with show virtual set to false, and is es set |
3235 | | * to false |
3236 | | * |
3237 | | * Input: |
3238 | | * tvbuff_t * : tvbuffer for packet data |
3239 | | * proto_tree * : protocol display tree to fill out. May be NULL |
3240 | | * int : offset into packet data where we are. |
3241 | | * int : length of IDs in packet. |
3242 | | * int : length of clv we are decoding |
3243 | | * |
3244 | | * Output: |
3245 | | * void, but we will add to proto tree if !NULL. |
3246 | | */ |
3247 | | static void |
3248 | | dissect_lsp_l2_is_neighbors_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
3249 | | isis_data_t *isis, int length) |
3250 | 267 | { |
3251 | 267 | dissect_lsp_eis_neighbors_clv_inner(tvb, pinfo, tree, offset, |
3252 | 267 | length, isis->system_id_len, false, false); |
3253 | 267 | } |
3254 | | |
3255 | | /* |
3256 | | * Name: dissect_lsp_instance_identifier_clv() |
3257 | | * |
3258 | | * Description: |
3259 | | * Decode for a lsp packets Instance Identifier clv. |
3260 | | * Calls into the CLV common one. |
3261 | | * |
3262 | | * Input: |
3263 | | * tvbuff_t * : tvbuffer for packet data |
3264 | | * proto_tree * : proto tree to build on (may be null) |
3265 | | * int : current offset into packet data |
3266 | | * int : length of IDs in packet. |
3267 | | * int : length of this clv |
3268 | | * |
3269 | | * Output: |
3270 | | * void, will modify proto_tree if not null. |
3271 | | */ |
3272 | | static void |
3273 | | dissect_lsp_instance_identifier_clv(tvbuff_t *tvb, packet_info* pinfo _U_, |
3274 | | proto_tree *tree, int offset, isis_data_t *isis _U_, int length) |
3275 | 119 | { |
3276 | 119 | isis_dissect_instance_identifier_clv(tree, pinfo, tvb, &ei_isis_lsp_short_clv, hf_isis_lsp_instance_identifier, hf_isis_lsp_supported_itid, offset, length); |
3277 | 119 | } |
3278 | | |
3279 | | /* |
3280 | | * Name: dissect_subclv_admin_group () |
3281 | | * |
3282 | | * Description: Called by function dissect_lsp_ext_is_reachability_clv(). |
3283 | | * |
3284 | | * This function is called by dissect_lsp_ext_is_reachability_clv() |
3285 | | * for dissect the administrative group sub-CLV (code 3). |
3286 | | * |
3287 | | * Input: |
3288 | | * tvbuff_t * : tvbuffer for packet data |
3289 | | * proto_tree * : protocol display tree to fill out. |
3290 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
3291 | | * |
3292 | | * Output: |
3293 | | * void |
3294 | | */ |
3295 | | static void |
3296 | 155 | dissect_subclv_admin_group (tvbuff_t *tvb, proto_tree *tree, int offset) { |
3297 | 155 | proto_tree *ntree; |
3298 | 155 | uint32_t clv_value; |
3299 | 155 | uint32_t mask; |
3300 | 155 | int i; |
3301 | | |
3302 | 155 | ntree = proto_tree_add_subtree(tree, tvb, offset-2, 6, |
3303 | 155 | ett_isis_lsp_subclv_admin_group, NULL, "Administrative group(s):"); |
3304 | | |
3305 | 155 | clv_value = tvb_get_ntohl(tvb, offset); |
3306 | | |
3307 | 5.08k | for (i = 0, mask = 1; i < 32; i++, mask <<= 1) { |
3308 | 4.92k | if ( (clv_value & mask) != 0 ) { |
3309 | 1.23k | proto_tree_add_uint_format(ntree, hf_isis_lsp_group, tvb, offset, 4, clv_value & mask, "group %d", i); |
3310 | 1.23k | } |
3311 | 4.92k | } |
3312 | 155 | } |
3313 | | |
3314 | | /* |
3315 | | * Name: dissect_subclv_max_bw () |
3316 | | * |
3317 | | * Description: Called by function dissect_lsp_ext_is_reachability_clv(). |
3318 | | * |
3319 | | * This function is called by dissect_lsp_ext_is_reachability_clv() |
3320 | | * for dissect the maximum link bandwidth sub-CLV (code 9). |
3321 | | * |
3322 | | * Input: |
3323 | | * tvbuff_t * : tvbuffer for packet data |
3324 | | * proto_tree * : protocol display tree to fill out. |
3325 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
3326 | | * |
3327 | | * Output: |
3328 | | * void |
3329 | | */ |
3330 | | static void |
3331 | | dissect_subclv_max_bw(tvbuff_t *tvb, proto_tree *tree, int offset) |
3332 | 59 | { |
3333 | 59 | float bw; |
3334 | | |
3335 | 59 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3336 | 59 | proto_tree_add_float_format_value(tree, hf_isis_lsp_maximum_link_bandwidth, tvb, offset-2, 6, |
3337 | 59 | bw, "%.2f Mbps", bw); |
3338 | 59 | } |
3339 | | |
3340 | | /* |
3341 | | * Name: dissect_subclv_rsv_bw () |
3342 | | * |
3343 | | * Description: Called by function dissect_lsp_ext_is_reachability_clv(). |
3344 | | * |
3345 | | * This function is called by dissect_lsp_ext_is_reachability_clv() |
3346 | | * for dissect the reservable link bandwidth sub-CLV (code 10). |
3347 | | * |
3348 | | * Input: |
3349 | | * tvbuff_t * : tvbuffer for packet data |
3350 | | * proto_tree * : protocol display tree to fill out. |
3351 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
3352 | | * |
3353 | | * Output: |
3354 | | * void |
3355 | | */ |
3356 | | static void |
3357 | | dissect_subclv_rsv_bw(tvbuff_t *tvb, proto_tree *tree, int offset) |
3358 | 23 | { |
3359 | 23 | float bw; |
3360 | | |
3361 | 23 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3362 | 23 | proto_tree_add_float_format_value (tree, hf_isis_lsp_reservable_link_bandwidth, tvb, offset-2, 6, |
3363 | 23 | bw, "%.2f Mbps", bw ); |
3364 | 23 | } |
3365 | | |
3366 | | /* |
3367 | | * Name: dissect_subclv_unrsv_bw () |
3368 | | * |
3369 | | * Description: Called by function dissect_lsp_ext_is_reachability_clv(). |
3370 | | * |
3371 | | * This function is called by dissect_lsp_ext_is_reachability_clv() |
3372 | | * for dissect the unreserved bandwidth sub-CLV (code 11). |
3373 | | * |
3374 | | * Input: |
3375 | | * tvbuff_t * : tvbuffer for packet data |
3376 | | * proto_tree * : protocol display tree to fill out. |
3377 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
3378 | | * |
3379 | | * Output: |
3380 | | * void |
3381 | | */ |
3382 | | static void |
3383 | | dissect_subclv_unrsv_bw(tvbuff_t *tvb, proto_tree *tree, int offset) |
3384 | 38 | { |
3385 | 38 | proto_tree *ntree; |
3386 | 38 | float bw; |
3387 | 38 | int i; |
3388 | | |
3389 | 38 | ntree = proto_tree_add_subtree(tree, tvb, offset-2, 34, |
3390 | 38 | ett_isis_lsp_subclv_unrsv_bw, NULL, "Unreserved bandwidth:"); |
3391 | | |
3392 | 324 | for (i = 0 ; i < 8 ; i++) { |
3393 | 286 | bw = tvb_get_ntohieee_float(tvb, offset+4*i)*8/1000000; |
3394 | 286 | proto_tree_add_float_format(ntree, hf_isis_lsp_unrsv_bw_priority_level, tvb, offset+4*i, 4, |
3395 | 286 | bw, "priority level %d: %.2f Mbps", i, bw ); |
3396 | 286 | } |
3397 | 38 | } |
3398 | | |
3399 | | /* |
3400 | | * Name: dissect_subclv_bw_ct () |
3401 | | * |
3402 | | * Description: Called by function dissect_lsp_ext_is_reachability_clv(). |
3403 | | * |
3404 | | * This function is called by dissect_lsp_ext_is_reachability_clv() |
3405 | | * for dissect the Bandwidth Constraints sub-CLV (code 22). |
3406 | | * |
3407 | | * Input: |
3408 | | * tvbuff_t * : tvbuffer for packet data |
3409 | | * proto_tree * : protocol display tree to fill out. |
3410 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
3411 | | * |
3412 | | * Output: |
3413 | | * void |
3414 | | */ |
3415 | | static void |
3416 | | dissect_subclv_bw_ct(tvbuff_t *tvb, proto_tree *tree, int offset, int sublen) |
3417 | 340 | { |
3418 | 340 | proto_tree *ntree; |
3419 | 340 | int offset_end = offset + sublen; |
3420 | 340 | float bw; |
3421 | | |
3422 | 340 | ntree = proto_tree_add_subtree(tree, tvb, offset-2, sublen, |
3423 | 340 | ett_isis_lsp_subclv_bw_ct, NULL, "Bandwidth Constraints:"); |
3424 | | |
3425 | 340 | proto_tree_add_item(ntree, hf_isis_lsp_bw_ct_model, tvb, offset, 1, ENC_BIG_ENDIAN); |
3426 | 340 | offset +=1; |
3427 | | |
3428 | 340 | proto_tree_add_item(ntree, hf_isis_lsp_bw_ct_reserved, tvb, offset, 3, ENC_BIG_ENDIAN); |
3429 | 340 | offset +=3; |
3430 | | |
3431 | 340 | if(offset < offset_end){ |
3432 | 288 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3433 | 288 | proto_tree_add_float_format_value(ntree, hf_isis_lsp_bw_ct0, tvb, offset, 4, |
3434 | 288 | bw, "%.2f Mbps", bw); |
3435 | 288 | offset += 4; |
3436 | 288 | } |
3437 | | |
3438 | 340 | if(offset < offset_end){ |
3439 | 288 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3440 | 288 | proto_tree_add_float_format_value(ntree, hf_isis_lsp_bw_ct1, tvb, offset, 4, |
3441 | 288 | bw, "%.2f Mbps", bw); |
3442 | 288 | offset += 4; |
3443 | 288 | } |
3444 | | |
3445 | 340 | if(offset < offset_end){ |
3446 | 288 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3447 | 288 | proto_tree_add_float_format_value(ntree, hf_isis_lsp_bw_ct2, tvb, offset, 4, |
3448 | 288 | bw, "%.2f Mbps", bw); |
3449 | 288 | offset += 4; |
3450 | 288 | } |
3451 | | |
3452 | 340 | if(offset < offset_end){ |
3453 | 271 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3454 | 271 | proto_tree_add_float_format_value(ntree, hf_isis_lsp_bw_ct3, tvb, offset, 4, |
3455 | 271 | bw, "%.2f Mbps", bw); |
3456 | 271 | offset += 4; |
3457 | 271 | } |
3458 | | |
3459 | 340 | if(offset < offset_end){ |
3460 | 269 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3461 | 269 | proto_tree_add_float_format_value(ntree, hf_isis_lsp_bw_ct4, tvb, offset, 4, |
3462 | 269 | bw, "%.2f Mbps", bw); |
3463 | 269 | offset += 4; |
3464 | 269 | } |
3465 | | |
3466 | 340 | if(offset < offset_end){ |
3467 | 44 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3468 | 44 | proto_tree_add_float_format_value(ntree, hf_isis_lsp_bw_ct5, tvb, offset, 4, |
3469 | 44 | bw, "%.2f Mbps", bw); |
3470 | 44 | offset += 4; |
3471 | 44 | } |
3472 | | |
3473 | 340 | if(offset < offset_end){ |
3474 | 43 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3475 | 43 | proto_tree_add_float_format_value(ntree, hf_isis_lsp_bw_ct6, tvb, offset, 4, |
3476 | 43 | bw, "%.2f Mbps", bw); |
3477 | 43 | offset += 4; |
3478 | 43 | } |
3479 | | |
3480 | 340 | if(offset < offset_end){ |
3481 | 24 | bw = tvb_get_ntohieee_float(tvb, offset)*8/1000000; |
3482 | 24 | proto_tree_add_float_format_value(ntree, hf_isis_lsp_bw_ct7, tvb, offset, 4, |
3483 | 24 | bw, "%.2f Mbps", bw); |
3484 | | /*offset += 4;*/ |
3485 | 24 | } |
3486 | 340 | } |
3487 | | |
3488 | | /* |
3489 | | * Name: dissect_subclv_spb_link_metric () |
3490 | | * |
3491 | | * Description: Called by function dissect_lsp_ext_is_reachability_clv(). |
3492 | | * |
3493 | | * This function is called by dissect_lsp_ext_is_reachability_clv() |
3494 | | * for dissect the SPB link metric sub-CLV (code 29). |
3495 | | * |
3496 | | * Input: |
3497 | | * tvbuff_t * : tvbuffer for packet data |
3498 | | * proto_tree * : protocol display tree to fill out. |
3499 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
3500 | | * int : subtlv type |
3501 | | * int : subtlv length |
3502 | | * |
3503 | | * Output: |
3504 | | * void |
3505 | | */ |
3506 | | |
3507 | | static void |
3508 | | dissect_subclv_spb_link_metric(tvbuff_t *tvb, packet_info *pinfo, |
3509 | | proto_tree *tree, int offset, int subtype, int sublen) |
3510 | 24 | { |
3511 | 24 | const int SUBLEN = 6; |
3512 | | |
3513 | 24 | if (sublen != SUBLEN) { |
3514 | 24 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
3515 | 24 | "Short SPB Link Metric sub-TLV (%d vs %d)", sublen, SUBLEN); |
3516 | 24 | return; |
3517 | 24 | } |
3518 | 0 | else { |
3519 | 0 | proto_tree *subtree; |
3520 | 0 | subtree = proto_tree_add_subtree_format( tree, tvb, offset-2, sublen+2, ett_isis_lsp_subclv_spb_link_metric, NULL, |
3521 | 0 | "SPB Link Metric: Type: 0x%02x (%d), Length: %d", subtype, subtype, sublen); |
3522 | |
|
3523 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_spb_link_metric, |
3524 | 0 | tvb, offset, 3, ENC_BIG_ENDIAN); |
3525 | |
|
3526 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_spb_port_count, |
3527 | 0 | tvb, offset+3, 1, ENC_BIG_ENDIAN); |
3528 | |
|
3529 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_spb_port_id, |
3530 | 0 | tvb, offset+4, 2, ENC_BIG_ENDIAN); |
3531 | 0 | } |
3532 | 24 | } |
3533 | | |
3534 | | /* |
3535 | | * Name : dissect_subclv_ext_admin_group() |
3536 | | * |
3537 | | * Description : called by function dissect_sub_clv_tlv_22_22_23_141_222_223() |
3538 | | * |
3539 | | * Dissects Extended Administrative Groups subclv |
3540 | | * |
3541 | | * Input : |
3542 | | * tvbuff_t * : tvbuffer for packet data |
3543 | | * proto_tree * : protocol display tree to fill out. |
3544 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
3545 | | * int : subtlv type |
3546 | | * int : subtlv length |
3547 | | * |
3548 | | * Output: |
3549 | | * void |
3550 | | */ |
3551 | | static void |
3552 | | dissect_subclv_ext_admin_group(tvbuff_t *tvb, proto_tree *tree, |
3553 | | int offset, int subtype _U_, int sublen) |
3554 | 76 | { |
3555 | 76 | int i; |
3556 | 76 | uint32_t admin_group; |
3557 | | |
3558 | | /* Number of Extended Admin Groups */ |
3559 | 446 | for (i = 0; i < (sublen / 4); i++) { |
3560 | 370 | admin_group = tvb_get_uint32(tvb, offset + (i * 4), ENC_BIG_ENDIAN); |
3561 | 370 | proto_tree_add_uint_format(tree, hf_isis_lsp_clv_ext_admin_group, |
3562 | 370 | tvb, offset + (i * 4), 4, admin_group, |
3563 | 370 | "Extended Admin Group[%d]: 0x%08x", |
3564 | 370 | i, admin_group); |
3565 | 370 | } |
3566 | 76 | } |
3567 | | |
3568 | | /* |
3569 | | * Name : dissect_subclv_adj_sid() |
3570 | | * |
3571 | | * Description : called by function dissect_sub_clv_tlv_22_22_23_141_222_223() |
3572 | | * |
3573 | | * Dissects LAN-Adj-SID & Adj-SID subclv |
3574 | | * |
3575 | | * Input : |
3576 | | * tvbuff_t * : tvbuffer for packet data |
3577 | | * proto_tree * : protocol display tree to fill out. |
3578 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
3579 | | * int : subtlv type |
3580 | | * int : subtlv length |
3581 | | * |
3582 | | * Output: |
3583 | | * void |
3584 | | */ |
3585 | | |
3586 | | static void |
3587 | | dissect_subclv_adj_sid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
3588 | | int local_offset, int subtype, int sublen) |
3589 | 51 | { |
3590 | 51 | int offset = local_offset; |
3591 | 51 | proto_item *ti; |
3592 | 51 | int sli_len; |
3593 | 51 | uint8_t flags; |
3594 | | |
3595 | 51 | flags = tvb_get_uint8(tvb, offset); |
3596 | 51 | proto_tree_add_bitmask(tree, tvb, offset, hf_isis_lsp_adj_sid_flags, |
3597 | 51 | ett_isis_lsp_adj_sid_flags, adj_sid_flags, ENC_BIG_ENDIAN); |
3598 | | |
3599 | 51 | offset++; |
3600 | | |
3601 | 51 | proto_tree_add_item(tree, hf_isis_lsp_adj_sid_weight, tvb, offset, 1, ENC_BIG_ENDIAN); |
3602 | 51 | offset++; |
3603 | | |
3604 | | /* Only present in LAN-Adj-SID, not Adj-SID */ |
3605 | 51 | if (subtype == 32) { |
3606 | 31 | proto_tree_add_item(tree, hf_isis_lsp_adj_sid_system_id, tvb, offset, 6, ENC_NA); |
3607 | 31 | offset += 6; |
3608 | 31 | } |
3609 | | |
3610 | 51 | sli_len = local_offset + sublen - offset; |
3611 | 51 | switch(sli_len) { |
3612 | 1 | case 3: |
3613 | 1 | if (!((flags & 0x30) == 0x30)) |
3614 | 1 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, |
3615 | 1 | local_offset, sublen, "V & L flags must be set"); |
3616 | 1 | proto_tree_add_item(tree, hf_isis_lsp_sid_sli_label, tvb, offset, sli_len, ENC_BIG_ENDIAN); |
3617 | 1 | break; |
3618 | 1 | case 4: |
3619 | 1 | if (flags & 0x30) |
3620 | 0 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, |
3621 | 0 | local_offset, sublen, "V & L flags must be unset"); |
3622 | 1 | proto_tree_add_item(tree, hf_isis_lsp_sid_sli_index, tvb, offset, sli_len, ENC_BIG_ENDIAN); |
3623 | 1 | break; |
3624 | 8 | case 16: |
3625 | 8 | if (!(flags & 0x20)) |
3626 | 8 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, |
3627 | 8 | local_offset, sublen, "V flag must be set"); |
3628 | 8 | ti = proto_tree_add_item(tree, hf_isis_lsp_sid_sli_ipv6, tvb, offset, sli_len, ENC_NA); |
3629 | | /* L flag set */ |
3630 | 8 | if (flags & 0x10) |
3631 | 7 | proto_item_append_text(ti, "Globally unique"); |
3632 | 8 | break; |
3633 | 41 | default: |
3634 | 41 | break; |
3635 | 51 | } |
3636 | | /*offset += sli_len;*/ |
3637 | 51 | } |
3638 | | |
3639 | | /* |
3640 | | * Name: dissect_srv6_sid_struct_subsubclv() |
3641 | | * |
3642 | | * Description: |
3643 | | * Decodes a SRv6 SID Structure sub-sub-TLV (RFC 9352) |
3644 | | * |
3645 | | * Input: |
3646 | | * tvbuff_t * : tvbuffer for packet data |
3647 | | * packet_info * : expert error misuse reporting |
3648 | | * proto_tree * : proto tree to build on |
3649 | | * tree_item * : proto tree item to build on (may be null) |
3650 | | * int : current offset into packet data |
3651 | | * int : type of this clv |
3652 | | * int : length of this clv |
3653 | | * |
3654 | | * Output: |
3655 | | * void, will modify proto_tree if not null. |
3656 | | */ |
3657 | | static void |
3658 | | dissect_srv6_sid_struct_subsubclv(tvbuff_t *tvb, packet_info* pinfo, |
3659 | | proto_tree *tree, proto_item *tree_item _U_, |
3660 | | int offset, int clv_code _U_, int clv_len) |
3661 | 25 | { |
3662 | 25 | if (clv_len != 4) { |
3663 | 25 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, |
3664 | 25 | tvb, offset-2, 2, |
3665 | 25 | "Invalid Sub-Sub-TLV Length %d (should be 4)", clv_len); |
3666 | 25 | return; |
3667 | 25 | } |
3668 | 0 | proto_tree_add_item(tree, hf_isis_lsp_clv_srv6_sid_struct_lb_len, tvb, offset, 1, ENC_NA); |
3669 | 0 | proto_tree_add_item(tree, hf_isis_lsp_clv_srv6_sid_struct_ln_len, tvb, offset+1, 1, ENC_NA); |
3670 | 0 | proto_tree_add_item(tree, hf_isis_lsp_clv_srv6_sid_struct_fun_len, tvb, offset+2, 1, ENC_NA); |
3671 | 0 | proto_tree_add_item(tree, hf_isis_lsp_clv_srv6_sid_struct_arg_len, tvb, offset+3, 1, ENC_NA); |
3672 | 0 | } |
3673 | | |
3674 | | /* |
3675 | | * Name: dissect_sub_clv_tlv_22_22_23_141_222_223 |
3676 | | * |
3677 | | * Description: Decode a sub tlv's for all those tlv |
3678 | | * |
3679 | | * CALLED BY TLV 22,23,141,222,223 DISSECTOR |
3680 | | * |
3681 | | * Input: |
3682 | | * tvbuff_t * : tvbuffer for packet data |
3683 | | * packet_info * : expert error misuse reporting |
3684 | | * proto_tree * : protocol display tree to fill out. May be NULL |
3685 | | * int : offset into packet data where we are. |
3686 | | * int : sub-tlv length |
3687 | | * int : length of clv we are decoding |
3688 | | * |
3689 | | * Output: |
3690 | | * void |
3691 | | */ |
3692 | | |
3693 | | static void |
3694 | | // NOLINTNEXTLINE(misc-no-recursion) |
3695 | | dissect_sub_clv_tlv_22_22_23_141_222_223(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, |
3696 | | int offset, int subclvs_len) |
3697 | 816 | { |
3698 | 816 | proto_item *ti_subclvs = NULL; |
3699 | 816 | proto_tree *subtree = NULL; |
3700 | 816 | int sub_tlv_offset = 0; |
3701 | 816 | int i = 0; |
3702 | 816 | unsigned clv_code, clv_len; |
3703 | 816 | int local_offset, local_len; |
3704 | 816 | proto_item *ti; |
3705 | 816 | float percentage; |
3706 | 816 | uint8_t sabm_length = 0, udabm_length = 0; |
3707 | 816 | int subsubclvs_len; |
3708 | 816 | int ssclv_code, ssclv_len; |
3709 | 816 | proto_tree *subsubtree = NULL; |
3710 | 816 | proto_item *ti_subsubtree = NULL; |
3711 | | |
3712 | 816 | increment_dissection_depth(pinfo); |
3713 | | |
3714 | 3.95k | while (i < subclvs_len) { |
3715 | | /* offset for each sub-TLV */ |
3716 | 3.23k | sub_tlv_offset = offset + i; |
3717 | | |
3718 | 3.23k | subtree = proto_tree_add_subtree(tree, tvb, sub_tlv_offset, 0, |
3719 | 3.23k | ett_isis_lsp_part_of_clv_ext_is_reachability_subtlv, |
3720 | 3.23k | &ti_subclvs, "subTLV"); |
3721 | 3.23k | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_code, |
3722 | 3.23k | tvb, sub_tlv_offset, 1, ENC_BIG_ENDIAN); |
3723 | 3.23k | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_len, tvb, sub_tlv_offset+1, 1, ENC_BIG_ENDIAN); |
3724 | 3.23k | clv_code = tvb_get_uint8(tvb, sub_tlv_offset); |
3725 | 3.23k | clv_len = tvb_get_uint8(tvb, sub_tlv_offset+1); |
3726 | 3.23k | proto_item_append_text(ti_subclvs, ": %s (c=%u, l=%u)", |
3727 | 3.23k | val_to_str_const(clv_code, isis_lsp_ext_is_reachability_code_vals, "Unknown"), |
3728 | 3.23k | clv_code, clv_len); |
3729 | 3.23k | proto_item_set_len(ti_subclvs, clv_len+2); |
3730 | | |
3731 | 3.23k | sub_tlv_offset += 2; |
3732 | | |
3733 | 3.23k | switch (clv_code) { |
3734 | 155 | case 3 : |
3735 | 155 | dissect_subclv_admin_group(tvb, subtree, sub_tlv_offset); |
3736 | 155 | break; |
3737 | 65 | case 4 : |
3738 | 65 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_link_local_identifier, |
3739 | 65 | tvb, sub_tlv_offset, 4, ENC_BIG_ENDIAN); |
3740 | 65 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_link_remote_identifier, |
3741 | 65 | tvb, sub_tlv_offset + 4, 4, ENC_BIG_ENDIAN); |
3742 | 65 | break; |
3743 | 76 | case 6 : |
3744 | 76 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_ipv4_interface_address, tvb, sub_tlv_offset, 4, ENC_BIG_ENDIAN); |
3745 | 76 | break; |
3746 | 68 | case 8 : |
3747 | 68 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_ipv4_neighbor_address, tvb, sub_tlv_offset, 4, ENC_BIG_ENDIAN); |
3748 | 68 | break; |
3749 | 59 | case 9 : |
3750 | 59 | dissect_subclv_max_bw(tvb, subtree, sub_tlv_offset); |
3751 | 59 | break; |
3752 | 23 | case 10: |
3753 | 23 | dissect_subclv_rsv_bw(tvb, subtree, sub_tlv_offset); |
3754 | 23 | break; |
3755 | 38 | case 11: |
3756 | 38 | dissect_subclv_unrsv_bw(tvb, subtree, sub_tlv_offset); |
3757 | 38 | break; |
3758 | 6 | case 12: |
3759 | 6 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_ipv6_interface_address, tvb, sub_tlv_offset, 16, ENC_NA); |
3760 | 6 | break; |
3761 | 106 | case 13: |
3762 | 106 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_ipv6_neighbor_address, tvb, sub_tlv_offset, 16, ENC_NA); |
3763 | 106 | break; |
3764 | 32 | case 14: |
3765 | | /* Extended Administrative Groups (rfc7308) */ |
3766 | 32 | dissect_subclv_ext_admin_group(tvb, subtree, sub_tlv_offset, clv_code, clv_len); |
3767 | 32 | break; |
3768 | 69 | case 15: |
3769 | | /* Link MSD */ |
3770 | 69 | local_offset = sub_tlv_offset; |
3771 | 69 | local_len = clv_len; |
3772 | 704 | while (local_len >= 2) { |
3773 | 635 | proto_tree_add_item(subtree, hf_isis_lsp_clv_igp_msd_type, tvb, local_offset, 1, ENC_NA); |
3774 | 635 | proto_tree_add_item(subtree, hf_isis_lsp_clv_igp_msd_value, tvb, local_offset+1, 1, ENC_NA); |
3775 | 635 | local_len -= 2; |
3776 | 635 | local_offset += 2; |
3777 | 635 | } |
3778 | 69 | break; |
3779 | 65 | case 16: |
3780 | | /* Application-Specific Link Attributes (rfc8919) */ |
3781 | 65 | local_offset = sub_tlv_offset; |
3782 | 65 | local_len = clv_len; |
3783 | 65 | proto_tree_add_item(subtree, hf_isis_lsp_clv_app_sabm_legacy, tvb, local_offset, 1, ENC_NA); |
3784 | 65 | sabm_length = tvb_get_uint8(tvb, local_offset) & 0x7f; |
3785 | 65 | proto_tree_add_uint(subtree, hf_isis_lsp_clv_app_sabm_length, tvb, local_offset, 1, sabm_length); |
3786 | 65 | proto_tree_add_item(subtree, hf_isis_lsp_clv_app_udabm_reserved, tvb, local_offset + 1, 1, ENC_NA); |
3787 | 65 | udabm_length = tvb_get_uint8(tvb, local_offset + 1) & 0x7f; |
3788 | 65 | proto_tree_add_uint(subtree, hf_isis_lsp_clv_app_udabm_length, tvb, local_offset + 1, 1, udabm_length); |
3789 | 65 | local_offset += 2; |
3790 | 65 | local_len -= 2; |
3791 | 65 | if (sabm_length > 0) { |
3792 | 52 | proto_tree_add_bitmask(subtree, tvb, local_offset, |
3793 | 52 | hf_isis_lsp_clv_app_sabm_bits, |
3794 | 52 | ett_isis_lsp_clv_app_sabm_bits, |
3795 | 52 | isis_lsp_app_sabm_bits, ENC_NA); |
3796 | 52 | local_offset += sabm_length; |
3797 | 52 | local_len -= sabm_length; |
3798 | 52 | } |
3799 | 65 | if (udabm_length > 0) { |
3800 | 49 | proto_tree_add_item(subtree, hf_isis_lsp_clv_app_udabm_bits, |
3801 | 49 | tvb, local_offset, udabm_length, ENC_NA); |
3802 | 49 | local_offset += udabm_length; |
3803 | 49 | local_len -= udabm_length; |
3804 | 49 | } |
3805 | 65 | if (local_len > 2) { |
3806 | | /* Dissect Link Attribute sub-sub-TLVs */ |
3807 | 7 | dissect_sub_clv_tlv_22_22_23_141_222_223(tvb, pinfo, subtree, local_offset, local_len); |
3808 | 7 | } |
3809 | 65 | break; |
3810 | 2 | case 17: |
3811 | | /* Generic Metric (rfc9843) */ |
3812 | 2 | proto_tree_add_item(subtree, hf_isis_lsp_clv_flex_algo_generic_metric_type, tvb, sub_tlv_offset, 1, ENC_NA); |
3813 | 2 | proto_tree_add_item(subtree, hf_isis_lsp_clv_flex_algo_generic_metric_value, tvb, sub_tlv_offset+1, 3, ENC_BIG_ENDIAN); |
3814 | 2 | break; |
3815 | 20 | case 18: |
3816 | 20 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_traffic_engineering_default_metric, |
3817 | 20 | tvb, sub_tlv_offset, 3, ENC_BIG_ENDIAN); |
3818 | 20 | break; |
3819 | 340 | case 22: |
3820 | 340 | dissect_subclv_bw_ct(tvb, subtree, sub_tlv_offset, clv_len); |
3821 | 340 | break; |
3822 | 24 | case 29: |
3823 | 24 | dissect_subclv_spb_link_metric(tvb, pinfo, subtree, |
3824 | 24 | sub_tlv_offset, clv_code, clv_len); |
3825 | 24 | break; |
3826 | 20 | case 31: |
3827 | 51 | case 32: |
3828 | 51 | dissect_subclv_adj_sid(tvb, pinfo, subtree, sub_tlv_offset, clv_code, clv_len); |
3829 | 51 | break; |
3830 | 31 | case 33: |
3831 | | /* Unidirectional Link Delay (rfc8570) */ |
3832 | 31 | proto_tree_add_bitmask(subtree, tvb, sub_tlv_offset, |
3833 | 31 | hf_isis_lsp_ext_is_reachability_unidir_link_flags, |
3834 | 31 | ett_isis_lsp_clv_unidir_link_flags, |
3835 | 31 | unidir_link_flags, ENC_NA); |
3836 | 31 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_link_delay, tvb, sub_tlv_offset+1, 3, ENC_BIG_ENDIAN); |
3837 | 31 | break; |
3838 | 19 | case 34: |
3839 | | /* Min/Max Unidirectional Link Delay (rfc8570) */ |
3840 | 19 | proto_tree_add_bitmask(subtree, tvb, sub_tlv_offset, |
3841 | 19 | hf_isis_lsp_ext_is_reachability_unidir_link_flags, |
3842 | 19 | ett_isis_lsp_clv_unidir_link_flags, |
3843 | 19 | unidir_link_flags, ENC_NA); |
3844 | 19 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_link_delay_min, tvb, sub_tlv_offset+1, 3, ENC_BIG_ENDIAN); |
3845 | 19 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_link_reserved, tvb, sub_tlv_offset+4, 1, ENC_NA); |
3846 | 19 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_link_delay_max, tvb, sub_tlv_offset+5, 3, ENC_BIG_ENDIAN); |
3847 | 19 | break; |
3848 | 14 | case 35: |
3849 | | /* Unidirectional Delay Variation (rfc8570) */ |
3850 | 14 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_link_reserved, tvb, sub_tlv_offset, 1, ENC_NA); |
3851 | 14 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_delay_variation, tvb, sub_tlv_offset+1, 3, ENC_BIG_ENDIAN); |
3852 | 14 | break; |
3853 | 8 | case 36: |
3854 | | /* Unidirectional Link Loss (rfc8570) */ |
3855 | 8 | proto_tree_add_bitmask(subtree, tvb, sub_tlv_offset, |
3856 | 8 | hf_isis_lsp_ext_is_reachability_unidir_link_flags, |
3857 | 8 | ett_isis_lsp_clv_unidir_link_flags, |
3858 | 8 | unidir_link_flags, ENC_NA); |
3859 | 8 | ti = proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_link_loss, tvb, sub_tlv_offset+1, 3, ENC_BIG_ENDIAN); |
3860 | 8 | if (ti) { |
3861 | 7 | percentage = (float)tvb_get_uint24(tvb, sub_tlv_offset+1, ENC_BIG_ENDIAN); |
3862 | 7 | proto_item_append_text(ti, " (%f %%)", percentage * 0.000003); |
3863 | 7 | } |
3864 | 8 | break; |
3865 | 15 | case 37: |
3866 | | /* 37: Unidirectional Residual Bandwidth (rfc8570) */ |
3867 | 15 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_residual_bandwidth, tvb, sub_tlv_offset, 4, ENC_BIG_ENDIAN); |
3868 | 15 | break; |
3869 | 8 | case 38: |
3870 | | /* 38: Unidirectional Available Bandwidth (rfc8570) */ |
3871 | 8 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_available_bandwidth, tvb, sub_tlv_offset, 4, ENC_BIG_ENDIAN); |
3872 | 8 | break; |
3873 | 3 | case 39: |
3874 | | /* 39: Unidirectional Utilized Bandwidth (rfc8570) */ |
3875 | 3 | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_unidir_utilized_bandwidth, tvb, sub_tlv_offset, 4, ENC_BIG_ENDIAN); |
3876 | 3 | break; |
3877 | 24 | case 43: |
3878 | | /* SRv6 End.X SID */ |
3879 | 24 | proto_tree_add_bitmask(subtree, tvb, sub_tlv_offset, |
3880 | 24 | hf_isis_lsp_clv_srv6_endx_sid_flags, |
3881 | 24 | ett_isis_lsp_clv_srv6_endx_sid_flags, |
3882 | 24 | srv6_endx_sid_flags, ENC_BIG_ENDIAN); |
3883 | 24 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_alg, tvb, sub_tlv_offset+1, 1, ENC_NA); |
3884 | 24 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_weight, tvb, sub_tlv_offset+2, 1, ENC_BIG_ENDIAN); |
3885 | 24 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_endpoint_behavior, tvb, sub_tlv_offset+3, 2, ENC_BIG_ENDIAN); |
3886 | 24 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_sid, tvb, sub_tlv_offset+5, 16, ENC_NA); |
3887 | 24 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_subsubclvs_len, tvb, sub_tlv_offset+21, 1, ENC_NA); |
3888 | 24 | subsubclvs_len = tvb_get_uint8(tvb, sub_tlv_offset+21); |
3889 | 24 | local_offset = sub_tlv_offset + 22; |
3890 | 159 | while (subsubclvs_len >= 2) { |
3891 | 151 | ssclv_code = tvb_get_uint8(tvb, local_offset); |
3892 | 151 | ssclv_len = tvb_get_uint8(tvb, local_offset+1); |
3893 | 151 | subsubtree = proto_tree_add_subtree_format(subtree, tvb, local_offset, ssclv_len+2, |
3894 | 151 | ett_isis_lsp_clv_srv6_endx_sid_sub_sub_tlv, |
3895 | 151 | &ti_subsubtree, "subsubTLV: %s (c=%u, l=%u)", |
3896 | 151 | val_to_str_const(ssclv_code, isis_lsp_srv6_loc_end_sid_sub_sub_tlv_vals, "Unknown"), |
3897 | 151 | ssclv_code, ssclv_len); |
3898 | 151 | subsubclvs_len -= 2; |
3899 | 151 | local_offset += 2; |
3900 | 151 | if (ssclv_len > subsubclvs_len) { |
3901 | 15 | proto_tree_add_expert_format(subtree, pinfo, |
3902 | 15 | &ei_isis_lsp_short_clv, |
3903 | 15 | tvb, local_offset-2, 2, |
3904 | 15 | "Too short Sub-Sub-TLV length %u (%d bytes left)", |
3905 | 15 | ssclv_len, subsubclvs_len); |
3906 | 15 | break; |
3907 | 15 | } |
3908 | 136 | switch (ssclv_code) { |
3909 | 14 | case 1: |
3910 | | /* SRv6 SID Structure (rfc9352) */ |
3911 | 14 | dissect_srv6_sid_struct_subsubclv(tvb, pinfo, subsubtree, ti_subsubtree, |
3912 | 14 | local_offset, ssclv_code, ssclv_len); |
3913 | 14 | break; |
3914 | 122 | default: |
3915 | 122 | proto_tree_add_expert_format(subsubtree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, |
3916 | 122 | local_offset, ssclv_len, |
3917 | 122 | "Unknown Sub-Sub-TLV: Type: %u, Length: %u", |
3918 | 122 | ssclv_code, ssclv_len); |
3919 | 122 | break; |
3920 | 136 | } |
3921 | 135 | subsubclvs_len -= ssclv_len; |
3922 | 135 | local_offset += ssclv_len; |
3923 | 135 | } |
3924 | 23 | break; |
3925 | 34 | case 44: |
3926 | | /* SRv6 LAN End.X SID */ |
3927 | 34 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_system_id, tvb, sub_tlv_offset, 6, ENC_NA); |
3928 | 34 | proto_tree_add_bitmask(subtree, tvb, sub_tlv_offset+6, |
3929 | 34 | hf_isis_lsp_clv_srv6_endx_sid_flags, |
3930 | 34 | ett_isis_lsp_clv_srv6_endx_sid_flags, |
3931 | 34 | srv6_endx_sid_flags, ENC_BIG_ENDIAN); |
3932 | 34 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_alg, tvb, sub_tlv_offset+7, 1, ENC_NA); |
3933 | 34 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_weight, tvb, sub_tlv_offset+8, 1, ENC_BIG_ENDIAN); |
3934 | 34 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_endpoint_behavior, tvb, sub_tlv_offset+9, 2, ENC_BIG_ENDIAN); |
3935 | 34 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_sid, tvb, sub_tlv_offset+11, 16, ENC_NA); |
3936 | 34 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_endx_sid_subsubclvs_len, tvb, sub_tlv_offset+27, 1, ENC_NA); |
3937 | 34 | subsubclvs_len = tvb_get_uint8(tvb, sub_tlv_offset+27); |
3938 | 34 | local_offset = sub_tlv_offset+28; |
3939 | 298 | while (subsubclvs_len >= 2) { |
3940 | 286 | ssclv_code = tvb_get_uint8(tvb, local_offset); |
3941 | 286 | ssclv_len = tvb_get_uint8(tvb, local_offset+1); |
3942 | 286 | subsubtree = proto_tree_add_subtree_format(subtree, tvb, local_offset, ssclv_len+2, |
3943 | 286 | ett_isis_lsp_clv_srv6_endx_sid_sub_sub_tlv, |
3944 | 286 | &ti_subsubtree, "subsubTLV: %s (c=%u, l=%u)", |
3945 | 286 | val_to_str_const(ssclv_code, isis_lsp_srv6_loc_end_sid_sub_sub_tlv_vals, "Unknown"), |
3946 | 286 | ssclv_code, ssclv_len); |
3947 | 286 | subsubclvs_len -= 2; |
3948 | 286 | local_offset += 2; |
3949 | 286 | if (ssclv_len > subsubclvs_len) { |
3950 | 21 | proto_tree_add_expert_format(subtree, pinfo, |
3951 | 21 | &ei_isis_lsp_short_clv, |
3952 | 21 | tvb, local_offset-2, 2, |
3953 | 21 | "Too short Sub-Sub-TLV length %u (%d bytes left)", |
3954 | 21 | ssclv_len, subsubclvs_len); |
3955 | 21 | break; |
3956 | 21 | } |
3957 | 265 | switch (ssclv_code) { |
3958 | 11 | case 1: |
3959 | | /* SRv6 SID Structure (rfc9352) */ |
3960 | 11 | dissect_srv6_sid_struct_subsubclv(tvb, pinfo, subsubtree, ti_subsubtree, |
3961 | 11 | local_offset, ssclv_code, ssclv_len); |
3962 | 11 | break; |
3963 | 254 | default: |
3964 | 254 | proto_tree_add_expert_format(subsubtree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, |
3965 | 254 | local_offset, ssclv_len, |
3966 | 254 | "Unknown Sub-Sub-TLV: Type: %u, Length: %u", |
3967 | 254 | ssclv_code, ssclv_len); |
3968 | 254 | break; |
3969 | 265 | } |
3970 | 264 | subsubclvs_len -= ssclv_len; |
3971 | 264 | local_offset += ssclv_len; |
3972 | 264 | } |
3973 | 33 | break; |
3974 | 1.86k | default: |
3975 | 1.86k | proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_value, tvb, sub_tlv_offset, clv_len, ENC_NA); |
3976 | 1.86k | break; |
3977 | 3.23k | } |
3978 | 3.13k | i += clv_len + 2; |
3979 | 3.13k | } |
3980 | 720 | decrement_dissection_depth(pinfo); |
3981 | 720 | } |
3982 | | |
3983 | | |
3984 | | /* |
3985 | | * Name: dissect_lsp_ext_is_reachability_clv() |
3986 | | * |
3987 | | * Description: Decode a Extended IS Reachability CLV - code 22 |
3988 | | * RFC 3784 |
3989 | | * |
3990 | | * The extended IS reachability TLV is an extended version |
3991 | | * of the IS reachability TLV (code 2). It encodes the metric |
3992 | | * as a 24-bit unsigned integer and allows to add sub-CLV(s). |
3993 | | * |
3994 | | * CALLED BY TLV 222 DISSECTOR |
3995 | | * |
3996 | | * Input: |
3997 | | * tvbuff_t * : tvbuffer for packet data |
3998 | | * proto_tree * : protocol display tree to fill out. May be NULL |
3999 | | * int : offset into packet data where we are. |
4000 | | * int : length of IDs in packet. |
4001 | | * int : length of clv we are decoding |
4002 | | * |
4003 | | * Output: |
4004 | | * void, but we will add to proto tree if !NULL. |
4005 | | */ |
4006 | | |
4007 | | static void |
4008 | | dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, |
4009 | | int offset, isis_data_t *isis _U_, int length) |
4010 | 462 | { |
4011 | 462 | proto_item *ti, *ti_subclvs_len; |
4012 | 462 | proto_tree *ntree = NULL; |
4013 | 462 | unsigned subclvs_len; |
4014 | 462 | unsigned len; |
4015 | | |
4016 | 1.52k | while (length > 0) { |
4017 | 1.06k | ntree = proto_tree_add_subtree(tree, tvb, offset, -1, |
4018 | 1.06k | ett_isis_lsp_part_of_clv_ext_is_reachability, &ti, "IS Neighbor"); |
4019 | | |
4020 | 1.06k | proto_tree_add_item(ntree, hf_isis_lsp_ext_is_reachability_is_neighbor_id, tvb, offset, 7, ENC_NA); |
4021 | 1.06k | proto_item_append_text(ti, ": %s", tvb_print_system_id(pinfo->pool, tvb, offset, 7)); |
4022 | | |
4023 | 1.06k | proto_tree_add_item(ntree, hf_isis_lsp_ext_is_reachability_metric, tvb, offset+7, 3, ENC_BIG_ENDIAN); |
4024 | | |
4025 | 1.06k | ti_subclvs_len = proto_tree_add_item(ntree, hf_isis_lsp_ext_is_reachability_subclvs_len, tvb, offset+10, 1, ENC_BIG_ENDIAN); |
4026 | | |
4027 | 1.06k | subclvs_len = tvb_get_uint8(tvb, offset+10); |
4028 | 1.06k | if (subclvs_len == 0) { |
4029 | 244 | proto_item_append_text(ti_subclvs_len, " (no sub-TLVs present)"); |
4030 | 244 | } |
4031 | 821 | else { |
4032 | 821 | dissect_sub_clv_tlv_22_22_23_141_222_223(tvb, pinfo, ntree, |
4033 | 821 | offset + 11, subclvs_len); |
4034 | 821 | } |
4035 | | |
4036 | 1.06k | len = 11 + subclvs_len; |
4037 | 1.06k | proto_item_set_len (ti, len); |
4038 | 1.06k | offset += len; |
4039 | 1.06k | length -= len; |
4040 | 1.06k | } |
4041 | 462 | } |
4042 | | |
4043 | | /* |
4044 | | * Name: dissect_lsp_mt_reachable_IPv4_prefx_clv() |
4045 | | * |
4046 | | * Description: Decode Multi-Topology IPv4 Prefixes - code 235 |
4047 | | * |
4048 | | * |
4049 | | * Input: |
4050 | | * tvbuff_t * : tvbuffer for packet data |
4051 | | * proto_tree * : protocol display tree to fill out. May be NULL |
4052 | | * int : offset into packet data where we are. |
4053 | | * int : length of IDs in packet. |
4054 | | * int : length of clv we are decoding |
4055 | | * |
4056 | | * Output: |
4057 | | * void, but we will add to proto tree if !NULL. |
4058 | | */ |
4059 | | static void |
4060 | | dissect_lsp_mt_reachable_IPv4_prefx_clv(tvbuff_t *tvb, packet_info* pinfo, |
4061 | | proto_tree *tree, int offset, isis_data_t *isis _U_, int length) |
4062 | 24 | { |
4063 | 24 | if (length < 2) { |
4064 | 3 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
4065 | 3 | "short lsp multi-topology reachable IPv4 prefixes(%d vs %d)", length, 2 ); |
4066 | 3 | return; |
4067 | 3 | } |
4068 | 21 | dissect_lsp_mt_id(tvb, tree, offset); |
4069 | 21 | dissect_lsp_ext_ip_reachability_clv(tvb, pinfo, tree, offset+2, 0, length-2); |
4070 | 21 | } |
4071 | | |
4072 | | /* |
4073 | | * Name: dissect_lsp_mt_reachable_IPv6_prefx_clv() |
4074 | | * |
4075 | | * Description: Decode Multi-Topology IPv6 Prefixes - code 237 |
4076 | | * |
4077 | | * |
4078 | | * Input: |
4079 | | * tvbuff_t * : tvbuffer for packet data |
4080 | | * proto_tree * : protocol display tree to fill out. May be NULL |
4081 | | * int : offset into packet data where we are. |
4082 | | * int : length of IDs in packet. |
4083 | | * int : length of clv we are decoding |
4084 | | * |
4085 | | * Output: |
4086 | | * void, but we will add to proto tree if !NULL. |
4087 | | */ |
4088 | | static void |
4089 | | dissect_lsp_mt_reachable_IPv6_prefx_clv(tvbuff_t *tvb, packet_info* pinfo, |
4090 | | proto_tree *tree, int offset, isis_data_t *isis _U_, int length) |
4091 | 38 | { |
4092 | 38 | if (length < 2) { |
4093 | 2 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
4094 | 2 | "short lsp multi-topology reachable IPv6 prefixes(%d vs %d)", length, 2 ); |
4095 | 2 | return; |
4096 | 2 | } |
4097 | 36 | dissect_lsp_mt_id(tvb, tree, offset); |
4098 | 36 | dissect_lsp_ipv6_reachability_clv(tvb, pinfo, tree, offset+2, 0, length-2); |
4099 | 36 | } |
4100 | | |
4101 | | |
4102 | | /* |
4103 | | * Name: dissect_lsp_mt_is_reachability_clv() |
4104 | | * |
4105 | | * Description: Decode Multi-Topology Intermediate Systems - code 222 |
4106 | | * |
4107 | | * |
4108 | | * Input: |
4109 | | * tvbuff_t * : tvbuffer for packet data |
4110 | | * proto_tree * : protocol display tree to fill out. May be NULL |
4111 | | * int : offset into packet data where we are. |
4112 | | * int : unused |
4113 | | * int : length of clv we are decoding |
4114 | | * |
4115 | | * Output: |
4116 | | * void, but we will add to proto tree if !NULL. |
4117 | | */ |
4118 | | |
4119 | | static void |
4120 | | dissect_lsp_mt_is_reachability_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
4121 | | isis_data_t *isis _U_, int length) |
4122 | 58 | { |
4123 | 58 | if (length < 2) { |
4124 | 3 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
4125 | 3 | "short lsp reachability(%d vs %d)", length, 2 ); |
4126 | 3 | return; |
4127 | 3 | } |
4128 | | |
4129 | | /* |
4130 | | * the MT ID value dissection is used in other LSPs so we push it |
4131 | | * in a function |
4132 | | */ |
4133 | 55 | dissect_lsp_mt_id(tvb, tree, offset); |
4134 | | /* |
4135 | | * fix here. No need to parse TLV 22 (with bugs) while it is |
4136 | | * already done correctly!! |
4137 | | */ |
4138 | 55 | dissect_lsp_ext_is_reachability_clv(tvb, pinfo, tree, offset+2, 0, length-2); |
4139 | 55 | } |
4140 | | |
4141 | | |
4142 | | /* |
4143 | | * Name: dissect_lsp_ori_buffersize_clv() |
4144 | | * |
4145 | | * Description: |
4146 | | * This CLV is used give neighbor buffer size |
4147 | | * |
4148 | | * Input: |
4149 | | * tvbuff_t * : tvbuffer for packet data |
4150 | | * proto_tree * : protocol display tree to fill out. May be NULL |
4151 | | * int : offset into packet data where we are. |
4152 | | * int : length of IDs in packet. |
4153 | | * int : length of clv we are decoding |
4154 | | * |
4155 | | * Output: |
4156 | | * void, but we will add to proto tree if !NULL. |
4157 | | */ |
4158 | | static void |
4159 | | dissect_lsp_ori_buffersize_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
4160 | | isis_data_t *isis, int length) |
4161 | 106 | { |
4162 | 106 | if ( length != 2 ) { |
4163 | 103 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
4164 | 103 | "short lsp partition DIS(%d vs %d)", length, isis->system_id_len ); |
4165 | 103 | return; |
4166 | 103 | } |
4167 | | /* |
4168 | | * Gotta build a sub-tree for all our pieces |
4169 | | */ |
4170 | 3 | proto_tree_add_item(tree, hf_isis_lsp_originating_lsp_buffer_size, tvb, offset, length, ENC_BIG_ENDIAN); |
4171 | 3 | } |
4172 | | |
4173 | | |
4174 | | /* |
4175 | | * Name: dissect_lsp_partition_dis_clv() |
4176 | | * |
4177 | | * Description: |
4178 | | * This CLV is used to indicate which system is the designated |
4179 | | * IS for partition repair. This means just putting out the |
4180 | | * "isis->system_id_len"-octet IS. |
4181 | | * |
4182 | | * Input: |
4183 | | * tvbuff_t * : tvbuffer for packet data |
4184 | | * proto_tree * : protocol display tree to fill out. May be NULL |
4185 | | * int : offset into packet data where we are. |
4186 | | * int : length of IDs in packet. |
4187 | | * int : length of clv we are decoding |
4188 | | * |
4189 | | * Output: |
4190 | | * void, but we will add to proto tree if !NULL. |
4191 | | */ |
4192 | | static void |
4193 | | dissect_lsp_partition_dis_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
4194 | | isis_data_t *isis, int length) |
4195 | 216 | { |
4196 | 216 | if ( length < isis->system_id_len ) { |
4197 | 28 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
4198 | 28 | "short lsp partition DIS(%d vs %d)", length, isis->system_id_len ); |
4199 | 28 | return; |
4200 | 28 | } |
4201 | | /* |
4202 | | * Gotta build a sub-tree for all our pieces |
4203 | | */ |
4204 | 188 | proto_tree_add_item( tree, hf_isis_lsp_partition_designated_l2_is, tvb, offset, isis->system_id_len, ENC_NA); |
4205 | | |
4206 | 188 | length -= isis->system_id_len; |
4207 | 188 | offset += isis->system_id_len; |
4208 | 188 | if ( length > 0 ) { |
4209 | 179 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_long_clv, tvb, offset, |
4210 | 179 | "Long lsp partition DIS, %d left over", length ); |
4211 | 179 | return; |
4212 | 179 | } |
4213 | 188 | } |
4214 | | |
4215 | | /* |
4216 | | * Name: dissect_lsp_prefix_neighbors_clv() |
4217 | | * |
4218 | | * Description: |
4219 | | * The prefix CLV describes what other (OSI) networks we can reach |
4220 | | * and what their cost is. It is built from a metric block |
4221 | | * (see dissect_metric) followed by n addresses. |
4222 | | * |
4223 | | * Input: |
4224 | | * tvbuff_t * : tvbuffer for packet data |
4225 | | * proto_tree * : protocol display tree to fill out. May be NULL |
4226 | | * int : offset into packet data where we are. |
4227 | | * int : length of IDs in packet. |
4228 | | * int : length of clv we are decoding |
4229 | | * |
4230 | | * Output: |
4231 | | * void, but we will add to proto tree if !NULL. |
4232 | | */ |
4233 | | static void |
4234 | | dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
4235 | | isis_data_t *isis _U_, int length) |
4236 | 347 | { |
4237 | 347 | char *sbuf; |
4238 | 347 | int mylen; |
4239 | | |
4240 | 347 | if ( length < 4 ) { |
4241 | 17 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
4242 | 17 | "Short lsp prefix neighbors (%d vs 4)", length ); |
4243 | 17 | return; |
4244 | 17 | } |
4245 | 330 | if ( tree ) { |
4246 | 330 | dissect_metric (tvb, pinfo, tree, offset, |
4247 | 330 | hf_isis_lsp_default, hf_isis_lsp_default_support, true ); |
4248 | 330 | dissect_metric (tvb, pinfo, tree, offset+1, |
4249 | 330 | hf_isis_lsp_delay, hf_isis_lsp_delay_support, false ); |
4250 | 330 | dissect_metric (tvb, pinfo, tree, offset+2, |
4251 | 330 | hf_isis_lsp_expense, hf_isis_lsp_expense_support, false ); |
4252 | 330 | dissect_metric (tvb, pinfo, tree, offset+3, |
4253 | 330 | hf_isis_lsp_error, hf_isis_lsp_error_support, false ); |
4254 | 330 | } |
4255 | 330 | offset += 4; |
4256 | 330 | length -= 4; |
4257 | 942 | while ( length > 0 ) { |
4258 | | /* |
4259 | | * This is a length in "semi-octets", i.e., in nibbles. |
4260 | | */ |
4261 | 921 | mylen = tvb_get_uint8(tvb, offset); |
4262 | 921 | length--; |
4263 | 921 | if (length<=0) { |
4264 | 267 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, |
4265 | 267 | "Zero payload space after length in prefix neighbor" ); |
4266 | 267 | return; |
4267 | 267 | } |
4268 | 654 | if ( mylen > length*2) { |
4269 | 42 | proto_tree_add_expert_format_remaining(tree, pinfo, &ei_isis_lsp_long_clv, tvb, offset, |
4270 | 42 | "Integral length of prefix neighbor too long (%d vs %d)", mylen, length*2 ); |
4271 | 42 | return; |
4272 | 42 | } |
4273 | | |
4274 | | /* |
4275 | | * Lets turn the area address into "standard" 0000.0000.etc |
4276 | | * format string. |
4277 | | */ |
4278 | 612 | sbuf = print_address_prefix( pinfo->pool, tvb, offset+1, mylen ); |
4279 | | /* and spit it out */ |
4280 | 612 | proto_tree_add_string( tree, hf_isis_lsp_area_address_str, tvb, offset, (mylen+1)/2 + 1, sbuf); |
4281 | | |
4282 | 612 | offset += (mylen + 1)/2 + 1; |
4283 | 612 | length -= (mylen + 1)/2; /* length already adjusted for len fld*/ |
4284 | 612 | } |
4285 | 330 | } |
4286 | | |
4287 | | /* |
4288 | | * Name: dissect_lsp_ipv6_te_router_id() |
4289 | | * |
4290 | | * Description: Decode an IPv6 TE Router ID CLV - code 140. |
4291 | | * |
4292 | | * Calls into the clv common one. |
4293 | | * |
4294 | | * Input: |
4295 | | * tvbuff_t * : tvbuffer for packet data |
4296 | | * proto_tree * : proto tree to build on (may be null) |
4297 | | * int : current offset into packet data |
4298 | | * int : length of IDs in packet. |
4299 | | * int : length of this clv |
4300 | | * |
4301 | | * Output: |
4302 | | * void, will modify proto_tree if not null. |
4303 | | */ |
4304 | | static void |
4305 | | dissect_lsp_ipv6_te_router_id_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
4306 | | isis_data_t *isis _U_, int length) |
4307 | 21 | { |
4308 | 21 | isis_dissect_ipv6_int_clv(tree, pinfo, tvb, &ei_isis_lsp_short_clv, offset, length, |
4309 | 21 | hf_isis_lsp_clv_ipv6_te_router_id ); |
4310 | 21 | } |
4311 | | |
4312 | | /* |
4313 | | * Name: dissect_lsp_srv6_locator_subclv () |
4314 | | * |
4315 | | * Description: parses IP reach subTLVs |
4316 | | * Called by various IP Reachability dissectors. |
4317 | | * |
4318 | | * Input: |
4319 | | * tvbuff_t * : tvbuffer for packet data |
4320 | | * packet_info * : expert error misuse reporting |
4321 | | * proto_tree * : protocol display tree to fill out. |
4322 | | * int : offset into packet data where we are (beginning of the sub_clv value). |
4323 | | * |
4324 | | * Output: |
4325 | | * void |
4326 | | */ |
4327 | | static void |
4328 | | dissect_lsp_srv6_locator_subclv(tvbuff_t *tvb, packet_info *pinfo, |
4329 | | proto_tree *subtree, proto_item *subtree_item, |
4330 | | int offset, int length, int clv_code, int clv_len) |
4331 | 166 | { |
4332 | 166 | int subsubclvs_len; |
4333 | 166 | int ssclv_code, ssclv_len; |
4334 | 166 | proto_tree *subsubtree; |
4335 | 166 | proto_item *ti_subsubtree = NULL; |
4336 | | |
4337 | 166 | switch (clv_code) { |
4338 | 13 | case 4: |
4339 | | /* Prefix Attribute Flags */ |
4340 | 13 | dissect_prefix_attr_flags_subclv(tvb, pinfo, subtree, subtree_item, offset, clv_code, clv_len); |
4341 | 13 | break; |
4342 | 0 | case 5: |
4343 | | /* SRv6 End SID */ |
4344 | 0 | if (clv_len < 20) { |
4345 | 0 | proto_tree_add_expert_format(subtree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset-2, clv_len+2, |
4346 | 0 | "Invalid SubSub-TLV Length (%d vs min 20)", clv_len); |
4347 | 0 | break; |
4348 | 0 | } |
4349 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_end_sid_flags, tvb, offset, 1, ENC_NA); |
4350 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_end_sid_endpoint_behavior, tvb, offset+1, 2, ENC_BIG_ENDIAN); |
4351 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_end_sid_sid, tvb, offset+3, 16, ENC_NA); |
4352 | 0 | proto_tree_add_item(subtree, hf_isis_lsp_clv_srv6_end_sid_subsubclvs_len, tvb, offset+19, 1, ENC_NA); |
4353 | 0 | subsubclvs_len = tvb_get_uint8(tvb, offset + 19); |
4354 | 0 | offset += 20; |
4355 | 0 | length -= 20; |
4356 | 0 | if (subsubclvs_len > length) { |
4357 | 0 | proto_tree_add_expert_format(subtree, pinfo, &ei_isis_lsp_short_clv, tvb, offset-1, 1, |
4358 | 0 | "Too short SRv6 End SID Sub-Sub-TLV length %u (%d bytes left)", |
4359 | 0 | subsubclvs_len, length); |
4360 | 0 | break; |
4361 | 0 | } |
4362 | 0 | while (subsubclvs_len >= 2) { |
4363 | 0 | ssclv_code = tvb_get_uint8(tvb, offset); |
4364 | 0 | ssclv_len = tvb_get_uint8(tvb, offset + 1); |
4365 | 0 | subsubtree = proto_tree_add_subtree_format(subtree, tvb, offset, ssclv_len+2, |
4366 | 0 | ett_isis_lsp_clv_srv6_loc_end_sid_sub_sub_tlv, |
4367 | 0 | &ti_subsubtree, |
4368 | 0 | "subsubTLV: %s (c=%u, l=%u)", |
4369 | 0 | val_to_str_const(ssclv_code, isis_lsp_srv6_loc_end_sid_sub_sub_tlv_vals, "Unknown"), |
4370 | 0 | ssclv_code, ssclv_len); |
4371 | 0 | offset += 2; |
4372 | 0 | subsubclvs_len -= 2; |
4373 | 0 | if (ssclv_len > subsubclvs_len) { |
4374 | 0 | proto_tree_add_expert_format(subtree, pinfo, &ei_isis_lsp_short_clv, tvb, offset-2, 2, |
4375 | 0 | "Invalid Sub-Sub-TLV length (%u vs %d bytes left)", |
4376 | 0 | ssclv_len, subsubclvs_len); |
4377 | 0 | break; |
4378 | 0 | } |
4379 | 0 | switch (ssclv_code) { |
4380 | 0 | case 1: |
4381 | | /* SRv6 SID Structure (rfc9352) */ |
4382 | 0 | dissect_srv6_sid_struct_subsubclv(tvb, pinfo, subsubtree, ti_subsubtree, |
4383 | 0 | offset, ssclv_code, ssclv_len); |
4384 | 0 | break; |
4385 | 0 | default: |
4386 | 0 | proto_tree_add_expert_format(subsubtree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, |
4387 | 0 | offset, ssclv_len, |
4388 | 0 | "Unknown Sub-Sub-TLV: Type: %u, Length: %u", |
4389 | 0 | ssclv_code, ssclv_len); |
4390 | 0 | break; |
4391 | 0 | } |
4392 | 0 | offset += ssclv_len; |
4393 | 0 | subsubclvs_len -= ssclv_len; |
4394 | 0 | } |
4395 | 0 | break; |
4396 | 153 | default: |
4397 | 153 | proto_tree_add_expert_format(subtree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, |
4398 | 153 | offset, clv_len, |
4399 | 153 | "Unknown Sub-TLV: Type: %u, Length: %u", clv_code, clv_len); |
4400 | 153 | break; |
4401 | 166 | } |
4402 | 166 | } |
4403 | | |
4404 | | /* |
4405 | | * Name: dissect_lsp_srv6_locator_entry() |
4406 | | * |
4407 | | * Description: Decode each SRv6 locator entry in SRv6 Locator TLV |
4408 | | * |
4409 | | * Input: |
4410 | | * tvbuff_t * : tvbuffer for packet data |
4411 | | * packet_info * : expert error misuse reporting |
4412 | | * proto_tree * : proto tree to build on (may be null) |
4413 | | * int : current offset into packet data |
4414 | | * isis_data_t : data given to subdissectors |
4415 | | * int : length of clv we are decoding |
4416 | | * |
4417 | | * Output: |
4418 | | * int : Length of each SRv6 locator entry (-1 when it cannot dissect) |
4419 | | */ |
4420 | | static int |
4421 | | dissect_lsp_srv6_locator_entry(tvbuff_t *tvb, packet_info* pinfo, |
4422 | | proto_tree *tree, int offset, |
4423 | | isis_data_t *isis _U_, int length) |
4424 | 158 | { |
4425 | 158 | int locator_length; |
4426 | 158 | proto_tree *loctree = NULL; |
4427 | 158 | proto_item *ti_loctree = NULL; |
4428 | 158 | uint32_t bit_length; |
4429 | 158 | int byte_length; |
4430 | 158 | ws_in6_addr prefix; |
4431 | 158 | address prefix_addr; |
4432 | 158 | char *prefix_str; |
4433 | 158 | uint8_t algorithm; |
4434 | 158 | int subtlv_length; |
4435 | 158 | int clv_code, clv_len; |
4436 | 158 | proto_item *ti_subtree = NULL; |
4437 | 158 | proto_tree *subtree = NULL; |
4438 | | |
4439 | 158 | if (length < 9) { |
4440 | 6 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, length, |
4441 | 6 | "Too short SRv6 locator entry (%d vs min 9)", |
4442 | 6 | length); |
4443 | 6 | return (-1); |
4444 | 6 | } |
4445 | | |
4446 | | /* (1) Determine the length of each SRv6 locator entry, first */ |
4447 | | /* Loc Size */ |
4448 | 152 | bit_length = tvb_get_uint8(tvb, offset+6); |
4449 | 152 | if (bit_length <= 0 || bit_length > 128) { |
4450 | 34 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset+6, 1, |
4451 | 34 | "Invalid SRv6 locator size %u (should be 1-128)", |
4452 | 34 | bit_length); |
4453 | 34 | return (-1); |
4454 | 34 | } |
4455 | 118 | byte_length = (bit_length + 7) / 8; |
4456 | 118 | if (length < 7 + byte_length + 1) { |
4457 | 4 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, length, |
4458 | 4 | "Too short SRv6 locator entry (%d vs min %d)", |
4459 | 4 | length, 7+byte_length+1); |
4460 | 4 | return (-1); |
4461 | 4 | } |
4462 | | |
4463 | | /* Sub-TLV Length */ |
4464 | 114 | subtlv_length = tvb_get_uint8(tvb, offset+7+byte_length); |
4465 | | |
4466 | | /* Length of each SRv6 locator */ |
4467 | 114 | locator_length = (7 + byte_length + 1) + subtlv_length; |
4468 | 114 | if (length < locator_length) { |
4469 | 52 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset, length, |
4470 | 52 | "Too short SRv6 locator entry (%d vs %d bytes left)", |
4471 | 52 | locator_length, length); |
4472 | 52 | return (-1); |
4473 | 52 | } |
4474 | | |
4475 | | /* (2) Dissect each SRv6 locator entry */ |
4476 | 62 | loctree = proto_tree_add_subtree_format(tree, tvb, offset, locator_length, |
4477 | 62 | ett_isis_lsp_clv_srv6_loc_entry, |
4478 | 62 | &ti_loctree, "SRv6 Locator"); |
4479 | | /* Metric */ |
4480 | 62 | proto_tree_add_item(loctree, hf_isis_lsp_srv6_loc_metric, tvb, offset, 4, ENC_BIG_ENDIAN); |
4481 | 62 | offset += 4; |
4482 | 62 | length -= 4; |
4483 | | |
4484 | | /* Flags */ |
4485 | 62 | proto_tree_add_bitmask(loctree, tvb, offset, hf_isis_lsp_srv6_loc_flags, |
4486 | 62 | ett_isis_lsp_clv_srv6_loc_flags, srv6_locator_flags, ENC_NA); |
4487 | 62 | offset++; |
4488 | 62 | length--; |
4489 | | |
4490 | | /* Algorithm */ |
4491 | 62 | algorithm = tvb_get_uint8(tvb, offset); |
4492 | 62 | proto_tree_add_item(loctree, hf_isis_lsp_srv6_loc_alg, tvb, offset, 1, ENC_BIG_ENDIAN); |
4493 | 62 | offset++; |
4494 | 62 | length--; |
4495 | | |
4496 | | /* Locator Size */ |
4497 | 62 | proto_tree_add_item(loctree, hf_isis_lsp_srv6_loc_size, tvb, offset, 1, ENC_BIG_ENDIAN); |
4498 | 62 | offset++; |
4499 | 62 | length--; |
4500 | | |
4501 | | /* Locator */ |
4502 | 62 | (void)tvb_get_ipv6_addr_with_prefix_len(tvb, offset, &prefix, bit_length); |
4503 | 62 | proto_tree_add_ipv6(loctree, hf_isis_lsp_srv6_loc_locator, tvb, offset, byte_length, &prefix); |
4504 | 62 | offset += byte_length; |
4505 | 62 | length -= byte_length; |
4506 | | |
4507 | | /* Sub-TLV Length */ |
4508 | 62 | subtlv_length = tvb_get_uint8(tvb, offset); |
4509 | 62 | proto_tree_add_item(loctree, hf_isis_lsp_srv6_loc_subclvs_len, tvb, offset, 1, ENC_NA); |
4510 | 62 | offset++; |
4511 | 62 | length--; |
4512 | | |
4513 | 62 | set_address(&prefix_addr, AT_IPv6, 16, prefix.bytes); |
4514 | 62 | prefix_str = address_to_str(pinfo->pool, &prefix_addr); |
4515 | 62 | proto_item_append_text(ti_loctree, ": %s/%u (Algorithm: %u)", prefix_str, bit_length, algorithm); |
4516 | | |
4517 | 229 | while (subtlv_length >= 2) { |
4518 | 191 | clv_code = tvb_get_uint8(tvb, offset); |
4519 | 191 | clv_len = tvb_get_uint8(tvb, offset+1); |
4520 | 191 | subtree = proto_tree_add_subtree_format(loctree, tvb, offset, clv_len + 2, |
4521 | 191 | ett_isis_lsp_clv_srv6_loc_sub_tlv, |
4522 | 191 | &ti_subtree, "subTLV: %s (c=%u, l=%u)", |
4523 | 191 | val_to_str_const(clv_code, isis_lsp_srv6_loc_sub_tlv_vals, "Unknown"), |
4524 | 191 | clv_code, clv_len); |
4525 | 191 | proto_tree_add_item(subtree, hf_isis_lsp_srv6_loc_sub_tlv_type, tvb, offset, 1, ENC_BIG_ENDIAN); |
4526 | 191 | proto_tree_add_item(subtree, hf_isis_lsp_srv6_loc_sub_tlv_length, tvb, offset+1, 1, ENC_BIG_ENDIAN); |
4527 | 191 | offset += 2; |
4528 | 191 | subtlv_length -= 2; |
4529 | 191 | if (clv_len > subtlv_length) { |
4530 | 24 | proto_tree_add_expert_format(subtree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset-1, 1, |
4531 | 24 | "Invalid Sub-TLV length %u (%d bytes left)", |
4532 | 24 | clv_len, subtlv_length); |
4533 | 24 | return (-1); |
4534 | 24 | } |
4535 | 167 | dissect_lsp_srv6_locator_subclv(tvb, pinfo, subtree, ti_subtree, offset, subtlv_length, clv_code, clv_len); |
4536 | 167 | offset += clv_len; |
4537 | 167 | subtlv_length -= clv_len; |
4538 | 167 | } |
4539 | | |
4540 | | /* Return the length of each SRv6 locator entry */ |
4541 | 38 | return locator_length; |
4542 | 62 | } |
4543 | | |
4544 | | /* |
4545 | | * Name: dissect_lsp_srv6_locator_clv() |
4546 | | * |
4547 | | * Description: Decode an SRv6 Locator CLV - code 27. |
4548 | | * |
4549 | | * CALLED BY TLV 27 DISSECTOR |
4550 | | * |
4551 | | * Input: |
4552 | | * tvbuff_t * : tvbuffer for packet data |
4553 | | * packet_info * : expert error misuse reporting |
4554 | | * proto_tree * : proto tree to build on (may be null) |
4555 | | * int : current offset into packet data |
4556 | | * int : length of IDs in packet. |
4557 | | * int : length of this clv |
4558 | | * |
4559 | | * Output: |
4560 | | * void, will modify proto_tree if not null. |
4561 | | */ |
4562 | | static void |
4563 | | dissect_lsp_srv6_locator_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
4564 | | isis_data_t *isis, int length) |
4565 | 148 | { |
4566 | 148 | int locator_length; |
4567 | | |
4568 | 148 | if (length < 11) { |
4569 | 23 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, length, |
4570 | 23 | "Too short LSP SRv6 locator TLV (%d vs min 11)", length); |
4571 | 23 | return; |
4572 | 23 | } |
4573 | | |
4574 | | /* MTID */ |
4575 | 125 | dissect_lsp_mt_id(tvb, tree, offset); |
4576 | 125 | offset += 2; |
4577 | 125 | length -= 2; |
4578 | | |
4579 | | /* Dissect each SRv6 Locator */ |
4580 | 165 | while (length > 0) { |
4581 | 158 | locator_length = dissect_lsp_srv6_locator_entry(tvb, pinfo, tree, offset, isis, length); |
4582 | 158 | if (locator_length < 0) { |
4583 | 118 | break; |
4584 | 118 | } |
4585 | 40 | offset += locator_length; |
4586 | 40 | length -= locator_length; |
4587 | 40 | } |
4588 | 125 | } |
4589 | | |
4590 | | /* |
4591 | | * Name: dissect_lsp_purge_orig_id_clv() |
4592 | | * |
4593 | | * Description: Decode a Purge Originator ID CLV - code 13. |
4594 | | * |
4595 | | * CALLED BY TLV 13 DISSECTOR |
4596 | | * |
4597 | | * Input: |
4598 | | * tvbuff_t * : tvbuffer for packet data |
4599 | | * packet_info * : expert error misuse reporting |
4600 | | * proto_tree * : proto tree to build on (may be null) |
4601 | | * int : current offset into packet data |
4602 | | * isis_data_t : data given to subdissectors |
4603 | | * int : length of clv we are decoding |
4604 | | * |
4605 | | * Output: |
4606 | | * void, will modify proto_tree if not null. |
4607 | | */ |
4608 | | static void |
4609 | | dissect_lsp_purge_orig_id_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, |
4610 | | isis_data_t *isis _U_, int length) |
4611 | 161 | { |
4612 | 161 | int min_tlv_len = 7; |
4613 | 161 | uint8_t num_of_system_ids; |
4614 | 161 | int i; |
4615 | | |
4616 | 161 | if (length < min_tlv_len) { |
4617 | 22 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, length, |
4618 | 22 | "Too short LSP Purge Originator ID (%d vs %d)", |
4619 | 22 | length, min_tlv_len); |
4620 | 22 | return; |
4621 | 22 | } |
4622 | | |
4623 | | /* Number of System IDs */ |
4624 | 139 | num_of_system_ids = tvb_get_uint8(tvb, offset); |
4625 | 139 | proto_tree_add_item(tree, hf_isis_lsp_purge_orig_id_num, tvb, offset, 1, ENC_NA); |
4626 | 139 | offset++; |
4627 | 139 | length--; |
4628 | | |
4629 | 139 | if (num_of_system_ids != 1 && num_of_system_ids != 2) { |
4630 | 135 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset, length, |
4631 | 135 | "Invalid number of System IDs: %u (should be 1 or 2)", |
4632 | 135 | num_of_system_ids); |
4633 | 135 | return; |
4634 | 135 | } |
4635 | 4 | if (length < num_of_system_ids * 6) { |
4636 | 3 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset, length, |
4637 | 3 | "Invalid Purge Originator ID TLV length: %u ", |
4638 | 3 | length+1); |
4639 | 3 | return; |
4640 | 3 | } |
4641 | 2 | for (i = 0; i < num_of_system_ids; i++) { |
4642 | 1 | proto_tree_add_item(tree, hf_isis_lsp_purge_orig_id_system_id, tvb, offset, 6, ENC_NA); |
4643 | 1 | offset += 6; |
4644 | 1 | length -= 6; |
4645 | 1 | } |
4646 | 1 | } |
4647 | | |
4648 | | /* rfc6165: MAC Reachability */ |
4649 | | static void |
4650 | | dissect_lsp_mac_reachability(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree, int offset, |
4651 | | isis_data_t *isis _U_, int length) |
4652 | 20 | { |
4653 | 20 | int num_macs; |
4654 | 20 | int count; |
4655 | 20 | bool is_avaya = true; // JMayer: FIXME Add preference or determine from other parts of packet |
4656 | | |
4657 | 20 | if ((length - 5) % 6) { |
4658 | 17 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_length_clv, tvb, offset, length, |
4659 | 17 | "Unexpected length of MAC Reachability TLV (%d vs 5 + N*6)", |
4660 | 17 | length); |
4661 | 17 | return; |
4662 | 17 | } |
4663 | 3 | num_macs = (length -5) / 6; |
4664 | | |
4665 | 3 | proto_tree_add_item(tree, hf_isis_lsp_mac_reachability_topoid_nick, tvb, offset, 2, ENC_NA); |
4666 | 3 | offset += 2; |
4667 | 3 | proto_tree_add_item(tree, hf_isis_lsp_mac_reachability_confidence, tvb, offset, 1, ENC_NA); |
4668 | 3 | offset += 1; |
4669 | 3 | proto_tree_add_item(tree, hf_isis_lsp_mac_reachability_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); |
4670 | 3 | proto_tree_add_item(tree, hf_isis_lsp_mac_reachability_vlan, tvb, offset, 2, ENC_BIG_ENDIAN); |
4671 | 3 | offset += 2; |
4672 | | |
4673 | 33 | for (count = 1; count <= num_macs; count++) { |
4674 | 30 | if (is_avaya && count == 1 ) |
4675 | 2 | proto_tree_add_item(tree, hf_isis_lsp_mac_reachability_chassismac, tvb, offset, 6, ENC_NA); |
4676 | 28 | else if (is_avaya && count == 2) |
4677 | 2 | proto_tree_add_item(tree, hf_isis_lsp_mac_reachability_fanmcast, tvb, offset, 6, ENC_NA); |
4678 | 26 | else |
4679 | 26 | proto_tree_add_item(tree, hf_isis_lsp_mac_reachability_mac, tvb, offset, 6, ENC_NA); |
4680 | 30 | offset += 6; |
4681 | 30 | } |
4682 | 3 | } |
4683 | | |
4684 | | static void |
4685 | | dissect_lsp_avaya_ipvpn(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree, int offset, |
4686 | | isis_data_t *isis _U_, int length) |
4687 | 7 | { |
4688 | 7 | unsigned subtlvbytes; |
4689 | 7 | proto_item *ti; |
4690 | 7 | proto_item *ti_pfxlen, *ti_prefix; |
4691 | 7 | proto_tree *subtlvtree; |
4692 | 7 | unsigned subtype; |
4693 | 7 | unsigned sublength; |
4694 | | |
4695 | 7 | if (length < 15) { |
4696 | 4 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_short_clv, tvb, offset, length, |
4697 | 4 | "Too short LSP Avaya IPVPN (%d vs min 15)", |
4698 | 4 | length); |
4699 | 4 | return; |
4700 | 4 | } |
4701 | 3 | proto_tree_add_item(tree, hf_isis_lsp_avaya_ipvpn_unknown, tvb, offset, 4, ENC_NA); |
4702 | 3 | offset += 4; |
4703 | 3 | proto_tree_add_item(tree, hf_isis_lsp_avaya_ipvpn_system_id, tvb, offset, 7, ENC_NA); |
4704 | 3 | offset += 7; |
4705 | 3 | proto_tree_add_item(tree, hf_isis_lsp_avaya_ipvpn_vrfsid, tvb, offset, 3, ENC_BIG_ENDIAN); |
4706 | 3 | offset += 3; |
4707 | 3 | proto_tree_add_item_ret_uint(tree, hf_isis_lsp_avaya_ipvpn_subtlvbytes, tvb, offset, 1, ENC_NA, &subtlvbytes); |
4708 | 3 | offset += 1; |
4709 | | |
4710 | 3 | if ((unsigned)length != 15+subtlvbytes) { |
4711 | 3 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_length_clv, tvb, offset, length, |
4712 | 3 | "Inconsistent length of LSP Avaya IPVPN with subtlvs (%d vs min %d)", |
4713 | 3 | length, 15 + subtlvbytes); |
4714 | 3 | return; |
4715 | 3 | } |
4716 | 0 | while (subtlvbytes > 0) { |
4717 | 0 | if (subtlvbytes == 1) { |
4718 | 0 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset, length, |
4719 | 0 | "Too few bytes remaining for Sub-TLV header (1 vs 2)"); |
4720 | 0 | return; |
4721 | 0 | } |
4722 | 0 | subtype = tvb_get_uint8(tvb, offset); |
4723 | 0 | sublength = tvb_get_uint8(tvb, offset + 1); |
4724 | 0 | if (sublength + 2 > subtlvbytes) { |
4725 | 0 | proto_tree_add_expert_format(tree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset, subtlvbytes, |
4726 | 0 | "Sub-TLV length too large for remaining bytes (%u vs %u)", |
4727 | 0 | sublength + 2, subtlvbytes); |
4728 | 0 | return; |
4729 | 0 | } |
4730 | 0 | subtlvtree = proto_tree_add_subtree_format(tree, tvb, offset, sublength + 2, ett_isis_lsp_clv_avaya_ipvpn_subtlv, &ti, "%s", |
4731 | 0 | val_to_str_const(subtype, isis_lsp_avaya_ipvpn_subtlv_code_vals, "Unknown")); |
4732 | 0 | proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_subtlvtype, tvb, offset, 1, ENC_NA); |
4733 | 0 | proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_subtlvlength, tvb, offset + 1, 1, ENC_NA); |
4734 | 0 | offset += 2; |
4735 | 0 | switch (subtype) { |
4736 | 0 | case 1: /* Metric Type */ |
4737 | 0 | if (sublength != 4) { |
4738 | 0 | proto_tree_add_expert_format(subtlvtree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset, sublength, |
4739 | 0 | "Unexpected Metric Type sub-TLV length (%d vs 4)", sublength); |
4740 | 0 | offset += sublength; |
4741 | 0 | } else { |
4742 | 0 | proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_ipv4_metrictype, tvb, offset, 4, ENC_BIG_ENDIAN); |
4743 | 0 | offset += 4; |
4744 | 0 | } |
4745 | 0 | break; |
4746 | 0 | case 135: /* IPv4 */ |
4747 | 0 | if (sublength != 12) { |
4748 | 0 | proto_tree_add_expert_format(subtlvtree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset, sublength, |
4749 | 0 | "Unexpected IPv4 Reachability sub-TLV length (%d vs 12)", sublength); |
4750 | 0 | offset += sublength; |
4751 | 0 | } else { |
4752 | 0 | proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_ipv4_metric, tvb, offset, 4, ENC_BIG_ENDIAN); |
4753 | 0 | offset += 4; |
4754 | 0 | ti_prefix = proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_ipv4_addr, tvb, offset, 4, ENC_BIG_ENDIAN); |
4755 | 0 | offset += 4; |
4756 | 0 | ti_pfxlen = proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_ipv4_mask, tvb, offset, 4, ENC_BIG_ENDIAN); |
4757 | 0 | offset += 4; |
4758 | 0 | proto_item_append_text(ti, ": %s/%s", proto_item_get_display_repr(pinfo->pool, ti_prefix), |
4759 | 0 | proto_item_get_display_repr(pinfo->pool, ti_pfxlen)); |
4760 | 0 | } |
4761 | 0 | break; |
4762 | 0 | case 236: /* IPv6 */ |
4763 | 0 | if (sublength != 22) { |
4764 | 0 | proto_tree_add_expert_format(subtlvtree, pinfo, &ei_isis_lsp_malformed_subtlv, tvb, offset, sublength, |
4765 | 0 | "Unexpected IPv6 Reachability sub-TLV length (%d vs 22)", sublength); |
4766 | 0 | offset += sublength; |
4767 | 0 | } else { |
4768 | 0 | proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_ipv6_metric, tvb, offset, 4, ENC_BIG_ENDIAN); |
4769 | 0 | offset += 4; |
4770 | 0 | ti_pfxlen = proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_ipv6_prefixlen, tvb, offset, 2, ENC_BIG_ENDIAN); |
4771 | 0 | offset += 2; |
4772 | 0 | ti_prefix = proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_ipv6_prefix, tvb, offset, 16, ENC_NA); |
4773 | 0 | offset += 16; |
4774 | 0 | proto_item_append_text(ti, ": %s/%s", proto_item_get_display_repr(pinfo->pool, ti_prefix), |
4775 | 0 | proto_item_get_display_repr(pinfo->pool, ti_pfxlen)); |
4776 | 0 | } |
4777 | 0 | break; |
4778 | 0 | default: |
4779 | 0 | proto_tree_add_item(subtlvtree, hf_isis_lsp_avaya_ipvpn_unknown_sub, tvb, offset, sublength, ENC_NA); |
4780 | 0 | proto_tree_add_expert_format(subtlvtree, pinfo, &ei_isis_lsp_unknown_subtlv, tvb, offset, sublength, |
4781 | 0 | "Unknown Avaya IPVPN subTLV (%d): Please report to Wireshark developers.", subtype); |
4782 | 0 | offset += sublength; |
4783 | 0 | } |
4784 | 0 | subtlvbytes -= (2 + sublength); |
4785 | 0 | } |
4786 | 0 | } |
4787 | | |
4788 | | static void |
4789 | | dissect_lsp_avaya_ipvpn_mc(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree, int offset, |
4790 | | isis_data_t *isis _U_, int length) |
4791 | 1 | { |
4792 | 1 | proto_tree_add_item(tree, hf_isis_lsp_avaya_185_unknown, tvb, offset, length, ENC_NA); |
4793 | 1 | } |
4794 | | |
4795 | | static void |
4796 | | dissect_lsp_avaya_ip_grt_mc(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree, int offset, |
4797 | | isis_data_t *isis _U_, int length) |
4798 | 10 | { |
4799 | 10 | proto_tree_add_item(tree, hf_isis_lsp_avaya_186_unknown, tvb, offset, length, ENC_NA); |
4800 | 10 | } |
4801 | | |
4802 | | static const isis_clv_handle_t clv_l1_lsp_opts[] = { |
4803 | | { |
4804 | | ISIS_CLV_AREA_ADDRESS, |
4805 | | "Area address(es)", |
4806 | | &ett_isis_lsp_clv_area_addr, |
4807 | | dissect_lsp_area_address_clv |
4808 | | }, |
4809 | | { |
4810 | | ISIS_CLV_IS_REACH, |
4811 | | "IS Reachability", |
4812 | | &ett_isis_lsp_clv_is_neighbors, |
4813 | | dissect_lsp_l1_is_neighbors_clv |
4814 | | }, |
4815 | | { |
4816 | | ISIS_CLV_ES_NEIGHBORS, |
4817 | | "ES Neighbor(s)", |
4818 | | &ett_isis_lsp_clv_is_neighbors, |
4819 | | dissect_lsp_l1_es_neighbors_clv |
4820 | | }, |
4821 | | { |
4822 | | ISIS_CLV_INSTANCE_IDENTIFIER, |
4823 | | "Instance Identifier", |
4824 | | &ett_isis_lsp_clv_instance_identifier, |
4825 | | dissect_lsp_instance_identifier_clv |
4826 | | }, |
4827 | | { |
4828 | | ISIS_CLV_LSP_BUFFERSIZE, |
4829 | | "Originating neighbor buffer size", |
4830 | | &ett_isis_lsp_clv_originating_buff_size, |
4831 | | dissect_lsp_ori_buffersize_clv |
4832 | | }, |
4833 | | { |
4834 | | ISIS_CLV_EXTD_IS_REACH, |
4835 | | "Extended IS reachability", |
4836 | | &ett_isis_lsp_clv_ext_is_reachability, |
4837 | | dissect_lsp_ext_is_reachability_clv |
4838 | | }, |
4839 | | { |
4840 | | ISIS_CLV_INT_IP_REACH, |
4841 | | "IP Internal reachability", |
4842 | | &ett_isis_lsp_clv_ip_reachability, |
4843 | | dissect_lsp_ip_reachability_clv |
4844 | | }, |
4845 | | { |
4846 | | ISIS_CLV_EXT_IP_REACH, |
4847 | | "IP External reachability", |
4848 | | &ett_isis_lsp_clv_ip_reachability, |
4849 | | dissect_lsp_ip_reachability_clv |
4850 | | }, |
4851 | | { |
4852 | | ISIS_CLV_EXTD_IP_REACH, |
4853 | | "Extended IP Reachability", |
4854 | | &ett_isis_lsp_clv_ext_ip_reachability, |
4855 | | dissect_lsp_ext_ip_reachability_clv |
4856 | | }, |
4857 | | { |
4858 | | ISIS_CLV_IP6_REACH, |
4859 | | "IPv6 reachability", |
4860 | | &ett_isis_lsp_clv_ipv6_reachability, |
4861 | | dissect_lsp_ipv6_reachability_clv |
4862 | | }, |
4863 | | { |
4864 | | ISIS_CLV_PROTOCOLS_SUPPORTED, |
4865 | | "Protocols supported", |
4866 | | &ett_isis_lsp_clv_nlpid_nlpid, |
4867 | | dissect_lsp_nlpid_clv |
4868 | | }, |
4869 | | { |
4870 | | ISIS_CLV_HOSTNAME, |
4871 | | "Hostname", |
4872 | | &ett_isis_lsp_clv_hostname, |
4873 | | dissect_lsp_hostname_clv |
4874 | | }, |
4875 | | { |
4876 | | ISIS_CLV_SHARED_RISK_GROUP, |
4877 | | "Shared Risk Link Group", |
4878 | | &ett_isis_lsp_clv_srlg, |
4879 | | dissect_lsp_srlg_clv |
4880 | | }, |
4881 | | { |
4882 | | ISIS_CLV_APPSPEC_SRLG, |
4883 | | "Application-Specific SRLG", |
4884 | | &ett_isis_lsp_clv_appspec_srlg, |
4885 | | dissect_lsp_appspec_srlg_clv |
4886 | | }, |
4887 | | { |
4888 | | ISIS_CLV_TE_ROUTER_ID, |
4889 | | "Traffic Engineering Router ID", |
4890 | | &ett_isis_lsp_clv_te_router_id, |
4891 | | dissect_lsp_te_router_id_clv |
4892 | | }, |
4893 | | { |
4894 | | ISIS_CLV_IP_ADDR, |
4895 | | "IP Interface address(es)", |
4896 | | &ett_isis_lsp_clv_ipv4_int_addr, |
4897 | | dissect_lsp_ip_int_addr_clv |
4898 | | }, |
4899 | | { |
4900 | | ISIS_CLV_IP6_ADDR, |
4901 | | "IPv6 Interface address(es)", |
4902 | | &ett_isis_lsp_clv_ipv6_int_addr, |
4903 | | dissect_lsp_ipv6_int_addr_clv |
4904 | | }, |
4905 | | { |
4906 | | ISIS_CLV_MT_CAP, |
4907 | | "MT-Capability", |
4908 | | &ett_isis_lsp_clv_mt_cap, |
4909 | | dissect_isis_lsp_clv_mt_cap |
4910 | | }, |
4911 | | { |
4912 | | ISIS_CLV_SID_LABEL_BINDING, |
4913 | | "SID/Label Binding TLV", |
4914 | | &ett_isis_lsp_clv_sid_label_binding, |
4915 | | dissect_isis_lsp_clv_sid_label_binding |
4916 | | }, |
4917 | | { |
4918 | | ISIS_CLV_AUTHENTICATION, |
4919 | | "Authentication", |
4920 | | &ett_isis_lsp_clv_authentication, |
4921 | | dissect_lsp_authentication_clv |
4922 | | }, |
4923 | | { |
4924 | | ISIS_CLV_IP_AUTHENTICATION, |
4925 | | "IP Authentication", |
4926 | | &ett_isis_lsp_clv_ip_authentication, |
4927 | | dissect_lsp_ip_authentication_clv |
4928 | | }, |
4929 | | { |
4930 | | ISIS_CLV_MT_SUPPORTED, |
4931 | | "Multi Topology supported", |
4932 | | &ett_isis_lsp_clv_mt, |
4933 | | dissect_lsp_mt_clv |
4934 | | }, |
4935 | | { |
4936 | | ISIS_CLV_MT_IS_REACH, |
4937 | | "Multi Topology IS Reachability", |
4938 | | &ett_isis_lsp_clv_mt_is, |
4939 | | dissect_lsp_mt_is_reachability_clv |
4940 | | }, |
4941 | | { |
4942 | | ISIS_CLV_MT_IP_REACH, |
4943 | | "Multi Topology Reachable IPv4 Prefixes", |
4944 | | &ett_isis_lsp_clv_mt_reachable_IPv4_prefx, |
4945 | | dissect_lsp_mt_reachable_IPv4_prefx_clv |
4946 | | }, |
4947 | | { |
4948 | | ISIS_CLV_MT_IP6_REACH, |
4949 | | "Multi Topology Reachable IPv6 Prefixes", |
4950 | | &ett_isis_lsp_clv_mt_reachable_IPv6_prefx, |
4951 | | dissect_lsp_mt_reachable_IPv6_prefx_clv |
4952 | | }, |
4953 | | { |
4954 | | ISIS_CLV_RT_CAPABLE, |
4955 | | "Router Capability", |
4956 | | &ett_isis_lsp_clv_rt_capable, |
4957 | | dissect_isis_rt_capable_clv |
4958 | | }, |
4959 | | { |
4960 | | ISIS_GRP_ADDR, |
4961 | | "Group Address", |
4962 | | &ett_isis_lsp_clv_grp_address, |
4963 | | dissect_isis_grp_address_clv |
4964 | | }, |
4965 | | { |
4966 | | ISIS_CLV_IPV6_TE_ROUTER_ID, |
4967 | | "IPv6 TE Router ID", |
4968 | | &ett_isis_lsp_clv_ipv6_te_router_id, |
4969 | | dissect_lsp_ipv6_te_router_id_clv |
4970 | | }, |
4971 | | { |
4972 | | ISIS_CLV_SRV6_LOCATOR, |
4973 | | "SRv6 Locator", |
4974 | | &ett_isis_lsp_clv_srv6_locator, |
4975 | | dissect_lsp_srv6_locator_clv |
4976 | | }, |
4977 | | { |
4978 | | ISIS_CLV_PURGE_ORIG_ID, |
4979 | | "Purge Originator ID", |
4980 | | &ett_isis_lsp_clv_purge_orig_id, |
4981 | | dissect_lsp_purge_orig_id_clv |
4982 | | }, |
4983 | | { |
4984 | | ISIS_CLV_MAC_RI, |
4985 | | "MAC Reachability", |
4986 | | &ett_isis_lsp_clv_mac_reachability, |
4987 | | dissect_lsp_mac_reachability |
4988 | | }, |
4989 | | { |
4990 | | ISIS_CLV_AVAYA_IPVPN, |
4991 | | "Avaya IPVPN", |
4992 | | &ett_isis_lsp_clv_avaya_ipvpn, |
4993 | | dissect_lsp_avaya_ipvpn |
4994 | | }, |
4995 | | { |
4996 | | ISIS_CLV_AVAYA_IPVPN_MC, |
4997 | | "Avaya IPVPN MCast", |
4998 | | &ett_isis_lsp_clv_avaya_ipvpn_mc, |
4999 | | dissect_lsp_avaya_ipvpn_mc |
5000 | | }, |
5001 | | { |
5002 | | ISIS_CLV_AVAYA_IP_GRT_MC, |
5003 | | "Avaya IP GRT MCast", |
5004 | | &ett_isis_lsp_clv_avaya_ip_grt_mc, |
5005 | | dissect_lsp_avaya_ip_grt_mc |
5006 | | }, |
5007 | | { |
5008 | | 0, |
5009 | | "", |
5010 | | NULL, |
5011 | | NULL |
5012 | | } |
5013 | | }; |
5014 | | |
5015 | | static const isis_clv_handle_t clv_l2_lsp_opts[] = { |
5016 | | { |
5017 | | ISIS_CLV_AREA_ADDRESS, |
5018 | | "Area address(es)", |
5019 | | &ett_isis_lsp_clv_area_addr, |
5020 | | dissect_lsp_area_address_clv |
5021 | | }, |
5022 | | { |
5023 | | ISIS_CLV_IS_REACH, |
5024 | | "IS Reachability", |
5025 | | &ett_isis_lsp_clv_is_neighbors, |
5026 | | dissect_lsp_l2_is_neighbors_clv |
5027 | | }, |
5028 | | { |
5029 | | ISIS_CLV_EXTD_IS_REACH, |
5030 | | "Extended IS reachability", |
5031 | | &ett_isis_lsp_clv_ext_is_reachability, |
5032 | | dissect_lsp_ext_is_reachability_clv |
5033 | | }, |
5034 | | { |
5035 | | ISIS_CLV_PARTITION_DIS, |
5036 | | "Partition Designated Level 2 IS", |
5037 | | &ett_isis_lsp_clv_partition_dis, |
5038 | | dissect_lsp_partition_dis_clv |
5039 | | }, |
5040 | | { |
5041 | | ISIS_CLV_PREFIX_NEIGHBORS, |
5042 | | "Prefix neighbors", |
5043 | | &ett_isis_lsp_clv_prefix_neighbors, |
5044 | | dissect_lsp_prefix_neighbors_clv |
5045 | | }, |
5046 | | { |
5047 | | ISIS_CLV_INSTANCE_IDENTIFIER, |
5048 | | "Instance Identifier", |
5049 | | &ett_isis_lsp_clv_instance_identifier, |
5050 | | dissect_lsp_instance_identifier_clv |
5051 | | }, |
5052 | | { |
5053 | | ISIS_CLV_LSP_BUFFERSIZE, |
5054 | | "Originating neighbor buffer size", |
5055 | | &ett_isis_lsp_clv_originating_buff_size, |
5056 | | dissect_lsp_ori_buffersize_clv |
5057 | | }, |
5058 | | { |
5059 | | ISIS_CLV_INT_IP_REACH, |
5060 | | "IP Internal reachability", |
5061 | | &ett_isis_lsp_clv_ip_reachability, |
5062 | | dissect_lsp_ip_reachability_clv |
5063 | | }, |
5064 | | { |
5065 | | ISIS_CLV_EXT_IP_REACH, |
5066 | | "IP External reachability", |
5067 | | &ett_isis_lsp_clv_ip_reachability, |
5068 | | dissect_lsp_ip_reachability_clv |
5069 | | }, |
5070 | | { |
5071 | | ISIS_CLV_PROTOCOLS_SUPPORTED, |
5072 | | "Protocols supported", |
5073 | | &ett_isis_lsp_clv_nlpid_nlpid, |
5074 | | dissect_lsp_nlpid_clv |
5075 | | }, |
5076 | | { |
5077 | | ISIS_CLV_HOSTNAME, |
5078 | | "Hostname", |
5079 | | &ett_isis_lsp_clv_hostname, |
5080 | | dissect_lsp_hostname_clv |
5081 | | }, |
5082 | | { |
5083 | | ISIS_CLV_SHARED_RISK_GROUP, |
5084 | | "Shared Risk Link Group", |
5085 | | &ett_isis_lsp_clv_srlg, |
5086 | | dissect_lsp_srlg_clv |
5087 | | }, |
5088 | | { |
5089 | | ISIS_CLV_APPSPEC_SRLG, |
5090 | | "Application-Specific SRLG", |
5091 | | &ett_isis_lsp_clv_appspec_srlg, |
5092 | | dissect_lsp_appspec_srlg_clv |
5093 | | }, |
5094 | | { |
5095 | | ISIS_CLV_TE_ROUTER_ID, |
5096 | | "Traffic Engineering Router ID", |
5097 | | &ett_isis_lsp_clv_te_router_id, |
5098 | | dissect_lsp_te_router_id_clv |
5099 | | }, |
5100 | | { |
5101 | | ISIS_CLV_EXTD_IP_REACH, |
5102 | | "Extended IP Reachability", |
5103 | | &ett_isis_lsp_clv_ext_ip_reachability, |
5104 | | dissect_lsp_ext_ip_reachability_clv |
5105 | | }, |
5106 | | { |
5107 | | ISIS_CLV_IP6_REACH, |
5108 | | "IPv6 reachability", |
5109 | | &ett_isis_lsp_clv_ipv6_reachability, |
5110 | | dissect_lsp_ipv6_reachability_clv |
5111 | | }, |
5112 | | { |
5113 | | ISIS_CLV_IP_ADDR, |
5114 | | "IP Interface address(es)", |
5115 | | &ett_isis_lsp_clv_ipv4_int_addr, |
5116 | | dissect_lsp_ip_int_addr_clv |
5117 | | }, |
5118 | | { |
5119 | | ISIS_CLV_IP6_ADDR, |
5120 | | "IPv6 Interface address(es)", |
5121 | | &ett_isis_lsp_clv_ipv6_int_addr, |
5122 | | dissect_lsp_ipv6_int_addr_clv |
5123 | | }, |
5124 | | { |
5125 | | ISIS_CLV_MT_CAP, |
5126 | | "MT-Capability", |
5127 | | &ett_isis_lsp_clv_mt_cap, |
5128 | | dissect_isis_lsp_clv_mt_cap |
5129 | | }, |
5130 | | { |
5131 | | ISIS_CLV_SID_LABEL_BINDING, |
5132 | | "SID/Label Binding TLV", |
5133 | | &ett_isis_lsp_clv_sid_label_binding, |
5134 | | dissect_isis_lsp_clv_sid_label_binding |
5135 | | }, |
5136 | | { |
5137 | | ISIS_CLV_AUTHENTICATION, |
5138 | | "Authentication", |
5139 | | &ett_isis_lsp_clv_authentication, |
5140 | | dissect_lsp_authentication_clv |
5141 | | }, |
5142 | | { |
5143 | | ISIS_CLV_IP_AUTHENTICATION, |
5144 | | "IP Authentication", |
5145 | | &ett_isis_lsp_clv_ip_authentication, |
5146 | | dissect_lsp_ip_authentication_clv |
5147 | | }, |
5148 | | { |
5149 | | ISIS_CLV_MT_SUPPORTED, |
5150 | | "Multi Topology", |
5151 | | &ett_isis_lsp_clv_mt, |
5152 | | dissect_lsp_mt_clv |
5153 | | }, |
5154 | | { |
5155 | | ISIS_CLV_MT_IS_REACH, |
5156 | | "Multi Topology IS Reachability", |
5157 | | &ett_isis_lsp_clv_mt_is, |
5158 | | dissect_lsp_mt_is_reachability_clv |
5159 | | }, |
5160 | | { |
5161 | | ISIS_CLV_MT_IP_REACH, |
5162 | | "Multi Topology Reachable IPv4 Prefixes", |
5163 | | &ett_isis_lsp_clv_mt_reachable_IPv4_prefx, |
5164 | | dissect_lsp_mt_reachable_IPv4_prefx_clv |
5165 | | }, |
5166 | | { |
5167 | | ISIS_CLV_MT_IP6_REACH, |
5168 | | "Multi Topology Reachable IPv6 Prefixes", |
5169 | | &ett_isis_lsp_clv_mt_reachable_IPv6_prefx, |
5170 | | dissect_lsp_mt_reachable_IPv6_prefx_clv |
5171 | | }, |
5172 | | { |
5173 | | ISIS_CLV_RT_CAPABLE, |
5174 | | "Router Capability", |
5175 | | &ett_isis_lsp_clv_rt_capable, |
5176 | | dissect_isis_rt_capable_clv |
5177 | | }, |
5178 | | { |
5179 | | ISIS_CLV_IPV6_TE_ROUTER_ID, |
5180 | | "IPv6 TE Router ID", |
5181 | | &ett_isis_lsp_clv_ipv6_te_router_id, |
5182 | | dissect_lsp_ipv6_te_router_id_clv |
5183 | | }, |
5184 | | { |
5185 | | ISIS_CLV_SRV6_LOCATOR, |
5186 | | "SRv6 Locator", |
5187 | | &ett_isis_lsp_clv_srv6_locator, |
5188 | | dissect_lsp_srv6_locator_clv |
5189 | | }, |
5190 | | { |
5191 | | ISIS_CLV_PURGE_ORIG_ID, |
5192 | | "Purge Originator ID", |
5193 | | &ett_isis_lsp_clv_purge_orig_id, |
5194 | | dissect_lsp_purge_orig_id_clv |
5195 | | }, |
5196 | | { |
5197 | | 0, |
5198 | | "", |
5199 | | NULL, |
5200 | | NULL |
5201 | | } |
5202 | | }; |
5203 | | |
5204 | | /* |
5205 | | * Name: isis_dissect_isis_lsp() |
5206 | | * |
5207 | | * Description: |
5208 | | * Print out the LSP part of the main header and then call the CLV |
5209 | | * de-mangler with the right list of valid CLVs. |
5210 | | * |
5211 | | * Input: |
5212 | | * tvbuff_t * : tvbuffer for packet data |
5213 | | * proto_tree * : protocol display tree to add to. May be NULL. |
5214 | | * int offset : our offset into packet data. |
5215 | | * int : LSP type, a la packet-isis.h ISIS_TYPE_* values |
5216 | | * int : header length of packet. |
5217 | | * int : length of IDs in packet. |
5218 | | * |
5219 | | * Output: |
5220 | | * void, but we will add to proto tree if !NULL. |
5221 | | */ |
5222 | | static void |
5223 | | dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, |
5224 | | const isis_clv_handle_t *opts, isis_data_t *isis) |
5225 | 830 | { |
5226 | 830 | proto_item *ti; |
5227 | 830 | proto_tree *lsp_tree, *info_tree; |
5228 | 830 | uint16_t pdu_length, lifetime, checksum, cacl_checksum=0; |
5229 | 830 | bool pdu_length_too_short = false; |
5230 | 830 | bool pdu_length_too_long = false; |
5231 | 830 | uint8_t lsp_info; |
5232 | 830 | int offset_checksum; |
5233 | 830 | char *system_id; |
5234 | | |
5235 | | /* |
5236 | | * We are passed a tvbuff for the entire ISIS PDU, because some ISIS |
5237 | | * PDUs may contain a checksum CLV, and that's a checksum covering |
5238 | | * the entire PDU. Skip the part of the header that's already been |
5239 | | * dissected. |
5240 | | */ |
5241 | 830 | offset += 8; |
5242 | | |
5243 | 830 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISIS LSP"); |
5244 | | |
5245 | 830 | ti = proto_tree_add_item(tree, proto_isis_lsp, tvb, offset, -1, ENC_NA); |
5246 | 830 | lsp_tree = proto_item_add_subtree(ti, ett_isis_lsp); |
5247 | | |
5248 | 830 | if (isis->header_length < 8 + 2) { |
5249 | | /* Not large enough to include the part of the header that |
5250 | | we dissect here. */ |
5251 | 1 | expert_add_info(pinfo, isis->header_length_item, isis->ei_bad_header_length); |
5252 | 1 | return; |
5253 | 1 | } |
5254 | 829 | pdu_length = tvb_get_ntohs(tvb, offset); |
5255 | 829 | ti = proto_tree_add_uint(lsp_tree, hf_isis_lsp_pdu_length, tvb, |
5256 | 829 | offset, 2, pdu_length); |
5257 | 829 | if (pdu_length < isis->header_length) { |
5258 | 24 | expert_add_info(pinfo, ti, &ei_isis_lsp_short_pdu); |
5259 | 24 | pdu_length_too_short = true; |
5260 | 805 | } else if (pdu_length > tvb_reported_length(tvb) + isis->header_length) { |
5261 | 797 | expert_add_info(pinfo, ti, &ei_isis_lsp_long_pdu); |
5262 | 797 | pdu_length_too_long = true; |
5263 | 797 | } |
5264 | 829 | offset += 2; |
5265 | | |
5266 | 829 | if (isis->header_length < 8 + 2 + 2) { |
5267 | | /* Not large enough to include the part of the header that |
5268 | | we dissect here. */ |
5269 | 0 | expert_add_info(pinfo, isis->header_length_item, isis->ei_bad_header_length); |
5270 | 0 | return; |
5271 | 0 | } |
5272 | 829 | proto_tree_add_item(lsp_tree, hf_isis_lsp_remaining_life, |
5273 | 829 | tvb, offset, 2, ENC_BIG_ENDIAN); |
5274 | 829 | lifetime = tvb_get_ntohs(tvb, offset); |
5275 | 829 | offset += 2; |
5276 | | |
5277 | | /* Checksumming starts with the LSP ID */ |
5278 | 829 | offset_checksum = offset; |
5279 | | |
5280 | 829 | if (isis->header_length < 8 + 2 + 2 + isis->system_id_len + 2) { |
5281 | | /* Not large enough to include the part of the header that |
5282 | | we dissect here. */ |
5283 | 34 | expert_add_info(pinfo, isis->header_length_item, isis->ei_bad_header_length); |
5284 | 34 | return; |
5285 | 34 | } |
5286 | 795 | proto_tree_add_item(lsp_tree, hf_isis_lsp_lsp_id, tvb, offset, isis->system_id_len + 2, ENC_NA); |
5287 | 795 | system_id = tvb_print_system_id( pinfo->pool, tvb, offset, isis->system_id_len+2 ); |
5288 | 795 | col_append_fstr(pinfo->cinfo, COL_INFO, ", LSP-ID: %s", system_id); |
5289 | 795 | offset += (isis->system_id_len + 2); |
5290 | | |
5291 | 795 | if (isis->header_length < 8 + 2 + 2 + isis->system_id_len + 2 + 4) { |
5292 | | /* Not large enough to include the part of the header that |
5293 | | we dissect here. */ |
5294 | 0 | expert_add_info(pinfo, isis->header_length_item, isis->ei_bad_header_length); |
5295 | 0 | return; |
5296 | 0 | } |
5297 | 795 | proto_tree_add_item(lsp_tree, hf_isis_lsp_sequence_number, |
5298 | 795 | tvb, offset, 4, ENC_BIG_ENDIAN); |
5299 | 795 | col_append_fstr(pinfo->cinfo, COL_INFO, ", Sequence: 0x%08x, Lifetime: %5us", |
5300 | 795 | tvb_get_ntohl(tvb, offset), |
5301 | 795 | tvb_get_ntohs(tvb, offset - (isis->system_id_len+2+2))); |
5302 | 795 | offset += 4; |
5303 | | |
5304 | 795 | if (isis->header_length < 8 + 2 + 2 + isis->system_id_len + 2 + 4 + 2) { |
5305 | | /* Not large enough to include the part of the header that |
5306 | | we dissect here. */ |
5307 | 0 | expert_add_info(pinfo, isis->header_length_item, isis->ei_bad_header_length); |
5308 | 0 | return; |
5309 | 0 | } |
5310 | 795 | checksum = lifetime ? tvb_get_ntohs(tvb, offset) : 0; |
5311 | 795 | if (checksum == 0) { |
5312 | | /* No checksum present */ |
5313 | 105 | proto_tree_add_checksum(lsp_tree, tvb, offset, hf_isis_lsp_checksum, hf_isis_lsp_checksum_status, &ei_isis_lsp_bad_checksum, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NOT_PRESENT); |
5314 | 690 | } else if (pdu_length_too_short || pdu_length_too_long) { |
5315 | | /* Length bogus, so we can't check the checksum */ |
5316 | 681 | proto_tree_add_checksum(lsp_tree, tvb, offset, hf_isis_lsp_checksum, hf_isis_lsp_checksum_status, &ei_isis_lsp_bad_checksum, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS); |
5317 | 681 | } else { |
5318 | 9 | if (osi_check_and_get_checksum(tvb, offset_checksum, pdu_length-12, offset, &cacl_checksum)) { |
5319 | | /* Successfully processed checksum, verify it */ |
5320 | 5 | proto_tree_add_checksum(lsp_tree, tvb, offset, hf_isis_lsp_checksum, hf_isis_lsp_checksum_status, &ei_isis_lsp_bad_checksum, pinfo, cacl_checksum, ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY); |
5321 | 5 | if (cacl_checksum != checksum) { |
5322 | 5 | col_append_str(pinfo->cinfo, COL_INFO, " [ISIS CHECKSUM INCORRECT]"); |
5323 | 5 | } |
5324 | 5 | } else { |
5325 | | /* We didn't capture the entire packet, so we can't verify it */ |
5326 | 4 | proto_tree_add_checksum(lsp_tree, tvb, offset, hf_isis_lsp_checksum, hf_isis_lsp_checksum_status, &ei_isis_lsp_bad_checksum, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS); |
5327 | 4 | } |
5328 | 9 | } |
5329 | 795 | offset += 2; |
5330 | | |
5331 | 795 | if (isis->header_length < 8 + 2 + 2 + isis->system_id_len + 2 + 4 + 2 + 1) { |
5332 | | /* Not large enough to include the part of the header that |
5333 | | we dissect here. */ |
5334 | 0 | expert_add_info(pinfo, isis->header_length_item, isis->ei_bad_header_length); |
5335 | 0 | return; |
5336 | 0 | } |
5337 | 795 | if (tree) { |
5338 | 793 | static int * const attach_flags[] = { |
5339 | 793 | &hf_isis_lsp_error_metric, |
5340 | 793 | &hf_isis_lsp_expense_metric, |
5341 | 793 | &hf_isis_lsp_delay_metric, |
5342 | 793 | &hf_isis_lsp_default_metric, |
5343 | 793 | NULL |
5344 | 793 | }; |
5345 | | |
5346 | | /* |
5347 | | * P | ATT | HIPPITY | IS TYPE description. |
5348 | | */ |
5349 | 793 | lsp_info = tvb_get_uint8(tvb, offset); |
5350 | 793 | info_tree = proto_tree_add_subtree_format(lsp_tree, tvb, offset, 1, ett_isis_lsp_info, NULL, |
5351 | 793 | "Type block(0x%02x): Partition Repair:%d, Attached bits:%d, Overload bit:%d, IS type:%d", |
5352 | 793 | lsp_info, |
5353 | 793 | ISIS_LSP_PARTITION(lsp_info), |
5354 | 793 | ISIS_LSP_ATT(lsp_info), |
5355 | 793 | ISIS_LSP_HIPPITY(lsp_info), |
5356 | 793 | ISIS_LSP_IS_TYPE(lsp_info) |
5357 | 793 | ); |
5358 | | |
5359 | 793 | proto_tree_add_boolean(info_tree, hf_isis_lsp_p, tvb, offset, 1, lsp_info); |
5360 | 793 | proto_tree_add_bitmask_with_flags(info_tree, tvb, offset, hf_isis_lsp_att, |
5361 | 793 | ett_isis_lsp_att, attach_flags, ENC_NA, BMT_NO_APPEND); |
5362 | 793 | proto_tree_add_boolean(info_tree, hf_isis_lsp_hippity, tvb, offset, 1, lsp_info); |
5363 | 793 | proto_tree_add_uint(info_tree, hf_isis_lsp_is_type, tvb, offset, 1, lsp_info); |
5364 | 793 | } |
5365 | 795 | offset += 1; |
5366 | | |
5367 | 795 | if (pdu_length_too_short) { |
5368 | 2 | return; |
5369 | 2 | } |
5370 | | /* |
5371 | | * Now, we need to decode our CLVs. We need to pass in |
5372 | | * our list of valid ones! |
5373 | | */ |
5374 | 793 | isis->pdu_length = pdu_length; |
5375 | 793 | isis_dissect_clvs(tvb, pinfo, lsp_tree, offset, |
5376 | 793 | opts, &ei_isis_lsp_short_clv, isis, ett_isis_lsp_clv_unknown, |
5377 | 793 | hf_isis_lsp_clv_type, hf_isis_lsp_clv_length, |
5378 | 793 | &ei_isis_lsp_clv_unknown); |
5379 | 793 | } |
5380 | | |
5381 | | static int |
5382 | | dissect_isis_l1_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
5383 | 482 | { |
5384 | 482 | isis_data_t* isis = (isis_data_t*)data; |
5385 | 482 | dissect_isis_lsp(tvb, pinfo, tree, 0, clv_l1_lsp_opts, isis); |
5386 | 482 | return tvb_reported_length(tvb); |
5387 | 482 | } |
5388 | | |
5389 | | static int |
5390 | | dissect_isis_l2_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
5391 | 348 | { |
5392 | 348 | isis_data_t* isis = (isis_data_t*)data; |
5393 | 348 | dissect_isis_lsp(tvb, pinfo, tree, 0, clv_l2_lsp_opts, isis); |
5394 | 348 | return tvb_reported_length(tvb); |
5395 | 348 | } |
5396 | | |
5397 | | /* |
5398 | | * The "supported" bit in a metric is actually the "not supported" bit; |
5399 | | * if it's *clear*, the metric is supported, and if it's *set*, the |
5400 | | * metric is not supported. |
5401 | | */ |
5402 | | |
5403 | | void |
5404 | | proto_register_isis_lsp(void) |
5405 | 16 | { |
5406 | 16 | static hf_register_info hf[] = { |
5407 | 16 | { &hf_isis_lsp_pdu_length, |
5408 | 16 | { "PDU length", "isis.lsp.pdu_length", |
5409 | 16 | FT_UINT16, BASE_DEC, |
5410 | 16 | NULL, 0x0, NULL, HFILL } |
5411 | 16 | }, |
5412 | | |
5413 | 16 | { &hf_isis_lsp_remaining_life, |
5414 | 16 | { "Remaining lifetime", "isis.lsp.remaining_life", |
5415 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
5416 | 16 | NULL, HFILL } |
5417 | 16 | }, |
5418 | | |
5419 | 16 | { &hf_isis_lsp_lsp_id, |
5420 | 16 | { "LSP-ID", "isis.lsp.lsp_id", |
5421 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
5422 | 16 | NULL, HFILL } |
5423 | 16 | }, |
5424 | | |
5425 | 16 | { &hf_isis_lsp_hostname, |
5426 | 16 | { "Hostname", "isis.lsp.hostname", |
5427 | 16 | FT_STRING, BASE_NONE, NULL, 0x0, |
5428 | 16 | NULL, HFILL } |
5429 | 16 | }, |
5430 | | |
5431 | 16 | { &hf_isis_lsp_srlg_system_id, |
5432 | 16 | { "System ID", "isis.lsp.srlg.system_id", |
5433 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
5434 | 16 | NULL, HFILL } |
5435 | 16 | }, |
5436 | | |
5437 | 16 | { &hf_isis_lsp_srlg_pseudo_num, |
5438 | 16 | { "Pseudonode num", "isis.lsp.srlg.pseudo_num", |
5439 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
5440 | 16 | NULL, HFILL } |
5441 | 16 | }, |
5442 | | |
5443 | 16 | { &hf_isis_lsp_srlg_flags_numbered, |
5444 | 16 | { "Numbered", "isis.lsp.srlg.flags_numbered", |
5445 | 16 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01, |
5446 | 16 | NULL, HFILL } |
5447 | 16 | }, |
5448 | | |
5449 | 16 | { &hf_isis_lsp_srlg_ipv4_local, |
5450 | 16 | { "IPv4 interface address/Link Local Identifier", "isis.lsp.srlg.ipv4_local", |
5451 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
5452 | 16 | NULL, HFILL } |
5453 | 16 | }, |
5454 | | |
5455 | 16 | { &hf_isis_lsp_srlg_ipv4_remote, |
5456 | 16 | { "IPv4 neighbor address/Link remote Identifier", "isis.lsp.srlg.ipv4_remote", |
5457 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
5458 | 16 | NULL, HFILL } |
5459 | 16 | }, |
5460 | | |
5461 | 16 | { &hf_isis_lsp_srlg_value, |
5462 | 16 | { "Shared Risk Link Group Value", "isis.lsp.srlg.value", |
5463 | 16 | FT_UINT32, BASE_DEC_HEX, NULL, 0x0, |
5464 | 16 | NULL, HFILL } |
5465 | 16 | }, |
5466 | | |
5467 | | /* rfc9479 */ |
5468 | 16 | { &hf_isis_lsp_appspec_srlg_system_id, |
5469 | 16 | { "System ID", "isis.lsp.application_specific_srlg.system_id", |
5470 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
5471 | 16 | NULL, HFILL } |
5472 | 16 | }, |
5473 | 16 | { &hf_isis_lsp_appspec_srlg_pseudo_num, |
5474 | 16 | { "Pseudonode num", "isis.lsp.application_specific_srlg.pseudo_num", |
5475 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
5476 | 16 | NULL, HFILL } |
5477 | 16 | }, |
5478 | 16 | { &hf_isis_lsp_appspec_srlg_sub_tlv_length, |
5479 | 16 | { "Sub-TLV length", "isis.lsp.application_specific_srlg.sub_tlv_len", |
5480 | 16 | FT_UINT8, BASE_DEC, NULL, 0, |
5481 | 16 | NULL, HFILL} |
5482 | 16 | }, |
5483 | 16 | { &hf_isis_lsp_appspec_srlg_value, |
5484 | 16 | { "Shared Risk Link Group Value", "isis.lsp.application_specific_srlg.value", |
5485 | 16 | FT_UINT32, BASE_DEC_HEX, NULL, 0, |
5486 | 16 | NULL, HFILL } |
5487 | 16 | }, |
5488 | 16 | { &hf_isis_lsp_appspec_srlg_link_local_id, |
5489 | 16 | { "Link Local Identifier", "isis.lsp.application_specific_srlg.link_local_id", |
5490 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
5491 | 16 | NULL, HFILL } |
5492 | 16 | }, |
5493 | 16 | { &hf_isis_lsp_appspec_srlg_link_remote_id, |
5494 | 16 | { "Link Remote Identifier", "isis.lsp.application_specific_srlg.link_remote_id", |
5495 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
5496 | 16 | NULL, HFILL } |
5497 | 16 | }, |
5498 | | |
5499 | 16 | { &hf_isis_lsp_sequence_number, |
5500 | 16 | { "Sequence number", "isis.lsp.sequence_number", |
5501 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, |
5502 | 16 | NULL, HFILL } |
5503 | 16 | }, |
5504 | | |
5505 | 16 | { &hf_isis_lsp_checksum, |
5506 | 16 | { "Checksum", "isis.lsp.checksum", |
5507 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, |
5508 | 16 | NULL, HFILL } |
5509 | 16 | }, |
5510 | | |
5511 | 16 | { &hf_isis_lsp_checksum_status, |
5512 | 16 | { "Checksum Status", "isis.lsp.checksum.status", |
5513 | 16 | FT_UINT8, BASE_NONE, VALS(proto_checksum_vals), 0x0, |
5514 | 16 | NULL, HFILL } |
5515 | 16 | }, |
5516 | | |
5517 | 16 | { &hf_isis_lsp_clv_ipv4_int_addr, |
5518 | 16 | { "IPv4 interface address", "isis.lsp.clv_ipv4_int_addr", |
5519 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
5520 | 16 | NULL, HFILL } |
5521 | 16 | }, |
5522 | | |
5523 | 16 | { &hf_isis_lsp_clv_ipv6_int_addr, |
5524 | 16 | { "IPv6 interface address", "isis.lsp.clv_ipv6_int_addr", |
5525 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
5526 | 16 | NULL, HFILL } |
5527 | 16 | }, |
5528 | | |
5529 | 16 | { &hf_isis_lsp_clv_te_router_id, |
5530 | 16 | { "Traffic Engineering Router ID", "isis.lsp.clv_te_router_id", |
5531 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
5532 | 16 | NULL, HFILL } |
5533 | 16 | }, |
5534 | | |
5535 | 16 | { &hf_isis_lsp_clv_mt, |
5536 | 16 | { "MT-ID", "isis.lsp.clv_mt", |
5537 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, |
5538 | 16 | NULL, HFILL } |
5539 | 16 | }, |
5540 | | |
5541 | 16 | { &hf_isis_lsp_p, |
5542 | 16 | { "Partition Repair", "isis.lsp.partition_repair", |
5543 | 16 | FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), ISIS_LSP_PARTITION_MASK, |
5544 | 16 | "If set, this router supports the optional Partition Repair function", HFILL } |
5545 | 16 | }, |
5546 | | |
5547 | 16 | { &hf_isis_lsp_att, |
5548 | 16 | { "Attachment", "isis.lsp.att", |
5549 | 16 | FT_UINT8, BASE_DEC, NULL, ISIS_LSP_ATT_MASK, |
5550 | 16 | NULL, HFILL } |
5551 | 16 | }, |
5552 | | |
5553 | 16 | { &hf_isis_lsp_hippity, |
5554 | 16 | { "Overload bit", "isis.lsp.overload", |
5555 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), ISIS_LSP_HIPPITY_MASK, |
5556 | 16 | "If set, this router will not be used by any decision process to calculate routes", HFILL } |
5557 | 16 | }, |
5558 | | |
5559 | 16 | { &hf_isis_lsp_root_id, |
5560 | 16 | { "Root Bridge ID", "isis.lsp.root.id", |
5561 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
5562 | 16 | NULL, HFILL } |
5563 | 16 | }, |
5564 | | |
5565 | 16 | { &hf_isis_lsp_is_type, |
5566 | 16 | { "Type of Intermediate System", "isis.lsp.is_type", |
5567 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_istype_vals), ISIS_LSP_IS_TYPE_MASK, |
5568 | 16 | NULL, HFILL } |
5569 | 16 | }, |
5570 | | |
5571 | 16 | { &hf_isis_lsp_clv_type, |
5572 | 16 | { "Type", "isis.lsp.clv.type", |
5573 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
5574 | 16 | NULL, HFILL } |
5575 | 16 | }, |
5576 | | |
5577 | 16 | { &hf_isis_lsp_clv_length, |
5578 | 16 | { "Length", "isis.lsp.clv.length", |
5579 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
5580 | 16 | NULL, HFILL } |
5581 | 16 | }, |
5582 | | |
5583 | 16 | { &hf_isis_lsp_bw_ct_model, |
5584 | 16 | { "Bandwidth Constraints Model Id", "isis.lsp.bw_ct.model", |
5585 | 16 | FT_UINT8, BASE_DEC, NULL, 0, |
5586 | 16 | NULL, HFILL } |
5587 | 16 | }, |
5588 | 16 | { &hf_isis_lsp_bw_ct_reserved, |
5589 | 16 | { "Reserved", "isis.lsp.bw_ct.rsv", |
5590 | 16 | FT_UINT24, BASE_HEX, NULL, 0, |
5591 | 16 | NULL, HFILL } |
5592 | 16 | }, |
5593 | 16 | { &hf_isis_lsp_bw_ct0, |
5594 | 16 | { "Bandwidth Constraints 0", "isis.lsp.bw_ct.0", |
5595 | 16 | FT_FLOAT, BASE_NONE, NULL, 0, |
5596 | 16 | NULL, HFILL } |
5597 | 16 | }, |
5598 | 16 | { &hf_isis_lsp_bw_ct1, |
5599 | 16 | { "Bandwidth Constraints 1", "isis.lsp.bw_ct.1", |
5600 | 16 | FT_FLOAT, BASE_NONE, NULL, 0, |
5601 | 16 | NULL, HFILL } |
5602 | 16 | }, |
5603 | 16 | { &hf_isis_lsp_bw_ct2, |
5604 | 16 | { "Bandwidth Constraints 2", "isis.lsp.bw_ct.2", |
5605 | 16 | FT_FLOAT, BASE_NONE, NULL, 0, |
5606 | 16 | NULL, HFILL } |
5607 | 16 | }, |
5608 | 16 | { &hf_isis_lsp_bw_ct3, |
5609 | 16 | { "Bandwidth Constraints 3", "isis.lsp.bw_ct.3", |
5610 | 16 | FT_FLOAT, BASE_NONE, NULL, 0, |
5611 | 16 | NULL, HFILL } |
5612 | 16 | }, |
5613 | 16 | { &hf_isis_lsp_bw_ct4, |
5614 | 16 | { "Bandwidth Constraints 4", "isis.lsp.bw_ct.4", |
5615 | 16 | FT_FLOAT, BASE_NONE, NULL, 0, |
5616 | 16 | NULL, HFILL } |
5617 | 16 | }, |
5618 | 16 | { &hf_isis_lsp_bw_ct5, |
5619 | 16 | { "Bandwidth Constraints 5", "isis.lsp.bw_ct.5", |
5620 | 16 | FT_FLOAT, BASE_NONE, NULL, 0, |
5621 | 16 | NULL, HFILL } |
5622 | 16 | }, |
5623 | 16 | { &hf_isis_lsp_bw_ct6, |
5624 | 16 | { "Bandwidth Constraints 6", "isis.lsp.bw_ct.6", |
5625 | 16 | FT_FLOAT, BASE_NONE, NULL, 0, |
5626 | 16 | NULL, HFILL } |
5627 | 16 | }, |
5628 | 16 | { &hf_isis_lsp_bw_ct7, |
5629 | 16 | { "Bandwidth Constraints 7", "isis.lsp.bw_ct.7", |
5630 | 16 | FT_FLOAT, BASE_NONE, NULL, 0, |
5631 | 16 | NULL, HFILL } |
5632 | 16 | }, |
5633 | | |
5634 | 16 | { &hf_isis_lsp_spb_link_metric, |
5635 | 16 | { "SPB Link Metric", "isis.lsp.spb.link_metric", |
5636 | 16 | FT_UINT24, BASE_HEX_DEC, NULL, 0, |
5637 | 16 | NULL, HFILL } |
5638 | 16 | }, |
5639 | | |
5640 | 16 | { &hf_isis_lsp_spb_port_count, |
5641 | 16 | { "Number of Ports", "isis.lsp.spb.port_count", |
5642 | 16 | FT_UINT8, BASE_DEC, NULL, 0, |
5643 | 16 | NULL, HFILL } |
5644 | 16 | }, |
5645 | | |
5646 | 16 | { &hf_isis_lsp_spb_port_id, |
5647 | 16 | { "Port Id", "isis.lsp.spb.port_id", |
5648 | 16 | FT_UINT16, BASE_HEX_DEC, NULL, 0, |
5649 | 16 | NULL, HFILL } |
5650 | 16 | }, |
5651 | | |
5652 | 16 | { &hf_isis_lsp_adj_sid_flags, |
5653 | 16 | { "Flags", "isis.lsp.adj_sid.flags", |
5654 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
5655 | 16 | NULL, HFILL } |
5656 | 16 | }, |
5657 | | |
5658 | 16 | { &hf_isis_lsp_adj_sid_family_flag, |
5659 | 16 | { "Outgoing Encapsulation", "isis.lsp.adj_sid.flags.f", |
5660 | 16 | FT_BOOLEAN, 8, TFS(&tfs_ipv6_ipv4), 0x80, |
5661 | 16 | NULL, HFILL } |
5662 | 16 | }, |
5663 | | |
5664 | 16 | { &hf_isis_lsp_adj_sid_backup_flag, |
5665 | 16 | { "Backup", "isis.lsp.adj_sid.flags.b", |
5666 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40, |
5667 | 16 | NULL, HFILL } |
5668 | 16 | }, |
5669 | | |
5670 | 16 | { &hf_isis_lsp_adj_sid_value_flag, |
5671 | 16 | { "Value", "isis.lsp.adj_sid.flags.v", |
5672 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x20, |
5673 | 16 | NULL, HFILL } |
5674 | 16 | }, |
5675 | | |
5676 | 16 | { &hf_isis_lsp_adj_sid_local_flag, |
5677 | 16 | { "Local Significance", "isis.lsp.adj_sid.flags.l", |
5678 | 16 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, |
5679 | 16 | NULL, HFILL } |
5680 | 16 | }, |
5681 | | |
5682 | 16 | { &hf_isis_lsp_adj_sid_set_flag, |
5683 | 16 | { "Set", "isis.lsp.adj_sid.flags.s", |
5684 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x8, |
5685 | 16 | NULL, HFILL } |
5686 | 16 | }, |
5687 | | |
5688 | 16 | { &hf_isis_lsp_adj_sid_weight, |
5689 | 16 | { "Weight", "isis.lsp.adj_sid.weight", |
5690 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
5691 | 16 | NULL, HFILL } |
5692 | 16 | }, |
5693 | | |
5694 | 16 | { &hf_isis_lsp_adj_sid_system_id, |
5695 | 16 | { "System-ID", "isis.lsp.adj_sid.system_id", |
5696 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
5697 | 16 | NULL, HFILL } |
5698 | 16 | }, |
5699 | | |
5700 | 16 | { &hf_isis_lsp_sid_sli_label, |
5701 | 16 | { "SID/Label/Index", "isis.lsp.sid.sli_label", |
5702 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0FFFFF, |
5703 | 16 | NULL, HFILL } |
5704 | 16 | }, |
5705 | | |
5706 | 16 | { &hf_isis_lsp_sid_sli_index, |
5707 | 16 | { "SID/Label/Index", "isis.lsp.sid.sli_index", |
5708 | 16 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
5709 | 16 | NULL, HFILL } |
5710 | 16 | }, |
5711 | | |
5712 | 16 | { &hf_isis_lsp_sid_sli_ipv6, |
5713 | 16 | { "SID/Label/Index", "isis.lsp.sid.sli_ipv6", |
5714 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
5715 | 16 | NULL, HFILL } |
5716 | 16 | }, |
5717 | | |
5718 | 16 | { &hf_isis_lsp_spb_reserved, |
5719 | 16 | { "SR Bit", "isis.lsp.spb.reserved", |
5720 | 16 | FT_UINT16, BASE_DEC, NULL, 0xC000, |
5721 | 16 | NULL, HFILL } |
5722 | 16 | }, |
5723 | | |
5724 | 16 | { &hf_isis_lsp_spb_sr_bit, |
5725 | 16 | { "SR Bit", "isis.lsp.spb.sr_bit", |
5726 | 16 | FT_UINT16, BASE_DEC, NULL, 0x3000, |
5727 | 16 | NULL, HFILL } |
5728 | 16 | }, |
5729 | | |
5730 | 16 | { &hf_isis_lsp_spb_spvid, |
5731 | 16 | { "SPVID", "isis.lsp.spb.spvid", |
5732 | 16 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0FFF, |
5733 | 16 | NULL, HFILL } |
5734 | 16 | }, |
5735 | 16 | { &hf_isis_lsp_spb_short_mac_address_t, |
5736 | 16 | { "T", "isis.lsp.spb.mac_address.t", |
5737 | 16 | FT_BOOLEAN, 8, NULL, 0x80, |
5738 | 16 | NULL, HFILL } |
5739 | 16 | }, |
5740 | 16 | { &hf_isis_lsp_spb_short_mac_address_r, |
5741 | 16 | { "R", "isis.lsp.spb.mac_address.r", |
5742 | 16 | FT_BOOLEAN, 8, NULL, 0x40, |
5743 | 16 | NULL, HFILL } |
5744 | 16 | }, |
5745 | 16 | { &hf_isis_lsp_spb_short_mac_address_reserved, |
5746 | 16 | { "Reserved", "isis.lsp.spb.mac_address.reserved", |
5747 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
5748 | 16 | NULL, HFILL } |
5749 | 16 | }, |
5750 | 16 | { &hf_isis_lsp_spb_short_mac_address, |
5751 | 16 | { "MAC Address", "isis.lsp.spb.mac_address", |
5752 | 16 | FT_ETHER, BASE_NONE, NULL, 0x00, |
5753 | 16 | NULL, HFILL } |
5754 | 16 | }, |
5755 | | /* TLV 149 draft-previdi-isis-segmentrouting-extensions */ |
5756 | 16 | { &hf_isis_lsp_sl_binding_flags, |
5757 | 16 | { "TLV Flags", "isis.lsp.sl_binding.flags", |
5758 | 16 | FT_UINT8, BASE_HEX, NULL, 0, |
5759 | 16 | NULL, HFILL } |
5760 | 16 | }, |
5761 | 16 | { &hf_isis_lsp_sl_binding_flags_f, |
5762 | 16 | { "Flag F: Address Family", "isis.lsp.sl_binding.flags_f", |
5763 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
5764 | 16 | NULL, HFILL} |
5765 | 16 | }, |
5766 | 16 | { &hf_isis_lsp_sl_binding_flags_m, |
5767 | 16 | { "Flag M: Mirror Context", "isis.lsp.sl_binding.flags_m", |
5768 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40, |
5769 | 16 | NULL, HFILL} |
5770 | 16 | }, |
5771 | 16 | { &hf_isis_lsp_sl_binding_flags_s, |
5772 | 16 | { "Flag S", "isis.lsp.sl_binding.flags_s", |
5773 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x20, |
5774 | 16 | "If set, the SID/Label Binding TLV SHOULD be flooded across the entire routing domain", HFILL} |
5775 | 16 | }, |
5776 | 16 | { &hf_isis_lsp_sl_binding_flags_d, |
5777 | 16 | { "Flag D", "isis.lsp.sl_binding.flags_d", |
5778 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x10, |
5779 | 16 | "when the SID/Label Binding TLV is leaked from level-2 to level-1", HFILL} |
5780 | 16 | }, |
5781 | 16 | { &hf_isis_lsp_sl_binding_flags_a, |
5782 | 16 | { "Flag A: Attached", "isis.lsp.sl_binding.flags_a", |
5783 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x08, |
5784 | 16 | NULL, HFILL} |
5785 | 16 | }, |
5786 | 16 | { &hf_isis_lsp_sl_binding_flags_rsv, |
5787 | 16 | { "Flag reserved", "isis.lsp.sl_binding.flags_rsv", |
5788 | 16 | FT_UINT8, BASE_HEX, NULL, 0x07, |
5789 | 16 | NULL, HFILL} |
5790 | 16 | }, |
5791 | 16 | { &hf_isis_lsp_sl_binding_weight, |
5792 | 16 | { "Weight", "isis.lsp.sl_binding.weight", |
5793 | 16 | FT_UINT8, BASE_DEC, NULL, 0, |
5794 | 16 | NULL, HFILL} |
5795 | 16 | }, |
5796 | 16 | { &hf_isis_lsp_sl_binding_range, |
5797 | 16 | { "Range", "isis.lsp.sl_binding.range", |
5798 | 16 | FT_UINT16, BASE_DEC, NULL, 0, |
5799 | 16 | NULL, HFILL} |
5800 | 16 | }, |
5801 | 16 | { &hf_isis_lsp_sl_binding_prefix_length, |
5802 | 16 | { "Prefix length", "isis.lsp.sl_binding.prefix_len", |
5803 | 16 | FT_UINT8, BASE_DEC, NULL, 0, |
5804 | 16 | NULL, HFILL} |
5805 | 16 | }, |
5806 | 16 | { &hf_isis_lsp_sl_binding_fec_prefix_ipv4, |
5807 | 16 | { "Prefix", "isis.lsp.sl_binding.prefix_ipv4", |
5808 | 16 | FT_IPv4, BASE_NONE, NULL, 0, |
5809 | 16 | NULL, HFILL} |
5810 | 16 | }, |
5811 | 16 | { &hf_isis_lsp_sl_binding_fec_prefix_ipv6, |
5812 | 16 | { "Prefix", "isis.lsp.sl_binding.prefix_ipv6", |
5813 | 16 | FT_IPv6, BASE_NONE, NULL, 0, |
5814 | 16 | NULL, HFILL} |
5815 | 16 | }, |
5816 | 16 | { &hf_isis_lsp_sl_sub_tlv, |
5817 | 16 | { "SID/Label sub-TLV :", "isis.lsp.sl_binding.subtlv", |
5818 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
5819 | 16 | NULL, HFILL} |
5820 | 16 | }, |
5821 | 16 | { &hf_isis_lsp_sl_sub_tlv_type, |
5822 | 16 | { "SID/label sub-TLV type", "isis.lsp.sl_sub_tlv_type", |
5823 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_sl_sub_tlv_vals), 0, |
5824 | 16 | NULL, HFILL} |
5825 | 16 | }, |
5826 | 16 | { &hf_isis_lsp_sl_sub_tlv_length, |
5827 | 16 | { "Sub-TLV length", "isis.lsp.sl_binding.sub_tlv_len", |
5828 | 16 | FT_UINT8, BASE_DEC, NULL, 0, |
5829 | 16 | NULL, HFILL} |
5830 | 16 | }, |
5831 | 16 | { &hf_isis_lsp_sl_sub_tlv_label_20, |
5832 | 16 | { "SID/Label", "isis.lsp.sl_sub_tlv.label20", |
5833 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0FFFFF, |
5834 | 16 | NULL, HFILL} |
5835 | 16 | }, |
5836 | 16 | { &hf_isis_lsp_sl_sub_tlv_label_32, |
5837 | 16 | { "SID/Label", "isis.lsp.sl_sub_tlv.label32", |
5838 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
5839 | 16 | NULL, HFILL} |
5840 | 16 | }, |
5841 | 16 | { &hf_isis_lsp_sl_sub_tlv_flags, |
5842 | 16 | { "sub-TLV Flags", "isis.lsp.sl_sub_tlv.flags", |
5843 | 16 | FT_UINT8, BASE_HEX, NULL, 0, |
5844 | 16 | NULL, HFILL } |
5845 | 16 | }, |
5846 | 16 | { &hf_isis_lsp_sl_sub_tlv_flags_r, |
5847 | 16 | { "Flag R: Re-advertisement", "isis.lsp.sl_sub_tlv.flags_r", |
5848 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
5849 | 16 | NULL, HFILL} |
5850 | 16 | }, |
5851 | 16 | { &hf_isis_lsp_sl_sub_tlv_flags_n, |
5852 | 16 | { "Flag N: Node-SID", "isis.lsp.sl_sub_tlv.flags_n", |
5853 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40, |
5854 | 16 | NULL, HFILL} |
5855 | 16 | }, |
5856 | 16 | { &hf_isis_lsp_sl_sub_tlv_flags_p, |
5857 | 16 | { "Flag P: no-PHP", "isis.lsp.sl_sub_tlv.flags_p", |
5858 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x20, |
5859 | 16 | NULL, HFILL} |
5860 | 16 | }, |
5861 | 16 | { &hf_isis_lsp_sl_sub_tlv_flags_e, |
5862 | 16 | { "Flag E: Explicit-Null", "isis.lsp.sl_sub_tlv.flags_e", |
5863 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x10, |
5864 | 16 | NULL, HFILL} |
5865 | 16 | }, |
5866 | 16 | { &hf_isis_lsp_sl_sub_tlv_flags_v, |
5867 | 16 | { "Flag V: Value", "isis.lsp.sl_sub_tlv.flags_v", |
5868 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x08, |
5869 | 16 | NULL, HFILL} |
5870 | 16 | }, |
5871 | 16 | { &hf_isis_lsp_sl_sub_tlv_flags_l, |
5872 | 16 | { "Flag L: Local", "isis.lsp.sl_sub_tlv.flags_l", |
5873 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x04, |
5874 | 16 | NULL, HFILL} |
5875 | 16 | }, |
5876 | 16 | { &hf_isis_lsp_sl_sub_tlv_flags_rsv, |
5877 | 16 | { "Flag reserved", "isis.lsp.sl_sub_tlv.flags_rsv", |
5878 | 16 | FT_UINT8, BASE_HEX, NULL, 0x03, |
5879 | 16 | NULL, HFILL} |
5880 | 16 | }, |
5881 | 16 | { &hf_isis_lsp_sl_sub_tlv_algorithm, |
5882 | 16 | { "Algorithm", "isis.lsp.sl_sub_tlv.algorithm", |
5883 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
5884 | 16 | NULL, HFILL} |
5885 | 16 | }, |
5886 | | |
5887 | | /* Generated from convert_proto_tree_add_text.pl */ |
5888 | 16 | { &hf_isis_lsp_mt_id_reserved, |
5889 | 16 | { "Reserved", "isis.lsp.reserved", |
5890 | 16 | FT_UINT16, BASE_HEX, NULL, ISIS_LSP_MT_MSHIP_RES_MASK, |
5891 | 16 | NULL, HFILL} |
5892 | 16 | }, |
5893 | 16 | { &hf_isis_lsp_mt_id, |
5894 | 16 | { "Topology ID", "isis.lsp.mtid", |
5895 | 16 | FT_UINT16, BASE_DEC|BASE_RANGE_STRING, RVALS(isis_mtid_strings), 0x0fff, |
5896 | 16 | NULL, HFILL } |
5897 | 16 | }, |
5898 | 16 | { &hf_isis_lsp_ip_reachability_ipv4_prefix, |
5899 | 16 | { "IPv4 prefix", "isis.lsp.ip_reachability.ipv4_prefix", |
5900 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
5901 | 16 | NULL, HFILL } |
5902 | 16 | }, |
5903 | 16 | { &hf_isis_lsp_ip_reachability_default_metric, |
5904 | 16 | { "Default Metric", "isis.lsp.ip_reachability.default_metric", |
5905 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
5906 | 16 | NULL, HFILL } |
5907 | 16 | }, |
5908 | 16 | { &hf_isis_lsp_ip_reachability_delay_metric, |
5909 | 16 | { "Delay Metric", "isis.lsp.ip_reachability.delay_metric", |
5910 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
5911 | 16 | NULL, HFILL } |
5912 | 16 | }, |
5913 | 16 | { &hf_isis_lsp_ip_reachability_expense_metric, |
5914 | 16 | { "Expense Metric", "isis.lsp.ip_reachability.expense_metric", |
5915 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
5916 | 16 | NULL, HFILL } |
5917 | 16 | }, |
5918 | 16 | { &hf_isis_lsp_ip_reachability_error_metric, |
5919 | 16 | { "Error Metric", "isis.lsp.ip_reachability.error_metric", |
5920 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
5921 | 16 | NULL, HFILL } |
5922 | 16 | }, |
5923 | 16 | { &hf_isis_lsp_ext_ip_reachability_subclvs_len, |
5924 | 16 | { "SubCLV Length", "isis.lsp.ext_ip_reachability.subclvs_length", |
5925 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
5926 | 16 | NULL, HFILL } |
5927 | 16 | }, |
5928 | 16 | { &hf_isis_lsp_ext_ip_reachability_code, |
5929 | 16 | { "Code", "isis.lsp.ext_ip_reachability.code", |
5930 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_ext_ip_reachability_code_vals), 0x0, |
5931 | 16 | NULL, HFILL } |
5932 | 16 | }, |
5933 | 16 | { &hf_isis_lsp_ext_ip_reachability_len, |
5934 | 16 | { "Length", "isis.lsp.ext_ip_reachability.length", |
5935 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
5936 | 16 | NULL, HFILL } |
5937 | 16 | }, |
5938 | 16 | { &hf_isis_lsp_ext_ip_reachability_prefix_flags, |
5939 | 16 | { "Flags", "isis.lsp.ext_ip_reachability.prefix_sid.flags", |
5940 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
5941 | 16 | NULL, HFILL } |
5942 | 16 | }, |
5943 | 16 | { &hf_isis_lsp_ext_ip_reachability_prefix_re_adv_flag, |
5944 | 16 | { "Re-advertisement", "isis.lsp.ext_ip_reachability.prefix_sid.flags.r", |
5945 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
5946 | 16 | NULL, HFILL } |
5947 | 16 | }, |
5948 | 16 | { &hf_isis_lsp_ext_ip_reachability_prefix_node_sid_flag, |
5949 | 16 | { "Node-SID", "isis.lsp.ext_ip_reachability.prefix_sid.flags.n", |
5950 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40, |
5951 | 16 | NULL, HFILL } |
5952 | 16 | }, |
5953 | 16 | { &hf_isis_lsp_ext_ip_reachability_prefix_nophp_flag, |
5954 | 16 | { "no-PHP", "isis.lsp.ext_ip_reachability.prefix_sid.flags.p", |
5955 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x20, |
5956 | 16 | NULL, HFILL } |
5957 | 16 | }, |
5958 | 16 | { &hf_isis_lsp_ext_ip_reachability_prefix_expl_null_flag, |
5959 | 16 | { "Explicit-Null", "isis.lsp.ext_ip_reachability.prefix_sid.flags.e", |
5960 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x10, |
5961 | 16 | NULL, HFILL } |
5962 | 16 | }, |
5963 | 16 | { &hf_isis_lsp_ext_ip_reachability_prefix_value_flag, |
5964 | 16 | { "Value", "isis.lsp.ext_ip_reachability.prefix_sid.flags.v", |
5965 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x8, |
5966 | 16 | NULL, HFILL } |
5967 | 16 | }, |
5968 | 16 | { &hf_isis_lsp_ext_ip_reachability_prefix_local_flag, |
5969 | 16 | { "Local", "isis.lsp.ext_ip_reachability.prefix_sid.flags.l", |
5970 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x4, |
5971 | 16 | NULL, HFILL } |
5972 | 16 | }, |
5973 | 16 | { &hf_isis_lsp_32_bit_administrative_tag, |
5974 | 16 | { "32-Bit Administrative tag", "isis.lsp.32_bit_administrative_tag", |
5975 | 16 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
5976 | 16 | NULL, HFILL } |
5977 | 16 | }, |
5978 | 16 | { &hf_isis_lsp_64_bit_administrative_tag, |
5979 | 16 | { "64-Bit Administrative tag", "isis.lsp.64_bit_administrative_tag", |
5980 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, |
5981 | 16 | NULL, HFILL } |
5982 | 16 | }, |
5983 | 16 | { &hf_isis_lsp_ext_ip_reachability_ipv4_prefix, |
5984 | 16 | { "IPv4 prefix", "isis.lsp.ext_ip_reachability.ipv4_prefix", |
5985 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
5986 | 16 | NULL, HFILL } |
5987 | 16 | }, |
5988 | 16 | { &hf_isis_lsp_ext_ip_reachability_metric, |
5989 | 16 | { "Metric", "isis.lsp.ext_ip_reachability.metric", |
5990 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
5991 | 16 | NULL, HFILL } |
5992 | 16 | }, |
5993 | 16 | { &hf_isis_lsp_ext_ip_reachability_distribution, |
5994 | 16 | { "Distribution", "isis.lsp.ext_ip_reachability.distribution", |
5995 | 16 | FT_BOOLEAN, 8, TFS(&tfs_down_up), 0x80, |
5996 | 16 | NULL, HFILL } |
5997 | 16 | }, |
5998 | 16 | { &hf_isis_lsp_ext_ip_reachability_subtlv, |
5999 | 16 | { "Sub-TLV", "isis.lsp.ext_ip_reachability.subtlv", |
6000 | 16 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40, |
6001 | 16 | NULL, HFILL } |
6002 | 16 | }, |
6003 | 16 | { &hf_isis_lsp_ext_ip_reachability_prefix_length, |
6004 | 16 | { "Prefix Length", "isis.lsp.ext_ip_reachability.prefix_length", |
6005 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
6006 | 16 | NULL, HFILL } |
6007 | 16 | }, |
6008 | 16 | { &hf_isis_lsp_grp_type, |
6009 | 16 | { "Type", "isis.lsp.grp.type", |
6010 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_grp_types), 0x0, |
6011 | 16 | NULL, HFILL } |
6012 | 16 | }, |
6013 | 16 | { &hf_isis_lsp_grp_macaddr_length, |
6014 | 16 | { "Length", "isis.lsp.grp_macaddr.length", |
6015 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6016 | 16 | NULL, HFILL } |
6017 | 16 | }, |
6018 | 16 | { &hf_isis_lsp_grp_macaddr_topology_id, |
6019 | 16 | { "Topology ID", "isis.lsp.grp_macaddr.mtid", |
6020 | 16 | FT_UINT16, BASE_DEC|BASE_RANGE_STRING, RVALS(isis_mtid_strings), 0x0fff, |
6021 | 16 | NULL, HFILL } |
6022 | 16 | }, |
6023 | 16 | { &hf_isis_lsp_grp_macaddr_vlan_id, |
6024 | 16 | { "VLAN ID", "isis.lsp.grp_macaddr.vlan_id", |
6025 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0fff, |
6026 | 16 | NULL, HFILL } |
6027 | 16 | }, |
6028 | 16 | { &hf_isis_lsp_grp_macaddr_number_of_records, |
6029 | 16 | { "Number of records", "isis.lsp.grp_macaddr.number_of_records", |
6030 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6031 | 16 | NULL, HFILL } |
6032 | 16 | }, |
6033 | 16 | { &hf_isis_lsp_grp_macaddr_number_of_sources, |
6034 | 16 | { "Number of sources", "isis.lsp.grp_macaddr.number_of_sources", |
6035 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6036 | 16 | NULL, HFILL } |
6037 | 16 | }, |
6038 | 16 | { &hf_isis_lsp_grp_macaddr_group_address, |
6039 | 16 | { "Group Address", "isis.lsp.grp_macaddr.group_address", |
6040 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
6041 | 16 | NULL, HFILL } |
6042 | 16 | }, |
6043 | 16 | { &hf_isis_lsp_grp_macaddr_source_address, |
6044 | 16 | { "Source Address", "isis.lsp.grp_macaddr.source_address", |
6045 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
6046 | 16 | NULL, HFILL } |
6047 | 16 | }, |
6048 | 16 | { &hf_isis_lsp_grp_ipv4addr_length, |
6049 | 16 | { "Length", "isis.lsp.grp_ipv4addr.length", |
6050 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6051 | 16 | NULL, HFILL } |
6052 | 16 | }, |
6053 | 16 | { &hf_isis_lsp_grp_ipv4addr_topology_id, |
6054 | 16 | { "Topology ID", "isis.lsp.grp_ipv4addr.mtid", |
6055 | 16 | FT_UINT16, BASE_DEC|BASE_RANGE_STRING, RVALS(isis_mtid_strings), 0x0fff, |
6056 | 16 | NULL, HFILL } |
6057 | 16 | }, |
6058 | 16 | { &hf_isis_lsp_grp_ipv4addr_vlan_id, |
6059 | 16 | { "VLAN ID", "isis.lsp.grp_ipv4addr.vlan_id", |
6060 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0fff, |
6061 | 16 | NULL, HFILL } |
6062 | 16 | }, |
6063 | 16 | { &hf_isis_lsp_grp_ipv4addr_number_of_records, |
6064 | 16 | { "Number of records", "isis.lsp.grp_ipv4addr.number_of_records", |
6065 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6066 | 16 | NULL, HFILL } |
6067 | 16 | }, |
6068 | 16 | { &hf_isis_lsp_grp_ipv4addr_number_of_sources, |
6069 | 16 | { "Number of sources", "isis.lsp.grp_ipv4addr.number_of_sources", |
6070 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6071 | 16 | NULL, HFILL } |
6072 | 16 | }, |
6073 | 16 | { &hf_isis_lsp_grp_ipv4addr_group_address, |
6074 | 16 | { "Group Address", "isis.lsp.grp_ipv4addr.group_address", |
6075 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
6076 | 16 | NULL, HFILL } |
6077 | 16 | }, |
6078 | 16 | { &hf_isis_lsp_grp_ipv4addr_source_address, |
6079 | 16 | { "Source Address", "isis.lsp.grp_ipv4addr.source_address", |
6080 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
6081 | 16 | NULL, HFILL } |
6082 | 16 | }, |
6083 | 16 | { &hf_isis_lsp_grp_ipv6addr_length, |
6084 | 16 | { "Length", "isis.lsp.grp_ipv6addr.length", |
6085 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6086 | 16 | NULL, HFILL } |
6087 | 16 | }, |
6088 | 16 | { &hf_isis_lsp_grp_ipv6addr_topology_id, |
6089 | 16 | { "Topology ID", "isis.lsp.grp_ipv6addr.mtid", |
6090 | 16 | FT_UINT16, BASE_DEC|BASE_RANGE_STRING, RVALS(isis_mtid_strings), 0x0fff, |
6091 | 16 | NULL, HFILL } |
6092 | 16 | }, |
6093 | 16 | { &hf_isis_lsp_grp_ipv6addr_vlan_id, |
6094 | 16 | { "VLAN ID", "isis.lsp.grp_ipv6addr.vlan_id", |
6095 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0fff, |
6096 | 16 | NULL, HFILL } |
6097 | 16 | }, |
6098 | 16 | { &hf_isis_lsp_grp_ipv6addr_number_of_records, |
6099 | 16 | { "Number of records", "isis.lsp.grp_ipv6addr.number_of_records", |
6100 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6101 | 16 | NULL, HFILL } |
6102 | 16 | }, |
6103 | 16 | { &hf_isis_lsp_grp_ipv6addr_number_of_sources, |
6104 | 16 | { "Number of sources", "isis.lsp.grp_ipv6addr.number_of_sources", |
6105 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6106 | 16 | NULL, HFILL } |
6107 | 16 | }, |
6108 | 16 | { &hf_isis_lsp_grp_ipv6addr_group_address, |
6109 | 16 | { "Group Address", "isis.lsp.grp_ipv6addr.group_address", |
6110 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
6111 | 16 | NULL, HFILL } |
6112 | 16 | }, |
6113 | 16 | { &hf_isis_lsp_grp_ipv6addr_source_address, |
6114 | 16 | { "Source Address", "isis.lsp.grp_ipv6addr.source_address", |
6115 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
6116 | 16 | NULL, HFILL } |
6117 | 16 | }, |
6118 | 16 | { &hf_isis_lsp_grp_unknown_length, |
6119 | 16 | { "Length", "isis.lsp.grp_unknown.length", |
6120 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6121 | 16 | NULL, HFILL } |
6122 | 16 | }, |
6123 | 16 | { &hf_isis_lsp_rt_capable_trill_affinity_tlv, |
6124 | 16 | { "Affinity Sub-TLV", "isis.lsp.rt_capable.trill.affinity_tlv", |
6125 | 16 | FT_BOOLEAN, 32 , TFS(&tfs_supported_not_supported), 0x80000000, |
6126 | 16 | NULL, HFILL } |
6127 | 16 | }, |
6128 | 16 | { &hf_isis_lsp_rt_capable_trill_fgl_safe, |
6129 | 16 | { "FGL-safe", "isis.lsp.rt_capable.trill.fgl_safe", |
6130 | 16 | FT_BOOLEAN, 32 , TFS(&tfs_yes_no), 0x40000000, |
6131 | 16 | NULL, HFILL } |
6132 | 16 | }, |
6133 | 16 | { &hf_isis_lsp_rt_capable_trill_caps, |
6134 | 16 | { "Other Capabilities", "isis.lsp.rt_capable.trill.caps", |
6135 | 16 | FT_BOOLEAN, 32 , TFS(&tfs_supported_not_supported), 0x3ffc0000, |
6136 | 16 | NULL, HFILL } |
6137 | 16 | }, |
6138 | 16 | { &hf_isis_lsp_rt_capable_trill_flags, |
6139 | 16 | { "Extended Header Flags", "isis.lsp.rt_capable.trill.flags", |
6140 | 16 | FT_BOOLEAN, 32 , TFS(&tfs_supported_not_supported), 0x0003ffff, |
6141 | 16 | NULL, HFILL } |
6142 | 16 | }, |
6143 | 16 | { &hf_isis_lsp_rt_capable_trill_maximum_version, |
6144 | 16 | { "Maximum version", "isis.lsp.rt_capable.trill.maximum_version", |
6145 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6146 | 16 | NULL, HFILL } |
6147 | 16 | }, |
6148 | 16 | { &hf_isis_lsp_rt_capable_trees_nof_trees_to_compute, |
6149 | 16 | { "Nof. trees to compute", "isis.lsp.rt_capable.trees.nof_trees_to_compute", |
6150 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
6151 | 16 | NULL, HFILL } |
6152 | 16 | }, |
6153 | 16 | { &hf_isis_lsp_rt_capable_trees_maximum_nof_trees_to_compute, |
6154 | 16 | { "Maximum nof. trees to compute", "isis.lsp.rt_capable.trees.maximum_nof_trees_to_compute", |
6155 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
6156 | 16 | NULL, HFILL } |
6157 | 16 | }, |
6158 | 16 | { &hf_isis_lsp_rt_capable_trees_nof_trees_to_use, |
6159 | 16 | { "Nof. trees to use", "isis.lsp.rt_capable.trees.nof_trees_to_use", |
6160 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
6161 | 16 | NULL, HFILL } |
6162 | 16 | }, |
6163 | 16 | { &hf_isis_lsp_rt_capable_tree_root_id_starting_tree_no, |
6164 | 16 | { "Starting tree no", "isis.lsp.rt_capable.tree_root_id.starting_tree_no", |
6165 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
6166 | 16 | NULL, HFILL } |
6167 | 16 | }, |
6168 | 16 | { &hf_isis_lsp_rt_capable_tree_root_id_nickname, |
6169 | 16 | { "Nickname", "isis.lsp.rt_capable.tree_root_id.nickname", |
6170 | 16 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
6171 | 16 | NULL, HFILL } |
6172 | 16 | }, |
6173 | 16 | { &hf_isis_lsp_rt_capable_nickname_nickname_priority, |
6174 | 16 | { "Nickname priority", "isis.lsp.rt_capable.nickname.nickname_priority", |
6175 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6176 | 16 | NULL, HFILL } |
6177 | 16 | }, |
6178 | 16 | { &hf_isis_lsp_rt_capable_nickname_tree_root_priority, |
6179 | 16 | { "Tree root priority", "isis.lsp.rt_capable.nickname.tree_root_priority", |
6180 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
6181 | 16 | NULL, HFILL } |
6182 | 16 | }, |
6183 | 16 | { &hf_isis_lsp_rt_capable_nickname_nickname, |
6184 | 16 | { "Nickname", "isis.lsp.rt_capable.nickname.nickname", |
6185 | 16 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
6186 | 16 | NULL, HFILL } |
6187 | 16 | }, |
6188 | 16 | { &hf_isis_lsp_rt_capable_interested_vlans_nickname, |
6189 | 16 | { "Nickname", "isis.lsp.rt_capable.interested_vlans.nickname", |
6190 | 16 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
6191 | 16 | NULL, HFILL } |
6192 | 16 | }, |
6193 | 16 | { &hf_isis_lsp_rt_capable_interested_vlans_multicast_ipv4, |
6194 | 16 | { "IPv4 multicast router", "isis.lsp.rt_capable.interested_vlans.multicast_ipv4", |
6195 | 16 | FT_BOOLEAN, 16, TFS(&tfs_set_notset), 0x8000, |
6196 | 16 | NULL, HFILL } |
6197 | 16 | }, |
6198 | 16 | { &hf_isis_lsp_rt_capable_interested_vlans_multicast_ipv6, |
6199 | 16 | { "IPv6 multicast router", "isis.lsp.rt_capable.interested_vlans.multicast_ipv6", |
6200 | 16 | FT_BOOLEAN, 16, TFS(&tfs_set_notset), 0x4000, |
6201 | 16 | NULL, HFILL } |
6202 | 16 | }, |
6203 | 16 | { &hf_isis_lsp_rt_capable_interested_vlans_vlan_start_id, |
6204 | 16 | { "Vlan start id", "isis.lsp.rt_capable.interested_vlans.vlan_start_id", |
6205 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0fff, |
6206 | 16 | NULL, HFILL } |
6207 | 16 | }, |
6208 | 16 | { &hf_isis_lsp_rt_capable_interested_vlans_vlan_end_id, |
6209 | 16 | { "Vlan end id", "isis.lsp.rt_capable.interested_vlans.vlan_end_id", |
6210 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0fff, |
6211 | 16 | NULL, HFILL } |
6212 | 16 | }, |
6213 | 16 | { &hf_isis_lsp_rt_capable_interested_vlans_afs_lost_counter, |
6214 | 16 | { "Appointed forward state lost counter", "isis.lsp.rt_capable.interested_vlans.afs_lost_counter", |
6215 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
6216 | 16 | NULL, HFILL } |
6217 | 16 | }, |
6218 | 16 | { &hf_isis_lsp_rt_capable_tree_used_id_starting_tree_no, |
6219 | 16 | { "Starting tree no", "isis.lsp.rt_capable.tree_used_id.starting_tree_no", |
6220 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
6221 | 16 | NULL, HFILL } |
6222 | 16 | }, |
6223 | 16 | { &hf_isis_lsp_rt_capable_tree_used_id_nickname, |
6224 | 16 | { "Nickname", "isis.lsp.rt_capable.tree_used_id.nickname", |
6225 | 16 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
6226 | 16 | NULL, HFILL } |
6227 | 16 | }, |
6228 | 16 | { &hf_isis_lsp_rt_capable_vlan_group_primary_vlan_id, |
6229 | 16 | { "Primary vlan id", "isis.lsp.rt_capable.vlan_group.primary_vlan_id", |
6230 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0fff, |
6231 | 16 | NULL, HFILL } |
6232 | 16 | }, |
6233 | 16 | { &hf_isis_lsp_rt_capable_vlan_group_secondary_vlan_id, |
6234 | 16 | { "Secondary vlan id", "isis.lsp.rt_capable.vlan_group.secondary_vlan_id", |
6235 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0fff, |
6236 | 16 | NULL, HFILL } |
6237 | 16 | }, |
6238 | 16 | { &hf_isis_lsp_ipv6_reachability_subclvs_len, |
6239 | 16 | { "SubCLV Length", "isis.lsp.ipv6_reachability.subclvs_length", |
6240 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6241 | 16 | NULL, HFILL } |
6242 | 16 | }, |
6243 | 16 | { &hf_isis_lsp_ipv6_reachability_ipv6_prefix, |
6244 | 16 | { "IPv6 prefix", "isis.lsp.ipv6_reachability.ipv6_prefix", |
6245 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
6246 | 16 | NULL, HFILL } |
6247 | 16 | }, |
6248 | 16 | { &hf_isis_lsp_ipv6_reachability_metric, |
6249 | 16 | { "Metric", "isis.lsp.ipv6_reachability.metric", |
6250 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
6251 | 16 | NULL, HFILL } |
6252 | 16 | }, |
6253 | 16 | { &hf_isis_lsp_ipv6_reachability_distribution, |
6254 | 16 | { "Distribution", "isis.lsp.ipv6_reachability.distribution", |
6255 | 16 | FT_BOOLEAN, 8, TFS(&tfs_down_up), 0x80, |
6256 | 16 | NULL, HFILL } |
6257 | 16 | }, |
6258 | 16 | { &hf_isis_lsp_ipv6_reachability_distribution_internal, |
6259 | 16 | { "Distribution", "isis.lsp.ipv6_reachability.distribution_internal", |
6260 | 16 | FT_BOOLEAN, 8, TFS(&tfs_external_internal), 0x40, |
6261 | 16 | NULL, HFILL } |
6262 | 16 | }, |
6263 | 16 | { &hf_isis_lsp_ipv6_reachability_subtlv, |
6264 | 16 | { "Sub-TLV", "isis.lsp.ipv6_reachability.subtlv", |
6265 | 16 | FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20, |
6266 | 16 | NULL, HFILL } |
6267 | 16 | }, |
6268 | 16 | { &hf_isis_lsp_ipv6_reachability_reserved_bits, |
6269 | 16 | { "Reserved bits", "isis.lsp.ipv6_reachability.reserved_bits", |
6270 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1F, |
6271 | 16 | NULL, HFILL } |
6272 | 16 | }, |
6273 | 16 | { &hf_isis_lsp_ipv6_reachability_prefix_length, |
6274 | 16 | { "Prefix Length", "isis.lsp.ipv6_reachability.prefix_length", |
6275 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6276 | 16 | NULL, HFILL } |
6277 | 16 | }, |
6278 | | |
6279 | | /* rfc7794 */ |
6280 | 16 | { &hf_isis_lsp_prefix_attr_flags, |
6281 | 16 | { "Flags", "isis.lsp.prefix_attribute.flags", |
6282 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
6283 | 16 | NULL, HFILL } |
6284 | 16 | }, |
6285 | 16 | { &hf_isis_lsp_prefix_attr_flags_x, |
6286 | 16 | { "External Prefix", "isis.lsp.prefix_attribute.flags.x", |
6287 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), ISIS_LSP_PFX_ATTR_FLAG_X, |
6288 | 16 | NULL, HFILL } |
6289 | 16 | }, |
6290 | 16 | { &hf_isis_lsp_prefix_attr_flags_r, |
6291 | 16 | { "Re-advertisement", "isis.lsp.prefix_attribute.flags.r", |
6292 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), ISIS_LSP_PFX_ATTR_FLAG_R, |
6293 | 16 | NULL, HFILL } |
6294 | 16 | }, |
6295 | 16 | { &hf_isis_lsp_prefix_attr_flags_n, |
6296 | 16 | { "Node", "isis.lsp.prefix_attribute.flags.n", |
6297 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), ISIS_LSP_PFX_ATTR_FLAG_N, |
6298 | 16 | NULL, HFILL } |
6299 | 16 | }, |
6300 | | |
6301 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_cist_root_identifier, |
6302 | 16 | { "CIST Root Identifier", "isis.lsp.mt_cap_spb_instance.cist_root_identifier", |
6303 | 16 | FT_BYTES, SEP_DASH, NULL, 0x0, |
6304 | 16 | NULL, HFILL } |
6305 | 16 | }, |
6306 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_cist_external_root_path_cost, |
6307 | 16 | { "CIST External Root Path Cost", "isis.lsp.mt_cap_spb_instance.cist_external_root_path_cost", |
6308 | 16 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
6309 | 16 | NULL, HFILL } |
6310 | 16 | }, |
6311 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_bridge_priority, |
6312 | 16 | { "Bridge Priority", "isis.lsp.mt_cap_spb_instance.bridge_priority", |
6313 | 16 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
6314 | 16 | NULL, HFILL } |
6315 | 16 | }, |
6316 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_v, |
6317 | 16 | { "V", "isis.lsp.mt_cap_spb_instance.v", |
6318 | 16 | FT_BOOLEAN, 32, NULL, 0x00100000, |
6319 | 16 | NULL, HFILL } |
6320 | 16 | }, |
6321 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_number_of_trees, |
6322 | 16 | { "Number of Trees", "isis.lsp.mt_cap_spb_instance.number_of_trees", |
6323 | 16 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
6324 | 16 | NULL, HFILL } |
6325 | 16 | }, |
6326 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_u, |
6327 | 16 | { "U", "isis.lsp.mt_cap_spb_instance.vlanid_tuple.u", |
6328 | 16 | FT_BOOLEAN, 8, NULL, 0x80, |
6329 | 16 | "Set if this bridge is currently using this ECT-ALGORITHM for I-SIDs it sources or sinks", HFILL } |
6330 | 16 | }, |
6331 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_m, |
6332 | 16 | { "M", "isis.lsp.mt_cap_spb_instance.vlanid_tuple.m", |
6333 | 16 | FT_BOOLEAN, 8, NULL, 0x40, |
6334 | 16 | "indicates if this is SPBM or SPBV mode", HFILL } |
6335 | 16 | }, |
6336 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_a, |
6337 | 16 | { "A", "isis.lsp.mt_cap_spb_instance.vlanid_tuple.a", |
6338 | 16 | FT_BOOLEAN, 8, NULL, 0x20, |
6339 | 16 | "When set, declares this is an SPVID with auto-allocation", HFILL } |
6340 | 16 | }, |
6341 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_reserved, |
6342 | 16 | { "Reserved", "isis.lsp.mt_cap_spb_instance.vlanid_tuple.reserved", |
6343 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1F, |
6344 | 16 | NULL, HFILL } |
6345 | 16 | }, |
6346 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_ect, |
6347 | 16 | { "ECT-ALGORITHM", "isis.lsp.mt_cap_spb_instance.vlanid_tuple.ect", |
6348 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
6349 | 16 | NULL, HFILL } |
6350 | 16 | }, |
6351 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_base_vid, |
6352 | 16 | { "Base VID", "isis.lsp.mt_cap_spb_instance.vlanid_tuple.basevid", |
6353 | 16 | FT_UINT24, BASE_DEC, NULL, 0xFFF000, |
6354 | 16 | NULL, HFILL } |
6355 | 16 | }, |
6356 | 16 | { &hf_isis_lsp_mt_cap_spb_instance_vlanid_tuple_spvid, |
6357 | 16 | { "SPVID", "isis.lsp.mt_cap_spb_instance.vlanid_tuple.spvid", |
6358 | 16 | FT_UINT24, BASE_DEC, NULL, 0x000FFF, |
6359 | 16 | NULL, HFILL } |
6360 | 16 | }, |
6361 | 16 | { &hf_isis_lsp_mt_cap_spb_opaque_algorithm, |
6362 | 16 | { "Algorithm", "isis.lsp.mt_cap_spb_opaque.algorithm", |
6363 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
6364 | 16 | NULL, HFILL } |
6365 | 16 | }, |
6366 | 16 | { &hf_isis_lsp_mt_cap_spb_opaque_information, |
6367 | 16 | { "information", "isis.lsp.mt_cap_spb_opaque.information", |
6368 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, |
6369 | 16 | NULL, HFILL } |
6370 | 16 | }, |
6371 | 16 | { &hf_isis_lsp_mt_cap_spbm_service_identifier_b_mac, |
6372 | 16 | { "B-MAC", "isis.lsp.mt_cap_spbm_service_identifier.b_mac", |
6373 | 16 | FT_ETHER, BASE_NONE, NULL, 0x0, |
6374 | 16 | NULL, HFILL } |
6375 | 16 | }, |
6376 | 16 | { &hf_isis_lsp_mt_cap_spbm_service_identifier_base_vid, |
6377 | 16 | { "Base-VID", "isis.lsp.mt_cap_spbm_service_identifier.base_vid", |
6378 | 16 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
6379 | 16 | NULL, HFILL } |
6380 | 16 | }, |
6381 | 16 | { &hf_isis_lsp_mt_cap_spbm_service_identifier_t, |
6382 | 16 | { "T", "isis.lsp.mt_cap_spbm_service_identifier.t", |
6383 | 16 | FT_BOOLEAN, 8, NULL, 0x80, |
6384 | 16 | NULL, HFILL } |
6385 | 16 | }, |
6386 | 16 | { &hf_isis_lsp_mt_cap_spbm_service_identifier_r, |
6387 | 16 | { "R", "isis.lsp.mt_cap_spbm_service_identifier.r", |
6388 | 16 | FT_BOOLEAN, 8, NULL, 0x40, |
6389 | 16 | NULL, HFILL } |
6390 | 16 | }, |
6391 | 16 | { &hf_isis_lsp_mt_cap_spbm_service_identifier_reserved, |
6392 | 16 | { "Reserved", "isis.lsp.mt_cap_spbm_service_identifier.reserved", |
6393 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, |
6394 | 16 | NULL, HFILL } |
6395 | 16 | }, |
6396 | 16 | { &hf_isis_lsp_mt_cap_spbm_service_identifier_i_sid, |
6397 | 16 | { "I-SID", "isis.lsp.mt_cap_spbm_service_identifier.i_sid", |
6398 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, |
6399 | 16 | NULL, HFILL } |
6400 | 16 | }, |
6401 | 16 | { &hf_isis_lsp_mt_cap_mtid, |
6402 | 16 | { "Topology ID", "isis.lsp.mt_cap.mtid", |
6403 | 16 | FT_UINT16, BASE_DEC|BASE_RANGE_STRING, RVALS(isis_mtid_strings), 0x0fff, |
6404 | 16 | NULL, HFILL } |
6405 | 16 | }, |
6406 | 16 | { &hf_isis_lsp_eis_neighbors_reserved, |
6407 | 16 | { "Reserved", "isis.lsp.eis_neighbors_clv_inner.reserved", |
6408 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
6409 | 16 | NULL, HFILL } |
6410 | 16 | }, |
6411 | 16 | { &hf_isis_lsp_eis_neighbors_es_neighbor_id, |
6412 | 16 | { "ES Neighbor ID", "isis.lsp.eis_neighbors.es_neighbor_id", |
6413 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
6414 | 16 | NULL, HFILL } |
6415 | 16 | }, |
6416 | 16 | { &hf_isis_lsp_eis_neighbors_is_neighbor_id, |
6417 | 16 | { "IS Neighbor", "isis.lsp.eis_neighbors.is_neighbor", |
6418 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
6419 | 16 | NULL, HFILL } |
6420 | 16 | }, |
6421 | 16 | { &hf_isis_lsp_eis_neighbors_default_metric, |
6422 | 16 | { "Default Metric", "isis.lsp.eis_neighbors.default_metric", |
6423 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
6424 | 16 | NULL, HFILL } |
6425 | 16 | }, |
6426 | 16 | { &hf_isis_lsp_eis_neighbors_delay_metric, |
6427 | 16 | { "Delay Metric", "isis.lsp.eis_neighbors.delay_metric", |
6428 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
6429 | 16 | NULL, HFILL } |
6430 | 16 | }, |
6431 | 16 | { &hf_isis_lsp_eis_neighbors_expense_metric, |
6432 | 16 | { "Expense Metric", "isis.lsp.eis_neighbors.expense_metric", |
6433 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
6434 | 16 | NULL, HFILL } |
6435 | 16 | }, |
6436 | 16 | { &hf_isis_lsp_eis_neighbors_error_metric, |
6437 | 16 | { "Error Metric", "isis.lsp.eis_neighbors.error_metric", |
6438 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
6439 | 16 | NULL, HFILL } |
6440 | 16 | }, |
6441 | 16 | { &hf_isis_lsp_maximum_link_bandwidth, |
6442 | 16 | { "Maximum link bandwidth", "isis.lsp.maximum_link_bandwidth", |
6443 | 16 | FT_FLOAT, BASE_NONE, NULL, 0x0, |
6444 | 16 | NULL, HFILL } |
6445 | 16 | }, |
6446 | 16 | { &hf_isis_lsp_reservable_link_bandwidth, |
6447 | 16 | { "Reservable link bandwidth", "isis.lsp.reservable_link_bandwidth", |
6448 | 16 | FT_FLOAT, BASE_NONE, NULL, 0x0, |
6449 | 16 | NULL, HFILL } |
6450 | 16 | }, |
6451 | 16 | { &hf_isis_lsp_ext_is_reachability_is_neighbor_id, |
6452 | 16 | { "IS neighbor ID", "isis.lsp.ext_is_reachability.is_neighbor_id", |
6453 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
6454 | 16 | NULL, HFILL } |
6455 | 16 | }, |
6456 | 16 | { &hf_isis_lsp_ext_is_reachability_metric, |
6457 | 16 | { "Metric", "isis.lsp.ext_is_reachability.metric", |
6458 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0, |
6459 | 16 | NULL, HFILL } |
6460 | 16 | }, |
6461 | 16 | { &hf_isis_lsp_ext_is_reachability_subclvs_len, |
6462 | 16 | { "SubCLV Length", "isis.lsp.ext_is_reachability.subclvs_length", |
6463 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6464 | 16 | NULL, HFILL } |
6465 | 16 | }, |
6466 | 16 | { &hf_isis_lsp_ext_is_reachability_code, |
6467 | 16 | { "Code", "isis.lsp.ext_is_reachability.code", |
6468 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_ext_is_reachability_code_vals), 0x0, |
6469 | 16 | NULL, HFILL } |
6470 | 16 | }, |
6471 | 16 | { &hf_isis_lsp_ext_is_reachability_len, |
6472 | 16 | { "Length", "isis.lsp.ext_is_reachability.length", |
6473 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6474 | 16 | NULL, HFILL } |
6475 | 16 | }, |
6476 | 16 | { &hf_isis_lsp_ext_is_reachability_value, |
6477 | 16 | { "Value", "isis.lsp.ext_is_reachability.value", |
6478 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, |
6479 | 16 | NULL, HFILL } |
6480 | 16 | }, |
6481 | 16 | { &hf_isis_lsp_ext_is_reachability_link_local_identifier, |
6482 | 16 | { "Link Local Identifier", "isis.lsp.ext_is_reachability.link_local_identifier", |
6483 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
6484 | 16 | NULL, HFILL } |
6485 | 16 | }, |
6486 | 16 | { &hf_isis_lsp_ext_is_reachability_link_remote_identifier, |
6487 | 16 | { "Link Remote Identifier", "isis.lsp.ext_is_reachability.link_remote_identifier", |
6488 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
6489 | 16 | NULL, HFILL } |
6490 | 16 | }, |
6491 | 16 | { &hf_isis_lsp_ext_is_reachability_ipv4_interface_address, |
6492 | 16 | { "IPv4 interface address", "isis.lsp.ext_is_reachability.ipv4_interface_address", |
6493 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
6494 | 16 | NULL, HFILL } |
6495 | 16 | }, |
6496 | 16 | { &hf_isis_lsp_ext_is_reachability_ipv4_neighbor_address, |
6497 | 16 | { "IPv4 neighbor address", "isis.lsp.ext_is_reachability.ipv4_neighbor_address", |
6498 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
6499 | 16 | NULL, HFILL } |
6500 | 16 | }, |
6501 | 16 | { &hf_isis_lsp_ext_is_reachability_traffic_engineering_default_metric, |
6502 | 16 | { "Traffic engineering default metric", "isis.lsp.ext_is_reachability.traffic_engineering_default_metric", |
6503 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0, |
6504 | 16 | NULL, HFILL } |
6505 | 16 | }, |
6506 | | /* rfc8570 */ |
6507 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_link_flags, |
6508 | 16 | { "Flags", "isis.lsp.ext_is_reachability.unidirectional_link_flags", |
6509 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
6510 | 16 | NULL, HFILL } |
6511 | 16 | }, |
6512 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_link_flags_a, |
6513 | 16 | { "Anomalous bit", "isis.lsp.ext_is_reachability.unidirectional_link_flags.a", |
6514 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
6515 | 16 | NULL, HFILL } |
6516 | 16 | }, |
6517 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_link_reserved, |
6518 | 16 | { "Reserved", "isis.lsp.ext_is_reachability.unidirectional_link_reserved", |
6519 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
6520 | 16 | NULL, HFILL } |
6521 | 16 | }, |
6522 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_link_delay, |
6523 | 16 | { "Delay", "isis.lsp.ext_is_reachability.unidirectional_link_delay", |
6524 | 16 | FT_UINT24, BASE_DEC, NULL, 0, |
6525 | 16 | NULL, HFILL } |
6526 | 16 | }, |
6527 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_link_delay_min, |
6528 | 16 | { "Min Delay", "isis.lsp.ext_is_reachability.unidirectional_link_delay_min", |
6529 | 16 | FT_UINT24, BASE_DEC, NULL, 0, |
6530 | 16 | NULL, HFILL } |
6531 | 16 | }, |
6532 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_link_delay_max, |
6533 | 16 | { "Max Delay", "isis.lsp.ext_is_reachability.unidirectional_link_delay_max", |
6534 | 16 | FT_UINT24, BASE_DEC, NULL, 0, |
6535 | 16 | NULL, HFILL } |
6536 | 16 | }, |
6537 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_delay_variation, |
6538 | 16 | { "Delay Variation", "isis.lsp.ext_is_reachability.unidirectional_delay_variation", |
6539 | 16 | FT_UINT24, BASE_DEC, NULL, 0, |
6540 | 16 | NULL, HFILL } |
6541 | 16 | }, |
6542 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_link_loss, |
6543 | 16 | { "Link Loss", "isis.lsp.ext_is_reachability.unidirectional_link_loss", |
6544 | 16 | FT_UINT24, BASE_DEC, NULL, 0, |
6545 | 16 | NULL, HFILL } |
6546 | 16 | }, |
6547 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_residual_bandwidth, |
6548 | 16 | { "Residual Bandwidth", "isis.lsp.ext_is_reachability.unidirectional_residual_bandwidth", |
6549 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
6550 | 16 | NULL, HFILL } |
6551 | 16 | }, |
6552 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_available_bandwidth, |
6553 | 16 | { "Available Bandwidth", "isis.lsp.ext_is_reachability.unidirectional_available_bandwidth", |
6554 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
6555 | 16 | NULL, HFILL } |
6556 | 16 | }, |
6557 | 16 | { &hf_isis_lsp_ext_is_reachability_unidir_utilized_bandwidth, |
6558 | 16 | { "Utilized Bandwidth", "isis.lsp.ext_is_reachability.unidirectional_utilized_bandwidth", |
6559 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
6560 | 16 | NULL, HFILL } |
6561 | 16 | }, |
6562 | | |
6563 | 16 | { &hf_isis_lsp_partition_designated_l2_is, |
6564 | 16 | { "Partition designated L2 IS", "isis.lsp.partition_designated_l2_is", |
6565 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
6566 | 16 | NULL, HFILL } |
6567 | 16 | }, |
6568 | 16 | { &hf_isis_lsp_originating_lsp_buffer_size, |
6569 | 16 | { "Neighbor originating buffer size", "isis.lsp.originating_lsp_buffer_size", |
6570 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
6571 | 16 | NULL, HFILL } |
6572 | 16 | }, |
6573 | 16 | { &hf_isis_lsp_error_metric, |
6574 | 16 | { "Error metric", "isis.lsp.error_metric", |
6575 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40, |
6576 | 16 | NULL, HFILL } |
6577 | 16 | }, |
6578 | 16 | { &hf_isis_lsp_expense_metric, |
6579 | 16 | { "Expense metric", "isis.lsp.expense_metric", |
6580 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x20, |
6581 | 16 | NULL, HFILL } |
6582 | 16 | }, |
6583 | 16 | { &hf_isis_lsp_delay_metric, |
6584 | 16 | { "Delay metric", "isis.lsp.delay_metric", |
6585 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x10, |
6586 | 16 | NULL, HFILL } |
6587 | 16 | }, |
6588 | 16 | { &hf_isis_lsp_default_metric, |
6589 | 16 | { "Default metric", "isis.lsp.default_metric", |
6590 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
6591 | 16 | NULL, HFILL } |
6592 | 16 | }, |
6593 | 16 | { &hf_isis_lsp_ip_reachability_default_metric_ie, |
6594 | 16 | { "Default Metric IE", "isis.lsp.ip_reachability.default_metric_ie", |
6595 | 16 | FT_BOOLEAN, 8, TFS(&tfs_external_internal), 0x40, |
6596 | 16 | NULL, HFILL } |
6597 | 16 | }, |
6598 | 16 | { &hf_isis_lsp_ip_reachability_delay_metric_support, |
6599 | 16 | { "Delay Metric", "isis.lsp.ip_reachability.delay_metric_support", |
6600 | 16 | FT_BOOLEAN, 8, TFS(&tfs_not_supported_supported), 0x80, |
6601 | 16 | NULL, HFILL } |
6602 | 16 | }, |
6603 | 16 | { &hf_isis_lsp_ip_reachability_expense_metric_support, |
6604 | 16 | { "Expense Metric", "isis.lsp.ip_reachability.expense_metric_support", |
6605 | 16 | FT_BOOLEAN, 8, TFS(&tfs_not_supported_supported), 0x80, |
6606 | 16 | NULL, HFILL } |
6607 | 16 | }, |
6608 | 16 | { &hf_isis_lsp_ip_reachability_error_metric_support, |
6609 | 16 | { "Error Metric", "isis.lsp.ip_reachability.error_metric_support", |
6610 | 16 | FT_BOOLEAN, 8, TFS(&tfs_not_supported_supported), 0x80, |
6611 | 16 | NULL, HFILL } |
6612 | 16 | }, |
6613 | 16 | { &hf_isis_lsp_mt_cap_spsourceid, |
6614 | 16 | { "SPSourceId", "isis.lsp.mt_cap.spsourceid", |
6615 | 16 | FT_UINT32, BASE_HEX_DEC, NULL, 0x000fffff, |
6616 | 16 | NULL, HFILL } |
6617 | 16 | }, |
6618 | 16 | { &hf_isis_lsp_mt_cap_overload, |
6619 | 16 | { "Overload", "isis.lsp.overload", |
6620 | 16 | FT_BOOLEAN, 16, NULL, 0x8000, |
6621 | 16 | NULL, HFILL } |
6622 | 16 | }, |
6623 | 16 | { &hf_isis_lsp_eis_neighbors_default_metric_ie, |
6624 | 16 | { "Default Metric", "isis.lsp.eis_neighbors.default_metric_ie", |
6625 | 16 | FT_BOOLEAN, 8, TFS(&tfs_external_internal), 0x40, |
6626 | 16 | NULL, HFILL } |
6627 | 16 | }, |
6628 | 16 | { &hf_isis_lsp_eis_neighbors_delay_metric_supported, |
6629 | 16 | { "Delay Metric", "isis.lsp.eis_neighbors_delay_metric.supported", |
6630 | 16 | FT_BOOLEAN, 8, TFS(&tfs_not_supported_supported), 0x80, |
6631 | 16 | NULL, HFILL } |
6632 | 16 | }, |
6633 | 16 | { &hf_isis_lsp_eis_neighbors_expense_metric_supported, |
6634 | 16 | { "Expense Metric", "isis.lsp.eis_neighbors.expense_metric_supported", |
6635 | 16 | FT_BOOLEAN, 8, TFS(&tfs_not_supported_supported), 0x80, |
6636 | 16 | NULL, HFILL } |
6637 | 16 | }, |
6638 | 16 | { &hf_isis_lsp_eis_neighbors_error_metric_supported, |
6639 | 16 | { "Error Metric", "isis.lsp.eis_neighbors.error_metric_supported", |
6640 | 16 | FT_BOOLEAN, 8, TFS(&tfs_not_supported_supported), 0x80, |
6641 | 16 | NULL, HFILL } |
6642 | 16 | }, |
6643 | 16 | { &hf_isis_lsp_unrsv_bw_priority_level, |
6644 | 16 | { "priority level", "isis.lsp.unrsv_bw.priority_level", |
6645 | 16 | FT_FLOAT, BASE_NONE, NULL, 0x0, |
6646 | 16 | NULL, HFILL } |
6647 | 16 | }, |
6648 | 16 | { &hf_isis_lsp_ip_reachability_distribution, |
6649 | 16 | { "Distribution", "isis.lsp.ip_reachability.distribution", |
6650 | 16 | FT_BOOLEAN, 8, TFS(&tfs_down_up), 0x80, |
6651 | 16 | NULL, HFILL } |
6652 | 16 | }, |
6653 | 16 | { &hf_isis_lsp_ip_reachability_delay_metric_ie, |
6654 | 16 | { "Delay Metric", "isis.lsp.ip_reachability.delay_metric_ie", |
6655 | 16 | FT_BOOLEAN, 8, TFS(&tfs_external_internal), 0x40, |
6656 | 16 | NULL, HFILL } |
6657 | 16 | }, |
6658 | 16 | { &hf_isis_lsp_ip_reachability_expense_metric_ie, |
6659 | 16 | { "Expense Metric", "isis.lsp.ip_reachability.expense_metric_ie", |
6660 | 16 | FT_BOOLEAN, 8, TFS(&tfs_external_internal), 0x40, |
6661 | 16 | NULL, HFILL } |
6662 | 16 | }, |
6663 | 16 | { &hf_isis_lsp_ip_reachability_error_metric_ie, |
6664 | 16 | { "Error Metric", "isis.lsp.ip_reachability.error_metric_ie", |
6665 | 16 | FT_BOOLEAN, 8, TFS(&tfs_external_internal), 0x40, |
6666 | 16 | NULL, HFILL } |
6667 | 16 | }, |
6668 | 16 | { &hf_isis_lsp_eis_neighbors_delay_metric_ie, |
6669 | 16 | { "Delay Metric", "isis.lsp.eis_neighbors.delay_metric_ie", |
6670 | 16 | FT_BOOLEAN, 8, TFS(&tfs_external_internal), 0x40, |
6671 | 16 | NULL, HFILL } |
6672 | 16 | }, |
6673 | 16 | { &hf_isis_lsp_eis_neighbors_expense_metric_ie, |
6674 | 16 | { "Expense Metric", "isis.lsp.eis_neighbors.expense_metric_ie", |
6675 | 16 | FT_BOOLEAN, 8, TFS(&tfs_external_internal), 0x40, |
6676 | 16 | NULL, HFILL } |
6677 | 16 | }, |
6678 | 16 | { &hf_isis_lsp_eis_neighbors_error_metric_ie, |
6679 | 16 | { "Error Metric", "isis.lsp.eis_neighbors.error_metric_ie", |
6680 | 16 | FT_BOOLEAN, 8, TFS(&tfs_external_internal), 0x40, |
6681 | 16 | NULL, HFILL } |
6682 | 16 | }, |
6683 | 16 | { &hf_isis_lsp_rt_capable_router_id, |
6684 | 16 | { "Router ID", "isis.lsp.rt_capable.router_id", |
6685 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, |
6686 | 16 | NULL, HFILL } |
6687 | 16 | }, |
6688 | 16 | { &hf_isis_lsp_rt_capable_flag_s, |
6689 | 16 | { "S bit", "isis.lsp.rt_capable.flag_s", |
6690 | 16 | FT_BOOLEAN, 8, NULL, 0x01, |
6691 | 16 | NULL, HFILL } |
6692 | 16 | }, |
6693 | 16 | { &hf_isis_lsp_rt_capable_flag_d, |
6694 | 16 | { "D bit", "isis.lsp.rt_capable.flag_d", |
6695 | 16 | FT_BOOLEAN, 8, NULL, 0x02, |
6696 | 16 | NULL, HFILL } |
6697 | 16 | }, |
6698 | 16 | { &hf_isis_lsp_clv_te_node_cap_b_bit, |
6699 | 16 | { "B bit: P2MP Branch LSR capability", "isis.lsp.te_node_cap.b_bit", |
6700 | 16 | FT_BOOLEAN, 8, NULL, 0x80, |
6701 | 16 | NULL, HFILL } |
6702 | 16 | }, |
6703 | 16 | { &hf_isis_lsp_clv_te_node_cap_e_bit, |
6704 | 16 | { "E bit: P2MP Bud LSR capability", "isis.lsp.te_node_cap.e_bit", |
6705 | 16 | FT_BOOLEAN, 8, NULL, 0x40, |
6706 | 16 | NULL, HFILL } |
6707 | 16 | }, |
6708 | 16 | { &hf_isis_lsp_clv_te_node_cap_m_bit, |
6709 | 16 | { "M bit: MPLS-TE support", "isis.lsp.te_node_cap.m_bit", |
6710 | 16 | FT_BOOLEAN, 8, NULL, 0x20, |
6711 | 16 | NULL, HFILL } |
6712 | 16 | }, |
6713 | 16 | { &hf_isis_lsp_clv_te_node_cap_g_bit, |
6714 | 16 | { "G bit: GMPLS support", "isis.lsp.te_node_cap.g_bit", |
6715 | 16 | FT_BOOLEAN, 8, NULL, 0x10, |
6716 | 16 | NULL, HFILL } |
6717 | 16 | }, |
6718 | 16 | { &hf_isis_lsp_clv_te_node_cap_p_bit, |
6719 | 16 | { "P bit: P2MP RSVP-TE support", "isis.lsp.te_node_cap.p_bit", |
6720 | 16 | FT_BOOLEAN, 8, NULL, 0x08, |
6721 | 16 | NULL, HFILL } |
6722 | 16 | }, |
6723 | 16 | { &hf_isis_lsp_clv_sr_cap_i_flag, |
6724 | 16 | { "I flag: IPv4 support", "isis.lsp.sr_cap.i_flag", |
6725 | 16 | FT_BOOLEAN, 8, NULL, 0x80, |
6726 | 16 | NULL, HFILL } |
6727 | 16 | }, |
6728 | 16 | { &hf_isis_lsp_clv_sr_cap_v_flag, |
6729 | 16 | { "V flag: IPv6 support", "isis.lsp.sr_cap.v_flag", |
6730 | 16 | FT_BOOLEAN, 8, NULL, 0x40, |
6731 | 16 | NULL, HFILL } |
6732 | 16 | }, |
6733 | 16 | { &hf_isis_lsp_clv_sr_cap_range, |
6734 | 16 | { "Range", "isis.lsp.sr_cap.range", |
6735 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0, |
6736 | 16 | NULL, HFILL } |
6737 | 16 | }, |
6738 | 16 | { &hf_isis_lsp_clv_sr_cap_sid, |
6739 | 16 | { "SID", "isis.lsp.sr_cap.sid", |
6740 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
6741 | 16 | NULL, HFILL } |
6742 | 16 | }, |
6743 | 16 | { &hf_isis_lsp_clv_sr_cap_label, |
6744 | 16 | { "Label", "isis.lsp.sr_cap.label", |
6745 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0, |
6746 | 16 | NULL, HFILL } |
6747 | 16 | }, |
6748 | 16 | { &hf_isis_lsp_clv_sr_alg, |
6749 | 16 | { "Algorithm", "isis.lsp.sr_alg", |
6750 | 16 | FT_UINT8, BASE_DEC, VALS(isis_igp_alg_vals), 0x0, |
6751 | 16 | NULL, HFILL } |
6752 | 16 | }, |
6753 | 16 | { &hf_isis_lsp_clv_sr_lb_flags, |
6754 | 16 | { "Flags", "isis.lsp.sr_local_block.flags", |
6755 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
6756 | 16 | NULL, HFILL } |
6757 | 16 | }, |
6758 | 16 | { &hf_isis_lsp_clv_srv6_cap_flags, |
6759 | 16 | { "Flags", "isis.lsp.srv6_cap.flags", |
6760 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, |
6761 | 16 | NULL, HFILL } |
6762 | 16 | }, |
6763 | 16 | { &hf_isis_lsp_clv_srv6_cap_flags_o, |
6764 | 16 | { "OAM flag", "isis.lsp.srv6_cap.flags.o", |
6765 | 16 | FT_BOOLEAN, 16, TFS(&tfs_set_notset), 0x4000, |
6766 | 16 | NULL, HFILL } |
6767 | 16 | }, |
6768 | 16 | { &hf_isis_lsp_clv_srv6_cap_flags_reserved, |
6769 | 16 | { "Reserved", "isis.lsp.srv6_cap.flags.reserved", |
6770 | 16 | FT_UINT16, BASE_HEX, NULL, 0x3fff, |
6771 | 16 | NULL, HFILL } |
6772 | 16 | }, |
6773 | | |
6774 | 16 | { &hf_isis_lsp_srv6_loc_metric, |
6775 | 16 | { "Metric", "isis.lsp.srv6_locator.metric", |
6776 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
6777 | 16 | NULL, HFILL } |
6778 | 16 | }, |
6779 | 16 | { &hf_isis_lsp_srv6_loc_flags, |
6780 | 16 | { "Flags", "isis.lsp.srv6_locator.flags", |
6781 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
6782 | 16 | NULL, HFILL } |
6783 | 16 | }, |
6784 | 16 | { &hf_isis_lsp_srv6_loc_flags_d, |
6785 | 16 | { "Down flag", "isis.lsp.srv6_locator.flags.d", |
6786 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
6787 | 16 | NULL, HFILL } |
6788 | 16 | }, |
6789 | 16 | { &hf_isis_lsp_srv6_loc_flags_reserved, |
6790 | 16 | { "Reserved", "isis.lsp.srv6_locator.flags.reserved", |
6791 | 16 | FT_UINT8, BASE_HEX, NULL, 0x7f, |
6792 | 16 | NULL, HFILL } |
6793 | 16 | }, |
6794 | 16 | { &hf_isis_lsp_srv6_loc_alg, |
6795 | 16 | { "Algorithm", "isis.lsp.srv6_locator.algorithm", |
6796 | 16 | FT_UINT8, BASE_DEC, VALS(isis_igp_alg_vals), 0x0, |
6797 | 16 | NULL, HFILL } |
6798 | 16 | }, |
6799 | 16 | { &hf_isis_lsp_srv6_loc_size, |
6800 | 16 | { "Locator Size", "isis.lsp.srv6_locator.locator_size", |
6801 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6802 | 16 | NULL, HFILL } |
6803 | 16 | }, |
6804 | 16 | { &hf_isis_lsp_srv6_loc_locator, |
6805 | 16 | { "Locator", "isis.lsp.srv6_locator.locator", |
6806 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
6807 | 16 | NULL, HFILL } |
6808 | 16 | }, |
6809 | 16 | { &hf_isis_lsp_srv6_loc_subclvs_len, |
6810 | 16 | { "SubCLV Length", "isis.lsp.srv6_locator.subclvs_length", |
6811 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6812 | 16 | NULL, HFILL } |
6813 | 16 | }, |
6814 | 16 | { &hf_isis_lsp_srv6_loc_sub_tlv_type, |
6815 | 16 | { "Code", "isis.lsp.srv6_locator.sub_tlv_type", |
6816 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_srv6_loc_sub_tlv_vals), 0x0, |
6817 | 16 | NULL, HFILL } |
6818 | 16 | }, |
6819 | 16 | { &hf_isis_lsp_srv6_loc_sub_tlv_length, |
6820 | 16 | { "Length", "isis.lsp.srv6_locator.sub_tlv_length", |
6821 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6822 | 16 | NULL, HFILL } |
6823 | 16 | }, |
6824 | | |
6825 | 16 | { &hf_isis_lsp_clv_srv6_end_sid_flags, |
6826 | 16 | { "Flags", "isis.lsp.srv6_end_sid.flags", |
6827 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
6828 | 16 | NULL, HFILL } |
6829 | 16 | }, |
6830 | 16 | { &hf_isis_lsp_clv_srv6_end_sid_endpoint_behavior, |
6831 | 16 | { "Endpoint Behavior", "isis.lsp.srv6_end_sid.endpoint_behavior", |
6832 | 16 | FT_UINT16, BASE_DEC, VALS(srv6_endpoint_type_vals), 0x0, |
6833 | 16 | NULL, HFILL } |
6834 | 16 | }, |
6835 | 16 | { &hf_isis_lsp_clv_srv6_end_sid_sid, |
6836 | 16 | { "SID", "isis.lsp.srv6_end_sid.sid", |
6837 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
6838 | 16 | NULL, HFILL } |
6839 | 16 | }, |
6840 | 16 | { &hf_isis_lsp_clv_srv6_end_sid_subsubclvs_len, |
6841 | 16 | { "SubSubCLV Length", "isis.lsp.srv6_end_sid.subsubclvs_length", |
6842 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6843 | 16 | NULL, HFILL } |
6844 | 16 | }, |
6845 | | |
6846 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_system_id, |
6847 | 16 | { "System-ID", "isis.lsp.srv6_endx_sid.system_id", |
6848 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
6849 | 16 | NULL, HFILL } |
6850 | 16 | }, |
6851 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_flags, |
6852 | 16 | { "Flags", "isis.lsp.srv6_endx_sid.flags", |
6853 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
6854 | 16 | NULL, HFILL } |
6855 | 16 | }, |
6856 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_flags_b, |
6857 | 16 | { "Backup flag", "isis.lsp.srv6_endx_sid.flags.b", |
6858 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
6859 | 16 | NULL, HFILL } |
6860 | 16 | }, |
6861 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_flags_s, |
6862 | 16 | { "Set flag", "isis.lsp.srv6_endx_sid.flags.s", |
6863 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40, |
6864 | 16 | NULL, HFILL } |
6865 | 16 | }, |
6866 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_flags_p, |
6867 | 16 | { "Persistent flag", "isis.lsp.srv6_endx_sid.flags.p", |
6868 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x20, |
6869 | 16 | NULL, HFILL } |
6870 | 16 | }, |
6871 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_flags_reserved, |
6872 | 16 | { "Reserved", "isis.lsp.srv6_endx_sid.flags.reserved", |
6873 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1f, |
6874 | 16 | NULL, HFILL } |
6875 | 16 | }, |
6876 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_alg, |
6877 | 16 | { "Algorithm", "isis.lsp.srv6_endx_sid.algorithm", |
6878 | 16 | FT_UINT8, BASE_DEC, VALS(isis_igp_alg_vals), 0x0, |
6879 | 16 | NULL, HFILL } |
6880 | 16 | }, |
6881 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_weight, |
6882 | 16 | { "Weight", "isis.lsp.srv6_endx_sid.weight", |
6883 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6884 | 16 | NULL, HFILL } |
6885 | 16 | }, |
6886 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_endpoint_behavior, |
6887 | 16 | { "Endpoint Behavior", "isis.lsp.srv6_endx_sid.endpoint_behavior", |
6888 | 16 | FT_UINT16, BASE_DEC, VALS(srv6_endpoint_type_vals), 0x0, |
6889 | 16 | NULL, HFILL } |
6890 | 16 | }, |
6891 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_sid, |
6892 | 16 | { "SID", "isis.lsp.srv6_endx_sid.sid", |
6893 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
6894 | 16 | NULL, HFILL } |
6895 | 16 | }, |
6896 | 16 | { &hf_isis_lsp_clv_srv6_endx_sid_subsubclvs_len, |
6897 | 16 | { "SubSubCLV Length", "isis.lsp.srv6_endx_sid.subsubclvs_length", |
6898 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6899 | 16 | NULL, HFILL } |
6900 | 16 | }, |
6901 | | |
6902 | | /* rfc9352 */ |
6903 | 16 | { &hf_isis_lsp_clv_srv6_sid_struct_lb_len, |
6904 | 16 | { "Locator Block Length", "isis.lsp.srv6_sid_struct.lb_length", |
6905 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6906 | 16 | NULL, HFILL } |
6907 | 16 | }, |
6908 | 16 | { &hf_isis_lsp_clv_srv6_sid_struct_ln_len, |
6909 | 16 | { "Locator Node Length", "isis.lsp.srv6_sid_struct.ln_length", |
6910 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6911 | 16 | NULL, HFILL } |
6912 | 16 | }, |
6913 | 16 | { &hf_isis_lsp_clv_srv6_sid_struct_fun_len, |
6914 | 16 | { "Function Length", "isis.lsp.srv6_sid_struct.fun_length", |
6915 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6916 | 16 | NULL, HFILL } |
6917 | 16 | }, |
6918 | 16 | { &hf_isis_lsp_clv_srv6_sid_struct_arg_len, |
6919 | 16 | { "Arguments Length", "isis.lsp.srv6_sid_struct.arg_length", |
6920 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6921 | 16 | NULL, HFILL } |
6922 | 16 | }, |
6923 | | |
6924 | | /* rfc8491 */ |
6925 | 16 | { &hf_isis_lsp_clv_igp_msd_type, |
6926 | 16 | { "MSD Type", "isis.lsp.igp_msd_type", |
6927 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_igp_msd_types), 0x0, |
6928 | 16 | NULL, HFILL } |
6929 | 16 | }, |
6930 | 16 | { &hf_isis_lsp_clv_igp_msd_value, |
6931 | 16 | { "MSD Value", "isis.lsp.igp_msd_value", |
6932 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
6933 | 16 | NULL, HFILL } |
6934 | 16 | }, |
6935 | | |
6936 | | /* rfc7308 */ |
6937 | 16 | { &hf_isis_lsp_clv_ext_admin_group, |
6938 | 16 | { "Extended Admin Group", "isis.lsp.extended_admin_group", |
6939 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, |
6940 | 16 | NULL, HFILL } |
6941 | 16 | }, |
6942 | | |
6943 | | /* rfc8919 */ |
6944 | 16 | { &hf_isis_lsp_clv_app_sabm_legacy, |
6945 | 16 | { "Legacy flag (L)", "isis.lsp.application.sabm.legacy", |
6946 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
6947 | 16 | NULL, HFILL } |
6948 | 16 | }, |
6949 | 16 | { &hf_isis_lsp_clv_app_sabm_length, |
6950 | 16 | { "SABM Length", "isis.lsp.application.sabm.length", |
6951 | 16 | FT_UINT8, BASE_DEC, NULL, 0x7f, |
6952 | 16 | NULL, HFILL } |
6953 | 16 | }, |
6954 | 16 | { &hf_isis_lsp_clv_app_udabm_reserved, |
6955 | 16 | { "Reserved (R)", "isis.lsp.application.udabm.reserved", |
6956 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
6957 | 16 | NULL, HFILL } |
6958 | 16 | }, |
6959 | 16 | { &hf_isis_lsp_clv_app_udabm_length, |
6960 | 16 | { "UDABM Length", "isis.lsp.application.udabm.length", |
6961 | 16 | FT_UINT8, BASE_DEC, NULL, 0x7f, |
6962 | 16 | NULL, HFILL } |
6963 | 16 | }, |
6964 | 16 | { &hf_isis_lsp_clv_app_sabm_bits, |
6965 | 16 | { "Standard Application Identifier Bit Mask", "isis.lsp.application.sabm.bits", |
6966 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
6967 | 16 | NULL, HFILL } |
6968 | 16 | }, |
6969 | 16 | { &hf_isis_lsp_clv_app_sabm_bits_r, |
6970 | 16 | { "RSVP-TE bit (R)", "isis.lsp.application.sabm.bits.r", |
6971 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, |
6972 | 16 | NULL, HFILL } |
6973 | 16 | }, |
6974 | 16 | { &hf_isis_lsp_clv_app_sabm_bits_s, |
6975 | 16 | { "Segment Routing Policy bit (S)", "isis.lsp.application.sabm.bits.s", |
6976 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40, |
6977 | 16 | NULL, HFILL } |
6978 | 16 | }, |
6979 | 16 | { &hf_isis_lsp_clv_app_sabm_bits_f, |
6980 | 16 | { "Loop-Free Alternate (LFA) bit (F)", "isis.lsp.application.sabm.bits.f", |
6981 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x20, |
6982 | 16 | NULL, HFILL } |
6983 | 16 | }, |
6984 | 16 | { &hf_isis_lsp_clv_app_sabm_bits_x, |
6985 | 16 | { "Flexible Algorithm bit (X)", "isis.lsp.application.sabm.bits.x", |
6986 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x10, |
6987 | 16 | NULL, HFILL } |
6988 | 16 | }, |
6989 | 16 | { &hf_isis_lsp_clv_app_udabm_bits, |
6990 | 16 | { "User-Defined Application Identifier Bit Mask", "isis.lsp.application.udabm.bits", |
6991 | 16 | FT_BYTES, SEP_SPACE, NULL, 0x0, |
6992 | 16 | NULL, HFILL } |
6993 | 16 | }, |
6994 | | /* rfc9843 */ |
6995 | 16 | { &hf_isis_lsp_clv_flex_algo_generic_metric_type, |
6996 | 16 | { "Metric-Type", "isis.lsp.flex_algorithm.generic_metric.metric_type", |
6997 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_flex_algo_metric_type_vals), 0x0, |
6998 | 16 | NULL, HFILL } |
6999 | 16 | }, |
7000 | 16 | { &hf_isis_lsp_clv_flex_algo_generic_metric_value, |
7001 | 16 | { "Value", "isis.lsp.flex_algorithm.generic_metric.value", |
7002 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0, |
7003 | 16 | NULL, HFILL } |
7004 | 16 | }, |
7005 | | |
7006 | | /* rfc9350 */ |
7007 | 16 | { &hf_isis_lsp_clv_flex_algo_algorithm, |
7008 | 16 | { "Flex-Algorithm", "isis.lsp.flex_algorithm.algorithm", |
7009 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7010 | 16 | NULL, HFILL } |
7011 | 16 | }, |
7012 | 16 | { &hf_isis_lsp_clv_flex_algo_metric_type, |
7013 | 16 | { "Metric-Type", "isis.lsp.flex_algorithm.metric_type", |
7014 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_flex_algo_metric_type_vals), 0x0, |
7015 | 16 | NULL, HFILL } |
7016 | 16 | }, |
7017 | 16 | { &hf_isis_lsp_clv_flex_algo_calc_type, |
7018 | 16 | { "Calculation-Type", "isis.lsp.flex_algorithm.calculation_type", |
7019 | 16 | FT_UINT8, BASE_DEC, VALS(isis_igp_alg_vals), 0x0, |
7020 | 16 | NULL, HFILL } |
7021 | 16 | }, |
7022 | 16 | { &hf_isis_lsp_clv_flex_algo_priority, |
7023 | 16 | { "Priority", "isis.lsp.flex_algorithm.priority", |
7024 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7025 | 16 | NULL, HFILL } |
7026 | 16 | }, |
7027 | 16 | { &hf_isis_lsp_clv_flex_algo_def_flags, |
7028 | 16 | { "Flexible Algorithm Definition Flags", "isis.lsp.flex_algorithm.definition_flags", |
7029 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
7030 | 16 | NULL, HFILL } |
7031 | 16 | }, |
7032 | 16 | { &hf_isis_lsp_clv_flex_algo_def_flags_m, |
7033 | 16 | { "M-flag (M)", "isis.lsp.flex_algorithm.definition_flags.m", |
7034 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), FAD_DEF_FLAGS_M, |
7035 | 16 | NULL, HFILL } |
7036 | 16 | }, |
7037 | 16 | { &hf_isis_lsp_clv_flex_algo_srlg_value, |
7038 | 16 | { "Shared Risk Link Group", "isis.lsp.flex_algorithm.srlg", |
7039 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7040 | 16 | NULL, HFILL } |
7041 | 16 | }, |
7042 | 16 | { &hf_isis_lsp_clv_flex_algo_prefix_metric, |
7043 | 16 | { "Metric", "isis.lsp.flex_algorithm.prefix_metric", |
7044 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7045 | 16 | NULL, HFILL } |
7046 | 16 | }, |
7047 | | /* rfc9843 */ |
7048 | 16 | { &hf_isis_lsp_clv_flex_algo_exclude_min_bandwidth, |
7049 | 16 | { "Min Bandwidth", "isis.lsp.flex_algorithm.exclude_min_bandwidth", |
7050 | 16 | FT_FLOAT, BASE_NONE, NULL, 0x0, |
7051 | 16 | NULL, HFILL } |
7052 | 16 | }, |
7053 | 16 | { &hf_isis_lsp_clv_flex_algo_exclude_max_delay, |
7054 | 16 | { "Max Link Delay", "isis.lsp.flex_algorithm.exclude_max_delay", |
7055 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7056 | 16 | NULL, HFILL } |
7057 | 16 | }, |
7058 | 16 | { &hf_isis_lsp_clv_flex_algo_ref_bw_flags, |
7059 | 16 | { "Flags", "isis.lsp.flex_algorithm.reference_bandwidth.flags", |
7060 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
7061 | 16 | NULL, HFILL } |
7062 | 16 | }, |
7063 | 16 | { &hf_isis_lsp_clv_flex_algo_ref_bw_flags_g, |
7064 | 16 | { "G-flag (G)", "isis.lsp.flex_algorithm.reference_bandwidth.flags.g", |
7065 | 16 | FT_BOOLEAN, 8, TFS(&tfs_set_notset), FAD_REFERENCE_BANDWIDTH_FLAGS_G, |
7066 | 16 | NULL, HFILL } |
7067 | 16 | }, |
7068 | 16 | { &hf_isis_lsp_clv_flex_algo_ref_bw_reference_bandwidth, |
7069 | 16 | { "Reference Bandwidth", "isis.lsp.flex_algorithm.reference_bandwidth.reference_bandwidth", |
7070 | 16 | FT_FLOAT, BASE_NONE, NULL, 0x0, |
7071 | 16 | NULL, HFILL } |
7072 | 16 | }, |
7073 | 16 | { &hf_isis_lsp_clv_flex_algo_ref_bw_granularity_bandwidth, |
7074 | 16 | { "Granularity Bandwidth", "isis.lsp.flex_algorithm.reference_bandwidth.granularity_bandwidth", |
7075 | 16 | FT_FLOAT, BASE_NONE, NULL, 0x0, |
7076 | 16 | NULL, HFILL } |
7077 | 16 | }, |
7078 | | |
7079 | | /* rfc6232 */ |
7080 | 16 | { &hf_isis_lsp_purge_orig_id_num, |
7081 | 16 | { "Number of System IDs", "isis.lsp.purge_originator_id.num", |
7082 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7083 | 16 | NULL, HFILL } |
7084 | 16 | }, |
7085 | 16 | { &hf_isis_lsp_purge_orig_id_system_id, |
7086 | 16 | { "System ID", "isis.lsp.purge_originator_id.system_id", |
7087 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
7088 | 16 | NULL, HFILL } |
7089 | 16 | }, |
7090 | | |
7091 | 16 | { &hf_isis_lsp_area_address, |
7092 | 16 | { "Area address", "isis.lsp.area_address", |
7093 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7094 | 16 | NULL, HFILL } |
7095 | 16 | }, |
7096 | 16 | { &hf_isis_lsp_instance_identifier, |
7097 | 16 | { "Instance Identifier", "isis.lsp.iid", |
7098 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
7099 | 16 | NULL, HFILL } |
7100 | 16 | }, |
7101 | 16 | { &hf_isis_lsp_supported_itid, |
7102 | 16 | { "Supported ITID", "isis.lsp.supported_itid", |
7103 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
7104 | 16 | NULL, HFILL } |
7105 | 16 | }, |
7106 | 16 | { &hf_isis_lsp_clv_nlpid_nlpid, |
7107 | 16 | { "NLPID", "isis.lsp.clv_nlpid.nlpid", |
7108 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
7109 | 16 | NULL, HFILL } |
7110 | 16 | }, |
7111 | 16 | { &hf_isis_lsp_ip_authentication, |
7112 | 16 | { "IP Authentication", "isis.lsp.ip_authentication", |
7113 | 16 | FT_STRING, BASE_NONE, NULL, 0x0, |
7114 | 16 | NULL, HFILL } |
7115 | 16 | }, |
7116 | 16 | { &hf_isis_lsp_authentication, |
7117 | 16 | { "Authentication", "isis.lsp.authentication", |
7118 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7119 | 16 | NULL, HFILL } |
7120 | 16 | }, |
7121 | 16 | { &hf_isis_lsp_area_address_str, |
7122 | 16 | { "Area address", "isis.lsp.area_address_str", |
7123 | 16 | FT_STRING, BASE_NONE, NULL, 0x0, |
7124 | 16 | NULL, HFILL } |
7125 | 16 | }, |
7126 | 16 | { &hf_isis_lsp_is_virtual, |
7127 | 16 | { "IsVirtual", "isis.lsp.is_virtual", |
7128 | 16 | FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0, |
7129 | 16 | NULL, HFILL } |
7130 | 16 | }, |
7131 | 16 | { &hf_isis_lsp_group, |
7132 | 16 | { "Group", "isis.lsp.group", |
7133 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7134 | 16 | NULL, HFILL } |
7135 | 16 | }, |
7136 | 16 | { &hf_isis_lsp_default, |
7137 | 16 | { "Default metric", "isis.lsp.default", |
7138 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3f, |
7139 | 16 | NULL, HFILL } |
7140 | 16 | }, |
7141 | 16 | { &hf_isis_lsp_default_support, |
7142 | 16 | { "Default metric supported", "isis.lsp.default_support", |
7143 | 16 | FT_BOOLEAN, 8, TFS(&tfs_no_yes), 0x80, |
7144 | 16 | NULL, HFILL } |
7145 | 16 | }, |
7146 | 16 | { &hf_isis_lsp_delay, |
7147 | 16 | { "Delay metric", "isis.lsp.delay", |
7148 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3f, |
7149 | 16 | NULL, HFILL } |
7150 | 16 | }, |
7151 | 16 | { &hf_isis_lsp_delay_support, |
7152 | 16 | { "Delay metric supported", "isis.lsp.delay_support", |
7153 | 16 | FT_BOOLEAN, 8, TFS(&tfs_no_yes), 0x80, |
7154 | 16 | NULL, HFILL } |
7155 | 16 | }, |
7156 | 16 | { &hf_isis_lsp_expense, |
7157 | 16 | { "Expense metric", "isis.lsp.expense", |
7158 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3f, |
7159 | 16 | NULL, HFILL } |
7160 | 16 | }, |
7161 | 16 | { &hf_isis_lsp_expense_support, |
7162 | 16 | { "Expense metric supported", "isis.lsp.expense_support", |
7163 | 16 | FT_BOOLEAN, 8, TFS(&tfs_no_yes), 0x80, |
7164 | 16 | NULL, HFILL } |
7165 | 16 | }, |
7166 | 16 | { &hf_isis_lsp_error, |
7167 | 16 | { "Error metric", "isis.lsp.error", |
7168 | 16 | FT_UINT8, BASE_DEC, NULL, 0x3F, |
7169 | 16 | NULL, HFILL } |
7170 | 16 | }, |
7171 | 16 | { &hf_isis_lsp_error_support, |
7172 | 16 | { "Error metric supported", "isis.lsp.error_support", |
7173 | 16 | FT_BOOLEAN, 8, TFS(&tfs_no_yes), 0x80, |
7174 | 16 | NULL, HFILL } |
7175 | 16 | }, |
7176 | | |
7177 | | /* rfc6119 */ |
7178 | 16 | { &hf_isis_lsp_clv_ipv6_te_router_id, |
7179 | 16 | { "IPv6 TE Router ID", "isis.lsp.clv_ipv6_te_router_id", |
7180 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
7181 | 16 | "IPv6 Traffic Engineering Router ID", HFILL } |
7182 | 16 | }, |
7183 | 16 | { &hf_isis_lsp_ext_is_reachability_ipv6_interface_address, |
7184 | 16 | { "IPv6 interface address", "isis.lsp.ext_is_reachability.ipv6_interface_address", |
7185 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
7186 | 16 | NULL, HFILL } |
7187 | 16 | }, |
7188 | 16 | { &hf_isis_lsp_ext_is_reachability_ipv6_neighbor_address, |
7189 | 16 | { "IPv6 neighbor address", "isis.lsp.ext_is_reachability.ipv6_neighbor_address", |
7190 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
7191 | 16 | NULL, HFILL } |
7192 | 16 | }, |
7193 | 16 | { &hf_isis_lsp_clv_bier_alg, |
7194 | 16 | { "BIER Algorithm", "isis.lsp.bier_alg", |
7195 | 16 | FT_UINT8, BASE_DEC | BASE_RANGE_STRING, RVALS(isis_lsp_bier_alg_vals), 0x0, |
7196 | 16 | NULL, HFILL } |
7197 | 16 | }, |
7198 | 16 | { &hf_isis_lsp_clv_bier_igp_alg, |
7199 | 16 | { "IGP Algorithm", "isis.lsp.bier_igp_alg", |
7200 | 16 | FT_UINT8, BASE_DEC, VALS(isis_igp_alg_vals), 0x0, |
7201 | 16 | NULL, HFILL } |
7202 | 16 | }, |
7203 | 16 | { &hf_isis_lsp_clv_bier_subdomain, |
7204 | 16 | { "BIER sub-domain", "isis.lsp.bier_subdomain", |
7205 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7206 | 16 | NULL, HFILL } |
7207 | 16 | }, |
7208 | 16 | { &hf_isis_lsp_clv_bier_bfrid, |
7209 | 16 | { "BFR-id", "isis.lsp.bier_bfrid", |
7210 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
7211 | 16 | NULL, HFILL } |
7212 | 16 | }, |
7213 | 16 | { &hf_isis_lsp_clv_bier_subsub_type, |
7214 | 16 | { "Type", "isis.lsp.bier.subsub.type", |
7215 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_bier_subsubtlv_type_vals), 0x0, |
7216 | 16 | NULL, HFILL } |
7217 | 16 | }, |
7218 | 16 | { &hf_isis_lsp_clv_bier_subsub_len, |
7219 | 16 | { "Length", "isis.lsp.bier.subsub.length", |
7220 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7221 | 16 | NULL, HFILL } |
7222 | 16 | }, |
7223 | 16 | { &hf_isis_lsp_clv_bier_subsub_mplsencap_maxsi, |
7224 | 16 | { "Maximum Set Identifier", "isis.lsp.bier.subsub.mplsencap.maxsi", |
7225 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7226 | 16 | NULL, HFILL } |
7227 | 16 | }, |
7228 | 16 | { &hf_isis_lsp_clv_bier_subsub_mplsencap_bslen, |
7229 | 16 | { "BitString Length", "isis.lsp.bier.subsub.mplsencap.bslen", |
7230 | 16 | FT_UINT8, BASE_DEC, NULL, 0xF0, |
7231 | 16 | NULL, HFILL } |
7232 | 16 | }, |
7233 | 16 | { &hf_isis_lsp_clv_bier_subsub_mplsencap_label, |
7234 | 16 | { "Label", "isis.lsp.bier.subsub.mplsencap.label", |
7235 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0FFFFF, |
7236 | 16 | NULL, HFILL } |
7237 | 16 | }, |
7238 | | /* rfc 6165 */ |
7239 | 16 | { &hf_isis_lsp_mac_reachability_topoid_nick, |
7240 | 16 | { "Topology-id/Nickname", "isis.lsp.mac_reachability.topoid_nick", |
7241 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7242 | 16 | NULL, HFILL } |
7243 | 16 | }, |
7244 | 16 | { &hf_isis_lsp_mac_reachability_confidence, |
7245 | 16 | { "Confidence", "isis.lsp.mac_reachability.confidence", |
7246 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7247 | 16 | NULL, HFILL } |
7248 | 16 | }, |
7249 | 16 | { &hf_isis_lsp_mac_reachability_reserved, |
7250 | 16 | { "Reserved", "isis.lsp.mac_reachability.reserved", |
7251 | 16 | FT_UINT16, BASE_DEC, NULL, 0xf000, |
7252 | 16 | NULL, HFILL } |
7253 | 16 | }, |
7254 | 16 | { &hf_isis_lsp_mac_reachability_vlan, |
7255 | 16 | { "VLAN-ID", "isis.lsp.mac_reachability.vlan", |
7256 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0fff, |
7257 | 16 | NULL, HFILL } |
7258 | 16 | }, |
7259 | 16 | { &hf_isis_lsp_mac_reachability_mac, |
7260 | 16 | { "MAC Address", "isis.lsp.mac_reachability.mac", |
7261 | 16 | FT_ETHER, BASE_NONE, NULL, 0x0, |
7262 | 16 | NULL, HFILL } |
7263 | 16 | }, |
7264 | 16 | { &hf_isis_lsp_mac_reachability_chassismac, |
7265 | 16 | { "Chassis MAC", "isis.lsp.mac_reachability.chassismac", |
7266 | 16 | FT_ETHER, BASE_NONE, NULL, 0x0, |
7267 | 16 | NULL, HFILL } |
7268 | 16 | }, |
7269 | 16 | { &hf_isis_lsp_mac_reachability_fanmcast, |
7270 | 16 | { "FAN Mcast", "isis.lsp.mac_reachability.fanmcast", |
7271 | 16 | FT_ETHER, BASE_NONE, NULL, 0x0, |
7272 | 16 | NULL, HFILL } |
7273 | 16 | }, |
7274 | | /* Avaya proprietary */ |
7275 | 16 | { &hf_isis_lsp_avaya_ipvpn_unknown, |
7276 | 16 | { "Unknown", "isis.lsp.avaya.ipvpn.unknown", |
7277 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7278 | 16 | NULL, HFILL } |
7279 | 16 | }, |
7280 | 16 | { &hf_isis_lsp_avaya_ipvpn_system_id, |
7281 | 16 | { "System-ID", "isis.lsp.avaya.ipvpn.system_id", |
7282 | 16 | FT_SYSTEM_ID, BASE_NONE, NULL, 0x0, |
7283 | 16 | NULL, HFILL } |
7284 | 16 | }, |
7285 | 16 | { &hf_isis_lsp_avaya_ipvpn_vrfsid, |
7286 | 16 | { "Vrf I-SID", "isis.lsp.avaya.ipvpn.vrfsid", |
7287 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0, |
7288 | 16 | NULL, HFILL } |
7289 | 16 | }, |
7290 | 16 | { &hf_isis_lsp_avaya_ipvpn_subtlvbytes, |
7291 | 16 | { "SubTLV Bytes", "isis.lsp.avaya.ipvpn.subtlvbytes", |
7292 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7293 | 16 | NULL, HFILL } |
7294 | 16 | }, |
7295 | 16 | { &hf_isis_lsp_avaya_ipvpn_subtlvtype, |
7296 | 16 | { "SubTLV Type", "isis.lsp.avaya.ipvpn.subtlvtype", |
7297 | 16 | FT_UINT8, BASE_DEC, VALS(isis_lsp_avaya_ipvpn_subtlv_code_vals), 0x0, |
7298 | 16 | NULL, HFILL } |
7299 | 16 | }, |
7300 | 16 | { &hf_isis_lsp_avaya_ipvpn_subtlvlength, |
7301 | 16 | { "SubTLV Length", "isis.lsp.avaya.ipvpn.subtlvlength", |
7302 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
7303 | 16 | NULL, HFILL } |
7304 | 16 | }, |
7305 | 16 | { &hf_isis_lsp_avaya_ipvpn_unknown_sub, |
7306 | 16 | { "Unknown", "isis.lsp.avaya.ipvpn.sub.unknown", |
7307 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7308 | 16 | NULL, HFILL } |
7309 | 16 | }, |
7310 | 16 | { &hf_isis_lsp_avaya_ipvpn_ipv4_metric, |
7311 | 16 | { "Metric", "isis.lsp.avaya.ipvpn.ipv4.metric", |
7312 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7313 | 16 | NULL, HFILL } |
7314 | 16 | }, |
7315 | 16 | { &hf_isis_lsp_avaya_ipvpn_ipv4_metrictype, |
7316 | 16 | { "Metric Type", "isis.lsp.avaya.ipvpn.ipv4.metrictype", |
7317 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7318 | 16 | NULL, HFILL } |
7319 | 16 | }, |
7320 | 16 | { &hf_isis_lsp_avaya_ipvpn_ipv4_addr, |
7321 | 16 | { "IPv4 Address", "isis.lsp.avaya.ipvpn.ipv4.address", |
7322 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7323 | 16 | NULL, HFILL } |
7324 | 16 | }, |
7325 | 16 | { &hf_isis_lsp_avaya_ipvpn_ipv4_mask, |
7326 | 16 | { "IPv4 Mask", "isis.lsp.avaya.ipvpn.ipv4.mask", |
7327 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, |
7328 | 16 | NULL, HFILL } |
7329 | 16 | }, |
7330 | 16 | { &hf_isis_lsp_avaya_ipvpn_ipv6_metric, |
7331 | 16 | { "Metric", "isis.lsp.avaya.ipvpn.ipv6.metric", |
7332 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7333 | 16 | NULL, HFILL } |
7334 | 16 | }, |
7335 | 16 | { &hf_isis_lsp_avaya_ipvpn_ipv6_prefixlen, |
7336 | 16 | { "Prefix length", "isis.lsp.avaya.ipvpn.ipv6.prefixlen", |
7337 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
7338 | 16 | NULL, HFILL } |
7339 | 16 | }, |
7340 | 16 | { &hf_isis_lsp_avaya_ipvpn_ipv6_prefix, |
7341 | 16 | { "Prefix", "isis.lsp.avaya.ipvpn.ipv6.prefix", |
7342 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, |
7343 | 16 | NULL, HFILL } |
7344 | 16 | }, |
7345 | 16 | { &hf_isis_lsp_avaya_185_unknown, |
7346 | 16 | { "Unknown", "isis.lsp.avaya.185.unknown", |
7347 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7348 | 16 | NULL, HFILL } |
7349 | 16 | }, |
7350 | 16 | { &hf_isis_lsp_avaya_186_unknown, |
7351 | 16 | { "Unknown", "isis.lsp.avaya.186.unknown", |
7352 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, |
7353 | 16 | NULL, HFILL } |
7354 | 16 | }, |
7355 | 16 | }; |
7356 | 16 | static int *ett[] = { |
7357 | 16 | &ett_isis_lsp, |
7358 | 16 | &ett_isis_lsp_info, |
7359 | 16 | &ett_isis_lsp_att, |
7360 | 16 | &ett_isis_lsp_cksum, |
7361 | 16 | &ett_isis_lsp_clv_area_addr, |
7362 | 16 | &ett_isis_lsp_clv_is_neighbors, |
7363 | 16 | &ett_isis_lsp_clv_instance_identifier, |
7364 | 16 | &ett_isis_lsp_clv_ext_is_reachability, /* CLV 22 */ |
7365 | 16 | &ett_isis_lsp_part_of_clv_ext_is_reachability, |
7366 | 16 | &ett_isis_lsp_part_of_clv_ext_is_reachability_subtlv, |
7367 | 16 | &ett_isis_lsp_subclv_admin_group, |
7368 | 16 | &ett_isis_lsp_subclv_unrsv_bw, |
7369 | 16 | &ett_isis_lsp_subclv_bw_ct, |
7370 | 16 | &ett_isis_lsp_subclv_spb_link_metric, |
7371 | 16 | &ett_isis_lsp_adj_sid_flags, |
7372 | 16 | &ett_isis_lsp_clv_unknown, |
7373 | 16 | &ett_isis_lsp_clv_partition_dis, |
7374 | 16 | &ett_isis_lsp_clv_prefix_neighbors, |
7375 | 16 | &ett_isis_lsp_clv_authentication, |
7376 | 16 | &ett_isis_lsp_clv_ip_authentication, |
7377 | 16 | &ett_isis_lsp_clv_nlpid_nlpid, |
7378 | 16 | &ett_isis_lsp_clv_hostname, |
7379 | 16 | &ett_isis_lsp_clv_srlg, |
7380 | 16 | &ett_isis_lsp_clv_appspec_srlg, |
7381 | 16 | &ett_isis_lsp_clv_appspec_srlg_subtlv, |
7382 | 16 | &ett_isis_lsp_clv_ipv4_int_addr, |
7383 | 16 | &ett_isis_lsp_clv_ipv6_int_addr, /* CLV 232 */ |
7384 | 16 | &ett_isis_lsp_clv_mt_cap, |
7385 | 16 | &ett_isis_lsp_clv_mt_cap_spb_instance, |
7386 | 16 | &ett_isis_lsp_clv_mt_cap_spbm_service_identifier, |
7387 | 16 | &ett_isis_lsp_clv_mt_cap_spbv_mac_address, |
7388 | 16 | &ett_isis_lsp_clv_sid_label_binding, |
7389 | 16 | &ett_isis_lsp_clv_te_router_id, |
7390 | 16 | &ett_isis_lsp_clv_ip_reachability, |
7391 | 16 | &ett_isis_lsp_clv_ip_reach_subclv, |
7392 | 16 | &ett_isis_lsp_clv_ext_ip_reachability, /* CLV 135 */ |
7393 | 16 | &ett_isis_lsp_part_of_clv_ext_ip_reachability, |
7394 | 16 | &ett_isis_lsp_prefix_sid_flags, |
7395 | 16 | &ett_isis_lsp_prefix_attr_flags, |
7396 | 16 | &ett_isis_lsp_clv_ipv6_reachability, /* CLV 236 */ |
7397 | 16 | &ett_isis_lsp_part_of_clv_ipv6_reachability, |
7398 | 16 | &ett_isis_lsp_clv_mt, |
7399 | 16 | &ett_isis_lsp_clv_mt_is, |
7400 | 16 | &ett_isis_lsp_part_of_clv_mt_is, |
7401 | 16 | &ett_isis_lsp_clv_rt_capable, /*CLV 242*/ |
7402 | 16 | &ett_isis_lsp_clv_te_node_cap_desc, |
7403 | 16 | &ett_isis_lsp_clv_trill_version, |
7404 | 16 | &ett_isis_lsp_clv_trees, |
7405 | 16 | &ett_isis_lsp_clv_root_id, |
7406 | 16 | &ett_isis_lsp_clv_nickname, |
7407 | 16 | &ett_isis_lsp_clv_interested_vlans, |
7408 | 16 | &ett_isis_lsp_clv_tree_used, |
7409 | 16 | &ett_isis_lsp_clv_vlan_group, |
7410 | 16 | &ett_isis_lsp_clv_grp_address, /*CLV 142*/ |
7411 | 16 | &ett_isis_lsp_clv_grp_macaddr, |
7412 | 16 | &ett_isis_lsp_clv_grp_ipv4addr, |
7413 | 16 | &ett_isis_lsp_clv_grp_ipv6addr, |
7414 | 16 | &ett_isis_lsp_clv_grp_unknown, |
7415 | 16 | &ett_isis_lsp_clv_mt_reachable_IPv4_prefx, |
7416 | 16 | &ett_isis_lsp_clv_mt_reachable_IPv6_prefx, |
7417 | 16 | &ett_isis_lsp_clv_purge_orig_id, /* CLV 13 */ |
7418 | 16 | &ett_isis_lsp_clv_originating_buff_size, /* CLV 14 */ |
7419 | 16 | &ett_isis_lsp_clv_sr_cap, |
7420 | 16 | &ett_isis_lsp_clv_sr_sid_label, |
7421 | 16 | &ett_isis_lsp_clv_sr_alg, |
7422 | 16 | &ett_isis_lsp_clv_sr_lb, |
7423 | 16 | &ett_isis_lsp_clv_bier_subsub_tlv, |
7424 | 16 | &ett_isis_lsp_clv_node_msd, |
7425 | 16 | &ett_isis_lsp_clv_srv6_cap, |
7426 | 16 | &ett_isis_lsp_clv_srv6_cap_flags, |
7427 | 16 | &ett_isis_lsp_clv_ipv6_te_rtrid, |
7428 | 16 | &ett_isis_lsp_clv_srv6_endx_sid_flags, |
7429 | 16 | &ett_isis_lsp_clv_srv6_endx_sid_sub_sub_tlv, |
7430 | 16 | &ett_isis_lsp_clv_srv6_locator, |
7431 | 16 | &ett_isis_lsp_clv_srv6_loc_entry, |
7432 | 16 | &ett_isis_lsp_clv_srv6_loc_flags, |
7433 | 16 | &ett_isis_lsp_clv_srv6_loc_sub_tlv, |
7434 | 16 | &ett_isis_lsp_clv_srv6_loc_end_sid_sub_sub_tlv, |
7435 | 16 | &ett_isis_lsp_clv_flex_algo_def, |
7436 | 16 | &ett_isis_lsp_clv_flex_algo_def_sub_tlv, |
7437 | 16 | &ett_isis_lsp_clv_flex_algo_ref_bw_flags, |
7438 | 16 | &ett_isis_lsp_clv_app_sabm_bits, |
7439 | 16 | &ett_isis_lsp_sl_flags, |
7440 | 16 | &ett_isis_lsp_sl_sub_tlv, |
7441 | 16 | &ett_isis_lsp_sl_sub_tlv_flags, |
7442 | 16 | &ett_isis_lsp_clv_ipv6_te_router_id, /* CLV 140, rfc6119 */ |
7443 | 16 | &ett_isis_lsp_clv_mac_reachability, /* CLV 147, rfc6165 */ |
7444 | 16 | &ett_isis_lsp_clv_avaya_ipvpn, |
7445 | 16 | &ett_isis_lsp_clv_avaya_ipvpn_subtlv, |
7446 | 16 | &ett_isis_lsp_clv_avaya_ipvpn_mc, |
7447 | 16 | &ett_isis_lsp_clv_avaya_ip_grt_mc, |
7448 | 16 | &ett_isis_lsp_clv_unidir_link_flags, |
7449 | 16 | }; |
7450 | | |
7451 | 16 | static ei_register_info ei[] = { |
7452 | 16 | { &ei_isis_lsp_short_pdu, { "isis.lsp.short_pdu", PI_MALFORMED, PI_ERROR, "PDU length less than header length", EXPFILL }}, |
7453 | 16 | { &ei_isis_lsp_long_pdu, { "isis.lsp.long_pdu", PI_MALFORMED, PI_ERROR, "PDU length greater than packet length", EXPFILL }}, |
7454 | 16 | { &ei_isis_lsp_bad_checksum, { "isis.lsp.bad_checksum", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }}, |
7455 | 16 | { &ei_isis_lsp_unknown_subtlv, { "isis.lsp.subtlv.unknown", PI_PROTOCOL, PI_WARN, "Unknown SubTLV", EXPFILL }}, |
7456 | 16 | { &ei_isis_lsp_authentication, { "isis.lsp.authentication.unknown", PI_PROTOCOL, PI_WARN, "Unknown authentication type", EXPFILL }}, |
7457 | 16 | { &ei_isis_lsp_short_clv, { "isis.lsp.short_clv", PI_MALFORMED, PI_ERROR, "Short CLV", EXPFILL }}, |
7458 | 16 | { &ei_isis_lsp_long_clv, { "isis.lsp.long_clv", PI_MALFORMED, PI_ERROR, "Long CLV", EXPFILL }}, |
7459 | 16 | { &ei_isis_lsp_length_clv, { "isis.lsp.length_clv", PI_MALFORMED, PI_ERROR, "Wrong length CLV", EXPFILL }}, |
7460 | 16 | { &ei_isis_lsp_clv_mt, { "isis.lsp.clv_mt.malformed", PI_MALFORMED, PI_ERROR, "malformed MT-ID", EXPFILL }}, |
7461 | 16 | { &ei_isis_lsp_clv_unknown, { "isis.lsp.clv.unknown", PI_UNDECODED, PI_NOTE, "Unknown option", EXPFILL }}, |
7462 | 16 | { &ei_isis_lsp_malformed_subtlv, { "isis.lsp.subtlv.malformed", PI_MALFORMED, PI_ERROR, "malformed SubTLV", EXPFILL }}, |
7463 | 16 | { &ei_isis_lsp_reserved_not_zero, { "isis.lsp.reserved_not_zero", PI_PROTOCOL, PI_WARN, "Reserve bit not 0", EXPFILL }}, |
7464 | 16 | { &ei_isis_lsp_length_invalid, { "isis.lsp.length.invalid", PI_PROTOCOL, PI_WARN, "Invalid length", EXPFILL }}, |
7465 | 16 | }; |
7466 | | |
7467 | 16 | expert_module_t* expert_isis_lsp; |
7468 | | |
7469 | | /* Register the protocol name and description */ |
7470 | 16 | proto_isis_lsp = proto_register_protocol(PROTO_STRING_LSP, "ISIS LSP", "isis.lsp"); |
7471 | | |
7472 | 16 | proto_register_field_array(proto_isis_lsp, hf, array_length(hf)); |
7473 | 16 | proto_register_subtree_array(ett, array_length(ett)); |
7474 | 16 | expert_isis_lsp = expert_register_protocol(proto_isis_lsp); |
7475 | 16 | expert_register_field_array(expert_isis_lsp, ei, array_length(ei)); |
7476 | 16 | } |
7477 | | |
7478 | | void |
7479 | | proto_reg_handoff_isis_lsp(void) |
7480 | 16 | { |
7481 | 16 | dissector_add_uint("isis.type", ISIS_TYPE_L1_LSP, create_dissector_handle(dissect_isis_l1_lsp, proto_isis_lsp)); |
7482 | 16 | dissector_add_uint("isis.type", ISIS_TYPE_L2_LSP, create_dissector_handle(dissect_isis_l2_lsp, proto_isis_lsp)); |
7483 | 16 | } |
7484 | | |
7485 | | /* |
7486 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
7487 | | * |
7488 | | * Local variables: |
7489 | | * c-basic-offset: 4 |
7490 | | * tab-width: 8 |
7491 | | * indent-tabs-mode: nil |
7492 | | * End: |
7493 | | * |
7494 | | * vi: set shiftwidth=4 tabstop=8 expandtab: |
7495 | | * :indentSize=4:tabSize=8:noTabs=true: |
7496 | | */ |