2 * Routines for decoding isis hello packets and their CLVs
4 * Stuart Stanley <stuarts@mxmail.net>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include <epan/packet.h>
16 #include <epan/expert.h>
17 #include <epan/nlpid.h>
19 #include <wsutil/array.h>
20 #include "packet-osi.h"
21 #include "packet-isis.h"
22 #include "packet-isis-clv.h"
26 * Declarations for L1/L2 hello base header.
28 #define ISIS_HELLO_CTYPE_MASK 0x03
29 #define ISIS_HELLO_CT_RESERVED_MASK 0xfc
30 #define ISIS_HELLO_PRIORITY_MASK 0x7f
31 #define ISIS_HELLO_P_RESERVED_MASK 0x80
33 #define ISIS_HELLO_TYPE_RESERVED 0
34 #define ISIS_HELLO_TYPE_LEVEL_1 1
35 #define ISIS_HELLO_TYPE_LEVEL_2 2
36 #define ISIS_HELLO_TYPE_LEVEL_12 3
39 * misc. bittest macros
42 #define ISIS_RESTART_RR 0x01
43 #define ISIS_RESTART_RA 0x02
44 #define ISIS_RESTART_SA 0x04
45 #define ISIS_MASK_RESTART_RR(x) ((x)&ISIS_RESTART_RR)
46 #define ISIS_MASK_RESTART_RA(x) ((x)&ISIS_RESTART_RA)
47 #define ISIS_MASK_RESTART_SA(x) ((x)&ISIS_RESTART_SA)
49 void proto_register_isis_hello(void);
50 void proto_reg_handoff_isis_hello(void);
52 static int proto_isis_hello
;
55 static int hf_isis_hello_circuit
;
56 static int hf_isis_hello_circuit_reserved
;
57 static int hf_isis_hello_source_id
;
58 static int hf_isis_hello_holding_timer
;
59 static int hf_isis_hello_pdu_length
;
60 static int hf_isis_hello_priority
;
61 static int hf_isis_hello_priority_reserved
;
62 static int hf_isis_hello_lan_id
;
63 static int hf_isis_hello_clv_type
;
64 static int hf_isis_hello_clv_length
;
65 static int hf_isis_hello_local_circuit_id
;
66 static int hf_isis_hello_clv_ipv4_int_addr
;
67 static int hf_isis_hello_clv_ipv6_int_addr
;
68 /* static int hf_isis_hello_clv_ptp_adj; */
69 static int hf_isis_hello_clv_mt
;
70 static int hf_isis_hello_clv_restart_flags
;
71 static int hf_isis_hello_clv_restart_flags_rr
;
72 static int hf_isis_hello_clv_restart_flags_ra
;
73 static int hf_isis_hello_clv_restart_flags_sa
;
74 static int hf_isis_hello_clv_restart_remain_time
;
75 static int hf_isis_hello_clv_restart_neighbor
;
76 /* Generated from convert_proto_tree_add_text.pl */
77 static int hf_isis_hello_extended_local_circuit_id
;
78 static int hf_isis_hello_adjacency_state
;
79 static int hf_isis_hello_neighbor_systemid
;
80 static int hf_isis_hello_digest
;
81 static int hf_isis_hello_digest_v
;
82 static int hf_isis_hello_digest_a
;
83 static int hf_isis_hello_digest_d
;
84 static int hf_isis_hello_ect
;
85 static int hf_isis_hello_bvid
;
86 static int hf_isis_hello_bvid_u
;
87 static int hf_isis_hello_bvid_m
;
88 static int hf_isis_hello_area_address
;
89 static int hf_isis_hello_instance_identifier
;
90 static int hf_isis_hello_supported_itid
;
91 static int hf_isis_hello_clv_nlpid_nlpid
;
92 static int hf_isis_hello_clv_ip_authentication
;
93 static int hf_isis_hello_authentication
;
95 static int hf_isis_hello_aux_mcid
;
96 static int hf_isis_hello_mcid
;
97 static int hf_isis_hello_is_neighbor
;
98 static int hf_isis_hello_mtid
;
99 static int hf_isis_hello_checksum
;
100 static int hf_isis_hello_checksum_status
;
101 static int hf_isis_hello_trill_neighbor_sf
;
102 static int hf_isis_hello_trill_neighbor_lf
;
103 static int hf_isis_hello_trill_neighbor_ff
;
104 static int hf_isis_hello_trill_neighbor_of
;
105 static int hf_isis_hello_trill_neighbor_size
;
106 static int hf_isis_hello_trill_neighbor_reserved
;
107 static int hf_isis_hello_trill_neighbor_mtu
;
108 static int hf_isis_hello_trill_neighbor_snpa
;
109 static int hf_isis_hello_reverse_metric_flags
;
110 static int hf_isis_hello_reverse_metric_flag_reserved
;
111 static int hf_isis_hello_reverse_metric_flag_u
;
112 static int hf_isis_hello_reverse_metric_flag_w
;
113 static int hf_isis_hello_reverse_metric_metric
;
114 static int hf_isis_hello_reverse_metric_sub_length
;
115 static int hf_isis_hello_reverse_metric_sub_data
;
116 static int hf_isis_hello_bfd_enabled_nlpid
;
117 static int hf_isis_hello_neighbor_extended_local_circuit_id
;
118 static int hf_isis_hello_vlan_flags_port_id
;
119 static int hf_isis_hello_vlan_flags_nickname
;
120 static int hf_isis_hello_vlan_flags_af
;
121 static int hf_isis_hello_vlan_flags_ac
;
122 static int hf_isis_hello_vlan_flags_vm
;
123 static int hf_isis_hello_vlan_flags_by
;
124 static int hf_isis_hello_vlan_flags_outer_vlan
;
125 static int hf_isis_hello_vlan_flags_tr
;
126 static int hf_isis_hello_vlan_flags_reserved
;
127 static int hf_isis_hello_vlan_flags_designated_vlan
;
128 static int hf_isis_hello_enabled_vlans
;
129 static int hf_isis_hello_appointed_vlans
;
130 static int hf_isis_hello_af_nickname
;
131 static int hf_isis_hello_af_start_vlan
;
132 static int hf_isis_hello_af_end_vlan
;
133 static int hf_isis_hello_trill_version
;
134 static int hf_isis_hello_trill_hello_reduction
;
135 static int hf_isis_hello_trill_unassigned_1
;
136 static int hf_isis_hello_trill_hop_by_hop_flags
;
137 static int hf_isis_hello_trill_unassigned_2
;
138 static int hf_isis_hello_clv_ipv6_glb_int_addr
;
140 static int ett_isis_hello
;
141 static int ett_isis_hello_clv_area_addr
;
142 static int ett_isis_hello_clv_instance_identifier
;
143 static int ett_isis_hello_clv_is_neighbors
;
144 static int ett_isis_hello_clv_padding
;
145 static int ett_isis_hello_clv_unknown
;
146 static int ett_isis_hello_clv_nlpid
;
147 static int ett_isis_hello_clv_nlpid_nlpid
;
148 static int ett_isis_hello_clv_authentication
;
149 static int ett_isis_hello_clv_ip_authentication
;
150 static int ett_isis_hello_clv_ipv4_int_addr
;
151 static int ett_isis_hello_clv_ipv6_int_addr
;
152 static int ett_isis_hello_clv_ptp_adj
;
153 static int ett_isis_hello_clv_mt
;
154 static int ett_isis_hello_clv_restart
;
155 static int ett_isis_hello_clv_restart_flags
;
156 static int ett_isis_hello_clv_mt_port_cap
;
157 static int ett_isis_hello_clv_mt_port_cap_spb_mcid
;
158 static int ett_isis_hello_clv_mt_port_cap_spb_digest
;
159 static int ett_isis_hello_clv_mt_port_cap_spb_bvid_tuples
;
160 static int ett_isis_hello_clv_mt_port_cap_vlan_flags
;
161 static int ett_isis_hello_clv_mt_port_cap_enabled_vlans
;
162 static int ett_isis_hello_clv_mt_port_cap_appointedfwrdrs
;
163 static int ett_isis_hello_clv_mt_port_cap_port_trill_ver
;
164 static int ett_isis_hello_clv_mt_port_cap_vlans_appointed
;
165 static int ett_isis_hello_clv_trill_neighbor
;
166 static int ett_isis_hello_clv_checksum
;
167 static int ett_isis_hello_clv_reverse_metric
;
168 static int ett_isis_hello_clv_bfd_enabled
;
169 static int ett_isis_hello_clv_ipv6_glb_int_addr
;
170 static int ett_isis_hello_reverse_metric_flags
;
172 static expert_field ei_isis_hello_short_pdu
;
173 static expert_field ei_isis_hello_long_pdu
;
174 static expert_field ei_isis_hello_bad_checksum
;
175 static expert_field ei_isis_hello_authentication
;
176 static expert_field ei_isis_hello_subtlv
;
177 static expert_field ei_isis_hello_short_clv
;
178 static expert_field ei_isis_hello_clv_mt
;
179 static expert_field ei_isis_hello_clv_unknown
;
181 static const value_string isis_hello_circuit_type_vals
[] = {
182 { ISIS_HELLO_TYPE_RESERVED
, "Reserved 0 (discard PDU)"},
183 { ISIS_HELLO_TYPE_LEVEL_1
, "Level 1 only"},
184 { ISIS_HELLO_TYPE_LEVEL_2
, "Level 2 only"},
185 { ISIS_HELLO_TYPE_LEVEL_12
, "Level 1 and 2"},
188 extern const range_string mtid_strings
[];
191 dissect_hello_mt_port_cap_spb_mcid_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
192 proto_tree
*tree
, int offset
, int subtype
, int sublen
)
194 const int MCID_LEN
= 51;
195 const int SUBLEN
= 2 * MCID_LEN
;
198 if (sublen
!= SUBLEN
) {
199 proto_tree_add_expert_format(tree
, pinfo
, &ei_isis_hello_short_clv
, tvb
, offset
, -1,
200 "Short SPB MCID TLV (%d vs %d)", sublen
, SUBLEN
);
205 subtree
= proto_tree_add_subtree_format( tree
, tvb
, offset
-2, sublen
+2, ett_isis_hello_clv_mt_port_cap_spb_mcid
, NULL
,
206 "SPB MCID: Type: 0x%02x, Length: %d", subtype
, sublen
);
209 proto_tree_add_item(subtree
, hf_isis_hello_mcid
, tvb
, offset
, MCID_LEN
, ENC_NA
);
213 proto_tree_add_item(subtree
, hf_isis_hello_aux_mcid
, tvb
, offset
, MCID_LEN
, ENC_NA
);
214 /* offset += MCID_LEN; */
218 dissect_hello_mt_port_cap_spb_digest_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
219 proto_tree
*tree
, int offset
, int subtype
, int sublen
)
221 const int DIGEST_LEN
= 32;
222 const int SUBLEN
= 1 + DIGEST_LEN
;
223 if (sublen
!= SUBLEN
) {
224 proto_tree_add_expert_format(tree
, pinfo
, &ei_isis_hello_short_clv
, tvb
, offset
, -1,
225 "Short SPB Digest TLV (%d vs %d)", sublen
, SUBLEN
);
231 subtree
= proto_tree_add_subtree_format( tree
, tvb
, offset
-2, sublen
+2, ett_isis_hello_clv_mt_port_cap_spb_digest
, NULL
,
232 "SPB Digest: Type: 0x%02x, Length: %d", subtype
, sublen
);
234 proto_tree_add_item( subtree
, hf_isis_hello_digest_v
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
235 proto_tree_add_item( subtree
, hf_isis_hello_digest_a
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
236 proto_tree_add_item( subtree
, hf_isis_hello_digest_d
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
240 proto_tree_add_item(subtree
, hf_isis_hello_digest
, tvb
, offset
, DIGEST_LEN
, ENC_NA
);
241 /* offset += DIGEST_LEN; */
246 dissect_hello_mt_port_cap_spb_bvid_tuples_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
247 proto_tree
*tree
, int offset
, int subtype
, int sublen
)
252 subtree
= proto_tree_add_subtree_format( tree
, tvb
, offset
-2, sublen
+2, ett_isis_hello_clv_mt_port_cap_spb_bvid_tuples
, NULL
,
253 "SPB Base Vlan Identifiers: Type: 0x%02x, Length: %d", subtype
, sublen
);
257 proto_tree_add_expert_format(tree
, pinfo
, &ei_isis_hello_short_clv
, tvb
, offset
, -1,
258 "Short SPB BVID header entry (%d vs %d)", sublen
, 6);
262 proto_tree_add_item( subtree
, hf_isis_hello_ect
, tvb
, subofs
, 4, ENC_NA
);
263 proto_tree_add_item( subtree
, hf_isis_hello_bvid
, tvb
, subofs
+4, 2, ENC_BIG_ENDIAN
);
264 proto_tree_add_item( subtree
, hf_isis_hello_bvid_u
, tvb
, subofs
+4, 2, ENC_BIG_ENDIAN
);
265 proto_tree_add_item( subtree
, hf_isis_hello_bvid_m
, tvb
, subofs
+4, 2, ENC_BIG_ENDIAN
);
273 dissect_hello_mt_port_cap_vlan_flags_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
274 proto_tree
*tree
, int offset
, int subtype
, int sublen
)
278 subtree
= proto_tree_add_subtree_format( tree
, tvb
, offset
-2, sublen
+2, ett_isis_hello_clv_mt_port_cap_vlan_flags
, NULL
,
279 "Special VLANs and Flags (t=%u, l=%u)", subtype
, sublen
);
281 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_port_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
284 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_nickname
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
287 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_af
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
288 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_ac
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
289 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_vm
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
290 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_by
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
291 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_outer_vlan
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
294 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_tr
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
295 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_reserved
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
296 proto_tree_add_item(subtree
, hf_isis_hello_vlan_flags_designated_vlan
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
301 parse_vlan_bitmap(proto_item
*item
, tvbuff_t
*tvb
, unsigned vlan
, int offset
, int sublen
)
304 uint8_t mask
, bitmap
, i
;
308 bitmap
= tvb_get_uint8(tvb
, offset
);
311 for (i
=0; i
<8; i
++) {
316 proto_item_append_text(item
, "%s%u", next
++ ? ", " : "", vlan
);
323 proto_item_append_text(item
, "-%u", vlan
-1);
336 proto_item_append_text(item
, "-%u", vlan
-1);
342 dissect_hello_mt_port_cap_enabled_vlans_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
343 proto_tree
*tree
, int offset
, int subtype
, int sublen
)
349 subtree
= proto_tree_add_subtree_format( tree
, tvb
, offset
-2, sublen
+2, ett_isis_hello_clv_mt_port_cap_enabled_vlans
, NULL
,
350 "Enabled-VLANs (t=%u, l=%u)", subtype
, sublen
);
352 vlan
= tvb_get_ntohs(tvb
, offset
) & 0xfff;
356 item
= proto_tree_add_string(subtree
, hf_isis_hello_enabled_vlans
, tvb
, offset
, sublen
, "");
358 parse_vlan_bitmap(item
, tvb
, vlan
, offset
, sublen
);
362 dissect_hello_mt_port_cap_appointedfwrdrs_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
363 proto_tree
*tree
, int offset
, int subtype
, int sublen
)
367 subtree
= proto_tree_add_subtree_format( tree
, tvb
, offset
-2, sublen
+2, ett_isis_hello_clv_mt_port_cap_appointedfwrdrs
, NULL
,
368 "Appointed Forwarders (t=%u, l=%u)", subtype
, sublen
);
371 proto_tree_add_item(subtree
, hf_isis_hello_af_nickname
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
372 proto_tree_add_item(subtree
, hf_isis_hello_af_start_vlan
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
373 proto_tree_add_item(subtree
, hf_isis_hello_af_end_vlan
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
381 dissect_hello_mt_port_cap_port_trill_ver_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
382 proto_tree
*tree
, int offset
, int subtype
, int sublen
)
386 subtree
= proto_tree_add_subtree_format( tree
, tvb
, offset
-2, sublen
+2, ett_isis_hello_clv_mt_port_cap_port_trill_ver
, NULL
,
387 "Port TRILL Version (t=%u, l=%u)", subtype
, sublen
);
389 proto_tree_add_item(subtree
, hf_isis_hello_trill_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
393 proto_tree_add_item(subtree
, hf_isis_hello_trill_hello_reduction
, tvb
, offset
, 4, ENC_NA
);
394 proto_tree_add_item(subtree
, hf_isis_hello_trill_unassigned_1
, tvb
, offset
, 4, ENC_NA
);
395 proto_tree_add_item(subtree
, hf_isis_hello_trill_hop_by_hop_flags
, tvb
, offset
, 4, ENC_NA
);
396 proto_tree_add_item(subtree
, hf_isis_hello_trill_unassigned_2
, tvb
, offset
, 4, ENC_NA
);
400 dissect_hello_mt_port_cap_vlans_appointed_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
401 proto_tree
*tree
, int offset
, int subtype
, int sublen
)
407 subtree
= proto_tree_add_subtree_format( tree
, tvb
, offset
-2, sublen
+2, ett_isis_hello_clv_mt_port_cap_vlans_appointed
, NULL
,
408 "Appointed VLANs (t=%u, l=%u)", subtype
, sublen
);
410 vlan
= tvb_get_ntohs(tvb
, offset
) & 0xfff;
414 item
= proto_tree_add_string(subtree
, hf_isis_hello_appointed_vlans
, tvb
, offset
, sublen
, "");
416 parse_vlan_bitmap(item
, tvb
, vlan
, offset
, sublen
);
420 dissect_hello_mt_port_cap_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
421 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
425 proto_tree_add_item(tree
, hf_isis_hello_mtid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
428 while (length
>= 2) {
429 uint8_t subtype
= tvb_get_uint8(tvb
, offset
);
430 uint8_t subtlvlen
= tvb_get_uint8(tvb
, offset
+1);
433 if (subtlvlen
> length
) {
434 proto_tree_add_expert_format(tree
, pinfo
, &ei_isis_hello_short_clv
, tvb
, offset
, -1,
435 "Short type %d TLV (%d vs %d)", subtype
, subtlvlen
, length
);
440 case 1: /* TRILL Special VLANs and Flags */
441 dissect_hello_mt_port_cap_vlan_flags_clv(tvb
, pinfo
, tree
, offset
, subtype
, subtlvlen
);
443 case 2: /* TRILL Enabled VLANs */
444 dissect_hello_mt_port_cap_enabled_vlans_clv(tvb
, pinfo
, tree
, offset
, subtype
, subtlvlen
);
446 case 3: /* TRILL Appointed Forwarders */
447 dissect_hello_mt_port_cap_appointedfwrdrs_clv(tvb
, pinfo
, tree
, offset
, subtype
, subtlvlen
);
449 case 4: /* SPB MCID */
450 dissect_hello_mt_port_cap_spb_mcid_clv(tvb
, pinfo
, tree
, offset
, subtype
, subtlvlen
);
452 case 5: /* SPB Digest */
453 dissect_hello_mt_port_cap_spb_digest_clv(tvb
, pinfo
, tree
, offset
, subtype
, subtlvlen
);
455 case 6: /* SPB BVID Tuples */
456 dissect_hello_mt_port_cap_spb_bvid_tuples_clv(tvb
, pinfo
, tree
, offset
, subtype
, subtlvlen
);
458 case 7: /* Port TRILL Version */
459 dissect_hello_mt_port_cap_port_trill_ver_clv(tvb
, pinfo
, tree
, offset
, subtype
, subtlvlen
);
461 case 8: /* TRILL VLANs Appointed */
462 dissect_hello_mt_port_cap_vlans_appointed_clv(tvb
, pinfo
, tree
, offset
, subtype
, subtlvlen
);
465 proto_tree_add_expert_format(tree
, pinfo
, &ei_isis_hello_subtlv
, tvb
, offset
-2, subtlvlen
+2,
466 "Unknown Sub-TLV: Type: %d, Length: %d", subtype
, subtlvlen
);
475 * The Restart CLV is documented in RFC 3847 (Restart Signaling for
476 * Intermediate System to Intermediate System). The CLV looks like this
479 * Length # of octets in the value field (1 to (3 + ID Length))
483 * +-----------------------+
485 * +-----------------------+
486 * | Remaining Time | 2
487 * +-----------------------+
488 * | Restarting Neighbor ID| ID Length
489 * +-----------------------+
494 * +--+--+--+--+--+--+--+--+
495 * | Reserved |SA|RA|RR|
496 * +--+--+--+--+--+--+--+--+
498 * RR - Restart Request
499 * RA - Restart Acknowledgement
500 * SA - Suppress adjacency advertisement
502 * The Remaining Time and Restarting Neighbor ID fields are only required when
503 * the RA flag is set. The Flags field is always required.
507 * Name: dissect_hello_restart_clv()
510 * Decode for a restart clv - only found in IIHs
511 * hence no call in the common clv dissector
516 dissect_hello_restart_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
517 proto_tree
*tree
, int offset
, isis_data_t
*isis
, int length
)
519 int restart_options
=0;
520 proto_item
*hold_time_item
;
523 static int * const flags
[] = {
524 &hf_isis_hello_clv_restart_flags_sa
,
525 &hf_isis_hello_clv_restart_flags_ra
,
526 &hf_isis_hello_clv_restart_flags_rr
,
530 restart_options
= tvb_get_uint8(tvb
, offset
);
531 proto_tree_add_bitmask_with_flags(tree
, tvb
, offset
, hf_isis_hello_clv_restart_flags
, ett_isis_hello_clv_restart_flags
, flags
, ENC_NA
, BMT_NO_FALSE
|BMT_NO_TFS
);
534 /* The Remaining Time field should only be present if the RA flag is
537 if (length
>= 3 && ISIS_MASK_RESTART_RA(restart_options
)) {
538 hold_time_item
= proto_tree_add_item( tree
, hf_isis_hello_clv_restart_remain_time
,
539 tvb
, offset
+1, 2, ENC_BIG_ENDIAN
);
540 proto_item_append_text( hold_time_item
, "s" );
543 /* The Restarting Neighbor ID should only be present if the RA flag is
546 if (length
>= 3 + isis
->system_id_len
&& ISIS_MASK_RESTART_RA(restart_options
)) {
547 proto_tree_add_item( tree
, hf_isis_hello_clv_restart_neighbor
, tvb
, offset
+3, isis
->system_id_len
, ENC_NA
);
552 * Name: dissect_hello_nlpid_clv()
555 * Decode for a hello packets NLPID clv. Calls into the
559 * tvbuff_t * : tvbuffer for packet data
560 * proto_tree * : proto tree to build on (may be null)
561 * int : current offset into packet data
562 * int : length of IDs in packet.
563 * int : length of this clv
566 * void, will modify proto_tree if not null.
569 dissect_hello_nlpid_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
570 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
572 isis_dissect_nlpid_clv(tvb
, tree
, ett_isis_hello_clv_nlpid_nlpid
, hf_isis_hello_clv_nlpid_nlpid
, offset
, length
);
576 * Name: dissect_hello_mt_clv()
579 * Decode for a hello packets Multi Topology clv. Calls into the
583 * tvbuff_t * : tvbuffer for packet data
584 * proto_tree * : proto tree to build on (may be null)
585 * int : current offset into packet data
586 * int : length of IDs in packet.
587 * int : length of this clv
590 * void, will modify proto_tree if not null.
594 dissect_hello_mt_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
595 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
597 isis_dissect_mt_clv(tvb
, pinfo
, tree
, offset
, length
,
598 hf_isis_hello_clv_mt
, &ei_isis_hello_clv_mt
);
602 * Name: dissect_hello_ip_int_addr_clv()
605 * Decode for a hello packets ip interface addr clv. Calls into the
609 * tvbuff_t * : tvbuffer for packet data
610 * proto_tree * : proto tree to build on (may be null)
611 * int : current offset into packet data
612 * int : length of IDs in packet.
613 * int : length of this clv
616 * void, will modify proto_tree if not null.
619 dissect_hello_ip_int_addr_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
620 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
622 isis_dissect_ip_int_clv(tree
, pinfo
, tvb
, &ei_isis_hello_short_clv
,
623 offset
, length
, hf_isis_hello_clv_ipv4_int_addr
);
627 * Name: dissect_hello_ipv6_int_addr_clv()
630 * Decode for a hello packets ipv6 interface addr clv. Calls into the
634 * tvbuff_t * : tvbuffer for packet data
635 * proto_tree * : proto tree to build on (may be null)
636 * int : current offset into packet data
637 * int : length of IDs in packet.
638 * int : length of this clv
641 * void, will modify proto_tree if not null.
644 dissect_hello_ipv6_int_addr_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
645 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
647 isis_dissect_ipv6_int_clv(tree
, pinfo
, tvb
, &ei_isis_hello_short_clv
,
648 offset
, length
, hf_isis_hello_clv_ipv6_int_addr
);
652 * Name: dissect_hello_authentication_clv()
655 * Decode for a hello packets authentication clv.
656 * Calls into the CLV common one.
659 * tvbuff_t * : tvbuffer for packet data
660 * proto_tree * : proto tree to build on (may be null)
661 * int : current offset into packet data
662 * int : length of IDs in packet.
663 * int : length of this clv
666 * void, will modify proto_tree if not null.
669 dissect_hello_authentication_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
670 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
672 isis_dissect_authentication_clv(tree
, pinfo
, tvb
, hf_isis_hello_authentication
, hf_isis_clv_key_id
, &ei_isis_hello_authentication
, offset
, length
);
676 * Name: dissect_hello_ip_authentication_clv()
679 * Decode for a hello packets IP authentication clv.
680 * Calls into the CLV common one.
683 * tvbuff_t * : tvbuffer for packet data
684 * proto_tree * : proto tree to build on (may be null)
685 * int : current offset into packet data
686 * int : length of IDs in packet.
687 * int : length of this clv
690 * void, will modify proto_tree if not null.
693 dissect_hello_ip_authentication_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
694 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
697 proto_tree_add_item( tree
, hf_isis_hello_clv_ip_authentication
, tvb
, offset
, length
, ENC_ASCII
);
702 * Name: dissect_hello_trill_neighbor_clv
705 dissect_hello_trill_neighbor_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
706 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
) {
708 uint8_t size
= (tvb_get_uint8(tvb
, offset
)) & 0x1f;
713 proto_tree_add_item(tree
, hf_isis_hello_trill_neighbor_sf
, tvb
, offset
, 1, ENC_NA
);
714 proto_tree_add_item(tree
, hf_isis_hello_trill_neighbor_lf
, tvb
, offset
, 1, ENC_NA
);
715 proto_tree_add_item(tree
, hf_isis_hello_trill_neighbor_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
720 while(length
>=(size
+3)) {
721 proto_tree_add_item(tree
, hf_isis_hello_trill_neighbor_ff
, tvb
, offset
, 1, ENC_NA
);
722 proto_tree_add_item(tree
, hf_isis_hello_trill_neighbor_of
, tvb
, offset
, 1, ENC_NA
);
723 proto_tree_add_item(tree
, hf_isis_hello_trill_neighbor_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
728 proto_tree_add_item(tree
, hf_isis_hello_trill_neighbor_mtu
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
733 proto_tree_add_item(tree
, hf_isis_hello_trill_neighbor_snpa
, tvb
, offset
, 6, ENC_NA
);
741 * Name: dissect_hello_reverse_metric_clv
744 dissect_hello_reverse_metric_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
745 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length _U_
) {
749 static int * const flags
[] = {
750 &hf_isis_hello_reverse_metric_flag_reserved
,
751 &hf_isis_hello_reverse_metric_flag_u
,
752 &hf_isis_hello_reverse_metric_flag_w
,
756 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_isis_hello_reverse_metric_flags
, ett_isis_hello_reverse_metric_flags
, flags
, ENC_NA
);
758 proto_tree_add_item(tree
, hf_isis_hello_reverse_metric_metric
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
760 proto_tree_add_item_ret_uint(tree
, hf_isis_hello_reverse_metric_sub_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &sub_length
);
762 if (sub_length
> 0) {
763 proto_tree_add_item(tree
, hf_isis_hello_reverse_metric_sub_data
, tvb
, offset
, sub_length
, ENC_NA
);
768 * Name: dissect_hello_bfd_enabled_clv
771 * Decode for a hello packets BFD enabled clv.
774 * tvbuff_t * : tvbuffer for packet data
775 * proto_tree * : proto tree to build on (may be null)
776 * int : current offset into packet data
777 * int : length of IDs in packet.
778 * int : length of this clv
781 * void, will modify proto_tree if not null.
784 dissect_hello_bfd_enabled_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
785 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
) {
787 while (length
>= 3) {
789 proto_tree_add_item(tree
, hf_isis_hello_mtid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
793 proto_tree_add_item(tree
, hf_isis_hello_bfd_enabled_nlpid
, tvb
, offset
, 1, ENC_NA
);
800 * Name: dissect_hello_checksum_clv()
803 * dump and verify the optional checksum in TLV 12
806 * tvbuff_t * : tvbuffer for packet data
807 * proto_tree * : protocol display tree to fill out. May be NULL
808 * int : offset into packet data where we are.
809 * int : length of clv we are decoding
812 * void, but we will add to proto tree if !NULL.
816 dissect_hello_checksum_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
817 proto_tree
*tree
, int offset
, isis_data_t
*isis
, int length
) {
819 uint16_t checksum
, cacl_checksum
=0;
822 proto_tree_add_expert_format(tree
, pinfo
, &ei_isis_hello_short_clv
, tvb
, offset
, length
,
823 "incorrect checksum length (%u), should be (2)", length
);
827 checksum
= tvb_get_ntohs(tvb
, offset
);
830 /* No checksum present */
831 proto_tree_add_checksum(tree
, tvb
, offset
, hf_isis_hello_checksum
, hf_isis_hello_checksum_status
, &ei_isis_hello_bad_checksum
, pinfo
, 0, ENC_BIG_ENDIAN
, PROTO_CHECKSUM_NOT_PRESENT
);
833 if (osi_check_and_get_checksum(tvb
, 0, isis
->pdu_length
, offset
, &cacl_checksum
)) {
834 /* Successfully processed checksum, verify it */
835 proto_tree_add_checksum(tree
, tvb
, offset
, hf_isis_hello_checksum
, hf_isis_hello_checksum_status
, &ei_isis_hello_bad_checksum
, pinfo
, cacl_checksum
, ENC_BIG_ENDIAN
, PROTO_CHECKSUM_VERIFY
);
837 /* We didn't capture the entire packet, so we can't verify it */
838 proto_tree_add_checksum(tree
, tvb
, offset
, hf_isis_hello_checksum
, hf_isis_hello_checksum_status
, &ei_isis_hello_bad_checksum
, pinfo
, 0, ENC_BIG_ENDIAN
, PROTO_CHECKSUM_NO_FLAGS
);
846 * Name: dissect_hello_area_address_clv()
849 * Decode for a hello packets area address clv.
850 * Calls into the CLV common one.
853 * tvbuff_t * : tvbuffer for packet data
854 * proto_tree * : proto tree to build on (may be null)
855 * int : current offset into packet data
856 * int : length of IDs in packet.
857 * int : length of this clv
860 * void, will modify proto_tree if not null.
863 dissect_hello_area_address_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
864 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
866 isis_dissect_area_address_clv(tree
, pinfo
, tvb
, &ei_isis_hello_short_clv
, hf_isis_hello_area_address
, offset
, length
);
870 * Name: dissect_hello_instance_identifier_clv()
873 * Decode for a hello packets Instance Identifier clv.
874 * Calls into the CLV common one.
877 * tvbuff_t * : tvbuffer for packet data
878 * proto_tree * : proto tree to build on (may be null)
879 * int : current offset into packet data
880 * int : length of IDs in packet.
881 * int : length of this clv
884 * void, will modify proto_tree if not null.
887 dissect_hello_instance_identifier_clv(tvbuff_t
*tvb
, packet_info
* pinfo _U_
,
888 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
890 isis_dissect_instance_identifier_clv(tree
, pinfo
, tvb
, &ei_isis_hello_short_clv
, hf_isis_hello_instance_identifier
, hf_isis_hello_supported_itid
, offset
, length
);
893 static const value_string adj_state_vals
[] = {
895 { 1, "Initializing" },
901 dissect_hello_ptp_adj_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
902 proto_tree
*tree
, int offset
, isis_data_t
*isis
, int length
)
907 proto_tree_add_item(tree
, hf_isis_hello_adjacency_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
910 proto_tree_add_item(tree
, hf_isis_hello_adjacency_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
911 proto_tree_add_item(tree
, hf_isis_hello_extended_local_circuit_id
, tvb
, offset
+1, 4, ENC_BIG_ENDIAN
);
914 proto_tree_add_item(tree
, hf_isis_hello_adjacency_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
915 proto_tree_add_item(tree
, hf_isis_hello_extended_local_circuit_id
, tvb
, offset
+1, 4, ENC_BIG_ENDIAN
);
916 proto_tree_add_item(tree
, hf_isis_hello_neighbor_systemid
, tvb
, offset
+5, isis
->system_id_len
, ENC_NA
);
919 proto_tree_add_item(tree
, hf_isis_hello_adjacency_state
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
920 proto_tree_add_item(tree
, hf_isis_hello_extended_local_circuit_id
, tvb
, offset
+1, 4, ENC_BIG_ENDIAN
);
921 proto_tree_add_item(tree
, hf_isis_hello_neighbor_systemid
, tvb
, offset
+5, isis
->system_id_len
, ENC_NA
);
922 proto_tree_add_item(tree
, hf_isis_hello_neighbor_extended_local_circuit_id
, tvb
, offset
+5+isis
->system_id_len
, 4, ENC_BIG_ENDIAN
);
925 proto_tree_add_expert_format(tree
, pinfo
, &ei_isis_hello_short_clv
, tvb
, offset
, -1,
926 "malformed TLV (%d vs 1,5,11,15)", length
);
931 * Name: isis_dissect_is_neighbors_clv()
934 * Take apart a IS neighbor packet. A neighbor is n 6 byte packets.
935 * (they tend to be an 802.3 MAC address, but it's not required).
938 * tvbuff_t * : tvbuffer for packet data
939 * proto_tree * : protocol display tree to fill out. May be NULL
940 * int : offset into packet data where we are.
941 * int : length of IDs in packet.
942 * int : length of clv we are decoding
945 * void, but we will add to proto tree if !NULL.
948 dissect_hello_is_neighbors_clv(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
*tree
, int offset
,
949 isis_data_t
*isis _U_
, int length
)
951 while ( length
> 0 ) {
953 proto_tree_add_expert_format(tree
, pinfo
, &ei_isis_hello_short_clv
, tvb
, offset
, -1,
954 "short is neighbor (%d vs 6)", length
);
958 * Lets turn the area address into "standard" 0000.0000.etc
961 proto_tree_add_item(tree
, hf_isis_hello_is_neighbor
, tvb
, offset
, 6, ENC_NA
);
968 * Name: dissect_hello_padding_clv()
971 * Decode for a hello packet's padding clv. Padding does nothing,
975 * tvbuff_t * : tvbuffer for packet data
976 * proto_tree * : proto tree to build on (may be null)
977 * int : current offset into packet data
978 * int : length of IDs in packet.
979 * int : length of this clv
985 dissect_hello_padding_clv(tvbuff_t
*tvb _U_
, packet_info
* pinfo _U_
, proto_tree
*tree _U_
, int offset _U_
,
986 isis_data_t
*isis _U_
, int length _U_
)
988 /* nothing to do here! */
992 * Name: dissect_hello_ipv6_glb_int_addr_clv()
995 * Decode for a hello packets ipv6 gobal interface addr clv. Calls into the
999 * tvbuff_t * : tvbuffer for packet data
1000 * proto_tree * : proto tree to build on (may be null)
1001 * int : current offset into packet data
1002 * int : length of IDs in packet.
1003 * int : length of this clv
1006 * void, will modify proto_tree if not null.
1009 dissect_hello_ipv6_glb_int_addr_clv(tvbuff_t
*tvb
, packet_info
* pinfo
,
1010 proto_tree
*tree
, int offset
, isis_data_t
*isis _U_
, int length
)
1012 isis_dissect_ipv6_int_clv(tree
, pinfo
, tvb
, &ei_isis_hello_short_clv
,
1013 offset
, length
, hf_isis_hello_clv_ipv6_glb_int_addr
);
1015 static const isis_clv_handle_t clv_l1_hello_opts
[] = {
1017 ISIS_CLV_AREA_ADDRESS
,
1019 &ett_isis_hello_clv_area_addr
,
1020 dissect_hello_area_address_clv
1023 ISIS_CLV_IS_NEIGHBORS
,
1025 &ett_isis_hello_clv_is_neighbors
,
1026 dissect_hello_is_neighbors_clv
1029 ISIS_CLV_INSTANCE_IDENTIFIER
,
1030 "Instance Identifier",
1031 &ett_isis_hello_clv_instance_identifier
,
1032 dissect_hello_instance_identifier_clv
1037 &ett_isis_hello_clv_padding
,
1038 dissect_hello_padding_clv
1041 ISIS_CLV_PROTOCOLS_SUPPORTED
,
1042 "Protocols Supported",
1043 &ett_isis_hello_clv_nlpid
,
1044 dissect_hello_nlpid_clv
1048 "IP Interface address(es)",
1049 &ett_isis_hello_clv_ipv4_int_addr
,
1050 dissect_hello_ip_int_addr_clv
1054 "IPv6 Interface address(es)",
1055 &ett_isis_hello_clv_ipv6_int_addr
,
1056 dissect_hello_ipv6_int_addr_clv
1060 "Restart Signaling",
1061 &ett_isis_hello_clv_restart
,
1062 dissect_hello_restart_clv
1065 ISIS_CLV_AUTHENTICATION
,
1067 &ett_isis_hello_clv_authentication
,
1068 dissect_hello_authentication_clv
1071 ISIS_CLV_IP_AUTHENTICATION
,
1072 "IP Authentication",
1073 &ett_isis_hello_clv_ip_authentication
,
1074 dissect_hello_ip_authentication_clv
1077 ISIS_CLV_MT_PORT_CAP
,
1078 "MT Port Capability",
1079 &ett_isis_hello_clv_mt_port_cap
,
1080 dissect_hello_mt_port_cap_clv
1083 ISIS_CLV_MT_SUPPORTED
,
1085 &ett_isis_hello_clv_mt
,
1086 dissect_hello_mt_clv
1089 ISIS_CLV_TRILL_NEIGHBOR
,
1091 &ett_isis_hello_clv_trill_neighbor
,
1092 dissect_hello_trill_neighbor_clv
1097 &ett_isis_hello_clv_checksum
,
1098 dissect_hello_checksum_clv
1101 ISIS_CLV_IPV6_GBL_INT_ADDR
,
1102 "IPv6 Global Interface Address",
1103 &ett_isis_hello_clv_ipv6_glb_int_addr
,
1104 dissect_hello_ipv6_glb_int_addr_clv
1107 ISIS_CLV_REVERSE_METRIC
,
1109 &ett_isis_hello_clv_reverse_metric
,
1110 dissect_hello_reverse_metric_clv
1113 ISIS_CLV_BFD_ENABLED
,
1115 &ett_isis_hello_clv_bfd_enabled
,
1116 dissect_hello_bfd_enabled_clv
1126 static const isis_clv_handle_t clv_l2_hello_opts
[] = {
1128 ISIS_CLV_AREA_ADDRESS
,
1130 &ett_isis_hello_clv_area_addr
,
1131 dissect_hello_area_address_clv
1134 ISIS_CLV_IS_NEIGHBORS
,
1136 &ett_isis_hello_clv_is_neighbors
,
1137 dissect_hello_is_neighbors_clv
1140 ISIS_CLV_INSTANCE_IDENTIFIER
,
1141 "Instance Identifier",
1142 &ett_isis_hello_clv_instance_identifier
,
1143 dissect_hello_instance_identifier_clv
1148 &ett_isis_hello_clv_padding
,
1149 dissect_hello_padding_clv
1152 ISIS_CLV_PROTOCOLS_SUPPORTED
,
1153 "Protocols Supported",
1154 &ett_isis_hello_clv_nlpid
,
1155 dissect_hello_nlpid_clv
1159 "IP Interface address(es)",
1160 &ett_isis_hello_clv_ipv4_int_addr
,
1161 dissect_hello_ip_int_addr_clv
1165 "IPv6 Interface address(es)",
1166 &ett_isis_hello_clv_ipv6_int_addr
,
1167 dissect_hello_ipv6_int_addr_clv
1170 ISIS_CLV_AUTHENTICATION
,
1172 &ett_isis_hello_clv_authentication
,
1173 dissect_hello_authentication_clv
1176 ISIS_CLV_IP_AUTHENTICATION
,
1177 "IP Authentication",
1178 &ett_isis_hello_clv_ip_authentication
,
1179 dissect_hello_ip_authentication_clv
1183 "Restart Signaling",
1184 &ett_isis_hello_clv_restart
,
1185 dissect_hello_restart_clv
1188 ISIS_CLV_MT_SUPPORTED
,
1190 &ett_isis_hello_clv_mt
,
1191 dissect_hello_mt_clv
1196 &ett_isis_hello_clv_checksum
,
1197 dissect_hello_checksum_clv
1200 ISIS_CLV_IPV6_GBL_INT_ADDR
,
1201 "IPv6 Global Interface Address",
1202 &ett_isis_hello_clv_ipv6_glb_int_addr
,
1203 dissect_hello_ipv6_glb_int_addr_clv
1206 ISIS_CLV_BFD_ENABLED
,
1208 &ett_isis_hello_clv_bfd_enabled
,
1209 dissect_hello_bfd_enabled_clv
1219 static const isis_clv_handle_t clv_ptp_hello_opts
[] = {
1221 ISIS_CLV_AREA_ADDRESS
,
1223 &ett_isis_hello_clv_area_addr
,
1224 dissect_hello_area_address_clv
1227 ISIS_CLV_INSTANCE_IDENTIFIER
,
1228 "Instance Identifier",
1229 &ett_isis_hello_clv_instance_identifier
,
1230 dissect_hello_instance_identifier_clv
1235 &ett_isis_hello_clv_padding
,
1236 dissect_hello_padding_clv
1239 ISIS_CLV_PROTOCOLS_SUPPORTED
,
1240 "Protocols Supported",
1241 &ett_isis_hello_clv_nlpid
,
1242 dissect_hello_nlpid_clv
1246 "IP Interface address(es)",
1247 &ett_isis_hello_clv_ipv4_int_addr
,
1248 dissect_hello_ip_int_addr_clv
1252 "IPv6 Interface address(es)",
1253 &ett_isis_hello_clv_ipv6_int_addr
,
1254 dissect_hello_ipv6_int_addr_clv
1257 ISIS_CLV_AUTHENTICATION
,
1259 &ett_isis_hello_clv_authentication
,
1260 dissect_hello_authentication_clv
1263 ISIS_CLV_IP_AUTHENTICATION
,
1264 "IP Authentication",
1265 &ett_isis_hello_clv_ip_authentication
,
1266 dissect_hello_ip_authentication_clv
1269 ISIS_CLV_MT_PORT_CAP
,
1270 "MT Port Capability",
1271 &ett_isis_hello_clv_mt_port_cap
,
1272 dissect_hello_mt_port_cap_clv
1276 "Restart Signaling",
1277 &ett_isis_hello_clv_restart
,
1278 dissect_hello_restart_clv
1281 ISIS_CLV_PTP_ADJ_STATE
,
1282 "Point-to-point Adjacency State",
1283 &ett_isis_hello_clv_ptp_adj
,
1284 dissect_hello_ptp_adj_clv
1287 ISIS_CLV_MT_SUPPORTED
,
1289 &ett_isis_hello_clv_mt
,
1290 dissect_hello_mt_clv
1295 &ett_isis_hello_clv_checksum
,
1296 dissect_hello_checksum_clv
1299 ISIS_CLV_IPV6_GBL_INT_ADDR
,
1300 "IPv6 Global Interface Address",
1301 &ett_isis_hello_clv_ipv6_glb_int_addr
,
1302 dissect_hello_ipv6_glb_int_addr_clv
1305 ISIS_CLV_BFD_ENABLED
,
1307 &ett_isis_hello_clv_bfd_enabled
,
1308 dissect_hello_bfd_enabled_clv
1319 * Name: isis_dissect_isis_hello()
1322 * This procedure rips apart the various types of ISIS hellos. L1H and
1323 * L2H's are identical for the most part, while the PTP hello has
1327 dissect_isis_hello(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, int offset
,
1328 const isis_clv_handle_t
*opts
, isis_data_t
*isis
)
1331 proto_tree
*hello_tree
;
1332 uint16_t pdu_length
;
1333 bool pdu_length_too_short
= false;
1336 * We are passed a tvbuff for the entire ISIS PDU, because some ISIS
1337 * PDUs may contain a checksum CLV, and that's a checksum covering
1338 * the entire PDU. Skip the part of the header that's already been
1343 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "ISIS HELLO");
1345 ti
= proto_tree_add_item(tree
, proto_isis_hello
, tvb
, offset
, -1, ENC_NA
);
1346 hello_tree
= proto_item_add_subtree(ti
, ett_isis_hello
);
1348 if (isis
->header_length
< 8 + 1) {
1349 /* Not large enough to include the part of the header that
1351 expert_add_info(pinfo
, isis
->header_length_item
, isis
->ei_bad_header_length
);
1354 proto_tree_add_item(hello_tree
, hf_isis_hello_circuit
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1355 proto_tree_add_item(hello_tree
, hf_isis_hello_circuit_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1358 if (isis
->header_length
< 8 + 1 + isis
->system_id_len
) {
1359 /* Not large enough to include the part of the header that
1361 expert_add_info(pinfo
, isis
->header_length_item
, isis
->ei_bad_header_length
);
1364 proto_tree_add_item(hello_tree
, hf_isis_hello_source_id
, tvb
, offset
, isis
->system_id_len
, ENC_NA
);
1365 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", System-ID: %s", tvb_print_system_id( pinfo
->pool
, tvb
, offset
, isis
->system_id_len
));
1366 offset
+= isis
->system_id_len
;
1368 if (isis
->header_length
< 8 + 1 + isis
->system_id_len
+ 2) {
1369 /* Not large enough to include the part of the header that
1371 expert_add_info(pinfo
, isis
->header_length_item
, isis
->ei_bad_header_length
);
1374 proto_tree_add_item(hello_tree
, hf_isis_hello_holding_timer
, tvb
,
1375 offset
, 2, ENC_BIG_ENDIAN
);
1378 if (isis
->header_length
< 8 + 1 + isis
->system_id_len
+ 2 + 2) {
1379 /* Not large enough to include the part of the header that
1381 expert_add_info(pinfo
, isis
->header_length_item
, isis
->ei_bad_header_length
);
1384 pdu_length
= tvb_get_ntohs(tvb
, offset
);
1385 ti
= proto_tree_add_uint(hello_tree
, hf_isis_hello_pdu_length
, tvb
,
1386 offset
, 2, pdu_length
);
1387 if (pdu_length
< isis
->header_length
) {
1388 expert_add_info(pinfo
, ti
, &ei_isis_hello_short_pdu
);
1389 pdu_length_too_short
= true;
1390 } else if (pdu_length
> tvb_reported_length(tvb
) + isis
->header_length
) {
1391 expert_add_info(pinfo
, ti
, &ei_isis_hello_long_pdu
);
1395 if (opts
== clv_ptp_hello_opts
) {
1396 if (isis
->header_length
< 8 + 1 + isis
->system_id_len
+ 2 + 2 + 1) {
1397 /* Not large enough to include the part of the header that
1399 expert_add_info(pinfo
, isis
->header_length_item
, isis
->ei_bad_header_length
);
1402 proto_tree_add_item(hello_tree
, hf_isis_hello_local_circuit_id
, tvb
,
1403 offset
, 1, ENC_BIG_ENDIAN
);
1406 if (isis
->header_length
< 8 + 1 + isis
->system_id_len
+ 2 + 2 + 1) {
1407 /* Not large enough to include the part of the header that
1409 expert_add_info(pinfo
, isis
->header_length_item
, isis
->ei_bad_header_length
);
1412 proto_tree_add_item(hello_tree
, hf_isis_hello_priority
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1413 proto_tree_add_item(hello_tree
, hf_isis_hello_priority_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1416 if (isis
->header_length
< 8 + 1 + isis
->system_id_len
+ 2 + 2 + 1 + isis
->system_id_len
+ 1) {
1417 /* Not large enough to include the part of the header that
1419 expert_add_info(pinfo
, isis
->header_length_item
, isis
->ei_bad_header_length
);
1422 proto_tree_add_item(hello_tree
, hf_isis_hello_lan_id
, tvb
, offset
, isis
->system_id_len
+ 1, ENC_NA
);
1423 offset
+= isis
->system_id_len
+ 1;
1426 if (pdu_length_too_short
) {
1430 * Now, we need to decode our CLVs. We need to pass in
1431 * our list of valid ones!
1433 isis
->pdu_length
= pdu_length
;
1434 isis_dissect_clvs(tvb
, pinfo
, hello_tree
, offset
,
1435 opts
, &ei_isis_hello_short_clv
, isis
, ett_isis_hello_clv_unknown
,
1436 hf_isis_hello_clv_type
, hf_isis_hello_clv_length
,
1437 &ei_isis_hello_clv_unknown
);
1442 dissect_isis_l1_hello(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1444 isis_data_t
* isis
= (isis_data_t
*)data
;
1445 dissect_isis_hello(tvb
, pinfo
, tree
, 0, clv_l1_hello_opts
, isis
);
1446 return tvb_captured_length(tvb
);
1450 dissect_isis_l2_hello(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1452 isis_data_t
* isis
= (isis_data_t
*)data
;
1453 dissect_isis_hello(tvb
, pinfo
, tree
, 0, clv_l2_hello_opts
, isis
);
1454 return tvb_captured_length(tvb
);
1458 dissect_isis_ptp_hello(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1460 isis_data_t
* isis
= (isis_data_t
*)data
;
1461 dissect_isis_hello(tvb
, pinfo
, tree
, 0, clv_ptp_hello_opts
, isis
);
1462 return tvb_captured_length(tvb
);
1466 * Name: isis_register_hello()
1469 * Register our protocol sub-sets with protocol manager.
1472 * int : protocol index for the ISIS protocol
1478 proto_register_isis_hello(void)
1480 static hf_register_info hf
[] = {
1481 { &hf_isis_hello_circuit
,
1482 { "Circuit type", "isis.hello.circuit_type",
1483 FT_UINT8
, BASE_HEX
, VALS(isis_hello_circuit_type_vals
), ISIS_HELLO_CTYPE_MASK
, NULL
, HFILL
}},
1485 { &hf_isis_hello_circuit_reserved
,
1486 { "Reserved", "isis.hello.reserved",
1487 FT_UINT8
, BASE_HEX
, NULL
, ISIS_HELLO_CT_RESERVED_MASK
, NULL
, HFILL
}},
1489 { &hf_isis_hello_source_id
,
1490 { "SystemID {Sender of PDU}", "isis.hello.source_id",
1491 FT_SYSTEM_ID
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1493 { &hf_isis_hello_holding_timer
,
1494 { "Holding timer", "isis.hello.holding_timer",
1495 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1497 { &hf_isis_hello_pdu_length
,
1498 { "PDU length", "isis.hello.pdu_length",
1499 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1501 { &hf_isis_hello_priority
,
1502 { "Priority", "isis.hello.priority",
1503 FT_UINT8
, BASE_DEC
, NULL
, ISIS_HELLO_PRIORITY_MASK
, NULL
, HFILL
}},
1505 { &hf_isis_hello_priority_reserved
,
1506 { "Reserved", "isis.hello.reserved",
1507 FT_UINT8
, BASE_DEC
, NULL
, ISIS_HELLO_P_RESERVED_MASK
, NULL
, HFILL
}},
1509 { &hf_isis_hello_lan_id
,
1510 { "SystemID {Designated IS}", "isis.hello.lan_id",
1511 FT_SYSTEM_ID
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1513 { &hf_isis_hello_clv_type
,
1514 { "Type", "isis.hello.clv.type",
1515 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1517 { &hf_isis_hello_clv_length
,
1518 { "Length", "isis.hello.clv.length",
1519 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1521 { &hf_isis_hello_local_circuit_id
,
1522 { "Local circuit ID", "isis.hello.local_circuit_id",
1523 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1525 { &hf_isis_hello_clv_ipv4_int_addr
,
1526 { "IPv4 interface address", "isis.hello.clv_ipv4_int_addr",
1527 FT_IPv4
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1529 { &hf_isis_hello_clv_ipv6_int_addr
,
1530 { "IPv6 interface address", "isis.hello.clv_ipv6_int_addr",
1531 FT_IPv6
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1534 { &hf_isis_hello_clv_ptp_adj
,
1535 { "Point-to-point Adjacency", "isis.hello.clv_ptp_adj",
1536 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1539 { &hf_isis_hello_clv_mt
,
1540 { "MT-ID", "isis.hello.clv_mt",
1541 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1543 { &hf_isis_hello_clv_restart_flags
,
1544 { "Restart Signaling Flags", "isis.hello.clv_restart_flags",
1545 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1547 { &hf_isis_hello_clv_restart_flags_rr
,
1548 { "Restart Request", "isis.hello.clv_restart_flags.rr",
1549 FT_BOOLEAN
, 8, NULL
, ISIS_RESTART_RR
,
1550 "When set, the router is beginning a graceful restart", HFILL
}},
1552 { &hf_isis_hello_clv_restart_flags_ra
,
1553 { "Restart Acknowledgment", "isis.hello.clv_restart_flags.ra",
1554 FT_BOOLEAN
, 8, NULL
, ISIS_RESTART_RA
,
1555 "When set, the router is willing to enter helper mode", HFILL
}},
1557 { &hf_isis_hello_clv_restart_flags_sa
,
1558 { "Suppress Adjacency", "isis.hello.clv_restart_flags.sa",
1559 FT_BOOLEAN
, 8, NULL
, ISIS_RESTART_SA
,
1560 "When set, the router is starting as opposed to restarting", HFILL
}},
1562 { &hf_isis_hello_clv_restart_remain_time
,
1563 { "Remaining holding time", "isis.hello.clv_restart.remain_time",
1564 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1565 "How long the helper router will maintain the existing adjacency", HFILL
}},
1567 { &hf_isis_hello_clv_restart_neighbor
,
1568 { "Restarting Neighbor ID", "isis.hello.clv_restart.neighbor",
1569 FT_SYSTEM_ID
, BASE_NONE
, NULL
, 0x0,
1570 "The System ID of the restarting neighbor", HFILL
}},
1572 /* Generated from convert_proto_tree_add_text.pl */
1573 { &hf_isis_hello_mcid
, { "MCID", "isis.hello.mcid", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1574 { &hf_isis_hello_aux_mcid
, { "Aux MCID", "isis.hello.aux_mcid", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1575 { &hf_isis_hello_digest
, { "Digest", "isis.hello.digest", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1576 { &hf_isis_hello_digest_v
, { "V", "isis.hello.digest.v", FT_UINT8
, BASE_DEC
, NULL
, 0x10, NULL
, HFILL
}},
1577 { &hf_isis_hello_digest_a
, { "A", "isis.hello.digest.a", FT_UINT8
, BASE_DEC
, NULL
, 0x0c, NULL
, HFILL
}},
1578 { &hf_isis_hello_digest_d
, { "D", "isis.hello.digest.d", FT_UINT8
, BASE_DEC
, NULL
, 0x03, NULL
, HFILL
}},
1579 { &hf_isis_hello_ect
, { "ECT", "isis.hello.ect", FT_BYTES
, SEP_DASH
, NULL
, 0x0, NULL
, HFILL
}},
1580 { &hf_isis_hello_bvid
, { "BVID", "isis.hello.bvid", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0xFFF0, NULL
, HFILL
}},
1581 { &hf_isis_hello_bvid_u
, { "U", "isis.hello.bvid.u", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0008, NULL
, HFILL
}},
1582 { &hf_isis_hello_bvid_m
, { "M", "isis.hello.bvid.m", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0004, NULL
, HFILL
}},
1583 { &hf_isis_hello_area_address
, { "Area address", "isis.hello.area_address", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1584 { &hf_isis_hello_instance_identifier
, { "Instance Identifier", "isis.hello.iid", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1585 { &hf_isis_hello_supported_itid
, { "Supported ITID", "isis.hello.supported_itid", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1586 { &hf_isis_hello_clv_nlpid_nlpid
, { "NLPID", "isis.hello.clv_nlpid.nlpid", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1587 { &hf_isis_hello_clv_ip_authentication
, { "NLPID", "isis.hello.clv_ip_authentication", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1588 { &hf_isis_hello_authentication
, { "Authentication", "isis.hello.clv_authentication", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1589 { &hf_isis_hello_mtid
, { "Topology ID", "isis.hello.mtid", FT_UINT16
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(mtid_strings
), 0x0fff, NULL
, HFILL
}},
1590 { &hf_isis_hello_trill_neighbor_sf
, { "Smallest flag", "isis.hello.trill_neighbor.sf", FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0x80, NULL
, HFILL
}},
1591 { &hf_isis_hello_trill_neighbor_lf
, { "Largest flag", "isis.hello.trill_neighbor.lf", FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0x40, NULL
, HFILL
}},
1592 { &hf_isis_hello_trill_neighbor_size
, { "SNPA Size", "isis.hello.trill_neighbor.size", FT_UINT8
, BASE_DEC
, NULL
, 0x1f, NULL
, HFILL
}},
1593 { &hf_isis_hello_trill_neighbor_ff
, { "Failed flag", "isis.hello.trill_neighbor.ff", FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0x80, NULL
, HFILL
}},
1594 { &hf_isis_hello_trill_neighbor_of
, { "OOMF flag", "isis.hello.trill_neighbor.of", FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0x40, NULL
, HFILL
}},
1595 { &hf_isis_hello_trill_neighbor_reserved
, { "Reserved", "isis.hello.trill_neighbor.reserved", FT_UINT8
, BASE_DEC
, NULL
, 0x3f, NULL
, HFILL
}},
1596 { &hf_isis_hello_trill_neighbor_mtu
, { "Tested MTU", "isis.hello.trill_neighbor.mtu", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1597 { &hf_isis_hello_trill_neighbor_snpa
, { "SNPA", "isis.hello.trill_neighbor.snpa", FT_SYSTEM_ID
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1598 { &hf_isis_hello_checksum
, { "Checksum", "isis.hello.checksum", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1599 { &hf_isis_hello_checksum_status
, { "Checksum Status", "isis.hello.checksum.status", FT_UINT8
, BASE_NONE
, VALS(proto_checksum_vals
), 0x0, NULL
, HFILL
}},
1600 { &hf_isis_hello_adjacency_state
, { "Adjacency State", "isis.hello.adjacency_state", FT_UINT8
, BASE_DEC
, VALS(adj_state_vals
), 0x0, NULL
, HFILL
}},
1601 { &hf_isis_hello_extended_local_circuit_id
, { "Extended Local circuit ID", "isis.hello.extended_local_circuit_id", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1602 { &hf_isis_hello_neighbor_systemid
, { "Neighbor SystemID", "isis.hello.neighbor_systemid", FT_SYSTEM_ID
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1603 { &hf_isis_hello_neighbor_extended_local_circuit_id
, { "Neighbor Extended Local circuit ID", "isis.hello.neighbor_extended_local_circuit_id", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1604 { &hf_isis_hello_vlan_flags_port_id
, { "Port ID", "isis.hello.vlan_flags.port_id", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1605 { &hf_isis_hello_vlan_flags_nickname
, { "Nickname", "isis.hello.vlan_flags.nickname", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1606 { &hf_isis_hello_vlan_flags_af
, { "Appointed Forwarder", "isis.hello.vlan_flags.af", FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), 0x8000, NULL
, HFILL
}},
1607 { &hf_isis_hello_vlan_flags_ac
, { "Access Port", "isis.hello.vlan_flags.ac", FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), 0x4000, NULL
, HFILL
}},
1608 { &hf_isis_hello_vlan_flags_vm
, { "VLAN Mapping Detected", "isis.hello.vlan_flags.vm", FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), 0x2000, NULL
, HFILL
}},
1609 { &hf_isis_hello_vlan_flags_by
, { "Bypass Pseudonode", "isis.hello.vlan_flags.by", FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), 0x1000, NULL
, HFILL
}},
1610 { &hf_isis_hello_vlan_flags_outer_vlan
, { "Outer VLAN", "isis.hello.vlan_flags.outer_vlan", FT_UINT16
, BASE_DEC
, NULL
, 0x0fff, NULL
, HFILL
}},
1611 { &hf_isis_hello_vlan_flags_tr
, { "Trunk Port", "isis.hello.vlan_flags.tr", FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), 0x8000, NULL
, HFILL
}},
1612 { &hf_isis_hello_vlan_flags_reserved
, { "Reserved", "isis.hello.vlan_flags.reserved", FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), 0x7000, NULL
, HFILL
}},
1613 { &hf_isis_hello_vlan_flags_designated_vlan
, { "Designated VLAN", "isis.hello.vlan_flags.designated_vlan", FT_UINT16
, BASE_DEC
, NULL
, 0x0fff, NULL
, HFILL
}},
1614 { &hf_isis_hello_enabled_vlans
, { "Enabled VLANs", "isis.hello.enabled_vlans", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1615 { &hf_isis_hello_appointed_vlans
, { "Appointed VLANs", "isis.hello.appointed_vlans", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1616 { &hf_isis_hello_af_nickname
, { "Nickname", "isis.hello.af.nickname", FT_UINT16
, BASE_HEX_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1617 { &hf_isis_hello_af_start_vlan
, { "Start VLAN", "isis.hello.af.start_vlan", FT_UINT16
, BASE_DEC
, NULL
, 0x0fff, NULL
, HFILL
}},
1618 { &hf_isis_hello_af_end_vlan
, { "End VLAN", "isis.hello.af.end_vlan", FT_UINT16
, BASE_DEC
, NULL
, 0x0fff, NULL
, HFILL
}},
1619 { &hf_isis_hello_trill_version
, { "Maximum version", "isis.hello.trill.maximum_version", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1620 { &hf_isis_hello_trill_hello_reduction
, { "Hello Reduction", "isis.hello.trill.hello_reduction", FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x80000000, NULL
, HFILL
}},
1621 { &hf_isis_hello_trill_unassigned_1
, { "Unassigned", "isis.hello.trill.unassigned_1", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x60000000, NULL
, HFILL
}},
1622 { &hf_isis_hello_trill_hop_by_hop_flags
, { "Hop-by-hop Extended Header Flags", "isis.hello.trill.hop_by_hop_flags", FT_BOOLEAN
, 32, TFS(&tfs_supported_not_supported
), 0x1ffc0000, NULL
, HFILL
}},
1623 { &hf_isis_hello_trill_unassigned_2
, { "Unassigned", "isis.hello.trill.unassigned_2",FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x0003ffff, NULL
, HFILL
}},
1624 { &hf_isis_hello_is_neighbor
, { "IS Neighbor", "isis.hello.is_neighbor", FT_ETHER
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1625 { &hf_isis_hello_reverse_metric_flags
, { "Flags", "isis.hello.reverse_metric.flags", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1626 { &hf_isis_hello_reverse_metric_flag_reserved
, { "Reserved", "isis.hello.reverse_metric.flags.reserved", FT_UINT8
, BASE_HEX
, NULL
, 0xFC, NULL
, HFILL
}},
1627 { &hf_isis_hello_reverse_metric_flag_u
, { "U", "isis.hello.reverse_metric.flags.u", FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0x02, NULL
, HFILL
}},
1628 { &hf_isis_hello_reverse_metric_flag_w
, { "W", "isis.hello.reverse_metric.flags.w", FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0x01, NULL
, HFILL
}},
1629 { &hf_isis_hello_reverse_metric_metric
, { "Metric", "isis.hello.reverse_metric.metric", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1630 { &hf_isis_hello_reverse_metric_sub_length
, { "Sub-TLV length", "isis.hello.reverse_metric.sub_length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1631 { &hf_isis_hello_reverse_metric_sub_data
, { "Sub-TLV data", "isis.hello.reverse_metric.sub_data", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1632 { &hf_isis_hello_bfd_enabled_nlpid
, { "NLPID", "isis.hello.bfd_enabled.nlpid", FT_UINT8
, BASE_HEX
, VALS(nlpid_vals
), 0x0, NULL
, HFILL
}},
1635 { &hf_isis_hello_clv_ipv6_glb_int_addr
,
1636 { "IPv6 Global interface address", "isis.hello.clv_ipv6_glb_int_addr",
1637 FT_IPv6
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1640 static int *ett
[] = {
1642 &ett_isis_hello_clv_area_addr
,
1643 &ett_isis_hello_clv_instance_identifier
,
1644 &ett_isis_hello_clv_is_neighbors
,
1645 &ett_isis_hello_clv_padding
,
1646 &ett_isis_hello_clv_unknown
,
1647 &ett_isis_hello_clv_nlpid
,
1648 &ett_isis_hello_clv_nlpid_nlpid
,
1649 &ett_isis_hello_clv_authentication
,
1650 &ett_isis_hello_clv_ip_authentication
,
1651 &ett_isis_hello_clv_ipv4_int_addr
,
1652 &ett_isis_hello_clv_ipv6_int_addr
,
1653 &ett_isis_hello_clv_ptp_adj
,
1654 &ett_isis_hello_clv_mt
,
1655 &ett_isis_hello_clv_restart
,
1656 &ett_isis_hello_clv_restart_flags
,
1657 &ett_isis_hello_clv_mt_port_cap
,
1658 &ett_isis_hello_clv_mt_port_cap_spb_mcid
,
1659 &ett_isis_hello_clv_mt_port_cap_spb_digest
,
1660 &ett_isis_hello_clv_mt_port_cap_spb_bvid_tuples
,
1661 &ett_isis_hello_clv_mt_port_cap_vlan_flags
,
1662 &ett_isis_hello_clv_mt_port_cap_enabled_vlans
,
1663 &ett_isis_hello_clv_mt_port_cap_appointedfwrdrs
,
1664 &ett_isis_hello_clv_mt_port_cap_port_trill_ver
,
1665 &ett_isis_hello_clv_mt_port_cap_vlans_appointed
,
1666 &ett_isis_hello_clv_trill_neighbor
,
1667 &ett_isis_hello_clv_checksum
,
1668 &ett_isis_hello_clv_reverse_metric
,
1669 &ett_isis_hello_clv_bfd_enabled
,
1670 &ett_isis_hello_clv_ipv6_glb_int_addr
, /* CLV 233, rfc6119 */
1671 &ett_isis_hello_reverse_metric_flags
1674 static ei_register_info ei
[] = {
1675 { &ei_isis_hello_short_pdu
, { "isis.lsp.hello_pdu.bad_length", PI_MALFORMED
, PI_ERROR
, "PDU length less than header length", EXPFILL
}},
1676 { &ei_isis_hello_long_pdu
, { "isis.lsp.hello_pdu.bad_length", PI_MALFORMED
, PI_ERROR
, "PDU length greater than packet length", EXPFILL
}},
1677 { &ei_isis_hello_bad_checksum
, { "isis.hello.bad_checksum", PI_CHECKSUM
, PI_ERROR
, "Bad checksum", EXPFILL
}},
1678 { &ei_isis_hello_subtlv
, { "isis.hello.subtlv.unknown", PI_PROTOCOL
, PI_WARN
, "Unknown Sub-TLV", EXPFILL
}},
1679 { &ei_isis_hello_authentication
, { "isis.hello.authentication.unknown", PI_PROTOCOL
, PI_WARN
, "Unknown authentication type", EXPFILL
}},
1680 { &ei_isis_hello_short_clv
, { "isis.hello.short_clv", PI_MALFORMED
, PI_ERROR
, "Short CLV", EXPFILL
}},
1681 { &ei_isis_hello_clv_mt
, { "isis.hello.clv_mt.malformed", PI_MALFORMED
, PI_ERROR
, "malformed MT-ID", EXPFILL
}},
1682 { &ei_isis_hello_clv_unknown
, { "isis.hello.clv.unknown", PI_UNDECODED
, PI_NOTE
, "Unknown option", EXPFILL
}},
1685 expert_module_t
* expert_isis_hello
;
1687 /* Register the protocol name and description */
1688 proto_isis_hello
= proto_register_protocol("ISIS HELLO", "ISIS HELLO", "isis.hello");
1690 proto_register_field_array(proto_isis_hello
, hf
, array_length(hf
));
1691 proto_register_subtree_array(ett
, array_length(ett
));
1692 expert_isis_hello
= expert_register_protocol(proto_isis_hello
);
1693 expert_register_field_array(expert_isis_hello
, ei
, array_length(ei
));
1697 proto_reg_handoff_isis_hello(void)
1699 dissector_add_uint("isis.type", ISIS_TYPE_L1_HELLO
, create_dissector_handle(dissect_isis_l1_hello
, proto_isis_hello
));
1700 dissector_add_uint("isis.type", ISIS_TYPE_L2_HELLO
, create_dissector_handle(dissect_isis_l2_hello
, proto_isis_hello
));
1701 dissector_add_uint("isis.type", ISIS_TYPE_PTP_HELLO
, create_dissector_handle(dissect_isis_ptp_hello
, proto_isis_hello
));
1705 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1710 * indent-tabs-mode: nil
1713 * vi: set shiftwidth=4 tabstop=8 expandtab:
1714 * :indentSize=4:tabSize=8:noTabs=true: