2 * Routines for LLDP dissection
3 * By Juan Gonzalez <juan.gonzalez@pikatech.com>
7 * Modified by: Brian Bogora <brian_bogora@mitel.com>
11 * Hans-Christian Goeckeritz <hans.christian.goeckeritz@gmx.de>
12 * Gregor Miernik <gregor.miernik@hytec.de>
13 * Expansion of dissector for Hytec-OUI
16 * Added Avaya IP Phone OUI, Uli Heilmeier <uh@heilmeier.eu>
20 * IEEE 802.1Q for the 802.1 Organizationally Specific TLVs.
22 * TIA-1057 for TIA Organizationally Specific TLVs.
24 * Wireshark - Network traffic analyzer
25 * By Gerald Combs <gerald@wireshark.org>
26 * Copyright 1998 Gerald Combs
28 * SPDX-License-Identifier: GPL-2.0-or-later
33 #include <epan/packet.h>
34 #include <epan/etypes.h>
36 #include <epan/addr_resolv.h>
37 #include <epan/expert.h>
38 #include <epan/prefs.h>
40 #include <epan/unit_strings.h>
42 #include <wsutil/array.h>
45 #include "packet-enip.h"
47 #define DEFAULT_COLUMN_INFO 1
48 #define PROFINET_SPECIAL_COLUMN_INFO 2
50 /* Structure for general station information */
51 typedef struct _profinet_lldp_column_info
{
52 /* general information */
54 char *chassis_id_locally_assigned
;
55 char *port_id_locally_assigned
;
57 bool is_port_id_assigned
;
58 }profinet_lldp_column_info
;
60 static int column_info_selection
= DEFAULT_COLUMN_INFO
;
61 static bool assume_unrecognized_tlv
= false;
63 static dissector_handle_t lldp_handle
;
65 void proto_register_lldp(void);
66 void proto_reg_handoff_lldp(void);
68 static int hf_ex_avaya_tlv_subtype
;
69 static int hf_ex_avaya_hmac_shi
;
70 static int hf_ex_avaya_element_type
;
71 static int hf_ex_avaya_state
;
72 static int hf_ex_avaya_vlan
;
73 static int hf_ex_avaya_mgnt_vlan
;
74 static int hf_ex_avaya_rsvd
;
75 static int hf_ex_avaya_system_id
;
76 static int hf_ex_avaya_status
;
77 static int hf_ex_avaya_i_sid
;
79 static int hf_ex_avaya2_tlv_subtype
;
80 static int hf_ex_avaya2_fabric_connect
;
81 static int hf_ex_avaya2_fabric_numbvlans
;
82 static int hf_ex_avaya2_fabric_bvlanid
;
83 static int hf_ex_avaya2_fabric_sysidlength
;
84 static int hf_ex_avaya2_fabric_sysid
;
86 /* Sub Dissector Tables */
87 static dissector_table_t oui_unique_code_table
;
89 /* Initialize the protocol and registered fields */
90 static int proto_lldp
;
91 static int hf_lldp_tlv_type
;
92 static int hf_lldp_tlv_len
;
93 static int hf_lldp_tlv_system_cap
;
94 static int hf_lldp_tlv_system_cap_other
;
95 static int hf_lldp_tlv_system_cap_repeater
;
96 static int hf_lldp_tlv_system_cap_bridge
;
97 static int hf_lldp_tlv_system_cap_wlan_access_pt
;
98 static int hf_lldp_tlv_system_cap_router
;
99 static int hf_lldp_tlv_system_cap_telephone
;
100 static int hf_lldp_tlv_system_cap_docsis_cable_device
;
101 static int hf_lldp_tlv_system_cap_station_only
;
102 static int hf_lldp_tlv_system_cap_cvlan_component
;
103 static int hf_lldp_tlv_system_cap_svlan_component
;
104 static int hf_lldp_tlv_system_cap_tpmr_component
;
105 static int hf_lldp_tlv_system_name
;
106 static int hf_lldp_tlv_system_desc
;
107 static int hf_lldp_tlv_enable_system_cap
;
108 static int hf_lldp_tlv_enable_system_cap_other
;
109 static int hf_lldp_tlv_enable_system_cap_repeater
;
110 static int hf_lldp_tlv_enable_system_cap_bridge
;
111 static int hf_lldp_tlv_enable_system_cap_wlan_access_pt
;
112 static int hf_lldp_tlv_enable_system_cap_router
;
113 static int hf_lldp_tlv_enable_system_cap_telephone
;
114 static int hf_lldp_tlv_enable_system_cap_docsis_cable_device
;
115 static int hf_lldp_tlv_enable_system_cap_station_only
;
116 static int hf_lldp_tlv_enable_system_cap_cvlan_component
;
117 static int hf_lldp_tlv_enable_system_cap_svlan_component
;
118 static int hf_lldp_tlv_enable_system_cap_tpmr_component
;
119 static int hf_chassis_id_subtype
;
120 static int hf_chassis_id
;
121 static int hf_chassis_id_mac
;
122 static int hf_chassis_id_ip4
;
123 static int hf_chassis_id_ip6
;
124 static int hf_port_id_subtype
;
125 static int hf_port_id
;
126 static int hf_port_desc
;
127 static int hf_port_id_mac
;
128 static int hf_lldp_network_address_family
;
129 static int hf_port_id_ip4
;
130 static int hf_port_id_ip6
;
131 static int hf_time_to_live
;
132 static int hf_pdu_type
;
133 static int hf_mgn_address_len
;
134 static int hf_mgn_address_subtype
;
135 static int hf_mgn_addr_ipv4
;
136 static int hf_mgn_addr_ipv6
;
137 static int hf_mgn_addr_hex
;
138 static int hf_mgn_interface_subtype
;
139 static int hf_mgn_interface_number
;
140 static int hf_mgn_oid_len
;
141 static int hf_mgn_obj_id
;
142 static int hf_org_spc_oui
;
143 static int hf_dcbx_type
;
144 static int hf_dcbx_tlv_type
;
145 static int hf_dcbx_tlv_len
;
146 static int hf_dcbx_tlv_oper_version
;
147 static int hf_dcbx_tlv_max_version
;
148 static int hf_dcbx_control_sequence
;
149 static int hf_dcbx_control_ack
;
150 static int hf_dcbx_feature_flag_enabled
;
151 static int hf_dcbx_feature_flag_error
;
152 static int hf_dcbx_feature_flag_willing
;
153 static int hf_dcbx_feature_subtype
;
154 static int hf_dcbx_feature_pgid_reserved
;
155 static int hf_dcbx_feature_pgid_prio_0
;
156 static int hf_dcbx_feature_pgid_prio_1
;
157 static int hf_dcbx_feature_pgid_prio_2
;
158 static int hf_dcbx_feature_pgid_prio_3
;
159 static int hf_dcbx_feature_pgid_prio_4
;
160 static int hf_dcbx_feature_pgid_prio_5
;
161 static int hf_dcbx_feature_pgid_prio_6
;
162 static int hf_dcbx_feature_pgid_prio_7
;
163 static int hf_dcbx_feature_pg_per_0
;
164 static int hf_dcbx_feature_pg_per_1
;
165 static int hf_dcbx_feature_pg_per_2
;
166 static int hf_dcbx_feature_pg_per_3
;
167 static int hf_dcbx_feature_pg_per_4
;
168 static int hf_dcbx_feature_pg_per_5
;
169 static int hf_dcbx_feature_pg_per_6
;
170 static int hf_dcbx_feature_pg_per_7
;
171 static int hf_dcbx_feature_pg_numtcs
;
172 static int hf_dcbx_feature_pfc_prio0
;
173 static int hf_dcbx_feature_pfc_prio1
;
174 static int hf_dcbx_feature_pfc_prio2
;
175 static int hf_dcbx_feature_pfc_prio3
;
176 static int hf_dcbx_feature_pfc_prio4
;
177 static int hf_dcbx_feature_pfc_prio5
;
178 static int hf_dcbx_feature_pfc_prio6
;
179 static int hf_dcbx_feature_pfc_prio7
;
180 static int hf_dcbx_feature_pfc_numtcs
;
181 static int hf_dcbx_feature_app_proto
;
182 static int hf_dcbx_feature_app_selector
;
183 static int hf_dcbx_feature_app_oui
;
184 static int hf_dcbx_feature_app_prio
;
185 static int hf_dcbx_feature_flag_llink_type
;
186 static int hf_ieee_802_1_subtype
;
187 static int hf_ieee_802_1_port_and_vlan_id_flag
;
188 static int hf_ieee_802_1_port_and_vlan_id_flag_supported
;
189 static int hf_ieee_802_1_port_and_vlan_id_flag_enabled
;
190 static int hf_ieee_802_1_port_vlan_id
;
191 static int hf_ieee_802_1_port_proto_vlan_id
;
192 static int hf_ieee_802_1_vlan_id
;
193 static int hf_ieee_802_1_vlan_name_length
;
194 static int hf_ieee_802_1_vlan_name
;
195 static int hf_ieee_802_1_proto_id_length
;
196 static int hf_ieee_802_1_proto_id
;
197 static int hf_ieee_802_1_aggregation_status
;
198 static int hf_ieee_802_1_aggregation_status_cap
;
199 static int hf_ieee_802_1_aggregation_status_enabled
;
200 static int hf_ieee_802_1_aggregation_status_porttype
;
201 static int hf_ieee_802_1_aggregated_port_id
;
202 static int hf_ieee_8021qau_cnpv_prio0
;
203 static int hf_ieee_8021qau_cnpv_prio1
;
204 static int hf_ieee_8021qau_cnpv_prio2
;
205 static int hf_ieee_8021qau_cnpv_prio3
;
206 static int hf_ieee_8021qau_cnpv_prio4
;
207 static int hf_ieee_8021qau_cnpv_prio5
;
208 static int hf_ieee_8021qau_cnpv_prio6
;
209 static int hf_ieee_8021qau_cnpv_prio7
;
210 static int hf_ieee_8021qau_ready_prio0
;
211 static int hf_ieee_8021qau_ready_prio1
;
212 static int hf_ieee_8021qau_ready_prio2
;
213 static int hf_ieee_8021qau_ready_prio3
;
214 static int hf_ieee_8021qau_ready_prio4
;
215 static int hf_ieee_8021qau_ready_prio5
;
216 static int hf_ieee_8021qau_ready_prio6
;
217 static int hf_ieee_8021qau_ready_prio7
;
218 static int hf_ieee_8021az_feature_flag_willing
;
219 static int hf_ieee_8021az_feature_flag_cbs
;
220 static int hf_ieee_8021az_maxtcs
;
221 static int hf_ieee_8021az_tsa_class0
;
222 static int hf_ieee_8021az_tsa_class1
;
223 static int hf_ieee_8021az_tsa_class2
;
224 static int hf_ieee_8021az_tsa_class3
;
225 static int hf_ieee_8021az_tsa_class4
;
226 static int hf_ieee_8021az_tsa_class5
;
227 static int hf_ieee_8021az_tsa_class6
;
228 static int hf_ieee_8021az_tsa_class7
;
229 static int hf_ieee_8021az_feature_flag_mbc
;
230 static int hf_ieee_8021az_pfc_numtcs
;
231 static int hf_ieee_8021az_app_reserved
;
232 static int hf_ieee_8021az_app_prio
;
233 static int hf_ieee_8021az_app_selector
;
234 static int hf_ieee_802_3_subtype
;
235 static int hf_ieee_802_3_mac_phy_auto_neg_status
;
236 static int hf_ieee_802_3_mac_phy_auto_neg_status_supported
;
237 static int hf_ieee_802_3_mac_phy_auto_neg_status_enabled
;
238 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps
;
239 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_tfd
;
240 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_t
;
241 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_xfd
;
242 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_x
;
243 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_bpause
;
244 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_spause
;
245 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_apause
;
246 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_pause
;
247 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2fd
;
248 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2
;
249 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_txfd
;
250 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_tx
;
251 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t4
;
252 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_tfd
;
253 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_t
;
254 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_other
;
255 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_tfd
;
256 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_t
;
257 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_xfd
;
258 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_x
;
259 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_bpause
;
260 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_spause
;
261 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_apause
;
262 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_pause
;
263 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2fd
;
264 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2
;
265 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_txfd
;
266 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_tx
;
267 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t4
;
268 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_tfd
;
269 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_t
;
270 static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_other
;
271 static int hf_ieee_802_3_pmd_mau_type
;
272 static int hf_ieee_802_3_mdi_power_support
;
273 static int hf_ieee_802_3_mdi_power_support_port_class
;
274 static int hf_ieee_802_3_mdi_power_support_pse_power_support
;
275 static int hf_ieee_802_3_mdi_power_support_pse_power_enabled
;
276 static int hf_ieee_802_3_mdi_power_support_pse_pairs
;
277 static int hf_ieee_802_3_mdi_power_pse_pair
;
278 static int hf_ieee_802_3_mdi_power_class
;
279 static int hf_ieee_802_3_mdi_power_type
;
280 static int hf_ieee_802_3_mdi_power_source
;
281 static int hf_ieee_802_3_mdi_power_pd4pid
;
282 static int hf_ieee_802_3_mdi_power_priority
;
283 static int hf_ieee_802_3_mdi_requested_power
;
284 static int hf_ieee_802_3_mdi_allocated_power
;
286 static int hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_a
;
287 static int hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_b
;
288 static int hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_a
;
289 static int hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_b
;
290 static int hf_ieee_802_3_bt_power_status
;
291 static int hf_ieee_802_3_bt_pse_powering_status
;
292 static int hf_ieee_802_3_bt_pd_powered_status
;
293 static int hf_ieee_802_3_bt_pse_power_pairs_ext
;
294 static int hf_ieee_802_3_bt_ds_pwr_class_ext_a
;
295 static int hf_ieee_802_3_bt_ds_pwr_class_ext_b
;
296 static int hf_ieee_802_3_bt_pwr_class_ext
;
297 static int hf_ieee_802_3_bt_system_setup
;
298 static int hf_ieee_802_3_bt_power_type_ext
;
299 static int hf_ieee_802_3_bt_power_pd_load
;
300 static int hf_ieee_802_3_bt_pse_maximum_available_power_value
;
301 static int hf_ieee_802_3_bt_autoclass
;
302 static int hf_ieee_802_3_bt_pse_autoclass_support
;
303 static int hf_ieee_802_3_bt_autoclass_completed
;
304 static int hf_ieee_802_3_bt_autoclass_request
;
305 static int hf_ieee_802_3_bt_autoclass_reserved
;
306 static int hf_ieee_802_3_bt_power_down
;
307 static int hf_ieee_802_3_bt_power_down_request
;
308 static int hf_ieee_802_3_bt_power_down_time
;
309 static int hf_ieee_802_3_aggregation_status
;
310 static int hf_ieee_802_3_aggregation_status_cap
;
311 static int hf_ieee_802_3_aggregation_status_enabled
;
312 static int hf_ieee_802_3_aggregated_port_id
;
313 static int hf_ieee_802_3_max_frame_size
;
314 static int hf_ieee_802_3_eee_transmit
;
315 static int hf_ieee_802_3_eee_receive
;
316 static int hf_ieee_802_3_eee_fallback_receive
;
317 static int hf_ieee_802_3_eee_echo_transmit
;
318 static int hf_ieee_802_3_eee_echo_receive
;
319 static int hf_ieee_802_1qbg_subtype
;
320 static int hf_ieee_802_1qbg_evb_support_caps
;
321 static int hf_ieee_802_1qbg_evb_support_caps_std
;
322 static int hf_ieee_802_1qbg_evb_support_caps_rr
;
323 static int hf_ieee_802_1qbg_evb_support_caps_rte
;
324 static int hf_ieee_802_1qbg_evb_support_caps_ecp
;
325 static int hf_ieee_802_1qbg_evb_support_caps_vdp
;
326 static int hf_ieee_802_1qbg_evb_configure_caps
;
327 static int hf_ieee_802_1qbg_evb_configure_caps_std
;
328 static int hf_ieee_802_1qbg_evb_configure_caps_rr
;
329 static int hf_ieee_802_1qbg_evb_configure_caps_rte
;
330 static int hf_ieee_802_1qbg_evb_configure_caps_ecp
;
331 static int hf_ieee_802_1qbg_evb_configure_caps_vdp
;
332 static int hf_ieee_802_1qbg_evb_supported_vsi
;
333 static int hf_ieee_802_1qbg_evb_configured_vsi
;
334 static int hf_ieee_802_1qbg_evb_retrans_timer
;
335 static int hf_ieee_802_3br_aec
;
336 static int hf_ieee_802_3br_aec_support
;
337 static int hf_ieee_802_3br_aec_enable
;
338 static int hf_ieee_802_3br_aec_active
;
339 static int hf_ieee_802_3br_aec_addfragsize
;
340 static int hf_ieee_802_3br_aec_reserved
;
341 static int hf_media_tlv_subtype
;
342 static int hf_media_tlv_subtype_caps
;
343 static int hf_media_tlv_subtype_caps_llpd
;
344 static int hf_media_tlv_subtype_caps_network_policy
;
345 static int hf_media_tlv_subtype_caps_location_id
;
346 static int hf_media_tlv_subtype_caps_mdi_pse
;
347 static int hf_media_tlv_subtype_caps_mid_pd
;
348 static int hf_media_tlv_subtype_caps_inventory
;
349 static int hf_media_tlv_subtype_class
;
350 static int hf_media_application_type
;
351 static int hf_media_policy_flag
;
352 static int hf_media_tag_flag
;
353 static int hf_media_vlan_id
;
354 static int hf_media_l2_prio
;
355 static int hf_media_dscp
;
356 static int hf_media_loc_data_format
;
357 static int hf_media_loc_lat_resolution
;
358 static int hf_media_loc_lat
;
359 static int hf_media_loc_long_resolution
;
360 static int hf_media_loc_long
;
361 static int hf_media_loc_alt_type
;
362 static int hf_media_loc_alt_resolution
;
363 static int hf_media_loc_alt
;
364 static int hf_media_loc_ver
;
365 static int hf_media_loc_reserved
;
366 static int hf_media_loc_datum
;
367 static int hf_media_civic_lci_length
;
368 static int hf_media_civic_what
;
369 static int hf_media_civic_country
;
370 static int hf_media_civic_addr_type
;
371 static int hf_media_civic_addr_len
;
372 static int hf_media_civic_addr_value
;
373 static int hf_media_ecs
;
374 static int hf_media_power_type
;
375 static int hf_media_power_source
;
376 static int hf_media_power_priority
;
377 static int hf_media_power_value
;
378 static int hf_media_hardware
;
379 static int hf_media_firmware
;
380 static int hf_media_software
;
381 static int hf_media_sn
;
382 static int hf_media_manufacturer
;
383 static int hf_media_model
;
384 static int hf_media_asset
;
385 static int hf_profinet_tlv_subtype
;
386 static int hf_profinet_class2_port_status
;
387 static int hf_profinet_class3_port_status
;
388 static int hf_profinet_class3_port_status_Fragmentation
;
389 static int hf_profinet_class3_port_status_reserved
;
390 static int hf_profinet_class3_port_status_PreambleLength
;
391 static int hf_profinet_port_rx_delay_local
;
392 static int hf_profinet_port_rx_delay_remote
;
393 static int hf_profinet_port_tx_delay_local
;
394 static int hf_profinet_port_tx_delay_remote
;
395 static int hf_profinet_cable_delay_local
;
396 static int hf_profinet_mrp_domain_uuid
;
397 static int hf_profinet_tsn_domain_uuid
;
398 static int hf_profinet_tsn_nme_management_addr
;
399 static int hf_profinet_tsn_nme_management_addr_str_length
;
400 static int hf_profinet_tsn_nme_management_addr_subtype
;
401 static int hf_profinet_tsn_nme_name_uuid
;
402 static int hf_profinet_tsn_nme_parameter_uuid
;
403 static int hf_profinet_time_domain_number
;
404 static int hf_profinet_time_domain_uuid
;
405 static int hf_profinet_time_domain_master_identity
;
406 static int hf_profinet_mrrt_port_status
;
407 static int hf_profinet_cm_mac
;
408 static int hf_profinet_master_source_address
;
409 static int hf_profinet_subdomain_uuid
;
410 static int hf_profinet_ir_data_uuid
;
411 static int hf_profinet_length_of_period_valid
;
412 static int hf_profinet_length_of_period_length
;
413 static int hf_profinet_red_period_begin_valid
;
414 static int hf_profinet_red_period_begin_offset
;
415 static int hf_profinet_orange_period_begin_valid
;
416 static int hf_profinet_orange_period_begin_offset
;
417 static int hf_profinet_green_period_begin_valid
;
418 static int hf_profinet_green_period_begin_offset
;
419 static int hf_cisco_subtype
;
420 static int hf_cisco_upoe
;
421 static int hf_cisco_upoe_supported
;
422 static int hf_cisco_upoe_altb_detection
;
423 static int hf_cisco_upoe_req_spare_pair
;
424 static int hf_cisco_upoe_pse_spare_pair_oper
;
425 static int hf_cisco_aci_portstate
;
426 static int hf_cisco_aci_noderole
;
427 static int hf_cisco_aci_nodeid
;
428 static int hf_cisco_aci_spinelevel
;
429 static int hf_cisco_aci_podid
;
430 static int hf_cisco_aci_fabricname
;
431 static int hf_cisco_aci_apiclist
;
432 static int hf_cisco_aci_apicid
;
433 static int hf_cisco_aci_apicipv4
;
434 static int hf_cisco_aci_apicuuid
;
435 static int hf_cisco_aci_nodeip
;
436 static int hf_cisco_aci_portrole
;
437 static int hf_cisco_aci_version
;
438 static int hf_cisco_aci_fabricvlan
;
439 static int hf_cisco_aci_serialno
;
440 static int hf_cisco_aci_model
;
441 static int hf_cisco_aci_nodename
;
442 static int hf_cisco_aci_portmode
;
443 static int hf_cisco_aci_authcookie
;
444 static int hf_cisco_aci_apicmode
;
445 static int hf_cisco_aci_fabricid
;
446 static int hf_hytec_tlv_subtype
;
447 static int hf_hytec_group
;
448 static int hf_hytec_identifier
;
449 static int hf_hytec_transceiver_vendor_product_revision
;
450 static int hf_hytec_single_mode
;
451 static int hf_hytec_multi_mode_50
;
452 static int hf_hytec_multi_mode_62_5
;
453 static int hf_hytec_tx_current_output_power
;
454 static int hf_hytec_rx_current_input_power
;
455 static int hf_hytec_rx_input_snr
;
456 static int hf_hytec_lineloss
;
457 static int hf_hytec_mac_trace_request
;
458 static int hf_hytec_trace_mac_address
;
459 static int hf_hytec_request_mac_address
;
460 static int hf_hytec_maximum_depth
;
461 static int hf_hytec_mac_trace_reply
;
462 static int hf_hytec_answering_mac_address
;
463 static int hf_hytec_actual_depth
;
464 static int hf_hytec_name_of_replying_device
;
465 static int hf_hytec_outgoing_port_name
;
466 static int hf_hytec_ipv4_address_of_replying_device
;
467 static int hf_hytec_end_of_trace
;
468 static int hf_hytec_ipv6_address_of_replying_device
;
469 static int hf_hytec_incoming_port_name
;
470 static int hf_hytec_trace_identifier
;
471 static int hf_hytec_invalid_object_data
;
472 static int hf_hytec_unknown_identifier_content
;
473 static int hf_avaya_subtype
;
474 static int hf_avaya_poe
;
475 static int hf_avaya_call_server
;
476 static int hf_avaya_cna_server
;
477 static int hf_avaya_file_server
;
478 static int hf_avaya_dot1q
;
479 static int hf_avaya_ipphone
;
480 static int hf_avaya_ipphone_ip
;
481 static int hf_avaya_ipphone_mask
;
482 static int hf_avaya_ipphone_gateway
;
483 static int hf_unknown_subtype
;
484 static int hf_unknown_subtype_content
;
485 static int hf_subtype_content_remaining
;
486 static int hf_iana_subtype
;
487 static int hf_iana_mudurl
;
488 static int hf_onos_subtype
;
489 static int hf_onos_chassis
;
490 static int hf_onos_port
;
491 static int hf_onos_ttl
;
493 /* Initialize the subtree pointers */
495 static int ett_chassis_id
;
496 static int ett_port_id
;
497 static int ett_time_to_live
;
498 static int ett_end_of_lldpdu
;
499 static int ett_port_description
;
500 static int ett_system_name
;
501 static int ett_system_desc
;
502 static int ett_system_cap
;
503 static int ett_system_cap_summary
;
504 static int ett_system_cap_enabled
;
505 static int ett_management_address
;
506 static int ett_unknown_tlv
;
507 static int ett_org_spc_def
;
508 static int ett_org_spc_dcbx_cin
;
509 static int ett_org_spc_dcbx_cee
;
510 static int ett_org_spc_dcbx_cee_1
;
511 static int ett_org_spc_dcbx_cee_2
;
512 static int ett_org_spc_dcbx_cee_3
;
513 static int ett_org_spc_dcbx_cee_4
;
514 static int ett_org_spc_dcbx_cin_6
;
515 static int ett_org_spc_dcbx_cee_app
;
516 static int ett_org_spc_ieee_802_1_1
;
517 static int ett_org_spc_ieee_802_1_2
;
518 static int ett_org_spc_ieee_802_1_3
;
519 static int ett_org_spc_ieee_802_1_4
;
520 static int ett_org_spc_ieee_802_1_8
;
521 static int ett_org_spc_ieee_802_1_9
;
522 static int ett_org_spc_ieee_802_1_a
;
523 static int ett_org_spc_ieee_802_1_b
;
524 static int ett_org_spc_ieee_802_1_c
;
525 static int ett_org_spc_ieee_dcbx_app
;
527 static int ett_org_spc_ieee_802_3_1
;
528 static int ett_org_spc_ieee_802_3_2
;
529 static int ett_org_spc_ieee_802_3_3
;
530 static int ett_org_spc_ieee_802_3_4
;
531 static int ett_org_spc_ieee_802_3_5
;
532 static int ett_org_spc_ieee_802_3_7
;
534 static int ett_org_spc_media_1
;
535 static int ett_org_spc_media_2
;
536 static int ett_org_spc_media_3
;
537 static int ett_org_spc_media_4
;
538 static int ett_org_spc_media_5
;
539 static int ett_org_spc_media_6
;
540 static int ett_org_spc_media_7
;
541 static int ett_org_spc_media_8
;
542 static int ett_org_spc_media_9
;
543 static int ett_org_spc_media_10
;
544 static int ett_org_spc_media_11
;
546 static int ett_ex_avayaSubTypes_11
;
547 static int ett_ex_avayaSubTypes_12
;
548 static int ett_ex_avaya2SubTypes_4
;
549 static int ett_org_spc_ProfinetSubTypes_1
;
550 static int ett_org_spc_ProfinetSubTypes_2
;
551 static int ett_org_spc_ProfinetSubTypes_3
;
552 static int ett_org_spc_ProfinetSubTypes_4
;
553 static int ett_org_spc_ProfinetSubTypes_5
;
554 static int ett_org_spc_ProfinetSubTypes_6
;
555 static int ett_org_spc_tlv
;
556 static int ett_port_vlan_flags
;
557 static int ett_802_3_flags
;
558 static int ett_802_3_autoneg_advertised
;
559 static int ett_802_3_power
;
560 static int ett_802_3_bt_power
;
561 static int ett_802_3_bt_system_setup
;
562 static int ett_802_3_bt_autoclass
;
563 static int ett_802_3_bt_power_down
;
564 static int ett_802_3_aggregation
;
565 static int ett_802_1_aggregation
;
566 static int ett_802_1qbg_capabilities_flags
;
567 static int ett_802_3br_capabilities_flags
;
568 static int ett_media_capabilities
;
569 static int ett_profinet_period
;
570 static int ett_cisco_upoe_tlv
;
571 static int ett_avaya_ipphone_tlv
;
572 static int ett_org_spc_hytec_subtype_transceiver
;
573 static int ett_org_spc_hytec_subtype_trace
;
574 static int ett_org_spc_hytec_trace_request
;
575 static int ett_org_spc_hytec_trace_reply
;
577 static expert_field ei_lldp_bad_length
;
578 static expert_field ei_lldp_bad_length_excess
;
579 static expert_field ei_lldp_shutdown_excess_tlv
;
580 static expert_field ei_lldp_bad_type
;
581 static expert_field ei_lldp_tlv_deprecated
;
584 #define END_OF_LLDPDU_TLV_TYPE 0x00
585 #define CHASSIS_ID_TLV_TYPE 0x01 /* Mandatory */
586 #define PORT_ID_TLV_TYPE 0x02 /* Mandatory */
587 #define TIME_TO_LIVE_TLV_TYPE 0x03 /* Mandatory */
588 #define PORT_DESCRIPTION_TLV_TYPE 0x04
589 #define SYSTEM_NAME_TLV_TYPE 0x05
590 #define SYSTEM_DESCRIPTION_TLV_TYPE 0x06
591 #define SYSTEM_CAPABILITIES_TLV_TYPE 0x07
592 #define MANAGEMENT_ADDR_TLV_TYPE 0x08
593 #define ORGANIZATION_SPECIFIC_TLV_TYPE 0x7F
596 #define TLV_TYPE_MASK 0xFE00
597 #define TLV_TYPE(value) (((value) & TLV_TYPE_MASK) >> 9)
598 #define TLV_INFO_LEN_MASK 0x01FF
599 #define TLV_INFO_LEN(value) ((value) & TLV_INFO_LEN_MASK)
601 static const value_string tlv_types
[] = {
602 { END_OF_LLDPDU_TLV_TYPE
, "End of LLDPDU"},
603 { CHASSIS_ID_TLV_TYPE
, "Chassis Id"},
604 { PORT_ID_TLV_TYPE
, "Port Id"},
605 { TIME_TO_LIVE_TLV_TYPE
, "Time to Live"},
606 { PORT_DESCRIPTION_TLV_TYPE
, "Port Description"},
607 { SYSTEM_NAME_TLV_TYPE
, "System Name"},
608 { SYSTEM_DESCRIPTION_TLV_TYPE
, "System Description"},
609 { SYSTEM_CAPABILITIES_TLV_TYPE
, "System Capabilities"},
610 { MANAGEMENT_ADDR_TLV_TYPE
, "Management Address"},
611 { ORGANIZATION_SPECIFIC_TLV_TYPE
, "Organization Specific"},
615 static const value_string chassis_id_subtypes
[] = {
617 { 1, "Chassis component"},
618 { 2, "Interface alias"},
619 { 3, "Port component"},
621 { 5, "Network address"},
622 { 6, "Interface name"},
623 { 7, "Locally assigned"},
627 static const value_string porttype_values
[] = {
628 { 0, "Not specified"},
629 { 1, "From aggregation port"},
630 { 2, "From aggregator"},
631 { 3, "From single-port aggregator"},
635 static const value_string port_id_subtypes
[] = {
637 { 1, "Interface alias"},
638 { 2, "Port component"},
640 { 4, "Network address"},
641 { 5, "Interface name"},
642 { 6, "Agent circuit Id"},
643 { 7, "Locally assigned"},
647 static const value_string interface_subtype_values
[] = {
650 { 3, "System port number"},
654 static const value_string dcbx_protocol_types
[] = {
656 { 0x02, "1.01 CEE" },
660 static const value_string dcbx_subtypes
[] = {
661 { 0x01, "DCBx Control" },
662 { 0x02, "Priority Groups" },
663 { 0x03, "Priority-Based Flow Control" },
664 { 0x04, "Application Protocol" },
665 { 0x06, "Logical Link Down" },
669 static const value_string dcbx_app_selector
[] = {
671 { 1, "Socket Number" },
675 static const value_string dcbx_app_types
[] = {
682 static const value_string dcbx_llink_types
[] = {
683 { 0x0, "FCoE Status" },
684 { 0x1, "LAN Status" },
688 /* IEEE 802.1 Subtypes */
689 static const value_string ieee_802_1_subtypes
[] = {
690 { 0x01, "Port VLAN ID" }, /* 802.1Q - D.2.1 */
691 { 0x02, "Port and Protocol VLAN ID" }, /* 802.1Q - D.2.2 */
692 { 0x03, "VLAN Name" }, /* 802.1Q - D.2.3 */
693 { 0x04, "Protocol Identity" }, /* 802.1Q - D.2.4 */
694 { 0x05, "VID Usage Digest" }, /* 802.1Q - D.2.5 */
695 { 0x06, "Management VID" }, /* 802.1Q - D.2.6 */
696 { 0x07, "Link Aggregation" }, /* 802.1Q - D.2.7 */
697 { 0x08, "Congestion Notification" }, /* 802.1Q - D.2.8 */
698 { 0x09, "ETS Configuration" }, /* 802.1Q - D.2.9 */
699 { 0x0A, "ETS Recommendation" }, /* 802.1Q - D.2.10 */
700 { 0x0B, "Priority Flow Control Configuration" },/* 802.1Q - D.2.11 */
701 { 0x0C, "Application Protocol" }, /* 802.1Q - D.2.12 */
702 { 0x0D, "EVB" }, /* 802.1Q - D.2.13 */
703 { 0x0E, "CDCP" }, /* 802.1Q - D.2.14 */
704 { 0x0F, "Port extension" }, /* 802.1BR - B.2 */
705 { 0x10, "Application VLAN" }, /* 802.1Q - D.2.15 */
706 { 0x11, "LRP ECP Discovery" }, /* 802.1CS - C.2.1 */
707 { 0x12, "LRP TCP Discovery" }, /* 802.1CS - C.2.2 */
708 { 0x13, "Congestion Isolation" }, /* 802.1Qcz - D.2.15 */
709 { 0x14, "Topology Recognition" }, /* 802.1Qcz - D.2.16 */
713 static const value_string dcbx_ieee_8021az_tsa
[] = {
714 { 0, "Strict Priority" },
715 { 1, "Credit-Based Shaper" },
716 { 2, "Enhanced Transmission Selection" },
717 /* All other bits Reserved */
718 { 255, "Vendor Specific Algorithm" },
722 static const value_string dcbx_ieee_8021az_sf
[] = {
724 { 1, "Default or Ethertype" },
725 { 2, "Port over TCP/SCTP" },
726 { 3, "Port over UDP/DCCP" },
727 { 4, "Port over TCP/SCTP/UDP/DCCP" },
734 /* IEEE 802.3 Subtypes */
735 static const value_string ieee_802_3_subtypes
[] = {
736 { 0x01, "MAC/PHY Configuration/Status" },
737 { 0x02, "Power Via MDI" },
738 { 0x03, "Link Aggregation" },
739 { 0x04, "Maximum Frame Size" },
740 { 0x05, "EEE (Energy-Efficient Ethernet)" },
741 { 0x07, "IEEE 802.3br Additional Ethernet capabilities" },
746 static const value_string media_subtypes
[] = {
747 { 1, "Media Capabilities" },
748 { 2, "Network Policy" },
749 { 3, "Location Identification" },
750 { 4, "Extended Power-via-MDI" },
751 { 5, "Inventory - Hardware Revision" },
752 { 6, "Inventory - Firmware Revision" },
753 { 7, "Inventory - Software Revision" },
754 { 8, "Inventory - Serial Number" },
755 { 9, "Inventory - Manufacturer Name" },
756 { 10, "Inventory - Model Name" },
757 { 11, "Inventory - Asset ID" },
761 /* Media Class Values */
762 static const value_string media_class_values
[] = {
763 { 0, "Type Not Defined" },
764 { 1, "Endpoint Class I" },
765 { 2, "Endpoint Class II" },
766 { 3, "Endpoint Class III" },
767 { 4, "Network Connectivity" },
771 /* Media Application Types */
772 static const value_string media_application_type
[] = {
775 { 2, "Voice Signaling" },
776 { 3, "Guest Voice" },
777 { 4, "Guest Voice Signaling" },
778 { 5, "Softphone Voice" },
779 { 6, "Video Conferencing" },
780 { 7, "Streaming Video" },
781 { 8, "Video Signaling" },
785 /* PROFINET subtypes */
786 static const value_string profinet_subtypes
[] = {
787 { 1, "Measured Delay Values" },
788 { 2, "Port Status" },
790 { 4, "MRP Port Status" },
791 { 5, "Chassis MAC" },
792 { 6, "PTCP Status" },
793 { 7, "MauType Extension" },
794 { 8, "MRPIC Port Status" },
796 { 10, "TSN NME Management Address"},
797 { 11, "TSN NME Name UUID"},
798 { 12, "TSN NME Parameter UUID"},
799 { 13, "AS Working Clock"},
800 { 14, "AS Global Time"},
803 /* extreme avaya ap subtypes */
804 #define EX_AVAYA_SUBTYPE_ELEMENT_TLV 11
805 #define EX_AVAYA_SUBTYPE_ASSIGNMENT_TLV 12
806 static const value_string ex_avaya_subtypes
[] = {
807 { EX_AVAYA_SUBTYPE_ELEMENT_TLV
, "Extreme Fabric Attach Element TLV" },
808 { EX_AVAYA_SUBTYPE_ASSIGNMENT_TLV
, "Extreme Fabric Attach Assignment TLV" },
812 /* extreme avaya2 (fabric) subtypes */
813 #define EX_AVAYA2_SUBTYPE_ZTFv2_FC_TLV 4
814 static const value_string ex_avaya2_subtypes
[] = {
815 { EX_AVAYA2_SUBTYPE_ZTFv2_FC_TLV
, "Extreme Zero Touch Fabric v2 Fabric Connect TLV" },
820 /* https://github.com/opennetworkinglab/onos/blob/master/utils/misc/src/main/java/org/onlab/packet/LLDP.java */
821 #define ONOS_CHASSIS_TLV_TYPE 1
822 #define ONOS_PORT_TLV_TYPE 2
823 #define ONOS_TTL_TLV_TYPE 3
824 static const value_string onos_subtypes
[] = {
825 { ONOS_CHASSIS_TLV_TYPE
, "ONOS Chassis" },
826 { ONOS_PORT_TLV_TYPE
, "ONOS Port" },
827 { ONOS_TTL_TLV_TYPE
, "ONOS TTL" },
833 static const value_string cisco_subtypes
[] = {
834 /* UPOE: https://www.cisco.com/c/dam/en/us/solutions/collateral/workforce-experience/digital-building/digital-building-partner-guide.pdf */
835 { 0x01, "4-wire Power-via-MDI (UPOE)" },
837 { 0xc9, "ACI Port State" },
838 { 0xca, "ACI Node Role" },
839 { 0xcb, "ACI Node ID" },
840 { 0xcc, "ACI Spine Level" },
841 { 0xcd, "ACI Pod ID" },
842 { 0xce, "ACI Fabric Name" },
843 { 0xcf, "ACI Appliance Vector" },
844 { 0xd0, "ACI Node IP" },
845 { 0xd1, "ACI Port Role" },
846 { 0xd2, "ACI Firmware Version" },
847 { 0xd3, "ACI Infra VLAN" },
848 { 0xd4, "ACI Serial Number" },
849 { 0xd6, "ACI Model" },
850 { 0xd7, "ACI Node Name" },
851 { 0xd8, "ACI Port Mode" },
852 { 0xd9, "ACI Authentication Cookie" },
853 { 0xda, "ACI APIC-Mode" },
854 { 0xdb, "ACI Fabric ID" },
858 static const true_false_string tfs_desired_not_desired
= { "Desired", "Not Desired" };
860 static const value_string cisco_portstate_vals
[] = {
862 { 2, "Out of Service" },
866 static const value_string cisco_portrole_vals
[] = {
871 static const value_string cisco_portmode_vals
[] = {
873 { 1, "Recovery Mode" },
877 /* Guessing here, the output of apic show commands only has leaf and spine, and
878 those values are leaf=2, spine=3 (off by 1) */
879 static const value_string cisco_noderole_vals
[] = {
887 static const value_string cisco_apicmode_vals
[] = {
894 static const value_string avaya_subtypes
[] = {
895 { 1, "PoE Conservation Level Support" },
896 { 3, "Call Server IP Address" },
897 { 4, "IP Phone Addresses" },
898 { 5, "CNA Server IP Address" },
899 { 6, "File Server" },
900 { 7, "802.1Q Framing" },
904 /* Avaya 802.1Q Framing Subtypes */
905 static const value_string avaya_dot1q_subtypes
[] = {
912 static const value_string iana_subtypes
[] = {
913 { 1, "Manufacturer Usage Description URL" },
919 /* 802.3 Power Class */
920 static const value_string power_class_802_3
[] = {
929 /* 802.3bt Extended Power Class */
930 static const value_string power_class_ext_802_3_bt
[] = {
939 { 15, "Dual signature" },
943 /* 802.3 Power Pair */
944 static const value_string power_pair_802_3
[] = {
950 /* 802.3bt extended powering pairs */
951 static const value_string power_pairs_ext_802_3_bt
[] = {
953 { 1, "Alternative A" },
954 { 2, "Alternative B" },
955 { 3, "Both alternatives" },
959 /* 802.3 Power Type */
960 static const value_string power_type_802_3
[] = {
961 { 0, "Type 2 PSE Device" },
962 { 1, "Type 2 PD Device" },
963 { 2, "Type 1 PSE Device" },
964 { 3, "Type 1 PD Device" },
968 /* 802.3bt Extended Power Type */
969 static const value_string power_type_ext_802_3_bt
[] = {
970 { 0, "Type 3 PSE Device" },
971 { 1, "Type 4 PSE Device" },
972 { 2, "Type 3 single-signature PD Device" },
973 { 3, "Type 3 dual-signature PD Device" },
974 { 4, "Type 4 single-signature PD Device" },
975 { 5, "Type 4 dual-signature PD Device" },
976 { 6, "Reserved/Ignore" },
977 { 7, "Reserved/Ignore" },
981 /* 802.3bt Dual-signature Extended Power Class Mode A|B */
982 static const value_string power_type_ext_mode_ab_802_3_bt
[] = {
983 { 0, "Reserved/Ignore" },
989 { 6, "Reserved/Ignore" },
990 { 7, "Single-signature or 2-pair PD" },
994 /* 802.3bt extended PSE powering status */
995 static const value_string pse_powering_status_802_3_bt
[] = {
998 { 2, "4-pair single-signature" },
999 { 3, "4-pair dual-signature" },
1003 /* 802.3bt extended PD powering status */
1004 static const value_string pd_powered_status_802_3_bt
[] = {
1006 { 1, "Single-signature PD" },
1007 { 2, "2-pair dual-signature PD" },
1008 { 3, "4-pair dual-signature PD" },
1012 static const true_false_string tfs_ieee_802_3_pse_pd
= { "PSE", "PD" };
1013 static const true_false_string tfs_ieee_802_3_pd_load
= { "Isolated", "Not isolated" };
1014 static const true_false_string tfs_unknown_defined
= { "Unknown", "Defined" };
1017 static const value_string media_power_type
[] = {
1018 { 0, "PSE Device" },
1020 { 2, "PSE Device" },
1025 /* Power Priority */
1026 static const value_string media_power_priority
[] = {
1035 static const value_string media_power_pd_device
[] = {
1039 { 3, "PSE and Local" },
1042 static const value_string media_power_pse_device
[] = {
1044 { 1, "Primary Power Source" },
1045 { 2, "Backup Power Source" },
1049 /* Location data format */
1050 static const value_string location_data_format
[] = {
1052 { 1, "Coordinate-based LCI" },
1053 { 2, "Civic Address LCI" },
1059 static const value_string altitude_type
[] = {
1066 static const value_string datum_type_values
[] = {
1068 { 2, "NAD83 (Latitude, Longitude) + NAVD88" },
1069 { 3, "NAD83 (Latitude, Longitude) + MLLW" },
1073 /* Civic Address LCI - What field */
1074 static const value_string civic_address_what_values
[] = {
1075 { 0, "Location of the DHCP server" },
1076 { 1, "Location of the network element believed to be closest to the client" },
1077 { 2, "Location of the client"},
1081 /* Civic Address Type field */
1082 static const value_string civic_address_type_values
[] = {
1084 { 1, "National subdivisions (province, state, etc)" },
1085 { 2, "County, parish, district" },
1086 { 3, "City, township" },
1087 { 4, "City division, borough, ward" },
1088 { 5, "Neighborhood, block" },
1090 { 16, "Leading street direction" },
1091 { 17, "Trailing street suffix" },
1092 { 18, "Street suffix" },
1093 { 19, "House number" },
1094 { 20, "House number suffix" },
1095 { 21, "Landmark or vanity address" },
1096 { 22, "Additional location information" },
1098 { 24, "Postal/ZIP code" },
1102 { 28, "Room number" },
1103 { 29, "Place type" },
1109 * Define the text strings for the LLDP 802.3 MAC/PHY Configuration/Status
1110 * Operational MAU Type field.
1112 * These values are taken from the DESCRIPTION field of the dot3MauType
1113 * objects defined in RFC 4836
1116 /* from rfc 4836 dot3MauType */
1117 static const value_string operational_mau_type_values
[] = {
1118 { 0, "other or unknown" },
1119 /* rfc 1515 values */
1120 { 1, "AUI - no internal MAU, view from AUI" },
1121 { 2, "10Base5 - thick coax MAU" },
1122 { 3, "Foirl - FOIRL MAU" },
1123 { 4, "10Base2 - thin coax MAU" },
1124 { 5, "10BaseT - UTP MAU" },
1125 { 6, "10BaseFP - passive fiber MAU" },
1126 { 7, "10BaseFB - sync fiber MAU" },
1127 { 8, "10BaseFL - async fiber MAU" },
1128 { 9, "10Broad36 - broadband DTE MAU" },
1129 /* rfc 2239 updates */
1130 { 10, "10BaseTHD - UTP MAU, half duplex mode" },
1131 { 11, "10BaseTFD - UTP MAU, full duplex mode" },
1132 { 12, "10BaseFLHD - async fiber MAU, half duplex mode" },
1133 { 13, "10BaseFLDF - async fiber MAU, full duplex mode" },
1134 { 14, "10BaseT4 - 4 pair category 3 UTP" },
1135 { 15, "100BaseTXHD - 2 pair category 5 UTP, half duplex mode" },
1136 { 16, "100BaseTXFD - 2 pair category 5 UTP, full duplex mode" },
1137 { 17, "100BaseFXHD - X fiber over PMT, half duplex mode" },
1138 { 18, "100BaseFXFD - X fiber over PMT, full duplex mode" },
1139 { 19, "100BaseT2HD - 2 pair category 3 UTP, half duplex mode" },
1140 { 20, "100BaseT2DF - 2 pair category 3 UTP, full duplex mode" },
1141 /* rfc 2668 updates */
1142 { 21, "1000BaseXHD - PCS/PMA, unknown PMD, half duplex mode" },
1143 { 22, "1000BaseXFD - PCS/PMA, unknown PMD, full duplex mode" },
1144 { 23, "1000BaseLXHD - Fiber over long-wavelength laser, half duplex mode" },
1145 { 24, "1000BaseLXFD - Fiber over long-wavelength laser, full duplex mode" },
1146 { 25, "1000BaseSXHD - Fiber over short-wavelength laser, half duplex mode" },
1147 { 26, "1000BaseSXFD - Fiber over short-wavelength laser, full duplex mode" },
1148 { 27, "1000BaseCXHD - Copper over 150-Ohm balanced cable, half duplex mode" },
1149 { 28, "1000BaseCXFD - Copper over 150-Ohm balanced cable, full duplex mode" },
1150 { 29, "1000BaseTHD - Four-pair Category 5 UTP, half duplex mode" },
1151 { 30, "1000BaseTFD - Four-pair Category 5 UTP, full duplex mode" },
1152 /* rfc 3636 updates */
1153 { 31, "10GigBaseX - X PCS/PMA, unknown PMD." },
1154 { 32, "10GigBaseLX4 - X fiber over WWDM optics" },
1155 { 33, "10GigBaseR - R PCS/PMA, unknown PMD." },
1156 { 34, "10GigBaseER - R fiber over 1550 nm optics" },
1157 { 35, "10GigBaseLR - R fiber over 1310 nm optics" },
1158 { 36, "10GigBaseSR - R fiber over 850 nm optics" },
1159 { 37, "10GigBaseW - W PCS/PMA, unknown PMD." },
1160 { 38, "10GigBaseEW - W fiber over 1550 nm optics" },
1161 { 39, "10GigBaseLW - W fiber over 1310 nm optics" },
1162 { 40, "10GigBaseSW - W fiber over 850 nm optics" },
1163 /* rfc 4836 updates */
1164 { 41, "10GBASE-CX4 - X copper over 8 pair 100-Ohm balanced cable" },
1165 { 42, "2BASE-TL - Voice grade UTP copper, up to 2700m, optional PAF" },
1166 { 43, "10PASS-TS - Voice grade UTP copper, up to 750m, optional PAF" },
1167 { 44, "100BASE-BX10D - One single-mode fiber OLT, long wavelength, 10km" },
1168 { 45, "100BASE-BX10U - One single-mode fiber ONU, long wavelength, 10km" },
1169 { 46, "100BASE-LX10 - One single-mode fiber ONU, long wavelength, 10km" },
1170 { 47, "1000BASE-BX10D - One single-mode fiber OLT, long wavelength, 10km" },
1171 { 48, "1000BASE-BX10U - One single-mode fiber ONU, long wavelength, 10km" },
1172 { 49, "1000BASE-LX10 - Two single-mode fiber, long wavelength, 10km" },
1173 { 50, "1000BASE-PX10D - One single-mode fiber EPON OLT, 10km" },
1174 { 51, "1000BASE-PX10U - One single-mode fiber EPON ONU, 10km" },
1175 { 52, "1000BASE-PX20D - One single-mode fiber EPON OLT, 20km" },
1176 { 53, "1000BASE-PX20U - One single-mode fiber EPON ONU, 20km" },
1181 #define HYTEC_GROUP_MASK 0xE0
1182 #define HYTEC_GROUP_MASK_OFFSET 0
1183 #define HYTEC_GROUP_MASK_SIZE 3
1184 #define HYTEC_IDENTIFIER_MASK 0x1F
1185 #define HYTEC_IDENTIFIER_MASK_OFFSET HYTEC_GROUP_MASK_SIZE
1186 #define HYTEC_IDENTIFIER_MASK_SIZE 5
1188 /* Hytec Subtypes */
1189 #define HYTEC_SUBTYPE__TRANSCEIVER 1
1190 #define HYTEC_SUBTYPE__TRACE 2
1192 /* Hytec Transceiver Groups */
1193 #define HYTEC_TRANSG__TRANCEIVER_IDENTIFIER 1
1194 #define HYTEC_TRANSG__TRANSCEIVER_BRIDGEABLE_DISTANCE 2
1195 #define HYTEC_TRANSG__MEASUREMENT_DATA 3
1197 /* Hytec Trace Groups */
1198 #define HYTEC_TRACEG__MAC_TRACE 1
1200 /* Hytec Transceiver Identifiers */
1201 #define HYTEC_TID__VENDOR_PRODUCT_REVISION 1
1203 #define HYTEC_TID__VENDOR_PRODUCT_REVISION_STR "Transceiver vendor, product and revision"
1205 /* Hytec Transceiver Bridgeable Distance Values */
1206 #define HYTEC_TBD__SINGLE_MODE 1
1207 #define HYTEC_TBD__MULTI_MODE_50 2
1208 #define HYTEC_TBD__MULTI_MODE_62_5 3
1210 #define HYTEC_TBD__SINGLE_MODE_STR "Single mode (9/125 um)"
1211 #define HYTEC_TBD__MULTI_MODE_50_STR "Multi mode (50/125 um)"
1212 #define HYTEC_TBD__MULTI_MODE_62_5_STR "Multi mode (62.5/125 um)"
1215 /* Hytec Measurement Data Values */
1216 #define HYTEC_MD__TX_CURRENT_OUTPUT_POWER 1
1217 #define HYTEC_MD__RX_CURRENT_INPUT_POWER 2
1218 #define HYTEC_MD__RX_INPUT_SNR 3
1219 #define HYTEC_MD__LINELOSS 4
1221 #define HYTEC_MD__TX_CURRENT_OUTPUT_POWER_STR "Tx current output power"
1222 #define HYTEC_MD__RX_CURRENT_INPUT_POWER_STR "Rx current input power"
1223 #define HYTEC_MD__RX_INPUT_SNR_STR "Rx input SNR"
1224 #define HYTEC_MD__LINELOSS_STR "Lineloss"
1227 /* Hytec MAC Trace Values */
1228 #define HYTEC_MC__MAC_TRACE_REQUEST 1
1229 #define HYTEC_MC__MAC_TRACE_REPLY 2
1230 #define HYTEC_MC__NAME_OF_REPLYING_DEVICE 3
1231 #define HYTEC_MC__OUTGOING_PORT_NAME 4
1232 #define HYTEC_MC__IPV4_ADDRESS_OF_REPLYING_DEVICE 5
1233 #define HYTEC_MC__END_OF_TRACE 6
1234 #define HYTEC_MC__IPV6_ADDRESS_OF_REPLYING_DEVICE 7
1235 #define HYTEC_MC__INCOMING_PORT_NAME 8
1236 #define HYTEC_MC__TRACE_IDENTIFIER 9
1238 #define HYTEC_MC__MAC_TRACE_REQUEST_STR "MAC Trace Request"
1239 #define HYTEC_MC__MAC_TRACE_REPLY_STR "MAC Trace Reply"
1240 #define HYTEC_MC__NAME_OF_REPLYING_DEVICE_STR "Name of replying device"
1241 #define HYTEC_MC__OUTGOING_PORT_NAME_STR "Outgoing port name"
1242 #define HYTEC_MC__IPV4_ADDRESS_OF_REPLYING_DEVICE_STR "IPv4 address of replying device"
1243 #define HYTEC_MC__END_OF_TRACE_STR "End of Trace"
1244 #define HYTEC_MC__IPV6_ADDRESS_OF_REPLYING_DEVICE_STR "IPv6 address of replying device"
1245 #define HYTEC_MC__INCOMING_PORT_NAME_STR "Incoming port name"
1246 #define HYTEC_MC__TRACE_IDENTIFIER_STR "Trace identifier"
1249 static const value_string hytec_subtypes
[] = {
1250 {HYTEC_SUBTYPE__TRANSCEIVER
, "Transceiver"},
1251 {HYTEC_SUBTYPE__TRACE
, "Trace"},
1255 static const value_string hytec_transceiver_groups
[] = {
1256 {HYTEC_TRANSG__TRANCEIVER_IDENTIFIER
, "Transceiver identifier"},
1257 {HYTEC_TRANSG__TRANSCEIVER_BRIDGEABLE_DISTANCE
, "Transceiver bridgeable distance"},
1258 {HYTEC_TRANSG__MEASUREMENT_DATA
, "Measurement data"},
1262 static const value_string hytec_trace_groups
[] = {
1263 {HYTEC_TRACEG__MAC_TRACE
, "MAC Trace"},
1267 static const value_string hytec_tid
[] = {
1268 {HYTEC_TID__VENDOR_PRODUCT_REVISION
, HYTEC_TID__VENDOR_PRODUCT_REVISION_STR
},
1272 static const value_string hytec_tbd
[] = {
1273 {HYTEC_TBD__SINGLE_MODE
, HYTEC_TBD__SINGLE_MODE_STR
},
1274 {HYTEC_TBD__MULTI_MODE_50
, HYTEC_TBD__MULTI_MODE_50_STR
},
1275 {HYTEC_TBD__MULTI_MODE_62_5
, HYTEC_TBD__MULTI_MODE_62_5_STR
},
1279 static const value_string hytec_md
[] = {
1280 {HYTEC_MD__TX_CURRENT_OUTPUT_POWER
, HYTEC_MD__TX_CURRENT_OUTPUT_POWER_STR
},
1281 {HYTEC_MD__RX_CURRENT_INPUT_POWER
, HYTEC_MD__RX_CURRENT_INPUT_POWER_STR
},
1282 {HYTEC_MD__RX_INPUT_SNR
, HYTEC_MD__RX_INPUT_SNR_STR
},
1283 {HYTEC_MD__LINELOSS
, HYTEC_MD__LINELOSS_STR
},
1287 static const value_string hytec_mc
[] = {
1288 {HYTEC_MC__MAC_TRACE_REQUEST
, HYTEC_MC__MAC_TRACE_REQUEST_STR
},
1289 {HYTEC_MC__MAC_TRACE_REPLY
, HYTEC_MC__MAC_TRACE_REPLY_STR
},
1290 {HYTEC_MC__NAME_OF_REPLYING_DEVICE
, HYTEC_MC__NAME_OF_REPLYING_DEVICE_STR
},
1291 {HYTEC_MC__OUTGOING_PORT_NAME
, HYTEC_MC__OUTGOING_PORT_NAME_STR
},
1292 {HYTEC_MC__IPV4_ADDRESS_OF_REPLYING_DEVICE
, HYTEC_MC__IPV4_ADDRESS_OF_REPLYING_DEVICE_STR
},
1293 {HYTEC_MC__END_OF_TRACE
, HYTEC_MC__END_OF_TRACE_STR
},
1294 {HYTEC_MC__IPV6_ADDRESS_OF_REPLYING_DEVICE
, HYTEC_MC__IPV6_ADDRESS_OF_REPLYING_DEVICE_STR
},
1295 {HYTEC_MC__INCOMING_PORT_NAME
, HYTEC_MC__INCOMING_PORT_NAME_STR
},
1296 {HYTEC_MC__TRACE_IDENTIFIER
, HYTEC_MC__TRACE_IDENTIFIER_STR
},
1301 /* System Capabilities */
1302 #define SYSTEM_CAPABILITY_OTHER 0x0001
1303 #define SYSTEM_CAPABILITY_REPEATER 0x0002
1304 #define SYSTEM_CAPABILITY_BRIDGE 0x0004
1305 #define SYSTEM_CAPABILITY_WLAN 0x0008
1306 #define SYSTEM_CAPABILITY_ROUTER 0x0010
1307 #define SYSTEM_CAPABILITY_TELEPHONE 0x0020
1308 #define SYSTEM_CAPABILITY_DOCSIS 0x0040
1309 #define SYSTEM_CAPABILITY_STATION 0x0080
1310 #define SYSTEM_CAPABILITY_CVLAN 0x0100
1311 #define SYSTEM_CAPABILITY_SVLAN 0x0200
1312 #define SYSTEM_CAPABILITY_TPMR 0x0400
1314 /* Media Capabilities */
1315 #define MEDIA_CAPABILITY_LLDP 0x0001
1316 #define MEDIA_CAPABILITY_NETWORK_POLICY 0x0002
1317 #define MEDIA_CAPABILITY_LOCATION_ID 0x0004
1318 #define MEDIA_CAPABILITY_MDI_PSE 0x0008
1319 #define MEDIA_CAPABILITY_MDI_PD 0x0010
1320 #define MEDIA_CAPABILITY_INVENTORY 0x0020
1323 * Define constants for the LLDP 802.3 MAC/PHY Configuration/Status
1324 * PMD Auto-Negotiation Advertised Capability field.
1325 * These values are taken from the ifMauAutoNegCapAdvertisedBits
1326 * object defined in RFC 3636.
1329 #define AUTONEG_OTHER 0x8000 /* bOther(0), -- other or unknown */
1330 #define AUTONEG_10BASE_T 0x4000 /* b10baseT(1), -- 10BASE-T half duplex mode */
1331 #define AUTONEG_10BASET_FD 0x2000 /* b10baseTFD(2), -- 10BASE-T full duplex mode */
1332 #define AUTONEG_100BASE_T4 0x1000 /* b100baseT4(3), -- 100BASE-T4 */
1333 #define AUTONEG_100BASE_TX 0x0800 /* b100baseTX(4), -- 100BASE-TX half duplex mode */
1334 #define AUTONEG_100BASE_TXFD 0x0400 /* b100baseTXFD(5), -- 100BASE-TX full duplex mode */
1335 #define AUTONEG_100BASE_T2 0x0200 /* b100baseT2(6), -- 100BASE-T2 half duplex mode */
1336 #define AUTONEG_100BASE_T2FD 0x0100 /* b100baseT2FD(7), -- 100BASE-T2 full duplex mode */
1337 #define AUTONEG_FDX_PAUSE 0x0080 /* bFdxPause(8), -- PAUSE for full-duplex links */
1338 #define AUTONEG_FDX_APAUSE 0x0040 /* bFdxAPause(9), -- Asymmetric PAUSE for full-duplex links */
1339 #define AUTONEG_FDX_SPAUSE 0x0020 /* bFdxSPause(10), -- Symmetric PAUSE for full-duplex links */
1340 #define AUTONEG_FDX_BPAUSE 0x0010 /* bFdxBPause(11), -- Asymmetric and Symmetric PAUSE for full-duplex links */
1341 #define AUTONEG_1000BASE_X 0x0008 /* b1000baseX(12), -- 1000BASE-X, -LX, -SX, -CX half duplex mode */
1342 #define AUTONEG_1000BASE_XFD 0x0004 /* b1000baseXFD(13), -- 1000BASE-X, -LX, -SX, -CX full duplex mode */
1343 #define AUTONEG_1000BASE_T 0x0002 /* b1000baseT(14), -- 1000BASE-T half duplex mode */
1344 #define AUTONEG_1000BASE_TFD 0x0001 /* b1000baseTFD(15) -- 1000BASE-T full duplex mode */
1346 /* Some vendors interpreted the standard to invert the bitorder:
1347 * according to a IEEE ruling, this is now officially wrong.
1348 * See https://gitlab.com/wireshark/wireshark/-/issues/1455
1349 * for all the gory details
1352 #define INV_AUTONEG_OTHER 0x0001 /* bOther(0), -- other or unknown */
1353 #define INV_AUTONEG_10BASE_T 0x0002 /* b10baseT(1), -- 10BASE-T half duplex mode */
1354 #define INV_AUTONEG_10BASET_FD 0x0004 /* b10baseTFD(2), -- 10BASE-T full duplex mode */
1355 #define INV_AUTONEG_100BASE_T4 0x0008 /* b100baseT4(3), -- 100BASE-T4 */
1356 #define INV_AUTONEG_100BASE_TX 0x0010 /* b100baseTX(4), -- 100BASE-TX half duplex mode */
1357 #define INV_AUTONEG_100BASE_TXFD 0x0020 /* b100baseTXFD(5), -- 100BASE-TX full duplex mode */
1358 #define INV_AUTONEG_100BASE_T2 0x0040 /* b100baseT2(6), -- 100BASE-T2 half duplex mode */
1359 #define INV_AUTONEG_100BASE_T2FD 0x0080 /* b100baseT2FD(7), -- 100BASE-T2 full duplex mode */
1360 #define INV_AUTONEG_FDX_PAUSE 0x0100 /* bFdxPause(8), -- PAUSE for full-duplex links */
1361 #define INV_AUTONEG_FDX_APAUSE 0x0200 /* bFdxAPause(9), -- Asymmetric PAUSE for full-duplex links */
1362 #define INV_AUTONEG_FDX_SPAUSE 0x0400 /* bFdxSPause(10), -- Symmetric PAUSE for full-duplex links */
1363 #define INV_AUTONEG_FDX_BPAUSE 0x0800 /* bFdxBPause(11), -- Asymmetric and Symmetric PAUSE for full-duplex links */
1364 #define INV_AUTONEG_1000BASE_X 0x1000 /* b1000baseX(12), -- 1000BASE-X, -LX, -SX, -CX half duplex mode */
1365 #define INV_AUTONEG_1000BASE_XFD 0x2000 /* b1000baseXFD(13), -- 1000BASE-X, -LX, -SX, -CX full duplex mode */
1366 #define INV_AUTONEG_1000BASE_T 0x4000 /* b1000baseT(14), -- 1000BASE-T half duplex mode */
1367 #define INV_AUTONEG_1000BASE_TFD 0x8000 /* b1000baseTFD(15) -- 1000BASE-T full duplex mode */
1369 #define EVB_CAPA_STD 0x8000
1370 #define EVB_CAPA_RR 0x4000
1372 #define EVB_CAPA_RTE 0x0004
1373 #define EVB_CAPA_ECP 0x0002
1374 #define EVB_CAPA_VDP 0x0001
1376 /* IEEE 802.3br Additional Ethernet Capabilities flags */
1377 #define IEEE_802_3BR_AEC_SUPPORT 0x0001
1378 #define IEEE_802_3BR_AEC_ENABLE 0x0002
1379 #define IEEE_802_3BR_AEC_ACTIVE 0x0004
1380 #define IEEE_802_3BR_AEC_ADDFRAGSIZE 0x0018
1381 #define IEEE_802_3BR_AEC_RESERVED 0xFFE0
1383 #define MAX_MAC_LEN 6
1386 static const value_string profinet_port2_status_vals
[] = {
1388 { 1, "SYNCDATA_LOADED" },
1389 { 2, "RTCLASS2_UP" },
1391 /* all other bits reserved */
1395 static const value_string profinet_port3_status_vals
[] = {
1398 { 2, "RTCLASS3_UP" },
1399 { 3, "RTCLASS3_DOWN" },
1400 { 4, "RTCLASS3_RUN" },
1401 /* all other bits reserved */
1405 static const value_string profinet_port3_status_PreambleLength
[] = {
1406 { 0, "Seven octets" },
1410 static const value_string profinet_mrrt_port_status_vals
[] = {
1412 { 1, "MRRT_CONFIGURED" },
1414 /* all other bits reserved */
1417 static const value_string profinet_time_domain_number_vals
[] = {
1418 { 0x0000, "Global Time" },
1419 { 0x0001, "Global Time Redundant" },
1420 { 0x0020, "Working Clock" },
1421 { 0x0021, "Working Clock Redundant" },
1425 /* IEEE 802.1Qbg Subtypes */
1426 static const value_string ieee_802_1qbg_subtypes
[] = {
1434 mdi_power_base(char *buf
, uint32_t value
) {
1435 snprintf(buf
, ITEM_LABEL_LENGTH
, "%u.%u. Watt", value
/10, value
%10);
1439 media_power_base(char *buf
, uint32_t value
) {
1440 snprintf(buf
, ITEM_LABEL_LENGTH
, "%u mW", value
* 100);
1443 // Get absolute 2's complement value
1444 // Returns true if the value is negative (so if
1445 // it returns false, there is no conversion).
1446 // bitSize: number of bits of the variable.
1448 get2sComplementAbsoluteValue(uint64_t * value
, unsigned bitSize
){
1449 const uint64_t signMask
= INT64_C(0x1) << (bitSize
- 1);
1451 uint64_t signedMask
= INT64_C(0x1) << bitSize
;
1453 signedMask
= ~signedMask
;
1455 if(*value
& signMask
){
1456 *value
|= signedMask
; // sign propagation
1458 // Convert to absolute value
1467 getUint64MaskedValue(uint64_t value
, unsigned bitSize
){
1468 uint64_t mask
= INT64_C(0x1) << bitSize
;
1470 return value
& mask
;
1474 pow10_uint64(int exponent
){
1477 while(exponent
> 0){
1482 while(exponent
< 0){
1489 // Decode uint fractional variable
1491 convertFractionalToFixedSizeDecimal(uint64_t value
, unsigned fractionalBitSize
, unsigned numberOfDigitToDisplay
){
1492 const uint64_t resolution
= INT64_C(0x1) << fractionalBitSize
;
1493 // => 0x02000000 for 25-bits
1494 // => 0x00000100 for 8-bits
1496 const uint64_t fractionalPortionMask
= resolution
- 1;
1497 value
&= fractionalPortionMask
;
1499 // Maximum value for numberOfDigitToDisplay is :
1500 // log10(INT64_C(0xFFFFFFFFFFFFFFFF) / fractionalPortionMask);
1501 // => if result is stored in 32-bits, numberOfDigitToDisplay max = 9
1502 const uint64_t displayMultiplier
= pow10_uint64(numberOfDigitToDisplay
);
1503 value
*= displayMultiplier
;
1504 uint64_t moduloValue
= value
% resolution
;
1505 value
/= resolution
;
1506 if(moduloValue
>= (resolution
/2)){
1507 value
++; // rounded value
1514 /* Calculate Latitude and Longitude string */
1517 option = 0 -> Latitude
1518 option = 1 -> Longitude
1521 get_latitude_or_longitude(char *buf
, int option
, uint64_t unmasked_value
)
1523 /* The latitude and longitude are 34 bit fixed point value consisting
1524 of 9 bits of integer and 25 bits of fraction.
1525 When option is equal to 0, positive numbers are represent a location
1526 north of the equator and negative (2s complement) numbers are south of the equator.
1527 When option is equal to 1, positive values are east of the prime
1528 meridian and negative (2s complement) numbers are west of the prime meridian.
1529 Longitude values outside the range of -180 to 180 decimal degrees or latitude values
1530 outside the range of -90 to 90 degrees MUST be considered invalid.
1532 const unsigned variableBitSize
= 34;
1533 const unsigned fractionalBitSize
= 25;
1534 const uint64_t maxlatitude
= (INT64_C(0x1) << fractionalBitSize
) * INT64_C(90); // 90 degrees
1535 const uint64_t maxlongitude
= (INT64_C(0x1) << fractionalBitSize
) * INT64_C(180); // 180 degrees
1537 uint64_t masked_value
= getUint64MaskedValue(unmasked_value
, variableBitSize
); // get 34-bit value
1539 // Get absolute value of a 34-bit 2's variable
1540 // => value is 33-bit
1541 uint64_t absolute_value
= masked_value
;
1542 bool isNegative
= get2sComplementAbsoluteValue(&absolute_value
, variableBitSize
);
1544 // Get unsigned integer 8-bit value
1545 uint32_t integerPortion
= (uint32_t)(absolute_value
>> fractionalBitSize
);
1547 // Get fractional 25-bit value
1548 const unsigned numberOfDigitToDisplay
= 4;
1549 uint64_t fixedSizeDecimal
= convertFractionalToFixedSizeDecimal(absolute_value
, fractionalBitSize
, numberOfDigitToDisplay
);
1551 const char *direction
;
1552 const char *err_str
= "";
1554 // Latitude - north/south directions
1556 direction
= "South";
1558 direction
= "North";
1560 if(absolute_value
> maxlatitude
){
1561 err_str
= "[Error: value > 90 degrees] ";
1564 // Longitude - east/west directions
1570 if(absolute_value
> maxlongitude
){
1571 err_str
= "[Error: value > 180 degrees] ";
1575 const uint64_t fractionalMask
= (INT64_C(0x1) << fractionalBitSize
) - 1;
1577 // %04 correspond to numberOfDigitToDisplay
1578 snprintf(buf
, ITEM_LABEL_LENGTH
, "%s%u.%04" PRIu64
" degrees %s (0x%010" PRIX64
" - %u-bit integer part 0x%04" PRIX64
" / %u-bit fractional part 0x%08" PRIX64
")",
1580 integerPortion
, fixedSizeDecimal
, direction
, masked_value
,
1581 variableBitSize
- fractionalBitSize
, masked_value
>> fractionalBitSize
,
1582 fractionalBitSize
, masked_value
& fractionalMask
1587 latitude_base(char *buf
, uint64_t value
) {
1588 get_latitude_or_longitude(buf
, 0, value
);
1592 longitude_base(char *buf
, uint64_t value
) {
1593 get_latitude_or_longitude(buf
, 1, value
);
1597 altitude_base(char *buf
, uint32_t unmasked_value
) {
1599 // Altitude: A 30-bit value defined by the AType field.
1600 // In some cases, the altitude of the location might not be provided.
1601 // An Altitude Type value of zero indicates that the altitude is not
1602 // given to the client. In this case, the Altitude and Altitude
1603 // Uncertainty fields can contain any value and MUST be ignored.
1605 // If the Altitude Type has a value of one, altitude is measured in
1606 // meters, in relation to the zero set by the vertical datum. For AType
1607 // = 1, the altitude value is expressed as a 30-bit, fixed-point, two's
1608 // complement integer with 22 integer bits and 8 fractional bits.
1610 // A value of two for Altitude Type indicates that the altitude value is
1611 // measured in floors. Since altitude in meters may not be known within
1612 // a building, a floor indication may be more useful. For AType = 2,
1613 // the altitude value is expressed as a 30-bit, fixed-point, two's
1614 // complement integer with 22 integer bits and 8 fractional bits.
1616 // the altitude resolution (AltRes) value encodes the number of
1617 // high-order altitude bits that should be considered valid.
1618 // Values above 30 (decimal) are undefined and reserved.
1620 const unsigned variableBitSize
= 30;
1621 const unsigned fractionalBitSize
= 8;
1623 uint64_t masked_value
= getUint64MaskedValue(unmasked_value
, variableBitSize
); // get 30-bit value
1625 // Get absolute value of a 30-bit 2's variable
1626 // => value is 29-bit
1627 uint64_t absolute_value
= masked_value
;
1628 bool isNegative
= get2sComplementAbsoluteValue(&absolute_value
, variableBitSize
);
1630 // Get unsigned integer 8-bit value
1631 uint32_t integerPortion
= (uint32_t)(absolute_value
>> fractionalBitSize
);
1633 // Get fractional 8-bit value
1634 const unsigned numberOfDigitToDisplay
= 4;
1635 uint64_t fixedSizeDecimal
= convertFractionalToFixedSizeDecimal(absolute_value
, fractionalBitSize
, numberOfDigitToDisplay
);
1645 const uint64_t fractionalMask
= (INT64_C(0x1) << fractionalBitSize
) - 1;
1647 // %04 correspond to numberOfDigitToDisplay
1648 snprintf(buf
, ITEM_LABEL_LENGTH
, "%s%u.%04" PRIu64
" (0x%08" PRIX64
" - %u-bit integer part 0x%06" PRIX64
" / %u-bit fractional part 0x%02" PRIX64
")",
1649 sign
, integerPortion
, fixedSizeDecimal
, masked_value
,
1650 variableBitSize
- fractionalBitSize
, masked_value
>> fractionalBitSize
,
1651 fractionalBitSize
, masked_value
& fractionalMask
1656 latitude_or_longitude_resolution(char *buf
, uint8_t value
) {
1657 // formula, where x is the encoded integer value:
1658 // Uncertainty = 2 ^ ( 8 - x )
1660 int32_t masked_value
= value
& 0x3F;
1661 double resolution
= 1.0;
1662 int32_t i
= 8 - masked_value
;
1672 const char *err_str
= "";
1673 if(masked_value
> 34){
1674 err_str
= "[Error: value > 34] ";
1675 } else if(masked_value
< 2){
1676 err_str
= "[Warning: value < 2] ";
1679 snprintf(buf
, ITEM_LABEL_LENGTH
, "%s%lE degrees (%" PRIi32
")", err_str
, resolution
, masked_value
);
1683 altitude_resolution(char *buf
, uint8_t value
) {
1684 // The encoded altitude of 000000000000000010000110110011 decodes to
1685 // 33.69921875. The encoded uncertainty of 15 gives a value of 64;
1686 // therefore, the final uncertainty is 33.69921875 +/- 64 (or the range
1687 // from -30.30078125 to 97.69921875).
1688 // The amount of altitude uncertainty can be determined by the following
1689 // formula, where x is the encoded integer value:
1690 // Uncertainty = 2 ^ ( 21 - x )
1691 // = 2 ^ ( 21 - 15 ) = 2 ^ 6 = 64
1693 int32_t masked_value
= value
& 0x3F;
1694 double resolution
= 1.0;
1695 int32_t i
= 21 - masked_value
;
1705 const char *err_str
= "";
1706 if(masked_value
> 30){
1707 err_str
= "[Error: value > 34] ";
1708 } else if(masked_value
< 2){
1709 err_str
= "[Warning: value < 2] ";
1712 snprintf(buf
, ITEM_LABEL_LENGTH
, "%s%lf (%" PRIi32
")", err_str
, resolution
, masked_value
);
1716 /* Dissect Chassis Id TLV (Mandatory) */
1718 dissect_lldp_chassis_id(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint32_t offset
,
1719 profinet_lldp_column_info
*pn_lldp_column_info
)
1723 uint32_t dataLen
= 0;
1724 const char *strPtr
=NULL
;
1725 const char *idType
=NULL
;
1726 uint8_t addr_family
= 0;
1728 proto_tree
*chassis_tree
= NULL
;
1729 proto_item
*tf
= NULL
, *lf
= NULL
;
1732 tempShort
= tvb_get_ntohs(tvb
, offset
);
1733 tlvsubType
= TLV_TYPE(tempShort
);
1734 if (tlvsubType
!= CHASSIS_ID_TLV_TYPE
)
1736 proto_tree_add_expert_format(tree
, pinfo
, &ei_lldp_bad_type
, tvb
, offset
, TLV_INFO_LEN(tempShort
),
1737 "Invalid TLV type (0x%02X), expected ChassisID type (0x%02X)", tlvsubType
, CHASSIS_ID_TLV_TYPE
);
1742 /* Get tlv length */
1743 dataLen
= TLV_INFO_LEN(tempShort
);
1744 /* Get tlv subtype */
1745 tlvsubType
= tvb_get_uint8(tvb
, (offset
+2));
1747 /* Set chassis tree */
1748 chassis_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, (dataLen
+ 2), ett_chassis_id
, &tf
, "Chassis Subtype = %s",
1749 val_to_str_const(tlvsubType
, chassis_id_subtypes
, "Reserved" ));
1751 proto_tree_add_item(chassis_tree
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1752 lf
= proto_tree_add_item(chassis_tree
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1758 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length
,
1759 "Invalid Chassis ID Length (%u), expected > (2)", dataLen
);
1764 /* Get chassis id subtype */
1765 proto_tree_add_item(chassis_tree
, hf_chassis_id_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1771 case 4: /* MAC address */
1775 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length
,
1776 "Invalid Chassis ID Length (%u) for Type (%s), expected (7)", dataLen
, val_to_str_const(tlvsubType
, chassis_id_subtypes
, ""));
1781 strPtr
= tvb_ether_to_str(pinfo
->pool
, tvb
, offset
);
1782 proto_tree_add_item(chassis_tree
, hf_chassis_id_mac
, tvb
, offset
, 6, ENC_NA
);
1783 pn_lldp_column_info
->chassis_id_mac
= wmem_strdup(pinfo
->pool
, strPtr
);
1784 offset
+= (dataLen
- 1);
1787 case 5: /* Network address */
1789 /* Get network address family */
1790 proto_tree_add_item(chassis_tree
, hf_lldp_network_address_family
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1791 addr_family
= tvb_get_uint8(tvb
,offset
);
1797 /* Check for IPv4 or IPv6 */
1798 switch(addr_family
){
1801 strPtr
= tvb_ip_to_str(pinfo
->pool
, tvb
, offset
);
1803 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length
,
1804 "Invalid Chassis ID Length (%u) for Type (%s, %s), expected (6)", dataLen
, val_to_str_const(tlvsubType
, chassis_id_subtypes
, ""), val_to_str_const(addr_family
, afn_vals
, ""));
1808 proto_tree_add_item(chassis_tree
, hf_chassis_id_ip4
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1813 strPtr
= tvb_ip6_to_str(pinfo
->pool
, tvb
, offset
);
1815 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length
,
1816 "Invalid Chassis ID Length (%u) for Type (%s, %s), expected (18)", dataLen
, val_to_str_const(tlvsubType
, chassis_id_subtypes
, ""), val_to_str_const(addr_family
, afn_vals
, ""));
1820 proto_tree_add_item(chassis_tree
, hf_chassis_id_ip6
, tvb
, offset
, 16, ENC_NA
);
1824 strPtr
= tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
, (dataLen
-2));
1825 proto_tree_add_item(chassis_tree
, hf_chassis_id
, tvb
, offset
, (dataLen
-2), ENC_NA
);
1830 offset
+= (dataLen
- 2);
1833 case 1: /* Chassis component */
1834 case 2: /* Interface alias */
1835 case 3: /* Port component */
1836 case 6: /* Interface name */
1837 case 7: /* Locally assigned */
1842 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length_excess
,
1843 "Invalid Chassis ID Length (%u) for Type (%s), expected < (256)", dataLen
, val_to_str_const(tlvsubType
, chassis_id_subtypes
, ""));
1849 case 2: /* Interface alias */
1851 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, (dataLen
- 1));
1853 case 6: /* Interface name */
1855 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, (dataLen
- 1));
1857 case 7: /* Locally assigned */
1859 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, (dataLen
-1));
1860 pn_lldp_column_info
->chassis_id_locally_assigned
= wmem_strdup(pinfo
->pool
, strPtr
);
1862 case 1: /* Chassis component */
1864 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, (dataLen
- 1));
1866 case 3: /* Port component */
1868 strPtr
= tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
, (dataLen
-1));
1873 strPtr
= "Reserved";
1878 proto_tree_add_item(chassis_tree
, hf_chassis_id
, tvb
, offset
, (dataLen
-1), ENC_NA
);
1880 offset
+= (dataLen
- 1);
1885 if (column_info_selection
== DEFAULT_COLUMN_INFO
)
1887 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s/%s ", idType
, strPtr
);
1889 proto_item_append_text(tf
, ", Id: %s", strPtr
);
1894 /* Dissect Port Id TLV (Mandatory) */
1896 dissect_lldp_port_id(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint32_t offset
,
1897 profinet_lldp_column_info
*pn_lldp_column_info
)
1901 uint32_t dataLen
= 0;
1902 const char *strPtr
=NULL
;
1903 const char *idType
=NULL
;
1904 uint8_t addr_family
= 0;
1906 proto_tree
*port_tree
= NULL
;
1907 proto_item
*tf
= NULL
, *lf
= NULL
;
1910 tempShort
= tvb_get_ntohs(tvb
, offset
);
1911 tlvsubType
= TLV_TYPE(tempShort
);
1912 if (tlvsubType
!= PORT_ID_TLV_TYPE
)
1914 proto_tree_add_expert_format(tree
, pinfo
, &ei_lldp_bad_type
, tvb
, offset
, TLV_INFO_LEN(tempShort
),
1915 "Invalid Port ID (0x%02X), expected (0x%02X)", tlvsubType
, PORT_ID_TLV_TYPE
);
1920 /* Get tlv length and subtype */
1921 dataLen
= TLV_INFO_LEN(tempShort
);
1922 tlvsubType
= tvb_get_uint8(tvb
, (offset
+2));
1925 port_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, (dataLen
+ 2), ett_port_id
, &tf
, "Port Subtype = %s",
1926 val_to_str_const(tlvsubType
, port_id_subtypes
, "Unknown" ));
1928 proto_tree_add_item(port_tree
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1929 lf
= proto_tree_add_item(port_tree
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1934 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length
,
1935 "Invalid Port ID Length (%u), expected > (2)", dataLen
);
1940 /* Get port id subtype */
1941 proto_tree_add_item(port_tree
, hf_port_id_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1947 case 3: /* MAC address */
1950 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length
,
1951 "Invalid Port ID Length (%u) for Type (%s), expected (7)", dataLen
, val_to_str_const(tlvsubType
, port_id_subtypes
, ""));
1956 strPtr
= tvb_ether_to_str(pinfo
->pool
, tvb
, offset
);
1957 proto_tree_add_item(port_tree
, hf_port_id_mac
, tvb
, offset
, 6, ENC_NA
);
1959 offset
+= (dataLen
- 1);
1961 case 4: /* Network address */
1962 /* Get network address family */
1963 addr_family
= tvb_get_uint8(tvb
,offset
);
1964 proto_tree_add_item(port_tree
, hf_lldp_network_address_family
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1970 /* Check for IPv4 or IPv6 */
1971 switch(addr_family
){
1974 strPtr
= tvb_ip_to_str(pinfo
->pool
, tvb
, offset
);
1976 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length
,
1977 "Invalid Port ID Length (%u) for Type (%s, %s), expected (6)", dataLen
, val_to_str_const(tlvsubType
, port_id_subtypes
, ""), val_to_str_const(addr_family
, afn_vals
, ""));
1981 proto_tree_add_item(port_tree
, hf_port_id_ip4
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1986 strPtr
= tvb_ip6_to_str(pinfo
->pool
, tvb
, offset
);
1988 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length
,
1989 "Invalid Port ID Length (%u) for Type (%s, %s), expected (18)", dataLen
, val_to_str_const(tlvsubType
, port_id_subtypes
, ""), val_to_str_const(addr_family
, afn_vals
, ""));
1993 proto_tree_add_item(port_tree
, hf_port_id_ip6
, tvb
, offset
, 16, ENC_NA
);
1997 strPtr
= tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
, (dataLen
-2));
1998 proto_tree_add_item(port_tree
, hf_port_id
, tvb
, offset
, (dataLen
-2), ENC_ASCII
);
2003 offset
+= (dataLen
- 2);
2005 case 1: /* Interface alias */
2006 case 2: /* Port Component */
2007 case 5: /* Interface name */
2008 case 6: /* Agent circuit ID */
2009 case 7: /* Locally assigned */
2013 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length_excess
,
2014 "Invalid Port ID Length (%u) for Type (%s), expected < (256)", dataLen
, val_to_str_const(tlvsubType
, port_id_subtypes
, ""));
2020 case 1: /* Interface alias */
2022 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, (dataLen
- 1));
2024 case 2: /* Port component */
2026 strPtr
= tvb_bytes_to_str(pinfo
->pool
, tvb
, offset
, (dataLen
-1));
2028 case 5: /* Interface name */
2030 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, (dataLen
- 1));
2032 case 6: /* Agent circuit ID */
2034 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, (dataLen
- 1));
2036 case 7: /* Locally assigned */
2038 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, offset
, (dataLen
-1));
2039 pn_lldp_column_info
->port_id_locally_assigned
= wmem_strdup(pinfo
->pool
, strPtr
);
2043 strPtr
= "Reserved";
2047 proto_tree_add_item(port_tree
, hf_port_id
, tvb
, offset
, (dataLen
-1), ENC_ASCII
);
2049 offset
+= (dataLen
- 1);
2052 if (column_info_selection
== DEFAULT_COLUMN_INFO
)
2054 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s/%s ", idType
, strPtr
);
2056 proto_item_append_text(tf
, ", Id: %s", strPtr
);
2061 /* Dissect Time To Live TLV (Mandatory) */
2063 dissect_lldp_time_to_live(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint32_t offset
, uint16_t *isShutdown
)
2067 uint32_t dataLen
= 0;
2069 proto_tree
*time_to_live_tree
;
2073 tempShort
= tvb_get_ntohs(tvb
, offset
);
2074 tlvsubType
= TLV_TYPE(tempShort
);
2075 if (tlvsubType
!= TIME_TO_LIVE_TLV_TYPE
)
2078 /* Get tlv length and seconds field */
2079 dataLen
= TLV_INFO_LEN(tempShort
);
2080 tempShort
= tvb_get_ntohs(tvb
, (offset
+2));
2081 *isShutdown
= !tempShort
;
2083 /* LLDPDU types: IEEE 802.1AB-2016 9.1.2 */
2084 if (tempShort
!= 0) {
2085 time_to_live_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, dataLen
+ 2,
2086 ett_time_to_live
, NULL
, "Time To Live = %u sec", tempShort
);
2087 ti
= proto_tree_add_none_format(time_to_live_tree
, hf_pdu_type
, tvb
, offset
, dataLen
+ 2, "Normal LLDPDU");
2088 proto_item_set_generated(ti
);
2090 time_to_live_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, dataLen
+ 2,
2091 ett_time_to_live
, NULL
, "Discard all info for this MSAP (Time To Live = 0)");
2092 ti
= proto_tree_add_none_format(time_to_live_tree
, hf_pdu_type
, tvb
, offset
, dataLen
+ 2, "Shutdown LLDPDU");
2093 proto_item_set_generated(ti
);
2096 proto_tree_add_item(time_to_live_tree
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2097 proto_tree_add_item(time_to_live_tree
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2100 /* Display time to live information */
2101 proto_tree_add_item(time_to_live_tree
, hf_time_to_live
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2104 if (column_info_selection
== DEFAULT_COLUMN_INFO
) {
2105 if (tempShort
!= 0) {
2106 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%u ", tempShort
);
2108 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "%s ", "0 (Shutdown LLDPDU)");
2115 /* Dissect End of LLDPDU TLV */
2116 /* As of 802.1ab-2016 LLDP is defective by design. The End of LLDPDU was changed from its
2117 * previously mandatory state to optional. With nothing to indicate the length of the entire LLDPDU
2118 * and no marker to indicate the end of the LLDPDU there are now cases where it is not possible to
2119 * affirmatively determine that an LLDPDU has ended. Depending on where a capture is collected,
2120 * additional data may follow the LLDPDU (FCS, diagnostic trailers, non-zero padding, etc...)
2123 dissect_lldp_end_of_lldpdu(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, uint32_t offset
)
2129 proto_tree
*end_of_lldpdu_tree
, *lf
;
2131 /* Get tlv type and length */
2132 tempShort
= tvb_get_ntohs(tvb
, offset
);
2133 tlvType
= TLV_TYPE(tempShort
);
2135 /* Get tlv length */
2136 dataLen
= TLV_INFO_LEN(tempShort
);
2139 end_of_lldpdu_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, (dataLen
+ 2), ett_end_of_lldpdu
, NULL
, "End of LLDPDU");
2141 proto_tree_add_item(end_of_lldpdu_tree
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2142 lf
= proto_tree_add_item(end_of_lldpdu_tree
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2145 /* Either a corrupt / bad End of LLDPDU, or the start of something after an LLDPDU
2146 * without an End of LLDPDU TLV.
2147 * Add EI pointing out possible invalid End of LLDP, but do not consume bytes.
2148 * Any trailer, FCS, etc starting with 0x00 or 0x01 would be interpreted as an
2149 * End of LLDPDU. Chances are better that they belong to another dissector vs.
2150 * being a malformed End of LLDPDU (or other TLV).
2152 * It may be reasonable to add pref to consume the bytes anyway
2155 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length_excess
,
2156 "Invalid Length (%u) for Type (%s), expected (0)", dataLen
, val_to_str_const(tlvType
, tlv_types
, ""));
2164 /* Dissect Port Description TLV */
2166 dissect_lldp_port_desc(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, uint32_t offset
)
2169 uint32_t dataLen
= 0;
2172 proto_tree
*port_desc_tree
;
2174 /* Get tlv type and length */
2175 tempShort
= tvb_get_ntohs(tvb
, offset
);
2177 /* Get tlv length */
2178 dataLen
= TLV_INFO_LEN(tempShort
);
2180 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, (offset
+2), dataLen
);
2183 port_desc_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, (dataLen
+ 2),
2184 ett_port_description
, NULL
, "Port Description = %s", strPtr
);
2186 proto_tree_add_item(port_desc_tree
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2187 proto_tree_add_item(port_desc_tree
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2190 /* Display port description information */
2191 proto_tree_add_item(port_desc_tree
, hf_port_desc
, tvb
, offset
, dataLen
, ENC_ASCII
);
2198 /* Dissect System Name and description TLV */
2200 dissect_lldp_system_name(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, uint32_t offset
)
2203 uint32_t dataLen
= 0;
2207 proto_tree
*system_subtree
;
2209 /* Get tlv type and length */
2210 tempShort
= tvb_get_ntohs(tvb
, offset
);
2211 tlvsubType
= TLV_TYPE(tempShort
);
2213 /* Get tlv length */
2214 dataLen
= TLV_INFO_LEN(tempShort
);
2216 strPtr
= tvb_format_stringzpad(pinfo
->pool
, tvb
, (offset
+2), dataLen
);
2218 /* Set system name tree */
2219 if (tlvsubType
== SYSTEM_NAME_TLV_TYPE
) {
2220 system_subtree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, (dataLen
+ 2),
2221 ett_system_name
, NULL
, "System Name = %s", strPtr
);
2222 if (column_info_selection
== DEFAULT_COLUMN_INFO
)
2224 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "SysN=%s ", strPtr
);
2227 system_subtree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, (dataLen
+ 2),
2228 ett_system_desc
, NULL
, "System Description = %s", strPtr
);
2229 if (column_info_selection
== DEFAULT_COLUMN_INFO
)
2231 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "SysD=%s ", strPtr
);
2235 proto_tree_add_item(system_subtree
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2236 proto_tree_add_item(system_subtree
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2240 /* Display system name information */
2241 if (tlvsubType
== SYSTEM_NAME_TLV_TYPE
)
2242 proto_tree_add_item(system_subtree
, hf_lldp_tlv_system_name
, tvb
, offset
, dataLen
, ENC_ASCII
);
2244 proto_tree_add_item(system_subtree
, hf_lldp_tlv_system_desc
, tvb
, offset
, dataLen
, ENC_ASCII
);
2251 /* Dissect System Capabilities TLV */
2253 dissect_lldp_system_capabilities(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, uint32_t offset
)
2256 uint32_t dataLen
= 0;
2258 proto_tree
*system_capabilities_tree
;
2259 proto_tree
*capabilities_summary_tree
;
2260 proto_tree
*capabilities_enabled_tree
;
2263 /* Get tlv type and length */
2264 tempShort
= tvb_get_ntohs(tvb
, offset
);
2266 /* Get tlv length */
2267 dataLen
= TLV_INFO_LEN(tempShort
);
2269 /* Set system capabilities tree */
2270 system_capabilities_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, (dataLen
+ 2), ett_system_cap
, NULL
, "Capabilities");
2272 proto_tree_add_item(system_capabilities_tree
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2273 proto_tree_add_item(system_capabilities_tree
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2276 /* Display system capability information */
2277 tf
= proto_tree_add_item(system_capabilities_tree
, hf_lldp_tlv_system_cap
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2278 capabilities_summary_tree
= proto_item_add_subtree(tf
, ett_system_cap_summary
);
2280 /* Add capabilities to summary tree */
2281 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_other
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2282 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_repeater
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2283 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_bridge
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2284 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_wlan_access_pt
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2285 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_router
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2286 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_telephone
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2287 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_docsis_cable_device
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2288 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_station_only
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2289 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_cvlan_component
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2290 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_svlan_component
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2291 proto_tree_add_item(capabilities_summary_tree
, hf_lldp_tlv_system_cap_tpmr_component
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2294 /* Get enabled summary */
2296 /* Display system capability information */
2297 tf
= proto_tree_add_item(system_capabilities_tree
, hf_lldp_tlv_enable_system_cap
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2298 capabilities_enabled_tree
= proto_item_add_subtree(tf
, ett_system_cap_enabled
);
2299 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_other
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2300 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_repeater
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2301 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_bridge
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2302 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_wlan_access_pt
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2303 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_router
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2304 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_telephone
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2305 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_docsis_cable_device
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2306 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_station_only
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2307 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_cvlan_component
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2308 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_svlan_component
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2309 proto_tree_add_item(capabilities_enabled_tree
, hf_lldp_tlv_enable_system_cap_tpmr_component
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2316 /* Dissect Management Address TLV */
2318 dissect_lldp_management_address(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, uint32_t offset
)
2321 uint32_t dataLen
= 0;
2322 uint8_t subtypeByte
;
2323 uint8_t stringLen
= 0;
2325 proto_tree
*system_mgm_addr
;
2327 /* Get tlv type and length */
2328 tempShort
= tvb_get_ntohs(tvb
, offset
);
2330 /* Get tlv length */
2331 dataLen
= TLV_INFO_LEN(tempShort
);
2333 /* Set system capabilities tree */
2334 system_mgm_addr
= proto_tree_add_subtree(tree
, tvb
, offset
, (dataLen
+ 2), ett_management_address
, NULL
, "Management Address");
2336 proto_tree_add_item(system_mgm_addr
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2337 proto_tree_add_item(system_mgm_addr
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2341 /* Get management address string length */
2342 stringLen
= tvb_get_uint8(tvb
, offset
);
2343 proto_tree_add_item(system_mgm_addr
, hf_mgn_address_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2347 /* Get management address subtype */
2348 subtypeByte
= tvb_get_uint8(tvb
, offset
);
2349 proto_tree_add_item(system_mgm_addr
, hf_mgn_address_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2354 switch (subtypeByte
)
2356 /* XXX - Should we throw an exception if stringLen doesn't match our address length? */
2358 proto_tree_add_item(system_mgm_addr
, hf_mgn_addr_ipv4
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2361 proto_tree_add_item(system_mgm_addr
, hf_mgn_addr_ipv6
, tvb
, offset
, 16, ENC_NA
);
2364 proto_tree_add_item(system_mgm_addr
, hf_mgn_addr_hex
, tvb
, offset
, (stringLen
-1), ENC_NA
);
2368 offset
+= (stringLen
-1);
2370 /* Get interface numbering subtype */
2371 proto_tree_add_item(system_mgm_addr
, hf_mgn_interface_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2375 /* Get interface number */
2376 proto_tree_add_item(system_mgm_addr
, hf_mgn_interface_number
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2380 /* Get OID string length */
2381 stringLen
= tvb_get_uint8(tvb
, offset
);
2382 proto_tree_add_item(system_mgm_addr
, hf_mgn_oid_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2388 /* Get OID identifier */
2389 proto_tree_add_item(system_mgm_addr
, hf_mgn_obj_id
, tvb
, offset
, stringLen
, ENC_NA
);
2391 offset
+= stringLen
;
2397 /* Dissect DCBX TLVs */
2399 dissect_dcbx_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2402 uint32_t offset
= 0;
2403 uint8_t priomaskByte
, prioCounter
, appCount
= 0;
2407 proto_tree
*subtlv_tree
= NULL
;
2408 proto_tree
*apptlv_tree
= NULL
;
2410 proto_tree_add_item(tree
, hf_dcbx_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2414 /* One org specific OUI holds many DCBx TLVs */
2415 while (tvb_reported_length_remaining(tvb
, offset
) && tree
) {
2417 tempShort
= tvb_get_ntohs(tvb
, offset
);
2419 /* Get TLV type & len. Actual TLV len = len + 2 */
2420 subType
= TLV_TYPE(tempShort
);
2421 dataLen
= TLV_INFO_LEN(tempShort
);
2423 /* Write out common header fields first */
2426 case 0x1: /* Control */
2427 subtlv_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, dataLen
+ 2,
2428 ett_org_spc_dcbx_cee_1
, NULL
, "%s TLV", val_to_str_const(subType
, dcbx_subtypes
, "Unknown"));
2430 case 0x2: /* Priority Groups */
2431 subtlv_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, dataLen
+ 2,
2432 ett_org_spc_dcbx_cee_2
, NULL
, "%s TLV", val_to_str_const(subType
, dcbx_subtypes
, "Unknown"));
2435 subtlv_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, dataLen
+ 2,
2436 ett_org_spc_dcbx_cee_3
, NULL
, "%s TLV", val_to_str_const(subType
, dcbx_subtypes
, "Unknown"));
2438 case 0x4: /* Application */
2439 subtlv_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, dataLen
+ 2,
2440 ett_org_spc_dcbx_cee_4
, NULL
, "%s TLV", val_to_str_const(subType
, dcbx_subtypes
, "Unknown"));
2442 case 0x6: /* Logical Link Down */
2443 subtlv_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, dataLen
+ 2,
2444 ett_org_spc_dcbx_cin_6
, NULL
, "%s TLV", val_to_str_const(subType
, dcbx_subtypes
, "Unknown"));
2447 proto_tree_add_item(subtlv_tree
, hf_dcbx_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2448 proto_tree_add_item(subtlv_tree
, hf_dcbx_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2452 proto_tree_add_item(subtlv_tree
, hf_dcbx_tlv_oper_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2456 proto_tree_add_item(subtlv_tree
, hf_dcbx_tlv_max_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2460 if (subType
== 0x1) {
2461 /* Specific to Control TLV */
2462 proto_tree_add_item(subtlv_tree
, hf_dcbx_control_sequence
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2466 proto_tree_add_item(subtlv_tree
, hf_dcbx_control_ack
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2470 /* Common to all feature TLVs */
2471 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_flag_enabled
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2472 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_flag_willing
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2473 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_flag_error
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2477 /* Unused field, no connection to SubType used to identify TLVs */
2478 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2484 case 0x2: /* Priority Groups */
2486 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pgid_prio_0
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2487 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pgid_prio_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2488 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pgid_prio_2
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2489 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pgid_prio_3
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2493 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pgid_prio_4
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2494 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pgid_prio_5
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2495 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pgid_prio_6
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2496 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pgid_prio_7
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2500 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pg_per_0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2504 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pg_per_1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2508 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pg_per_2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2512 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pg_per_3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2516 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pg_per_4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2520 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pg_per_5
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2524 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pg_per_6
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2528 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pg_per_7
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2532 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pg_numtcs
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2540 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pfc_prio0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2541 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pfc_prio1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2542 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pfc_prio2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2543 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pfc_prio3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2544 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pfc_prio4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2545 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pfc_prio5
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2546 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pfc_prio6
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2547 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pfc_prio7
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2551 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_pfc_numtcs
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2557 case 0x4: /* Application */
2559 /* One App TLV can hold 4 byte header & multiple apps, each app takes 6 bytes */
2560 appCount
= (dataLen
- 4)/6;
2563 tempShort
= tvb_get_ntohs(tvb
, offset
);
2565 apptlv_tree
= proto_tree_add_subtree_format(subtlv_tree
, tvb
, offset
, 6,
2566 ett_org_spc_dcbx_cee_app
, NULL
, "%s Application",
2567 val_to_str_const(tempShort
, dcbx_app_types
, "Unknown"));
2569 proto_tree_add_item(apptlv_tree
, hf_dcbx_feature_app_proto
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2573 proto_tree_add_item(apptlv_tree
, hf_dcbx_feature_app_oui
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
2574 proto_tree_add_item(apptlv_tree
, hf_dcbx_feature_app_selector
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
2578 priomaskByte
= tvb_get_uint8(tvb
, offset
);
2580 for (prioCounter
= 0; prioCounter
< 8; prioCounter
++)
2581 if(priomaskByte
& (0x1 << prioCounter
)) {
2582 proto_tree_add_uint(apptlv_tree
, hf_dcbx_feature_app_prio
, tvb
, offset
, 1, prioCounter
);
2590 case 0x6: /* Logical Link Down */
2592 proto_tree_add_item(subtlv_tree
, hf_dcbx_feature_flag_llink_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2606 /* Dissect IEEE 802.1 TLVs */
2608 dissect_ieee_802_1_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2611 uint32_t offset
= 0;
2613 uint16_t dcbApp
, appCount
;
2615 proto_tree
*vlan_flags_tree
= NULL
;
2616 proto_tree
*mac_phy_flags
= NULL
;
2617 proto_tree
*apptlv_tree
= NULL
;
2618 proto_item
*tf
= NULL
;
2621 subType
= tvb_get_uint8(tvb
, offset
);
2623 proto_tree_add_item(tree
, hf_ieee_802_1_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2629 case 0x01: /* Port VLAN ID */
2631 proto_tree_add_item(tree
, hf_ieee_802_1_port_vlan_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2637 case 0x02: /* Port and Protocol VLAN ID */
2640 tf
= proto_tree_add_item(tree
, hf_ieee_802_1_port_and_vlan_id_flag
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2641 vlan_flags_tree
= proto_item_add_subtree(tf
, ett_port_vlan_flags
);
2643 proto_tree_add_item(vlan_flags_tree
, hf_ieee_802_1_port_and_vlan_id_flag_supported
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2644 proto_tree_add_item(vlan_flags_tree
, hf_ieee_802_1_port_and_vlan_id_flag_enabled
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2648 proto_tree_add_item(tree
, hf_ieee_802_1_port_proto_vlan_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2654 case 0x03: /* VLAN Name */
2656 proto_tree_add_item(tree
, hf_ieee_802_1_vlan_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2660 /* Get vlan name length */
2661 tempByte
= tvb_get_uint8(tvb
, offset
);
2662 proto_tree_add_item(tree
, hf_ieee_802_1_vlan_name_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2668 proto_tree_add_item(tree
, hf_ieee_802_1_vlan_name
, tvb
, offset
, tempByte
, ENC_ASCII
);
2675 case 0x04: /* Protocol ID */
2677 /* Get protocol id length */
2678 tempByte
= tvb_get_uint8(tvb
, offset
);
2679 proto_tree_add_item(tree
, hf_ieee_802_1_proto_id_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2686 * Section D.2.4.3 "protocol identity" of IEEE
2689 * The protocol identity field shall contain
2690 * the first n octets of the protocol after
2691 * the layer 2 addresses (i.e., for example,
2692 * starting with the EtherType field) that the
2693 * sender would like to advertise.
2695 * What comes "after the layer 2 addresses"
2696 * depends on the network type. For Ethernet,
2697 * it's a type/length field, with, if it's a
2698 * length field, an 802.2 LLC header, with,
2699 * if that header specifies SNAP, a SNAP header
2700 * following it. For other network types, it's
2701 * just going to be an 802.2 LLC header (presumably,
2702 * if the layer 2 addresses aren't immediately
2703 * before the 802.2 header, this doesn't include
2704 * the fields between the last layer 2 address
2705 * and the 802.2 header).
2707 * We currently just show it as a blob of bytes.
2709 proto_tree_add_item(tree
, hf_ieee_802_1_proto_id
, tvb
, offset
, tempByte
, ENC_NA
);
2716 case 0x07: /* Link Aggregation */
2718 /* Get protocol id length */
2719 tf
= proto_tree_add_item(tree
, hf_ieee_802_1_aggregation_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2720 mac_phy_flags
= proto_item_add_subtree(tf
, ett_802_1_aggregation
);
2721 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_1_aggregation_status_cap
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2722 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_1_aggregation_status_enabled
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2723 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_1_aggregation_status_porttype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2727 /* Get aggregated port id */
2728 proto_tree_add_item(tree
, hf_ieee_802_1_aggregated_port_id
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2733 case 0x8: /* Congestion Notification */
2735 /* Per-Priority CNPV Indicators */
2736 proto_tree_add_item(tree
, hf_ieee_8021qau_cnpv_prio0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2737 proto_tree_add_item(tree
, hf_ieee_8021qau_cnpv_prio1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2738 proto_tree_add_item(tree
, hf_ieee_8021qau_cnpv_prio2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2739 proto_tree_add_item(tree
, hf_ieee_8021qau_cnpv_prio3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2740 proto_tree_add_item(tree
, hf_ieee_8021qau_cnpv_prio4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2741 proto_tree_add_item(tree
, hf_ieee_8021qau_cnpv_prio5
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2742 proto_tree_add_item(tree
, hf_ieee_8021qau_cnpv_prio6
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2743 proto_tree_add_item(tree
, hf_ieee_8021qau_cnpv_prio7
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2747 /* Per-Priority Ready Indicators */
2748 proto_tree_add_item(tree
, hf_ieee_8021qau_ready_prio0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2749 proto_tree_add_item(tree
, hf_ieee_8021qau_ready_prio1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2750 proto_tree_add_item(tree
, hf_ieee_8021qau_ready_prio2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2751 proto_tree_add_item(tree
, hf_ieee_8021qau_ready_prio3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2752 proto_tree_add_item(tree
, hf_ieee_8021qau_ready_prio4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2753 proto_tree_add_item(tree
, hf_ieee_8021qau_ready_prio5
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2754 proto_tree_add_item(tree
, hf_ieee_8021qau_ready_prio6
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2755 proto_tree_add_item(tree
, hf_ieee_8021qau_ready_prio7
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2761 case 0x9: /* ETS Configuration */
2763 proto_tree_add_item(tree
, hf_ieee_8021az_feature_flag_willing
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2764 proto_tree_add_item(tree
, hf_ieee_8021az_feature_flag_cbs
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2766 tempByte
= (tvb_get_uint8(tvb
, offset
) & 0x7);
2767 /* 0 implies 8 traffic classes supported */
2768 proto_tree_add_uint_format_value(tree
, hf_ieee_8021az_maxtcs
, tvb
, offset
, 1, tempByte
, "%u (0x%X)", tempByte
? tempByte
: 8, tempByte
);
2772 /* Priority Assignment Table */
2773 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_0
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2774 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2775 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_2
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2776 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_3
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2780 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_4
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2781 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_5
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2782 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_6
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2783 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_7
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2787 /* TC Bandwidth Table */
2788 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2792 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2796 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2800 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2804 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2808 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_5
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2812 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_6
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2816 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_7
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2820 /* TSA Assignment Table */
2821 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2825 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2829 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2833 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2837 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2841 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class5
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2845 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class6
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2849 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class7
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2855 case 0xA: /* ETS Recommendation */
2857 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2861 /* Priority Assignment Table */
2862 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_0
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2863 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_1
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2864 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_2
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2865 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_3
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2869 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_4
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2870 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_5
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2871 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_6
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2872 proto_tree_add_item(tree
, hf_dcbx_feature_pgid_prio_7
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2876 /* TC Bandwidth Table */
2877 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2881 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2885 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2889 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2893 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2897 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_5
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2901 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_6
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2905 proto_tree_add_item(tree
, hf_dcbx_feature_pg_per_7
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2909 /* TSA Assignment Table */
2910 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2914 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2918 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2922 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2926 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2930 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class5
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2934 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class6
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2938 proto_tree_add_item(tree
, hf_ieee_8021az_tsa_class7
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2944 case 0xB: /* PFC Configuration */
2946 proto_tree_add_item(tree
, hf_ieee_8021az_feature_flag_willing
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2947 proto_tree_add_item(tree
, hf_ieee_8021az_feature_flag_mbc
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2948 proto_tree_add_item(tree
, hf_ieee_8021az_pfc_numtcs
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2952 proto_tree_add_item(tree
, hf_dcbx_feature_pfc_prio0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2953 proto_tree_add_item(tree
, hf_dcbx_feature_pfc_prio1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2954 proto_tree_add_item(tree
, hf_dcbx_feature_pfc_prio2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2955 proto_tree_add_item(tree
, hf_dcbx_feature_pfc_prio3
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2956 proto_tree_add_item(tree
, hf_dcbx_feature_pfc_prio4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2957 proto_tree_add_item(tree
, hf_dcbx_feature_pfc_prio5
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2958 proto_tree_add_item(tree
, hf_dcbx_feature_pfc_prio6
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2959 proto_tree_add_item(tree
, hf_dcbx_feature_pfc_prio7
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2965 case 0xC: /* Application Priority */
2967 proto_tree_add_item(tree
, hf_ieee_8021az_app_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2971 appCount
= tvb_reported_length_remaining(tvb
, offset
)/3;
2974 dcbApp
= tvb_get_ntohs(tvb
, offset
+ 1);
2976 apptlv_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 3,
2977 ett_org_spc_ieee_dcbx_app
, NULL
, "%s Application",
2978 val_to_str_const(dcbApp
, dcbx_app_types
, "Unknown"));
2980 proto_tree_add_item(apptlv_tree
, hf_ieee_8021az_app_prio
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2981 proto_tree_add_item(apptlv_tree
, hf_ieee_8021az_app_selector
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2985 proto_tree_add_item(apptlv_tree
, hf_dcbx_feature_app_proto
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2996 /* Dissect IEEE 802.1Qbg TLVs */
2998 dissect_oui_default_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3000 proto_tree_add_item(tree
, hf_unknown_subtype
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
3001 if (tvb_captured_length_remaining(tvb
, 1) > 0) {
3002 proto_tree_add_item(tree
, hf_unknown_subtype_content
, tvb
, 1, -1, ENC_NA
);
3007 dissect_ieee_802_1qbg_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3010 uint32_t offset
= 0;
3012 proto_tree
*evb_capabilities_subtree
= NULL
;
3014 proto_item
*tf
= NULL
;
3015 subType
= tvb_get_uint8(tvb
, offset
);
3017 proto_tree_add_item(tree
, hf_ieee_802_1qbg_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3023 /* Get EVB capabilities */
3024 tf
= proto_tree_add_item(tree
, hf_ieee_802_1qbg_evb_support_caps
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3025 evb_capabilities_subtree
= proto_item_add_subtree(tf
, ett_802_1qbg_capabilities_flags
);
3027 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_support_caps_std
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3028 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_support_caps_rr
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3029 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_support_caps_rte
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3030 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_support_caps_ecp
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3031 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_support_caps_vdp
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3035 tf
= proto_tree_add_item(tree
, hf_ieee_802_1qbg_evb_configure_caps
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3036 evb_capabilities_subtree
= proto_item_add_subtree(tf
, ett_802_1qbg_capabilities_flags
);
3038 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_configure_caps_std
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3039 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_configure_caps_rr
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3040 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_configure_caps_rte
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3041 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_configure_caps_ecp
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3042 proto_tree_add_item(evb_capabilities_subtree
, hf_ieee_802_1qbg_evb_configure_caps_vdp
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3046 proto_tree_add_item(tree
, hf_ieee_802_1qbg_evb_supported_vsi
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3050 proto_tree_add_item(tree
, hf_ieee_802_1qbg_evb_configured_vsi
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3054 proto_tree_add_item(tree
, hf_ieee_802_1qbg_evb_retrans_timer
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3063 /* Dissect extreme avaya ap tlv*/
3065 dissect_extreme_avaya_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, uint16_t dataLen
)
3068 uint32_t i
, loopCount
;
3069 uint32_t offset
= 0;
3073 ___________________________________________________________________________________________________________________________
3074 | TLV Type | TLV Length | Avaya OUI | Subtype | HMAC-SHA Digest | Element Type | State | Mgmt. VLAN | Rsvd | System ID |
3075 ----------------------------------------------------------------------------------------------------------------------------
3076 | 7 bits | 9 bits | 3 octets | 1 octet | 32 octets | 6 bits | 6 bits | 12 bits | 1 octet | 10 octets |
3077 ----------------------------------------------------------------------------------------------------------------------------
3080 __________________________________________________________________________________________________________
3081 | TLV Type | TLV Length | Avaya OUI | Subtype | HMAC-SHA Digest | Assignment Status | VLAN | I-SID |
3082 ----------------------------------------------------------------------------------------------------------
3083 | 7 bits | 9 bits | 3 octets | 1 octet | 32 octets | 4 bits | 12 bits | 3 octets |
3084 ----------------------------------------------------------------------------------------------------------
3088 subType
= tvb_get_uint8(tvb
, offset
);
3089 proto_tree_add_item(tree
, hf_ex_avaya_tlv_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3093 case EX_AVAYA_SUBTYPE_ELEMENT_TLV
: /* Element TLV */
3095 proto_tree_add_item(tree
, hf_ex_avaya_hmac_shi
, tvb
, offset
, 32, ENC_NA
);
3097 proto_tree_add_item(tree
, hf_ex_avaya_element_type
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3098 proto_tree_add_item(tree
, hf_ex_avaya_state
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3099 proto_tree_add_item(tree
, hf_ex_avaya_mgnt_vlan
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3101 proto_tree_add_item(tree
, hf_ex_avaya_rsvd
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3103 proto_tree_add_item(tree
, hf_ex_avaya_system_id
, tvb
, offset
, 10, ENC_NA
);
3107 case EX_AVAYA_SUBTYPE_ASSIGNMENT_TLV
: /* Assignment TLV */
3109 loopCount
= (dataLen
- 36) / 5;
3110 proto_tree_add_item(tree
, hf_ex_avaya_hmac_shi
, tvb
, offset
, 32, ENC_NA
);
3112 for ( i
=0; i
< loopCount
; i
++)
3114 proto_tree_add_item(tree
, hf_ex_avaya_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3115 proto_tree_add_item(tree
, hf_ex_avaya_vlan
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3117 proto_tree_add_item(tree
, hf_ex_avaya_i_sid
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3126 /* Dissect extreme avaya ap tlv*/
3128 dissect_extreme_avaya2_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3131 uint32_t numbvlans
, sysidlength
;
3132 uint32_t offset
= 0;
3136 _________________________________________________________________________________________________
3137 | TLV Type | TLV Length | Avaya OUI | Subtype | Num. BVLANs | BVLAN-ID*N | SysID Len | Sysid |
3138 -------------------------------------------------------------------------------------------------
3139 | 7 bits | 9 bits | 3 octets | 1 octet | 1 octet | 2 octets*N | 1 octet | octets*N |
3140 -------------------------------------------------------------------------------------------------
3144 subType
= tvb_get_uint8(tvb
, offset
);
3145 proto_tree_add_item(tree
, hf_ex_avaya2_tlv_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3148 case EX_AVAYA2_SUBTYPE_ZTFv2_FC_TLV
: /* Zero Touch Fabric v2 Fabric Connect TLV */
3149 proto_tree_add_item(tree
, hf_ex_avaya2_fabric_connect
, tvb
, offset
, 1, ENC_NA
);
3151 proto_tree_add_item_ret_uint(tree
, hf_ex_avaya2_fabric_numbvlans
, tvb
, offset
, 1, ENC_NA
, &numbvlans
);
3153 while (numbvlans
--) {
3154 proto_tree_add_item(tree
, hf_ex_avaya2_fabric_bvlanid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3157 proto_tree_add_item_ret_uint(tree
, hf_ex_avaya2_fabric_sysidlength
, tvb
, offset
, 1, ENC_NA
, &sysidlength
);
3159 proto_tree_add_item(tree
, hf_ex_avaya2_fabric_sysid
, tvb
, offset
, sysidlength
, ENC_NA
);
3160 offset
+= sysidlength
;
3166 /* Dissect IEEE 802.3 TLVs */
3168 dissect_ieee_802_3_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3171 uint32_t offset
= 0;
3173 uint16_t tlvLen
= tvb_reported_length(tvb
)-offset
;
3175 proto_tree
*mac_phy_flags
= NULL
;
3176 proto_tree
*autoneg_advertised_subtree
= NULL
;
3178 proto_item
*tf
= NULL
, *subitem
;
3181 subType
= tvb_get_uint8(tvb
, offset
);
3183 subitem
= proto_tree_add_item(tree
, hf_ieee_802_3_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3189 case 0x01: /* MAC/PHY Configuration/Status */
3191 /* Get auto-negotiation info */
3192 tf
= proto_tree_add_item(tree
, hf_ieee_802_3_mac_phy_auto_neg_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3193 mac_phy_flags
= proto_item_add_subtree(tf
, ett_802_3_flags
);
3195 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_mac_phy_auto_neg_status_supported
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3196 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_mac_phy_auto_neg_status_enabled
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3200 /* Get pmd auto-negotiation advertised capability */
3201 tf
= proto_tree_add_item(tree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3202 autoneg_advertised_subtree
= proto_item_add_subtree(tf
, ett_802_3_autoneg_advertised
);
3204 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_tfd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3205 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_t
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3206 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_xfd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3207 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_x
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3208 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_bpause
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3209 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_spause
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3210 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_apause
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3211 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_pause
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3212 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2fd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3213 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3214 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_txfd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3215 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_tx
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3216 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t4
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3217 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_tfd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3218 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_t
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3219 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_other
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3221 autoneg_advertised_subtree
= proto_tree_add_subtree(tree
, tvb
, offset
, 2, ett_802_3_autoneg_advertised
, NULL
, "Same in inverse (wrong) bitorder");
3223 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_tfd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3224 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_t
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3225 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_xfd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3226 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_x
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3227 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_bpause
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3228 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_spause
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3229 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_apause
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3230 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_pause
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3231 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2fd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3232 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3233 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_txfd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3234 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_tx
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3235 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t4
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3236 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_tfd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3237 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_t
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3238 proto_tree_add_item(autoneg_advertised_subtree
, hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_other
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3242 /* Get operational MAU type */
3243 proto_tree_add_item(tree
, hf_ieee_802_3_pmd_mau_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3249 case 0x02: /* MDI Power Support */
3251 /* Get MDI power support info */
3252 tf
= proto_tree_add_item(tree
, hf_ieee_802_3_mdi_power_support
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3253 mac_phy_flags
= proto_item_add_subtree(tf
, ett_802_3_power
);
3255 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_mdi_power_support_port_class
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3256 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_mdi_power_support_pse_power_support
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3257 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_mdi_power_support_pse_power_enabled
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3258 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_mdi_power_support_pse_pairs
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3262 /* Get PSE power pair */
3263 proto_tree_add_item(tree
, hf_ieee_802_3_mdi_power_pse_pair
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3267 /* Get power class */
3268 proto_tree_add_item(tree
, hf_ieee_802_3_mdi_power_class
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3275 /* Get first byte */
3276 tempByte
= tvb_get_uint8(tvb
, offset
);
3278 /* Determine power type */
3279 subType
= ((tempByte
& 0xC0) >> 6);
3280 proto_tree_add_item(tree
, hf_ieee_802_3_mdi_power_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3282 tf
= proto_tree_add_item(tree
, hf_ieee_802_3_mdi_power_source
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3284 /* Determine power source subtype */
3290 subType
= ((tempByte
& 0x30) >> 4);
3291 proto_item_append_text(tf
, " %s", val_to_str_const(subType
, media_power_pse_device
, "Reserved"));
3298 subType
= ((tempByte
& 0x30) >> 4);
3299 proto_item_append_text(tf
, " %s", val_to_str_const(subType
, media_power_pd_device
, "Reserved"));
3305 proto_item_append_text(tf
, " %s", "Unknown");
3311 /* Determine PD 4PID flag */
3312 proto_tree_add_item(tree
, hf_ieee_802_3_mdi_power_pd4pid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3314 /* Determine power priority */
3315 proto_tree_add_item(tree
, hf_ieee_802_3_mdi_power_priority
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3319 /* Power Value: 1 to 510 expected */
3320 proto_tree_add_item(tree
, hf_ieee_802_3_mdi_requested_power
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3324 /* Power Value: 1 to 510 expected */
3325 proto_tree_add_item(tree
, hf_ieee_802_3_mdi_allocated_power
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3329 if (tlvLen
== 26) { /* 802.3BT TLV Extensions */
3330 proto_tree_add_item(tree
, hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_a
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3333 proto_tree_add_item(tree
, hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_b
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3336 proto_tree_add_item(tree
, hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_a
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3339 proto_tree_add_item(tree
, hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_b
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3342 tf
= proto_tree_add_item(tree
, hf_ieee_802_3_bt_power_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3343 mac_phy_flags
= proto_item_add_subtree(tf
, ett_802_3_bt_power
);
3345 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_pse_powering_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3346 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_pd_powered_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3347 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_pse_power_pairs_ext
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3348 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_ds_pwr_class_ext_a
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3349 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_ds_pwr_class_ext_b
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3350 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_pwr_class_ext
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3353 tf
= proto_tree_add_item(tree
, hf_ieee_802_3_bt_system_setup
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3354 mac_phy_flags
= proto_item_add_subtree(tf
, ett_802_3_bt_system_setup
);
3356 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_power_type_ext
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3357 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_power_pd_load
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3360 proto_tree_add_item(tree
, hf_ieee_802_3_bt_pse_maximum_available_power_value
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3363 tf
= proto_tree_add_item(tree
, hf_ieee_802_3_bt_autoclass
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3364 mac_phy_flags
= proto_item_add_subtree(tf
, ett_802_3_bt_autoclass
);
3366 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_pse_autoclass_support
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3367 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_autoclass_completed
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3368 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_autoclass_request
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3369 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_autoclass_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3372 tf
= proto_tree_add_item(tree
, hf_ieee_802_3_bt_power_down
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3373 mac_phy_flags
= proto_item_add_subtree(tf
, ett_802_3_bt_power_down
);
3375 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_power_down_request
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3376 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_bt_power_down_time
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3381 case 0x03: /* Link Aggregation */
3383 /* Get aggregation status */
3384 expert_add_info(pinfo
, subitem
, &ei_lldp_tlv_deprecated
);
3385 tf
= proto_tree_add_item(tree
, hf_ieee_802_3_aggregation_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3386 mac_phy_flags
= proto_item_add_subtree(tf
, ett_802_3_aggregation
);
3387 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_aggregation_status_cap
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3388 proto_tree_add_item(mac_phy_flags
, hf_ieee_802_3_aggregation_status_enabled
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3392 /* Get aggregated port id */
3393 proto_tree_add_item(tree
, hf_ieee_802_3_aggregated_port_id
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3398 case 0x04: /* Maximum Frame Size */
3400 /* Get maximum frame size */
3401 proto_tree_add_item(tree
, hf_ieee_802_3_max_frame_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3406 case 0x05: /* Energy-Efficient Ethernet */
3408 proto_tree_add_item(tree
, hf_ieee_802_3_eee_transmit
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3411 proto_tree_add_item(tree
, hf_ieee_802_3_eee_receive
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3414 proto_tree_add_item(tree
, hf_ieee_802_3_eee_fallback_receive
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3417 proto_tree_add_item(tree
, hf_ieee_802_3_eee_echo_transmit
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3420 proto_tree_add_item(tree
, hf_ieee_802_3_eee_echo_receive
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3425 case 0x07: /* IEEE 802.3br Frame Preemption Protocol */
3427 static int * const preemption_capabilities
[] = {
3428 &hf_ieee_802_3br_aec_support
,
3429 &hf_ieee_802_3br_aec_enable
,
3430 &hf_ieee_802_3br_aec_active
,
3431 &hf_ieee_802_3br_aec_addfragsize
,
3432 &hf_ieee_802_3br_aec_reserved
,
3436 /* Get Additional Ethernet Capabilities */
3437 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_ieee_802_3br_aec
, ett_802_3br_capabilities_flags
, preemption_capabilities
, ENC_BIG_ENDIAN
);
3443 if(tvb_reported_length_remaining(tvb
, offset
)) {
3444 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length_excess
, tvb
, offset
, -1);
3449 /* Dissect Media TLVs */
3451 dissect_media_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
3453 uint16_t tlvLen
= tvb_reported_length(tvb
);
3455 uint32_t offset
= 0;
3457 uint32_t LCI_Length
;
3459 proto_tree
*media_flags
= NULL
;
3460 proto_item
*tf
= NULL
;
3462 subType
= tvb_get_uint8(tvb
, offset
);
3463 proto_tree_add_item(tree
, hf_media_tlv_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3469 case 1: /* LLDP-MED Capabilities */
3471 /* Get capabilities */
3474 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3478 tf
= proto_tree_add_item(tree
, hf_media_tlv_subtype_caps
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3479 media_flags
= proto_item_add_subtree(tf
, ett_media_capabilities
);
3480 proto_tree_add_item(media_flags
, hf_media_tlv_subtype_caps_llpd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3481 proto_tree_add_item(media_flags
, hf_media_tlv_subtype_caps_network_policy
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3482 proto_tree_add_item(media_flags
, hf_media_tlv_subtype_caps_location_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3483 proto_tree_add_item(media_flags
, hf_media_tlv_subtype_caps_mdi_pse
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3484 proto_tree_add_item(media_flags
, hf_media_tlv_subtype_caps_mid_pd
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3485 proto_tree_add_item(media_flags
, hf_media_tlv_subtype_caps_inventory
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3490 /* Get Class type */
3493 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3497 proto_tree_add_item(tree
, hf_media_tlv_subtype_class
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3504 case 2: /* Network Policy */
3506 /* Get application type */
3509 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3513 proto_tree_add_item(tree
, hf_media_application_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3521 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3525 proto_tree_add_item(tree
, hf_media_policy_flag
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3526 proto_tree_add_item(tree
, hf_media_tag_flag
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3529 proto_tree_add_item(tree
, hf_media_vlan_id
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3532 /* Get L2 priority */
3534 proto_tree_add_item(tree
, hf_media_l2_prio
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3536 /* Get DSCP value */
3537 proto_tree_add_item(tree
, hf_media_dscp
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3541 case 3: /* Location Identification */
3543 /* Get location data format */
3546 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3550 tempByte
= tvb_get_uint8(tvb
, offset
);
3551 proto_tree_add_item(tree
, hf_media_loc_data_format
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3558 case 1: /* Coordinate-based LCI */
3561 * See RFC 6225 (obsoletes RFC 3825).
3562 * XXX - should this be handled by the BOOTP
3563 * dissector, and exported to us?
3567 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3571 /* Get latitude resolution */
3572 proto_tree_add_item(tree
, hf_media_loc_lat_resolution
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3575 proto_tree_add_item(tree
, hf_media_loc_lat
, tvb
, offset
, 5, ENC_BIG_ENDIAN
);
3579 /* Get longitude resolution */
3580 proto_tree_add_item(tree
, hf_media_loc_long_resolution
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3583 proto_tree_add_item(tree
, hf_media_loc_long
, tvb
, offset
, 5, ENC_BIG_ENDIAN
);
3588 proto_tree_add_item(tree
, hf_media_loc_alt_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3590 /* Get Altitude Resolution */
3591 proto_tree_add_item(tree
, hf_media_loc_alt_resolution
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3596 proto_tree_add_item(tree
, hf_media_loc_alt
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3601 proto_tree_add_item(tree
, hf_media_loc_ver
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3604 proto_tree_add_item(tree
, hf_media_loc_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3607 proto_tree_add_item(tree
, hf_media_loc_datum
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3613 case 2: /* Civic Address LCI */
3616 * See draft-ietf-geopriv-dhcp-civil-07.
3617 * XXX - should this be handled by the BOOTP
3618 * dissector, and exported to us?
3622 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3626 /* Get LCI length */
3627 tempByte
= tvb_get_uint8(tvb
, offset
);
3629 if (tempByte
> tlvLen
)
3631 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length_excess
, tvb
, offset
, tlvLen
);
3636 proto_tree_add_item(tree
, hf_media_civic_lci_length
, tvb
, offset
, 1 , ENC_BIG_ENDIAN
);
3638 LCI_Length
= (uint32_t)tempByte
;
3642 /* Get what value */
3645 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3649 proto_tree_add_item(tree
, hf_media_civic_what
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3654 /* Get country code */
3657 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3661 proto_tree_add_item(tree
, hf_media_civic_country
, tvb
, offset
, 2, ENC_ASCII
);
3666 while (LCI_Length
> 0)
3669 proto_tree_add_item(tree
, hf_media_civic_addr_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3677 proto_tree_add_expert(tree
, pinfo
, &ei_lldp_bad_length
, tvb
, offset
, tlvLen
);
3680 tempByte
= tvb_get_uint8(tvb
, offset
);
3682 proto_tree_add_item(tree
, hf_media_civic_addr_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3687 /* Make sure the CA value is within the specified length */
3688 if (tempByte
> LCI_Length
)
3694 proto_tree_add_item(tree
, hf_media_civic_addr_value
, tvb
, offset
, tempByte
, ENC_ASCII
);
3697 LCI_Length
-= tempByte
;
3703 case 3: /* ECS ELIN */
3707 proto_tree_add_item(tree
, hf_media_ecs
, tvb
, offset
, tlvLen
, ENC_ASCII
);
3716 case 4: /* Extended Power-via-MDI */
3718 /* Get first byte */
3719 tempByte
= tvb_get_uint8(tvb
, offset
);
3721 /* Determine power type */
3722 subType
= ((tempByte
& 0xC0) >> 6);
3723 proto_tree_add_item(tree
, hf_media_power_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3725 tf
= proto_tree_add_item(tree
, hf_media_power_source
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3727 /* Determine power source */
3732 subType
= ((tempByte
& 0x30) >> 4);
3733 proto_item_append_text(tf
, " %s", val_to_str_const(subType
, media_power_pse_device
, "Reserved"));
3739 subType
= ((tempByte
& 0x30) >> 4);
3740 proto_item_append_text(tf
, " %s", val_to_str_const(subType
, media_power_pd_device
, "Reserved"));
3746 proto_item_append_text(tf
, " %s", "Unknown");
3751 /* Determine power priority */
3752 proto_tree_add_item(tree
, hf_media_power_priority
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3756 /* Power Value: 0 to 102.3 Watts (0.1 W increments) */
3757 proto_tree_add_item(tree
, hf_media_power_value
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3761 case 5: /* Hardware Revision */
3763 /* Figure out the length of the hardware revision field */
3766 proto_tree_add_item(tree
, hf_media_hardware
, tvb
, offset
, tlvLen
, ENC_ASCII
|ENC_NA
);
3771 case 6: /* Firmware Revision */
3773 /* Figure out the length of the firmware revision field */
3776 proto_tree_add_item(tree
, hf_media_firmware
, tvb
, offset
, tlvLen
, ENC_ASCII
|ENC_NA
);
3781 case 7: /* Software Revision */
3783 /* Figure out the length of the software revision field */
3786 proto_tree_add_item(tree
, hf_media_software
, tvb
, offset
, tlvLen
, ENC_ASCII
|ENC_NA
);
3791 case 8: /* Serial Number */
3793 /* Figure out the length of the serial number field */
3796 proto_tree_add_item(tree
, hf_media_sn
, tvb
, offset
, tlvLen
, ENC_ASCII
|ENC_NA
);
3801 case 9: /* Manufacturer Name */
3803 /* Figure out the length of the manufacturer name field */
3806 proto_tree_add_item(tree
, hf_media_manufacturer
, tvb
, offset
, tlvLen
, ENC_ASCII
|ENC_NA
);
3811 case 10: /* Model Name */
3813 /* Figure out the length of the model name field */
3816 proto_tree_add_item(tree
, hf_media_model
, tvb
, offset
, tlvLen
, ENC_ASCII
|ENC_NA
);
3821 case 11: /* Asset ID */
3823 /* Figure out the length of the asset id field */
3826 proto_tree_add_item(tree
, hf_media_asset
, tvb
, offset
, tlvLen
, ENC_ASCII
|ENC_NA
);
3838 dissect_profinet_period(tvbuff_t
*tvb
, proto_tree
*tree
, uint32_t offset
, const char *name
, int hf_valid
, int hf_value
)
3841 proto_tree
*period_tree
;
3843 period
= tvb_get_ntohl(tvb
, offset
);
3845 period_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4, ett_profinet_period
, NULL
, "%s: %s, %uns",
3846 name
, (period
& 0x80000000) ? "Valid" : "Invalid", period
& 0x7FFFFFFF);
3848 proto_tree_add_uint(period_tree
, hf_valid
, tvb
, offset
, 4, period
);
3849 proto_tree_add_uint(period_tree
, hf_value
, tvb
, offset
, 4, period
);
3856 select_source_of_name_of_station
3857 (packet_info
*pinfo _U_
, profinet_lldp_column_info
*pn_lldp_column_info
)
3859 if (pn_lldp_column_info
->chassis_id_locally_assigned
!= NULL
)
3861 pn_lldp_column_info
->is_nos_assigned
= true;
3862 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "NoS = %s ", pn_lldp_column_info
->chassis_id_locally_assigned
);
3866 if (pn_lldp_column_info
->chassis_id_mac
!= NULL
)
3868 pn_lldp_column_info
->is_nos_assigned
= true;
3869 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "NoS = %s ", pn_lldp_column_info
->chassis_id_mac
);
3875 set_name_of_station_for_profinet_specialized_column_info
3876 (packet_info
*pinfo _U_
, profinet_lldp_column_info
*pn_lldp_column_info
)
3878 const char *delimForProfinetv23
= ".";
3879 char* foundDot
= NULL
;
3880 char* tokenPortId
= NULL
;
3881 char* tokenNameOfStation
= NULL
;
3882 char* lldpPortIdCombinedWithNameOfStation
= NULL
;
3884 if (pn_lldp_column_info
->is_nos_assigned
!= true)
3886 if (pn_lldp_column_info
->port_id_locally_assigned
!= NULL
)
3888 foundDot
= strstr(pn_lldp_column_info
->port_id_locally_assigned
, delimForProfinetv23
);
3889 if (foundDot
!= NULL
)
3891 pn_lldp_column_info
->is_nos_assigned
= true;
3892 pn_lldp_column_info
->is_port_id_assigned
= true;
3893 lldpPortIdCombinedWithNameOfStation
= wmem_strdup(pinfo
->pool
, pn_lldp_column_info
->port_id_locally_assigned
);
3894 tokenPortId
= strtok(lldpPortIdCombinedWithNameOfStation
, delimForProfinetv23
);
3895 tokenNameOfStation
= strtok(NULL
, delimForProfinetv23
);
3896 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "NoS = %s ", tokenNameOfStation
);
3897 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Port Id = %s ", tokenPortId
);
3901 select_source_of_name_of_station(pinfo
, pn_lldp_column_info
);
3906 select_source_of_name_of_station(pinfo
, pn_lldp_column_info
);
3912 set_port_id_for_profinet_specialized_column_info
3913 (packet_info
*pinfo _U_
, profinet_lldp_column_info
*pn_lldp_column_info
)
3915 if (pn_lldp_column_info
->is_port_id_assigned
!= true)
3917 if (pn_lldp_column_info
->port_id_locally_assigned
!= NULL
)
3919 pn_lldp_column_info
->is_port_id_assigned
= true;
3920 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "Port Id = %s ", pn_lldp_column_info
->port_id_locally_assigned
);
3925 /* Dissect PROFINET TLVs */
3927 dissect_profinet_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, profinet_lldp_column_info
*pn_lldp_column_info
)
3930 uint32_t offset
= 0;
3931 proto_item
*tf
= NULL
;
3932 uint32_t class3_PortStatus
;
3933 uint32_t port_rx_delay_local
;
3934 uint32_t port_rx_delay_remote
;
3935 uint32_t port_tx_delay_local
;
3936 uint32_t port_tx_delay_remote
;
3937 uint32_t cable_delay_local
;
3941 subType
= tvb_get_uint8(tvb
, offset
);
3942 proto_tree_add_uint(tree
, hf_profinet_tlv_subtype
, tvb
, offset
, 1, subType
);
3945 if (column_info_selection
== PROFINET_SPECIAL_COLUMN_INFO
)
3947 set_name_of_station_for_profinet_specialized_column_info(pinfo
, pn_lldp_column_info
);
3948 set_port_id_for_profinet_specialized_column_info(pinfo
, pn_lldp_column_info
);
3953 case 1: /* LLDP_PNIO_DELAY */
3955 port_rx_delay_local
= tvb_get_ntohl(tvb
, offset
);
3956 tf
= proto_tree_add_uint(tree
, hf_profinet_port_rx_delay_local
, tvb
, offset
, 4, port_rx_delay_local
);
3957 if(port_rx_delay_local
) {
3958 proto_item_append_text(tf
, "ns");
3960 proto_item_append_text(tf
, " (unknown)");
3963 port_rx_delay_remote
= tvb_get_ntohl(tvb
, offset
);
3964 tf
= proto_tree_add_uint(tree
, hf_profinet_port_rx_delay_remote
, tvb
, offset
, 4, port_rx_delay_remote
);
3965 if(port_rx_delay_remote
) {
3966 proto_item_append_text(tf
, "ns");
3968 proto_item_append_text(tf
, " (unknown)");
3971 port_tx_delay_local
= tvb_get_ntohl(tvb
, offset
);
3972 tf
= proto_tree_add_uint(tree
, hf_profinet_port_tx_delay_local
, tvb
, offset
, 4, port_tx_delay_local
);
3973 if(port_tx_delay_local
) {
3974 proto_item_append_text(tf
, "ns");
3976 proto_item_append_text(tf
, " (unknown)");
3979 port_tx_delay_remote
= tvb_get_ntohl(tvb
, offset
);
3980 tf
= proto_tree_add_uint(tree
, hf_profinet_port_tx_delay_remote
, tvb
, offset
, 4, port_tx_delay_remote
);
3981 if(port_tx_delay_remote
) {
3982 proto_item_append_text(tf
, "ns");
3984 proto_item_append_text(tf
, " (unknown)");
3987 cable_delay_local
= tvb_get_ntohl(tvb
, offset
);
3988 tf
= proto_tree_add_uint(tree
, hf_profinet_cable_delay_local
, tvb
, offset
, 4, cable_delay_local
);
3989 if(cable_delay_local
) {
3990 proto_item_append_text(tf
, "ns");
3992 proto_item_append_text(tf
, " (unknown)");
3997 case 2: /* LLDP_PNIO_PORTSTATUS */
3999 proto_tree_add_item(tree
, hf_profinet_class2_port_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4001 proto_tree_add_item_ret_uint(tree
, hf_profinet_class3_port_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
, &class3_PortStatus
);
4002 proto_tree_add_item(tree
, hf_profinet_class3_port_status_reserved
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4003 proto_tree_add_item(tree
, hf_profinet_class3_port_status_Fragmentation
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4004 proto_tree_add_item(tree
, hf_profinet_class3_port_status_PreambleLength
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4006 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "RTClass3 Port Status = %s", val_to_str(class3_PortStatus
, profinet_port3_status_vals
, "Unknown %d"));
4010 /*case 3:*/ /* XXX - LLDP_PNIO_ALIAS */
4011 case 4: /* LLDP_PNIO_MRPPORTSTATUS */
4014 proto_tree_add_item(tree
, hf_profinet_mrp_domain_uuid
, tvb
, offset
, 16, ENC_BIG_ENDIAN
);
4017 /* MRRT PortStatus */
4018 proto_tree_add_item(tree
, hf_profinet_mrrt_port_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4022 case 5: /* LLDP_PNIO_CHASSIS_MAC */
4024 proto_tree_add_item(tree
, hf_profinet_cm_mac
, tvb
, offset
, 6, ENC_NA
);
4028 case 6: /* LLDP_PNIO_PTCPSTATUS */
4030 /* MasterSourceAddress */
4031 proto_tree_add_item(tree
, hf_profinet_master_source_address
, tvb
, offset
, 6, ENC_NA
);
4034 proto_tree_add_item(tree
, hf_profinet_subdomain_uuid
, tvb
, offset
, 16, ENC_BIG_ENDIAN
);
4037 proto_tree_add_item(tree
, hf_profinet_ir_data_uuid
, tvb
, offset
, 16, ENC_BIG_ENDIAN
);
4039 /* LengthOfPeriod */
4040 offset
= dissect_profinet_period(tvb
, tree
, offset
, "LengthOfPeriod",
4041 hf_profinet_length_of_period_valid
, hf_profinet_length_of_period_length
);
4042 /* RedPeriodBegin */
4043 offset
= dissect_profinet_period(tvb
, tree
, offset
, "RedPeriodBegin",
4044 hf_profinet_red_period_begin_valid
, hf_profinet_red_period_begin_offset
);
4045 /* OrangePeriodBegin */
4046 offset
= dissect_profinet_period(tvb
, tree
, offset
, "OrangePeriodBegin",
4047 hf_profinet_orange_period_begin_valid
, hf_profinet_orange_period_begin_offset
);
4048 /* GreenPeriodBegin */
4049 /*offset = */dissect_profinet_period(tvb
, tree
, offset
, "GreenPeriodBegin",
4050 hf_profinet_green_period_begin_valid
, hf_profinet_green_period_begin_offset
);
4053 case 9: /* LLDP_PNIO_TSNDOMAIN */
4056 proto_tree_add_item(tree
, hf_profinet_tsn_domain_uuid
, tvb
, offset
, 16, ENC_BIG_ENDIAN
);
4060 case 10: /* LLDP_PNIO_TSNNMEManagementAddr */
4062 uint8_t management_string_length
= 0;
4063 management_string_length
= tvb_get_uint8(tvb
, offset
);
4065 /* Management Address String Length */
4066 proto_tree_add_item(tree
, hf_profinet_tsn_nme_management_addr_str_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4069 /* Management Address Subtype */
4070 proto_tree_add_item(tree
, hf_profinet_tsn_nme_management_addr_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4072 management_string_length
-= 1;
4074 /* Management Address */
4075 proto_tree_add_item(tree
, hf_profinet_tsn_nme_management_addr
, tvb
, offset
, management_string_length
, ENC_NA
);
4076 /*offset += management_string_length;*/
4079 case 11: /* LLDP_PNIO_TSNNMENameUUID */
4081 /* TSNNMENameUUID */
4082 proto_tree_add_item(tree
, hf_profinet_tsn_nme_name_uuid
, tvb
, offset
, 16, ENC_BIG_ENDIAN
);
4086 case 12: /* LLDP_PNIO_TSNNMEParameterUUID */
4088 /* NMEParameterUUID */
4089 proto_tree_add_item(tree
, hf_profinet_tsn_nme_parameter_uuid
, tvb
, offset
, 16, ENC_BIG_ENDIAN
);
4093 case 13: /* LLDP_PNIO_TSNTimeDomain */
4095 /*TimeDomainNumber*/
4096 proto_tree_add_item(tree
, hf_profinet_time_domain_number
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4100 proto_tree_add_item(tree
, hf_profinet_time_domain_uuid
, tvb
, offset
, 16, ENC_BIG_ENDIAN
);
4103 /*TimeDomainMasterIdentity*/
4104 proto_tree_add_item(tree
, hf_profinet_time_domain_master_identity
, tvb
, offset
, 8, ENC_NA
);
4109 proto_tree_add_item(tree
, hf_unknown_subtype_content
, tvb
, offset
, -1, ENC_NA
);
4113 /* Dissect Cisco OUI TLVs */
4115 dissect_cisco_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
4118 uint32_t offset
= 0;
4119 unsigned length
= tvb_reported_length(tvb
);
4121 proto_tree
*upoe_data
= NULL
;
4122 proto_item
*tf
= NULL
;
4123 proto_item
*parent_item
= proto_tree_get_parent(tree
);
4125 if (tree
== NULL
) return;
4128 subType
= tvb_get_uint8(tvb
, offset
);
4130 proto_tree_add_item(tree
, hf_cisco_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4138 tf
= proto_tree_add_item(tree
, hf_cisco_upoe
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4139 upoe_data
= proto_item_add_subtree(tf
, ett_cisco_upoe_tlv
);
4140 proto_tree_add_item(upoe_data
, hf_cisco_upoe_supported
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4141 proto_tree_add_item(upoe_data
, hf_cisco_upoe_altb_detection
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4142 proto_tree_add_item(upoe_data
, hf_cisco_upoe_req_spare_pair
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4143 proto_tree_add_item(upoe_data
, hf_cisco_upoe_pse_spare_pair_oper
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4148 case 0xc9: // 201 port-state, uint8
4149 tf
= proto_tree_add_item(tree
, hf_cisco_aci_portstate
, tvb
, offset
, length
, ENC_NA
);
4150 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4154 case 0xca: // 202 node-role, uint8
4155 tf
= proto_tree_add_item(tree
, hf_cisco_aci_noderole
, tvb
, offset
, length
, ENC_NA
);
4156 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4160 case 0xcb: // 203 node-id, uint32
4161 tf
= proto_tree_add_item(tree
, hf_cisco_aci_nodeid
, tvb
, offset
, length
, ENC_BIG_ENDIAN
);
4162 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4166 case 0xcc: // 204 spine-level, uint8
4167 tf
= proto_tree_add_item(tree
, hf_cisco_aci_spinelevel
, tvb
, offset
, length
, ENC_NA
);
4168 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4172 case 0xcd: // 205 pod-id, uint16
4173 tf
= proto_tree_add_item(tree
, hf_cisco_aci_podid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4174 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4178 case 0xce: // 206 fabric-name, string
4179 tf
= proto_tree_add_item(tree
, hf_cisco_aci_fabricname
, tvb
, offset
, length
, ENC_ASCII
);
4180 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4184 case 0xcf: // 207 av (id, ip, uuid) (uint8, ipv4, string)
4185 proto_tree_add_item(tree
, hf_cisco_aci_apiclist
, tvb
, offset
, length
, ENC_NA
);
4186 while (length
> 0) {
4187 tf
= proto_tree_add_item(tree
, hf_cisco_aci_apicid
, tvb
, offset
, 1, ENC_NA
);
4188 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4191 proto_tree_add_item(tree
, hf_cisco_aci_apicipv4
, tvb
, offset
, 4, ENC_NA
);
4194 proto_tree_add_item(tree
, hf_cisco_aci_apicuuid
, tvb
, offset
, 36, ENC_ASCII
);
4199 case 0xd0: // 208 node-ip, ipv4
4200 tf
= proto_tree_add_item(tree
, hf_cisco_aci_nodeip
, tvb
, offset
, length
, ENC_NA
);
4201 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4205 case 0xd1: // 209 port-role, uint8
4206 tf
= proto_tree_add_item(tree
, hf_cisco_aci_portrole
, tvb
, offset
, length
, ENC_NA
);
4207 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4211 case 0xd2: // 210 fw-ver, string
4212 tf
= proto_tree_add_item(tree
, hf_cisco_aci_version
, tvb
, offset
, length
, ENC_ASCII
);
4213 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4217 case 0xd3: // 211 infra-vlan, uint16
4218 tf
= proto_tree_add_item(tree
, hf_cisco_aci_fabricvlan
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4219 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4223 case 0xd4: // 212 serial-number, string
4224 tf
= proto_tree_add_item(tree
, hf_cisco_aci_serialno
, tvb
, offset
, length
, ENC_ASCII
);
4225 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4230 case 0xd5: // 213 unused
4233 case 0xd6: // 214 model, string
4234 tf
= proto_tree_add_item(tree
, hf_cisco_aci_model
, tvb
, offset
, length
, ENC_ASCII
);
4235 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4239 case 0xd7: // 215 name, string
4240 tf
= proto_tree_add_item(tree
, hf_cisco_aci_nodename
, tvb
, offset
, length
, ENC_ASCII
);
4241 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4245 case 0xd8: // 216 port-mode, uint16
4246 tf
= proto_tree_add_item(tree
, hf_cisco_aci_portmode
, tvb
, offset
, length
, ENC_BIG_ENDIAN
);
4247 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4251 case 0xd9: // 217 authenticate-cookie, bytes
4252 tf
= proto_tree_add_item(tree
, hf_cisco_aci_authcookie
, tvb
, offset
, length
, ENC_NA
);
4253 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4257 case 0xda: // 218 standby-apic, uint8
4258 tf
= proto_tree_add_item(tree
, hf_cisco_aci_apicmode
, tvb
, offset
, length
, ENC_NA
);
4259 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4263 case 0xdb: // 219 fabric-id, uint16
4264 tf
= proto_tree_add_item(tree
, hf_cisco_aci_fabricid
, tvb
, offset
, length
, ENC_BIG_ENDIAN
);
4265 proto_item_append_text(parent_item
, ": %s", proto_item_get_display_repr(pinfo
->pool
, tf
));
4271 proto_tree_add_item(tree
, hf_unknown_subtype_content
, tvb
, offset
, length
, ENC_NA
);
4278 proto_tree_add_item(tree
, hf_subtype_content_remaining
, tvb
, offset
, length
, ENC_NA
);
4282 /* Dissect OUI HytecGer-TLV's */
4284 dissect_hytec_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
4286 uint8_t subtype
, group
, identifier
;
4287 int32_t bit_offset
, msg_len
, expected_data_length
, maximum_data_length
, temp_int32
;
4288 proto_tree
*hytec_data
= NULL
;
4289 proto_item
*tf
= NULL
;
4290 proto_item
*group_proto_item
, *identifier_proto_item
;
4291 float float_value
= 0.0f
;
4292 uint32_t offset
= 0;
4294 subtype
= tvb_get_uint8(tvb
, offset
);
4295 proto_tree_add_uint(tree
, hf_hytec_tlv_subtype
, tvb
, offset
, 1, subtype
);
4298 /* get the group and identifier of the chosen subtype */
4299 bit_offset
= (int32_t)(offset
*8);
4300 group
= tvb_get_bits8(tvb
, bit_offset
+ HYTEC_GROUP_MASK_OFFSET
, HYTEC_GROUP_MASK_SIZE
);
4301 identifier
= tvb_get_bits8(tvb
, bit_offset
+ HYTEC_IDENTIFIER_MASK_OFFSET
, HYTEC_IDENTIFIER_MASK_SIZE
);
4303 group_proto_item
= proto_tree_add_item(tree
, hf_hytec_group
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4304 identifier_proto_item
= proto_tree_add_item(tree
, hf_hytec_identifier
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4305 proto_item_append_text(identifier_proto_item
, " ("); /* a group dependent identifier description will be appended */
4308 msg_len
= tvb_reported_length_remaining(tvb
, offset
);
4312 case HYTEC_SUBTYPE__TRANSCEIVER
: /* Transceiver-Subtype */
4313 proto_item_append_text(group_proto_item
, " (%s)", val_to_str_const(group
, hytec_transceiver_groups
, "Unknown" ));
4317 case HYTEC_TRANSG__TRANCEIVER_IDENTIFIER
:
4318 proto_item_append_text(identifier_proto_item
, "%s", val_to_str_const(identifier
, hytec_tid
, "Unknown"));
4322 case HYTEC_TID__VENDOR_PRODUCT_REVISION
:
4323 maximum_data_length
= 64;
4324 if(0 < msg_len
&& msg_len
<= maximum_data_length
)
4325 proto_tree_add_item(tree
, hf_hytec_transceiver_vendor_product_revision
, tvb
, offset
, msg_len
, ENC_ASCII
);
4327 { /* unexpected length */
4328 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) is beyond valid range (1-%d)", val_to_str_const(identifier
, hytec_tid
, ""), msg_len
, maximum_data_length
);
4329 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4332 default: proto_tree_add_item(tree
, hf_hytec_unknown_identifier_content
, tvb
, offset
, -1, ENC_NA
); /* unknown identifier */
4333 } /* switch (identifier) */
4336 case HYTEC_TRANSG__TRANSCEIVER_BRIDGEABLE_DISTANCE
:
4337 expected_data_length
= 4;
4338 proto_item_append_text(identifier_proto_item
, "%s", val_to_str_const(identifier
, hytec_tbd
, "Unknown"));
4342 case HYTEC_TBD__SINGLE_MODE
:
4343 if(msg_len
== expected_data_length
)
4345 proto_tree_add_item(tree
, hf_hytec_single_mode
, tvb
, offset
, msg_len
, ENC_BIG_ENDIAN
);
4348 { /* unexpected length */
4349 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_tbd
, ""), msg_len
, expected_data_length
);
4350 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4353 case HYTEC_TBD__MULTI_MODE_50
:
4354 if(msg_len
== expected_data_length
)
4356 proto_tree_add_item(tree
, hf_hytec_multi_mode_50
, tvb
, offset
, msg_len
, ENC_BIG_ENDIAN
);
4359 { /* unexpected length */
4360 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_tbd
, ""), msg_len
, expected_data_length
);
4361 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4364 case HYTEC_TBD__MULTI_MODE_62_5
:
4365 if(msg_len
== expected_data_length
)
4367 proto_tree_add_item(tree
, hf_hytec_multi_mode_62_5
, tvb
, offset
, msg_len
, ENC_BIG_ENDIAN
);
4370 { /* unexpected length */
4371 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_tbd
, ""), msg_len
, expected_data_length
);
4372 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4375 default: proto_tree_add_item(tree
, hf_hytec_unknown_identifier_content
, tvb
, offset
, -1, ENC_NA
); /* unknown identifier */
4376 } /* switch (identifier) */
4378 case HYTEC_TRANSG__MEASUREMENT_DATA
:
4379 expected_data_length
= 4;
4380 proto_item_append_text(identifier_proto_item
, "%s", val_to_str_const(identifier
, hytec_md
, "Unknown"));
4384 case HYTEC_MD__TX_CURRENT_OUTPUT_POWER
:
4385 if(msg_len
== expected_data_length
)
4387 temp_int32
= tvb_get_ntohil(tvb
, offset
);
4388 float_value
= (float) 0.1 * (float) temp_int32
;
4389 proto_tree_add_float(tree
, hf_hytec_tx_current_output_power
, tvb
, offset
, msg_len
, float_value
);
4392 { /* unexpected length */
4393 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_md
, ""), msg_len
, expected_data_length
);
4394 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4397 case HYTEC_MD__RX_CURRENT_INPUT_POWER
:
4398 if(msg_len
== expected_data_length
)
4400 temp_int32
= tvb_get_ntohil(tvb
, offset
);
4401 float_value
= (float) 0.1 * (float) temp_int32
;
4402 proto_tree_add_float(tree
, hf_hytec_rx_current_input_power
, tvb
, offset
, msg_len
, float_value
);
4405 { /* unexpected length */
4406 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_md
, ""), msg_len
, expected_data_length
);
4407 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4410 case HYTEC_MD__RX_INPUT_SNR
:
4411 if(msg_len
== expected_data_length
)
4413 temp_int32
= tvb_get_ntohil(tvb
, offset
);
4414 if(temp_int32
< 0) float_value
= (float)-1.0 * (float)((~temp_int32
) >> 8);
4415 else float_value
= (float) (temp_int32
>> 8);
4416 float_value
+= (float)(temp_int32
& 0xFF) * (float)0.00390625; /* 0.00390625 == 0.5 ^ 8 */
4417 proto_tree_add_float(tree
, hf_hytec_rx_input_snr
, tvb
, offset
, msg_len
, float_value
);
4420 { /* unexpected length */
4421 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_md
, ""), msg_len
, expected_data_length
);
4422 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4425 case HYTEC_MD__LINELOSS
:
4426 if(msg_len
== expected_data_length
)
4428 temp_int32
= tvb_get_ntohil(tvb
, offset
);
4429 if(temp_int32
< 0) float_value
= (float)-1.0 * (float)((~temp_int32
) >> 8);
4430 else float_value
= (float) (temp_int32
>> 8);
4431 float_value
+= (float)(temp_int32
& 0xFF) * (float)0.00390625; /* 0.5 ^ 8 */
4432 proto_tree_add_float(tree
, hf_hytec_lineloss
, tvb
, offset
, msg_len
, float_value
);
4435 { /* unexpected length */
4436 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_md
, ""), msg_len
, expected_data_length
);
4437 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4440 default: proto_tree_add_item(tree
, hf_hytec_unknown_identifier_content
, tvb
, offset
, -1, ENC_NA
); /* unknown identifier */
4441 } /* switch (identifier) */
4443 default: /* unknown group */
4444 /* identifier considered also unknown */
4445 proto_item_append_text(identifier_proto_item
, "Unknown");
4446 proto_tree_add_item(tree
, hf_hytec_unknown_identifier_content
, tvb
, offset
, -1, ENC_NA
);
4447 } /* switch (group) */
4449 case HYTEC_SUBTYPE__TRACE
: /* Trace-Subtype */
4450 proto_item_append_text(group_proto_item
, " (%s)", val_to_str_const(group
, hytec_trace_groups
, "Unknown"));
4454 case HYTEC_TRACEG__MAC_TRACE
:
4455 proto_item_append_text(identifier_proto_item
, "%s", val_to_str_const(identifier
, hytec_mc
, "Unknown"));
4459 case HYTEC_MC__MAC_TRACE_REQUEST
:
4460 expected_data_length
= 13;
4461 if(msg_len
== expected_data_length
)
4463 tf
= proto_tree_add_item(tree
, hf_hytec_mac_trace_request
, tvb
, offset
, -1, ENC_NA
);
4464 hytec_data
= proto_item_add_subtree(tf
, ett_org_spc_hytec_trace_request
);
4465 proto_tree_add_item(hytec_data
, hf_hytec_trace_mac_address
, tvb
, offset
, 6, ENC_NA
);
4467 proto_tree_add_item(hytec_data
, hf_hytec_request_mac_address
, tvb
, offset
, 6, ENC_NA
);
4469 proto_tree_add_item(hytec_data
, hf_hytec_maximum_depth
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4473 { /* unexpected length */
4474 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_mc
, ""), msg_len
, expected_data_length
);
4475 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4478 case HYTEC_MC__MAC_TRACE_REPLY
:
4479 expected_data_length
= 13;
4480 if(msg_len
== expected_data_length
)
4482 tf
= proto_tree_add_item(tree
, hf_hytec_mac_trace_reply
, tvb
, offset
, -1, ENC_NA
);
4483 hytec_data
= proto_item_add_subtree(tf
, ett_org_spc_hytec_trace_reply
);
4484 proto_tree_add_item(hytec_data
, hf_hytec_trace_mac_address
, tvb
, offset
, 6, ENC_NA
);
4486 proto_tree_add_item(hytec_data
, hf_hytec_answering_mac_address
, tvb
, offset
, 6, ENC_NA
);
4488 proto_tree_add_item(hytec_data
, hf_hytec_actual_depth
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4492 { /* unexpected length */
4493 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_mc
, ""), msg_len
, expected_data_length
);
4494 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4497 case HYTEC_MC__NAME_OF_REPLYING_DEVICE
:
4498 maximum_data_length
= 64;
4499 if(0 < msg_len
&& msg_len
<= maximum_data_length
) proto_tree_add_item(tree
, hf_hytec_name_of_replying_device
, tvb
, offset
, msg_len
, ENC_ASCII
);
4501 { /* unexpected length */
4502 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) is beyond valid range (1-%d)", val_to_str_const(identifier
, hytec_mc
, ""), msg_len
, maximum_data_length
);
4503 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4506 case HYTEC_MC__OUTGOING_PORT_NAME
:
4507 maximum_data_length
= 64;
4508 if(0 < msg_len
&& msg_len
<= maximum_data_length
) proto_tree_add_item(tree
, hf_hytec_outgoing_port_name
, tvb
, offset
, msg_len
, ENC_ASCII
);
4510 { /* unexpected length */
4511 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) is beyond valid range (1-%d)", val_to_str_const(identifier
, hytec_mc
, ""), msg_len
, maximum_data_length
);
4512 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4515 case HYTEC_MC__IPV4_ADDRESS_OF_REPLYING_DEVICE
:
4516 expected_data_length
= 4;
4517 if(msg_len
== expected_data_length
) proto_tree_add_item(tree
, hf_hytec_ipv4_address_of_replying_device
, tvb
, offset
, msg_len
, ENC_NA
);
4519 { /* unexpected length */
4520 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_mc
, ""), msg_len
, expected_data_length
);
4521 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4524 case HYTEC_MC__END_OF_TRACE
:
4525 expected_data_length
= 1;
4526 if(msg_len
== expected_data_length
) proto_tree_add_item(tree
, hf_hytec_end_of_trace
, tvb
, offset
, msg_len
, ENC_BIG_ENDIAN
);
4528 { /* unexpected length */
4529 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_mc
, ""), msg_len
, expected_data_length
);
4530 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4533 case HYTEC_MC__IPV6_ADDRESS_OF_REPLYING_DEVICE
:
4534 expected_data_length
= 16;
4535 if(msg_len
== expected_data_length
) proto_tree_add_item(tree
, hf_hytec_ipv6_address_of_replying_device
, tvb
, offset
, msg_len
, ENC_NA
);
4537 { /* unexpected length */
4538 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_mc
, ""), msg_len
, expected_data_length
);
4539 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4542 case HYTEC_MC__INCOMING_PORT_NAME
:
4543 maximum_data_length
= 64;
4544 if(0 < msg_len
&& msg_len
<= maximum_data_length
) proto_tree_add_item(tree
, hf_hytec_incoming_port_name
, tvb
, offset
, msg_len
, ENC_ASCII
);
4546 { /* unexpected length */
4547 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) is beyond valid range (1-%d)", val_to_str_const(identifier
, hytec_mc
, ""), msg_len
, maximum_data_length
);
4548 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4551 case HYTEC_MC__TRACE_IDENTIFIER
:
4552 expected_data_length
= 4;
4553 if(msg_len
== expected_data_length
) proto_tree_add_item(tree
, hf_hytec_trace_identifier
, tvb
, offset
, msg_len
, ENC_BIG_ENDIAN
);
4555 { /* unexpected length */
4556 expert_add_info_format(pinfo
, tree
, &ei_lldp_bad_length
, "%s length (%d) != expected length (%d)", val_to_str_const(identifier
, hytec_mc
, ""), msg_len
, expected_data_length
);
4557 if(msg_len
) proto_tree_add_item(tree
, hf_hytec_invalid_object_data
, tvb
, offset
, msg_len
, ENC_STR_HEX
);
4560 default: proto_tree_add_item(tree
, hf_hytec_unknown_identifier_content
, tvb
, offset
, -1, ENC_NA
); /* unknown identifier */
4561 } /* switch (identifier) */
4563 default: /* unknown group */
4564 /* identifier considered also unknown */
4565 proto_item_append_text(identifier_proto_item
, "Unknown");
4566 proto_tree_add_item(tree
, hf_hytec_unknown_identifier_content
, tvb
, offset
, -1, ENC_NA
);
4567 } /* switch (group) */
4569 default: /* unknown subtype */
4570 proto_item_append_text(group_proto_item
, " (Unknown)");
4571 proto_item_append_text(identifier_proto_item
, "Unknown");
4572 proto_tree_add_item(tree
, hf_unknown_subtype_content
, tvb
, offset
, -1, ENC_NA
);
4574 } /* switch (subtype) */
4576 proto_item_append_text(identifier_proto_item
, ")");
4579 /* Dissect Avaya OUI TLVs */
4581 dissect_avaya_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
4584 uint32_t offset
= 0;
4586 proto_tree
*avaya_data
= NULL
;
4587 proto_item
*tf
= NULL
;
4590 subType
= tvb_get_uint8(tvb
, offset
);
4592 proto_tree_add_item(tree
, hf_avaya_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4598 case 0x01: /* PoE Conservation Level Support */
4600 proto_tree_add_item(tree
, hf_avaya_poe
, tvb
, offset
, 7, ENC_NA
);
4603 case 0x03: /* Call Server IP Address */
4605 proto_tree_add_item(tree
, hf_avaya_call_server
, tvb
, offset
, 4, ENC_NA
);
4608 case 0x04: /* IP Phone Addresses */
4610 tf
= proto_tree_add_item(tree
, hf_avaya_ipphone
, tvb
, offset
, 12, ENC_NA
);
4611 avaya_data
= proto_item_add_subtree(tf
, ett_avaya_ipphone_tlv
);
4612 proto_tree_add_item(avaya_data
, hf_avaya_ipphone_ip
, tvb
, offset
, 4, ENC_NA
);
4613 proto_tree_add_item(avaya_data
, hf_avaya_ipphone_mask
, tvb
, offset
+4, 4, ENC_NA
);
4614 proto_tree_add_item(avaya_data
, hf_avaya_ipphone_gateway
, tvb
, offset
+8, 4, ENC_NA
);
4617 case 0x05: /* CNA Server IP Address */
4619 proto_tree_add_item(tree
, hf_avaya_cna_server
, tvb
, offset
, 4, ENC_NA
);
4622 case 0x06: /* File Server */
4624 proto_tree_add_item(tree
, hf_avaya_file_server
, tvb
, offset
, 4, ENC_NA
);
4627 case 0x07: /* 802.1Q Framing */
4629 proto_tree_add_item(tree
, hf_avaya_dot1q
, tvb
, offset
, 1, ENC_NA
);
4633 proto_tree_add_item(tree
, hf_unknown_subtype_content
, tvb
, offset
, -1, ENC_NA
);
4638 /* Dissect IANA OUI TLVs */
4640 dissect_iana_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
4644 uint32_t offset
= 0;
4647 subType
= tvb_get_uint8(tvb
, offset
);
4649 proto_tree_add_item(tree
, hf_iana_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4652 msg_len
=tvb_reported_length_remaining(tvb
, offset
);
4655 case 0x01: /* MUDURL */
4657 proto_tree_add_item(tree
, hf_iana_mudurl
, tvb
, offset
, msg_len
, ENC_ASCII
);
4661 proto_tree_add_item(tree
, hf_unknown_subtype_content
, tvb
, offset
, -1, ENC_NA
);
4667 dissect_onos_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
4671 uint32_t offset
= 0;
4673 proto_tree_add_item_ret_uint(tree
, hf_onos_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
, &subType
);
4676 msg_len
=tvb_reported_length_remaining(tvb
, offset
);
4679 case ONOS_CHASSIS_TLV_TYPE
:
4680 proto_tree_add_item(tree
, hf_onos_chassis
, tvb
, offset
, msg_len
, ENC_ASCII
);
4682 case ONOS_PORT_TLV_TYPE
:
4683 proto_tree_add_item(tree
, hf_onos_port
, tvb
, offset
, msg_len
, ENC_ASCII
);
4685 case ONOS_TTL_TLV_TYPE
:
4686 proto_tree_add_item(tree
, hf_onos_ttl
, tvb
, offset
, msg_len
, ENC_NA
);
4689 proto_tree_add_item(tree
, hf_unknown_subtype_content
, tvb
, offset
, -1, ENC_NA
);
4695 /* Dissect Organizational Specific TLV */
4697 dissect_organizational_specific_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint32_t offset
, profinet_lldp_column_info
*pn_lldp_column_info
)
4702 uint32_t oui
, tLength
= tvb_reported_length(tvb
);
4704 tvbuff_t
*vendor_tvb
;
4706 const char *subTypeStr
;
4708 proto_tree
*org_tlv_tree
= NULL
;
4709 proto_item
*lf
= NULL
;
4710 /* Get tlv type and length */
4711 tempShort
= tvb_get_ntohs(tvb
, offset
);
4713 /* Get tlv length */
4714 dataLen
= TLV_INFO_LEN(tempShort
);
4716 oui
= tvb_get_ntoh24(tvb
, (offset
+2));
4717 subType
= tvb_get_uint8(tvb
, (offset
+5));
4719 /* check for registered dissectors for the OUI If none found continue, else call dissector */
4720 if( dissector_try_uint(oui_unique_code_table
, oui
, tvb
, pinfo
, tree
) ) {
4723 /* Look in manuf database for OUI */
4724 ouiStr
= uint_get_manuf_name_if_known(oui
);
4725 if(ouiStr
==NULL
) ouiStr
="Unknown";
4727 /* Set a default value */
4728 tempTree
= ett_org_spc_ProfinetSubTypes_1
;
4732 subTypeStr
= val_to_str(subType
, dcbx_protocol_types
, "Unknown subtype (0x%x)");
4735 case 1: tempTree
= ett_org_spc_dcbx_cin
;
4737 case 2: tempTree
= ett_org_spc_dcbx_cee
;
4741 case OUI_IEEE_802_1
:
4742 subTypeStr
= val_to_str(subType
, ieee_802_1_subtypes
, "Unknown subtype 0x%x");
4745 case 0x1: tempTree
= ett_org_spc_ieee_802_1_1
;
4747 case 0x2: tempTree
= ett_org_spc_ieee_802_1_2
;
4749 case 0x3: tempTree
= ett_org_spc_ieee_802_1_3
;
4751 case 0x4: tempTree
= ett_org_spc_ieee_802_1_4
;
4753 case 0x8: tempTree
= ett_org_spc_ieee_802_1_8
;
4755 case 0x9: tempTree
= ett_org_spc_ieee_802_1_9
;
4757 case 0xa: tempTree
= ett_org_spc_ieee_802_1_a
;
4759 case 0xb: tempTree
= ett_org_spc_ieee_802_1_b
;
4761 case 0xc: tempTree
= ett_org_spc_ieee_802_1_c
;
4765 case OUI_IEEE_802_3
:
4766 subTypeStr
= val_to_str(subType
, ieee_802_3_subtypes
, "Unknown subtype 0x%x");
4769 case 1: tempTree
= ett_org_spc_ieee_802_3_1
;
4771 case 2: tempTree
= ett_org_spc_ieee_802_3_2
;
4773 case 3: tempTree
= ett_org_spc_ieee_802_3_3
;
4775 case 4: tempTree
= ett_org_spc_ieee_802_3_4
;
4777 case 5: tempTree
= ett_org_spc_ieee_802_3_5
;
4779 case 7: tempTree
= ett_org_spc_ieee_802_3_7
;
4783 case OUI_MEDIA_ENDPOINT
:
4784 subTypeStr
= val_to_str(subType
, media_subtypes
, "Unknown subtype 0x%x");
4787 case 1: tempTree
= ett_org_spc_media_1
;
4789 case 2: tempTree
= ett_org_spc_media_2
;
4791 case 3: tempTree
= ett_org_spc_media_3
;
4793 case 4: tempTree
= ett_org_spc_media_4
;
4795 case 5: tempTree
= ett_org_spc_media_5
;
4797 case 6: tempTree
= ett_org_spc_media_6
;
4799 case 7: tempTree
= ett_org_spc_media_7
;
4801 case 8: tempTree
= ett_org_spc_media_8
;
4803 case 9: tempTree
= ett_org_spc_media_9
;
4805 case 10: tempTree
= ett_org_spc_media_10
;
4807 case 11: tempTree
= ett_org_spc_media_11
;
4812 subTypeStr
= val_to_str(subType
, profinet_subtypes
, "Reserved (0x%x)");
4815 case 1: tempTree
= ett_org_spc_ProfinetSubTypes_1
;
4817 case 2: tempTree
= ett_org_spc_ProfinetSubTypes_2
;
4819 case 3: tempTree
= ett_org_spc_ProfinetSubTypes_3
;
4821 case 4: tempTree
= ett_org_spc_ProfinetSubTypes_4
;
4823 case 5: tempTree
= ett_org_spc_ProfinetSubTypes_5
;
4825 case 6: tempTree
= ett_org_spc_ProfinetSubTypes_6
;
4830 subTypeStr
= val_to_str(subType
, cisco_subtypes
, "Unknown subtype (0x%x)");
4832 case OUI_IEEE_802_1QBG
:
4833 subTypeStr
= val_to_str(subType
, ieee_802_1qbg_subtypes
, "Unknown subtype 0x%x");
4835 case OUI_AVAYA_EXTREME
:
4836 subTypeStr
= val_to_str(subType
, ex_avaya_subtypes
, "Unknown subtype 0x%x");
4839 case EX_AVAYA_SUBTYPE_ELEMENT_TLV
: tempTree
= ett_ex_avayaSubTypes_11
;
4841 case EX_AVAYA_SUBTYPE_ASSIGNMENT_TLV
: tempTree
= ett_ex_avayaSubTypes_12
;
4845 case OUI_AVAYA_EXTREME2
:
4846 subTypeStr
= val_to_str(subType
, ex_avaya2_subtypes
, "Unknown subtype 0x%x");
4849 case EX_AVAYA2_SUBTYPE_ZTFv2_FC_TLV
: tempTree
= ett_ex_avaya2SubTypes_4
;
4854 subTypeStr
= val_to_str(subType
, hytec_subtypes
, "Unknown subtype (0x%x)");
4857 case HYTEC_SUBTYPE__TRANSCEIVER
: tempTree
= ett_org_spc_hytec_subtype_transceiver
;
4859 case HYTEC_SUBTYPE__TRACE
: tempTree
= ett_org_spc_hytec_subtype_trace
;
4864 subTypeStr
= val_to_str(subType
, avaya_subtypes
, "Unknown subtype (0x%x)");
4867 subTypeStr
= val_to_str(subType
, iana_subtypes
, "Unknown subtype (0x%x)");
4870 subTypeStr
= val_to_str(subType
, onos_subtypes
, "Unknown subtype (0x%x)");
4873 subTypeStr
= val_to_str(subType
, lldp_cip_subtypes
, "Unknown subtype (0x%x)");
4876 subTypeStr
= wmem_strdup_printf(pinfo
->pool
, "Unknown (%d)",subType
);
4880 org_tlv_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, tLength
, tempTree
, NULL
, "%s - %s", ouiStr
, subTypeStr
);
4881 proto_tree_add_item(org_tlv_tree
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4883 lf
= proto_tree_add_item(org_tlv_tree
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4886 expert_add_info_format(pinfo
, lf
, &ei_lldp_bad_length
,
4887 "TLV length (%u) too short, must be >=4)", dataLen
);
4891 /* Display organizational unique id */
4892 proto_tree_add_uint(org_tlv_tree
, hf_org_spc_oui
, tvb
, offset
+ 2, 3, oui
);
4894 /* Try to make sure we don't overrun the sub-tlvs */
4895 vendor_tvb
= tvb_new_subset_length(tvb
, offset
+ 5, dataLen
- 3);
4900 dissect_dcbx_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4902 case OUI_IEEE_802_1
:
4903 dissect_ieee_802_1_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4905 case OUI_IEEE_802_3
:
4906 dissect_ieee_802_3_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4908 case OUI_MEDIA_ENDPOINT
:
4909 dissect_media_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4912 dissect_profinet_tlv(vendor_tvb
, pinfo
, org_tlv_tree
, pn_lldp_column_info
);
4915 dissect_cisco_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4917 case OUI_IEEE_802_1QBG
:
4918 dissect_ieee_802_1qbg_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4921 dissect_hytec_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4924 dissect_avaya_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4927 dissect_iana_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4929 case OUI_AVAYA_EXTREME
:
4930 dissect_extreme_avaya_tlv(vendor_tvb
, pinfo
, org_tlv_tree
, dataLen
);
4932 case OUI_AVAYA_EXTREME2
:
4933 dissect_extreme_avaya2_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4936 dissect_onos_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4939 dissect_lldp_cip_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4942 dissect_oui_default_tlv(vendor_tvb
, pinfo
, org_tlv_tree
);
4945 return offset
+ tvb_reported_length(tvb
);
4948 /* Dissect Unknown TLV */
4950 dissect_lldp_unknown_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, uint32_t offset
)
4955 proto_tree
*unknown_tlv_tree
;
4957 /* Get tlv type and length */
4958 tempShort
= tvb_get_ntohs(tvb
, offset
);
4960 /* Get tlv length */
4961 dataLen
= TLV_INFO_LEN(tempShort
);
4963 unknown_tlv_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, (dataLen
+ 2), ett_unknown_tlv
, NULL
, "Unknown TLV");
4965 proto_tree_add_item(unknown_tlv_tree
, hf_lldp_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4966 proto_tree_add_item(unknown_tlv_tree
, hf_lldp_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4969 /* Adjust for unknown data */
4976 /* Dissect LLDP packets */
4978 dissect_lldp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
4981 proto_tree
*lldp_tree
= NULL
;
4982 tvbuff_t
*new_tvb
= NULL
;
4983 uint32_t offset
= 0;
4984 uint16_t isShutdown
;
4985 int32_t rtnValue
= 0;
4989 profinet_lldp_column_info
*pn_lldp_column_info
= NULL
;
4990 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "LLDP");
4992 /* Clear the information column on summary display */
4993 col_clear(pinfo
->cinfo
, COL_INFO
);
4995 ti
= proto_tree_add_item(tree
, proto_lldp
, tvb
, offset
, -1, ENC_NA
);
4996 lldp_tree
= proto_item_add_subtree(ti
, ett_lldp
);
4998 // Maybe add an explicit field for the type of the destination mac address?
5000 // IEEE 802.1AB-2016, Table 7-2—Support for MAC addresses in different systems
5001 // Address | C-VLAN Bridge | S-VLAN Bridge | TPMR Bridge | End station
5002 // ------------------------------------------+---------------+----------------+---------------+-------------
5003 // 01-80-C2-00-00-0E Nearest bridge | Mandatory | Mandatory | Mandatory | Mandatory
5004 // 01-80-C2-00-00-03 Nearest non-TPMR bridge | Mandatory | Mandatory | Not permitted | Recommended
5005 // 01-80-C2-00-00-00 Nearest Customer Bridge | Mandatory | Not permitted | Not permitted | Recommended
5006 // Any other group MAC address | Permitted | Permitted | Permitted | Permitted
5007 // Any individual MAC address | Permitted | Permitted | Permitted | Permitted
5009 /* Get chassis id tlv */
5010 tempShort
= tvb_get_ntohs(tvb
, offset
);
5011 new_tvb
= tvb_new_subset_length(tvb
, offset
, TLV_INFO_LEN(tempShort
)+2);
5014 pn_lldp_column_info
= wmem_new0(pinfo
->pool
, profinet_lldp_column_info
);
5016 rtnValue
= dissect_lldp_chassis_id(new_tvb
, pinfo
, lldp_tree
, 0, pn_lldp_column_info
);
5019 col_set_str(pinfo
->cinfo
, COL_INFO
, "Invalid Chassis ID TLV");
5020 return tvb_captured_length(tvb
);
5025 /* Get port id tlv */
5026 tempShort
= tvb_get_ntohs(tvb
, offset
);
5027 new_tvb
= tvb_new_subset_length(tvb
, offset
, TLV_INFO_LEN(tempShort
)+2);
5029 rtnValue
= dissect_lldp_port_id(new_tvb
, pinfo
, lldp_tree
, 0, pn_lldp_column_info
);
5032 col_set_str(pinfo
->cinfo
, COL_INFO
, "Invalid Port ID TLV");
5033 return tvb_captured_length(tvb
);
5038 /* Get time to live tlv */
5039 tempShort
= tvb_get_ntohs(tvb
, offset
);
5040 new_tvb
= tvb_new_subset_length(tvb
, offset
, TLV_INFO_LEN(tempShort
)+2);
5042 rtnValue
= dissect_lldp_time_to_live(new_tvb
, pinfo
, lldp_tree
, 0, &isShutdown
);
5045 col_set_str(pinfo
->cinfo
, COL_INFO
, "Invalid Time-to-Live TLV");
5046 return tvb_captured_length(tvb
);
5051 tvbLen
= tvb_captured_length(tvb
);
5052 /* Dissect optional tlv info that contained in data packets */
5053 while (offset
< tvbLen
)
5055 tempShort
= tvb_get_ntohs(tvb
, offset
);
5056 tlvType
= TLV_TYPE(tempShort
);
5057 /* pass single TLV to dissectors, Zero offset (point to front of tlv) */
5058 new_tvb
= tvb_new_subset_length(tvb
, offset
, TLV_INFO_LEN(tempShort
)+2);
5061 case CHASSIS_ID_TLV_TYPE
:
5062 dissect_lldp_chassis_id(new_tvb
, pinfo
, lldp_tree
, 0, pn_lldp_column_info
);
5063 rtnValue
= -1; /* Duplicate chassis id tlv */
5064 if (column_info_selection
== DEFAULT_COLUMN_INFO
)
5066 col_set_str(pinfo
->cinfo
, COL_INFO
, "Duplicate Chassis ID TLV");
5069 case PORT_ID_TLV_TYPE
:
5070 dissect_lldp_port_id(new_tvb
, pinfo
, lldp_tree
, 0, pn_lldp_column_info
);
5071 rtnValue
= -1; /* Duplicate port id tlv */
5072 if (column_info_selection
== DEFAULT_COLUMN_INFO
)
5074 col_set_str(pinfo
->cinfo
, COL_INFO
, "Duplicate Port ID TLV");
5077 case TIME_TO_LIVE_TLV_TYPE
:
5078 dissect_lldp_time_to_live(new_tvb
, pinfo
, lldp_tree
, 0, &isShutdown
);
5079 rtnValue
= -1; /* Duplicate time-to-live tlv */
5080 if (column_info_selection
== DEFAULT_COLUMN_INFO
)
5082 col_set_str(pinfo
->cinfo
, COL_INFO
, "Duplicate Time-To-Live TLV");
5085 case END_OF_LLDPDU_TLV_TYPE
:
5086 rtnValue
= dissect_lldp_end_of_lldpdu(new_tvb
, pinfo
, lldp_tree
, 0);
5088 case PORT_DESCRIPTION_TLV_TYPE
:
5089 rtnValue
= dissect_lldp_port_desc(new_tvb
, pinfo
, lldp_tree
, 0);
5091 case SYSTEM_NAME_TLV_TYPE
:
5092 case SYSTEM_DESCRIPTION_TLV_TYPE
:
5093 rtnValue
= dissect_lldp_system_name(new_tvb
, pinfo
, lldp_tree
, 0);
5095 case SYSTEM_CAPABILITIES_TLV_TYPE
:
5096 rtnValue
= dissect_lldp_system_capabilities(new_tvb
, pinfo
, lldp_tree
, 0);
5098 case MANAGEMENT_ADDR_TLV_TYPE
:
5099 rtnValue
= dissect_lldp_management_address(new_tvb
, pinfo
, lldp_tree
, 0);
5101 case ORGANIZATION_SPECIFIC_TLV_TYPE
:
5102 rtnValue
= dissect_organizational_specific_tlv(new_tvb
, pinfo
, lldp_tree
, 0, pn_lldp_column_info
);
5105 if (!assume_unrecognized_tlv
5106 || tempShort
> tvb_reported_length_remaining(tvb
, offset
)) {
5107 /* Probably not an LLDP LTV */
5111 rtnValue
= dissect_lldp_unknown_tlv(new_tvb
, pinfo
, lldp_tree
, 0);
5116 // Shutdown PDU: Verify that only ChassisID, PortID, TTL and optionally END TLVs are present
5117 if (isShutdown
&& tlvType
!= END_OF_LLDPDU_TLV_TYPE
)
5119 proto_tree_add_expert_format(tree
, pinfo
, &ei_lldp_shutdown_excess_tlv
, tvb
, offset
, TLV_INFO_LEN(tempShort
),
5120 "TLV type 0x%02X not allowed in Shutdown PDU", tlvType
);
5129 /* Terminate the LLDP dissector after reaching the END_OF_LLDPDU */
5130 if (tlvType
== END_OF_LLDPDU_TLV_TYPE
) {
5135 set_actual_length(tvb
, offset
);
5136 proto_item_set_len(ti
, offset
);
5137 return tvb_captured_length(tvb
);
5140 /* Register the protocol with Wireshark */
5142 proto_register_lldp(void)
5144 module_t
*lldp_module
;
5145 expert_module_t
*expert_lldp
;
5147 /* Setup list of header fields */
5148 static hf_register_info hf
[] = {
5149 { &hf_lldp_tlv_type
,
5150 { "TLV Type", "lldp.tlv.type", FT_UINT16
, BASE_DEC
,
5151 VALS(tlv_types
), TLV_TYPE_MASK
, NULL
, HFILL
}
5154 { "TLV Length", "lldp.tlv.len", FT_UINT16
, BASE_DEC
,
5155 NULL
, TLV_INFO_LEN_MASK
, NULL
, HFILL
}
5157 { &hf_lldp_tlv_system_cap
,
5158 { "Capabilities", "lldp.tlv.system_cap", FT_UINT16
, BASE_HEX
,
5159 NULL
, 0, NULL
, HFILL
}
5161 { &hf_lldp_tlv_system_cap_other
,
5162 { "Other", "lldp.tlv.system_cap.other", FT_BOOLEAN
, 16,
5163 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_OTHER
, NULL
, HFILL
}
5165 { &hf_lldp_tlv_system_cap_repeater
,
5166 { "Repeater", "lldp.tlv.system_cap.repeater", FT_BOOLEAN
, 16,
5167 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_REPEATER
, NULL
, HFILL
}
5169 { &hf_lldp_tlv_system_cap_bridge
,
5170 { "Bridge", "lldp.tlv.system_cap.bridge", FT_BOOLEAN
, 16,
5171 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_BRIDGE
, NULL
, HFILL
}
5173 { &hf_lldp_tlv_system_cap_wlan_access_pt
,
5174 { "WLAN access point", "lldp.tlv.system_cap.wlan_access_pt", FT_BOOLEAN
, 16,
5175 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_WLAN
, NULL
, HFILL
}
5177 { &hf_lldp_tlv_system_cap_router
,
5178 { "Router", "lldp.tlv.system_cap.router", FT_BOOLEAN
, 16,
5179 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_ROUTER
, NULL
, HFILL
}
5181 { &hf_lldp_tlv_system_cap_telephone
,
5182 { "Telephone", "lldp.tlv.system_cap.telephone", FT_BOOLEAN
, 16,
5183 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_TELEPHONE
, NULL
, HFILL
}
5185 { &hf_lldp_tlv_system_cap_docsis_cable_device
,
5186 { "DOCSIS cable device", "lldp.tlv.system_cap.docsis_cable_device", FT_BOOLEAN
, 16,
5187 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_DOCSIS
, NULL
, HFILL
}
5189 { &hf_lldp_tlv_system_cap_station_only
,
5190 { "Station only", "lldp.tlv.system_cap.station_only", FT_BOOLEAN
, 16,
5191 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_STATION
, NULL
, HFILL
}
5193 { &hf_lldp_tlv_system_cap_cvlan_component
,
5194 { "C-VLAN component", "lldp.tlv.system_cap.cvlan", FT_BOOLEAN
, 16,
5195 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_CVLAN
, NULL
, HFILL
}
5197 { &hf_lldp_tlv_system_cap_svlan_component
,
5198 { "S-VLAN component", "lldp.tlv.system_cap.svlan", FT_BOOLEAN
, 16,
5199 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_SVLAN
, NULL
, HFILL
}
5201 { &hf_lldp_tlv_system_cap_tpmr_component
,
5202 { "TPMR component", "lldp.tlv.system_cap.tpmr", FT_BOOLEAN
, 16,
5203 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_TPMR
, NULL
, HFILL
}
5205 { &hf_lldp_tlv_system_name
,
5206 { "System Name", "lldp.tlv.system.name", FT_STRING
, BASE_NONE
,
5207 NULL
, 0, NULL
, HFILL
}
5209 { &hf_lldp_tlv_system_desc
,
5210 { "System Description", "lldp.tlv.system.desc", FT_STRING
, BASE_NONE
,
5211 NULL
, 0, NULL
, HFILL
}
5213 { &hf_lldp_tlv_enable_system_cap
,
5214 { "Enabled Capabilities", "lldp.tlv.enable_system_cap", FT_UINT16
, BASE_HEX
,
5215 NULL
, 0, NULL
, HFILL
}
5217 { &hf_lldp_tlv_enable_system_cap_other
,
5218 { "Other", "lldp.tlv.enable_system_cap.other", FT_BOOLEAN
, 16,
5219 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_OTHER
, NULL
, HFILL
}
5221 { &hf_lldp_tlv_enable_system_cap_repeater
,
5222 { "Repeater", "lldp.tlv.enable_system_cap.repeater", FT_BOOLEAN
, 16,
5223 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_REPEATER
, NULL
, HFILL
}
5225 { &hf_lldp_tlv_enable_system_cap_bridge
,
5226 { "Bridge", "lldp.tlv.enable_system_cap.bridge", FT_BOOLEAN
, 16,
5227 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_BRIDGE
, NULL
, HFILL
}
5229 { &hf_lldp_tlv_enable_system_cap_wlan_access_pt
,
5230 { "WLAN access point", "lldp.tlv.enable_system_cap.wlan_access_pt", FT_BOOLEAN
, 16,
5231 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_WLAN
, NULL
, HFILL
}
5233 { &hf_lldp_tlv_enable_system_cap_router
,
5234 { "Router", "lldp.tlv.enable_system_cap.router", FT_BOOLEAN
, 16,
5235 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_ROUTER
, NULL
, HFILL
}
5237 { &hf_lldp_tlv_enable_system_cap_telephone
,
5238 { "Telephone", "lldp.tlv.enable_system_cap.telephone", FT_BOOLEAN
, 16,
5239 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_TELEPHONE
, NULL
, HFILL
}
5241 { &hf_lldp_tlv_enable_system_cap_docsis_cable_device
,
5242 { "DOCSIS cable device", "lldp.tlv.enable_system_cap.docsis_cable_device", FT_BOOLEAN
, 16,
5243 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_DOCSIS
, NULL
, HFILL
}
5245 { &hf_lldp_tlv_enable_system_cap_station_only
,
5246 { "Station only", "lldp.tlv.enable_system_cap.station_only", FT_BOOLEAN
, 16,
5247 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_STATION
, NULL
, HFILL
}
5249 { &hf_lldp_tlv_enable_system_cap_cvlan_component
,
5250 { "C-VLAN component", "lldp.tlv.enable_system_cap.cvlan", FT_BOOLEAN
, 16,
5251 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_CVLAN
, NULL
, HFILL
}
5253 { &hf_lldp_tlv_enable_system_cap_svlan_component
,
5254 { "S-VLAN component", "lldp.tlv.enable_system_cap.svlan", FT_BOOLEAN
, 16,
5255 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_SVLAN
, NULL
, HFILL
}
5257 { &hf_lldp_tlv_enable_system_cap_tpmr_component
,
5258 { "TPMR component", "lldp.tlv.enable_system_cap.tpmr", FT_BOOLEAN
, 16,
5259 TFS(&tfs_capable_not_capable
), SYSTEM_CAPABILITY_TPMR
, NULL
, HFILL
}
5261 { &hf_chassis_id_subtype
,
5262 { "Chassis Id Subtype", "lldp.chassis.subtype", FT_UINT8
, BASE_DEC
,
5263 VALS(chassis_id_subtypes
), 0, NULL
, HFILL
}
5266 { "Chassis Id", "lldp.chassis.id", FT_BYTES
, BASE_NONE
,
5267 NULL
, 0, NULL
, HFILL
}
5269 { &hf_chassis_id_mac
,
5270 { "Chassis Id", "lldp.chassis.id.mac", FT_ETHER
, BASE_NONE
,
5271 NULL
, 0, NULL
, HFILL
}
5273 { &hf_chassis_id_ip4
,
5274 { "Chassis Id", "lldp.chassis.id.ip4", FT_IPv4
, BASE_NONE
,
5275 NULL
, 0, NULL
, HFILL
}
5277 { &hf_chassis_id_ip6
,
5278 { "Chassis Id", "lldp.chassis.id.ip6", FT_IPv6
, BASE_NONE
,
5279 NULL
, 0, NULL
, HFILL
}
5281 { &hf_port_id_subtype
,
5282 { "Port Id Subtype", "lldp.port.subtype", FT_UINT8
, BASE_DEC
,
5283 VALS(port_id_subtypes
), 0, NULL
, HFILL
}
5286 { "Port Id", "lldp.port.id", FT_STRING
, BASE_NONE
,
5287 NULL
, 0, NULL
, HFILL
}
5290 { "Port Description", "lldp.port.desc", FT_STRING
, BASE_NONE
,
5291 NULL
, 0, NULL
, HFILL
}
5294 { "Port Id", "lldp.port.id.mac", FT_ETHER
, BASE_NONE
,
5295 NULL
, 0, NULL
, HFILL
}
5297 { &hf_lldp_network_address_family
,
5298 { "Network Address family", "lldp.network_address.subtype", FT_UINT8
, BASE_DEC
,
5299 VALS(afn_vals
), 0, NULL
, HFILL
}
5302 { "Port Id", "lldp.port.id.ip4", FT_IPv4
, BASE_NONE
,
5303 NULL
, 0, NULL
, HFILL
}
5306 { "Port Id", "lldp.port.id.ip6", FT_IPv6
, BASE_NONE
,
5307 NULL
, 0, NULL
, HFILL
}
5310 { "Seconds", "lldp.time_to_live", FT_UINT16
, BASE_DEC
,
5311 NULL
, 0, NULL
, HFILL
}
5314 { "PDU Type", "lldp.pdu_type", FT_NONE
, BASE_NONE
,
5315 NULL
, 0, NULL
, HFILL
}
5318 { &hf_mgn_address_len
,
5319 { "Address String Length", "lldp.mgn.address.len", FT_UINT8
, BASE_DEC
,
5320 NULL
, 0, NULL
, HFILL
}
5322 { &hf_mgn_address_subtype
,
5323 { "Address Subtype", "lldp.mgn.address.subtype", FT_UINT8
, BASE_DEC
,
5324 VALS(afn_vals
), 0, "Undefined", HFILL
}
5326 { &hf_mgn_addr_ipv4
,
5327 { "Management Address", "lldp.mgn.addr.ip4", FT_IPv4
, BASE_NONE
,
5328 NULL
, 0, NULL
, HFILL
}
5330 { &hf_mgn_addr_ipv6
,
5331 { "Management Address", "lldp.mgn.addr.ip6", FT_IPv6
, BASE_NONE
,
5332 NULL
, 0, NULL
, HFILL
}
5335 { "Management Address", "lldp.mgn.addr.hex", FT_BYTES
, BASE_NONE
,
5336 NULL
, 0, NULL
, HFILL
}
5338 { &hf_mgn_interface_subtype
,
5339 { "Interface Subtype", "lldp.mgn.interface.subtype", FT_UINT8
, BASE_DEC
,
5340 VALS(interface_subtype_values
), 0, "Undefined", HFILL
}
5342 { &hf_mgn_interface_number
,
5343 { "Interface Number", "lldp.mgn.interface.number", FT_UINT32
, BASE_DEC
,
5344 NULL
, 0, NULL
, HFILL
}
5347 { "OID String Length", "lldp.mgn.obj.len", FT_UINT8
, BASE_DEC
,
5348 NULL
, 0, NULL
, HFILL
}
5351 { "Object Identifier", "lldp.mgn.obj.id", FT_OID
, BASE_NONE
,
5352 NULL
, 0, NULL
, HFILL
}
5355 { "Organization Unique Code", "lldp.orgtlv.oui", FT_UINT24
, BASE_OUI
,
5356 NULL
, 0x0, NULL
, HFILL
}
5359 { "DCBx Protocol", "lldp.dcbx.proto", FT_UINT8
, BASE_HEX
,
5360 VALS(dcbx_protocol_types
), 0x0, NULL
, HFILL
}
5362 { &hf_dcbx_tlv_type
,
5363 { "DCBx TLV Type", "lldp.dcbx.type", FT_UINT16
, BASE_DEC
,
5364 VALS(dcbx_subtypes
), TLV_TYPE_MASK
, NULL
, HFILL
}
5367 { "DCBx TLV Length", "lldp.dcbx.len", FT_UINT16
, BASE_DEC
,
5368 NULL
, TLV_INFO_LEN_MASK
, NULL
, HFILL
}
5370 { &hf_dcbx_tlv_oper_version
,
5371 { "Operating Version", "lldp.dcbx.version", FT_UINT8
, BASE_HEX
,
5372 VALS(dcbx_protocol_types
), 0x0, "Unknown", HFILL
}
5374 { &hf_dcbx_tlv_max_version
,
5375 { "Max Version", "lldp.dcbx.max_version", FT_UINT8
, BASE_HEX
,
5376 VALS(dcbx_protocol_types
), 0x0, "Unknown", HFILL
}
5378 { &hf_dcbx_control_sequence
,
5379 { "Sequence No", "lldp.dcbx.control.seq", FT_UINT32
, BASE_DEC
,
5380 NULL
, 0, NULL
, HFILL
}
5382 { &hf_dcbx_control_ack
,
5383 { "Ack No", "lldp.dcbx.control.ack", FT_UINT32
, BASE_DEC
,
5384 NULL
, 0, NULL
, HFILL
}
5386 { &hf_dcbx_feature_flag_enabled
,
5387 { "Feature", "lldp.dcbx.feature.enabled", FT_BOOLEAN
, 8,
5388 TFS(&tfs_enabled_disabled
), 0x80, NULL
, HFILL
}
5390 { &hf_dcbx_feature_flag_willing
,
5391 { "Willing", "lldp.dcbx.feature.willing", FT_BOOLEAN
, 8,
5392 TFS(&tfs_yes_no
), 0x40, NULL
, HFILL
}
5394 { &hf_dcbx_feature_flag_error
,
5395 { "Error", "lldp.dcbx.feature.error", FT_BOOLEAN
, 8,
5396 TFS(&tfs_set_notset
), 0x20, NULL
, HFILL
}
5398 { &hf_dcbx_feature_subtype
,
5399 { "Subtype", "lldp.dcbx.feature.subtype", FT_UINT8
, BASE_HEX
,
5400 NULL
, 0, NULL
, HFILL
}
5402 { &hf_dcbx_feature_pgid_reserved
,
5403 { "Reserved", "lldp.dcbx.feature.pg.reserved", FT_UINT8
, BASE_HEX
,
5404 NULL
, 0xFE, NULL
, HFILL
}
5406 { &hf_dcbx_feature_pgid_prio_0
,
5407 { "PGID for Prio 0", "lldp.dcbx.feature.pg.pgid_prio0", FT_UINT16
, BASE_DEC
,
5408 NULL
, 0xF000, NULL
, HFILL
}
5410 { &hf_dcbx_feature_pgid_prio_1
,
5411 { "PGID for Prio 1", "lldp.dcbx.feature.pg.pgid_prio1", FT_UINT16
, BASE_DEC
,
5412 NULL
, 0x0F00, NULL
, HFILL
}
5414 { &hf_dcbx_feature_pgid_prio_2
,
5415 { "PGID for Prio 2", "lldp.dcbx.feature.pg.pgid_prio2", FT_UINT16
, BASE_DEC
,
5416 NULL
, 0x00F0, NULL
, HFILL
}
5418 { &hf_dcbx_feature_pgid_prio_3
,
5419 { "PGID for Prio 3", "lldp.dcbx.feature.pg.pgid_prio3", FT_UINT16
, BASE_DEC
,
5420 NULL
, 0x000F, NULL
, HFILL
}
5422 { &hf_dcbx_feature_pgid_prio_4
,
5423 { "PGID for Prio 4", "lldp.dcbx.feature.pg.pgid_prio4", FT_UINT16
, BASE_DEC
,
5424 NULL
, 0xF000, NULL
, HFILL
}
5426 { &hf_dcbx_feature_pgid_prio_5
,
5427 { "PGID for Prio 5", "lldp.dcbx.feature.pg.pgid_prio5", FT_UINT16
, BASE_DEC
,
5428 NULL
, 0x0F00, NULL
, HFILL
}
5430 { &hf_dcbx_feature_pgid_prio_6
,
5431 { "PGID for Prio 6", "lldp.dcbx.feature.pg.pgid_prio6", FT_UINT16
, BASE_DEC
,
5432 NULL
, 0x00F0, NULL
, HFILL
}
5434 { &hf_dcbx_feature_pgid_prio_7
,
5435 { "PGID for Prio 7", "lldp.dcbx.feature.pg.pgid_prio7", FT_UINT16
, BASE_DEC
,
5436 NULL
, 0x000F, NULL
, HFILL
}
5438 { &hf_dcbx_feature_pg_per_0
,
5439 { "Bandwidth for PGID 0", "lldp.dcbx.feature.pg.per0", FT_UINT8
, BASE_DEC
,
5440 NULL
, 0, NULL
, HFILL
}
5442 { &hf_dcbx_feature_pg_per_1
,
5443 { "Bandwidth for PGID 1", "lldp.dcbx.feature.pg.per1", FT_UINT8
, BASE_DEC
,
5444 NULL
, 0, NULL
, HFILL
}
5446 { &hf_dcbx_feature_pg_per_2
,
5447 { "Bandwidth for PGID 2", "lldp.dcbx.feature.pg.per2", FT_UINT8
, BASE_DEC
,
5448 NULL
, 0, NULL
, HFILL
}
5450 { &hf_dcbx_feature_pg_per_3
,
5451 { "Bandwidth for PGID 3", "lldp.dcbx.feature.pg.per3", FT_UINT8
, BASE_DEC
,
5452 NULL
, 0, NULL
, HFILL
}
5454 { &hf_dcbx_feature_pg_per_4
,
5455 { "Bandwidth for PGID 4", "lldp.dcbx.feature.pg.per4", FT_UINT8
, BASE_DEC
,
5456 NULL
, 0, NULL
, HFILL
}
5458 { &hf_dcbx_feature_pg_per_5
,
5459 { "Bandwidth for PGID 5", "lldp.dcbx.feature.pg.per5", FT_UINT8
, BASE_DEC
,
5460 NULL
, 0, NULL
, HFILL
}
5462 { &hf_dcbx_feature_pg_per_6
,
5463 { "Bandwidth for PGID 6", "lldp.dcbx.feature.pg.per6", FT_UINT8
, BASE_DEC
,
5464 NULL
, 0, NULL
, HFILL
}
5466 { &hf_dcbx_feature_pg_per_7
,
5467 { "Bandwidth for PGID 7", "lldp.dcbx.feature.pg.per7", FT_UINT8
, BASE_DEC
,
5468 NULL
, 0, NULL
, HFILL
}
5470 { &hf_dcbx_feature_pg_numtcs
,
5471 { "Number of Traffic Classes Supported", "lldp.dcbx.feature.pg.numtcs", FT_UINT8
, BASE_HEX
,
5472 NULL
, 0, NULL
, HFILL
}
5474 { &hf_dcbx_feature_pfc_prio0
,
5475 { "PFC for Priority 0", "lldp.dcbx.feature.pfc.prio0", FT_BOOLEAN
, 8,
5476 TFS(&tfs_enabled_disabled
), 0x1, NULL
, HFILL
}
5478 { &hf_dcbx_feature_pfc_prio1
,
5479 { "PFC for Priority 1", "lldp.dcbx.feature.pfc.prio1", FT_BOOLEAN
, 8,
5480 TFS(&tfs_enabled_disabled
), 0x2, NULL
, HFILL
}
5482 { &hf_dcbx_feature_pfc_prio2
,
5483 { "PFC for Priority 2", "lldp.dcbx.feature.pfc.prio2", FT_BOOLEAN
, 8,
5484 TFS(&tfs_enabled_disabled
), 0x4, NULL
, HFILL
}
5486 { &hf_dcbx_feature_pfc_prio3
,
5487 { "PFC for Priority 3", "lldp.dcbx.feature.pfc.prio3", FT_BOOLEAN
, 8,
5488 TFS(&tfs_enabled_disabled
), 0x8, NULL
, HFILL
}
5490 { &hf_dcbx_feature_pfc_prio4
,
5491 { "PFC for Priority 4", "lldp.dcbx.feature.pfc.prio4", FT_BOOLEAN
, 8,
5492 TFS(&tfs_enabled_disabled
), 0x10, NULL
, HFILL
}
5494 { &hf_dcbx_feature_pfc_prio5
,
5495 { "PFC for Priority 5", "lldp.dcbx.feature.pfc.prio5", FT_BOOLEAN
, 8,
5496 TFS(&tfs_enabled_disabled
), 0x20, NULL
, HFILL
}
5498 { &hf_dcbx_feature_pfc_prio6
,
5499 { "PFC for Priority 6", "lldp.dcbx.feature.pfc.prio6", FT_BOOLEAN
, 8,
5500 TFS(&tfs_enabled_disabled
), 0x40, NULL
, HFILL
}
5502 { &hf_dcbx_feature_pfc_prio7
,
5503 { "PFC for Priority 7", "lldp.dcbx.feature.pfc.prio7", FT_BOOLEAN
, 8,
5504 TFS(&tfs_enabled_disabled
), 0x80, NULL
, HFILL
}
5506 { &hf_dcbx_feature_pfc_numtcs
,
5507 { "Number of Traffic Classes Supported", "lldp.dcbx.feature.pfc.numtcs", FT_UINT8
, BASE_HEX
,
5508 NULL
, 0, NULL
, HFILL
}
5510 { &hf_dcbx_feature_app_proto
,
5511 { "Application Protocol Id", "lldp.dcbx.feature.app.proto", FT_UINT16
, BASE_HEX
,
5512 NULL
, 0, NULL
, HFILL
}
5514 { &hf_dcbx_feature_app_selector
,
5515 { "Selector Field", "lldp.dcbx.feature.app.sf", FT_UINT24
, BASE_DEC
,
5516 VALS(dcbx_app_selector
), 0x3 << 16, NULL
, HFILL
}
5518 { &hf_dcbx_feature_app_oui
,
5519 { "Application OUI", "lldp.dcbx.feature.app.oui", FT_UINT24
, BASE_HEX
,
5520 NULL
, ~(0x3 << 16), NULL
, HFILL
}
5522 { &hf_dcbx_feature_app_prio
,
5523 { "Application Priority", "lldp.dcbx.feature.app.prio", FT_UINT8
, BASE_DEC
,
5524 NULL
, 0x0, NULL
, HFILL
}
5526 { &hf_dcbx_feature_flag_llink_type
,
5527 { "Logical Link Down Type", "lldp.dcbx.feature.llink.type", FT_UINT8
, BASE_HEX
,
5528 VALS(dcbx_llink_types
), 0x80, NULL
, HFILL
}
5530 { &hf_ieee_802_1_subtype
,
5531 { "IEEE 802.1 Subtype", "lldp.ieee.802_1.subtype", FT_UINT8
, BASE_HEX
,
5532 VALS(ieee_802_1_subtypes
), 0x0, NULL
, HFILL
}
5534 { &hf_ieee_802_1_port_and_vlan_id_flag
,
5535 { "Flags", "lldp.ieee.802_1.port_and_vlan_id_flag", FT_UINT8
, BASE_HEX
,
5536 NULL
, 0x0, NULL
, HFILL
}
5538 { &hf_ieee_802_1_port_and_vlan_id_flag_supported
,
5539 { "Port and Protocol VLAN", "lldp.ieee.802_1.port_and_vlan_id_flag.supported", FT_BOOLEAN
, 8,
5540 TFS(&tfs_supported_not_supported
), 0x02, NULL
, HFILL
}
5542 { &hf_ieee_802_1_port_and_vlan_id_flag_enabled
,
5543 { "Port and Protocol VLAN", "lldp.ieee.802_1.port_and_vlan_id_flag.enabled", FT_BOOLEAN
, 8,
5544 TFS(&tfs_enabled_disabled
), 0x04, NULL
, HFILL
}
5546 { &hf_ieee_802_1_port_vlan_id
,
5547 { "Port VLAN Identifier", "lldp.ieee.802_1.port_vlan.id", FT_UINT16
, BASE_DEC_HEX
,
5548 NULL
, 0x0, NULL
, HFILL
}
5550 { &hf_ieee_802_1_port_proto_vlan_id
,
5551 { "Port and Protocol VLAN Identifier", "lldp.ieee.802_1.port_proto_vlan.id", FT_UINT16
, BASE_DEC_HEX
,
5552 NULL
, 0x0, NULL
, HFILL
}
5554 { &hf_ieee_802_1_vlan_id
,
5555 { "VLAN Identifier", "lldp.ieee.802_1.vlan.id", FT_UINT16
, BASE_DEC_HEX
,
5556 NULL
, 0x0, NULL
, HFILL
}
5558 { &hf_ieee_802_1_vlan_name_length
,
5559 { "VLAN Name Length", "lldp.ieee.802_1.vlan.name_len", FT_UINT8
, BASE_DEC
,
5560 NULL
, 0x0, NULL
, HFILL
}
5562 { &hf_ieee_802_1_vlan_name
,
5563 { "VLAN Name", "lldp.ieee.802_1.vlan.name", FT_STRINGZ
, BASE_NONE
,
5564 NULL
, 0x0, NULL
, HFILL
}
5566 { &hf_ieee_802_1_proto_id_length
,
5567 { "Protocol Identity Length", "lldp.ieee.802_1.proto.id_length", FT_UINT8
, BASE_DEC
,
5568 NULL
, 0x0, NULL
, HFILL
}
5570 { &hf_ieee_802_1_proto_id
,
5571 { "Protocol Identity", "lldp.ieee.802_1.proto.id", FT_BYTES
, BASE_NONE
,
5572 NULL
, 0x0, NULL
, HFILL
}
5574 { &hf_ieee_802_1_aggregation_status
,
5575 { "Aggregation Status", "lldp.ieee.802_1.aggregation_status", FT_UINT8
, BASE_HEX
,
5576 NULL
, 0x0, NULL
, HFILL
}
5578 { &hf_ieee_802_1_aggregation_status_cap
,
5579 { "Aggregation Capability", "lldp.ieee.802_1.aggregation_status.cap", FT_BOOLEAN
, 8,
5580 TFS(&tfs_yes_no
), 0x01, NULL
, HFILL
}
5582 { &hf_ieee_802_1_aggregation_status_enabled
,
5583 { "Aggregation Status", "lldp.ieee.802_1.aggregation_status.enabled", FT_BOOLEAN
, 8,
5584 TFS(&tfs_enabled_disabled
), 0x02, NULL
, HFILL
}
5586 { &hf_ieee_802_1_aggregation_status_porttype
,
5587 { "Aggregation Status", "lldp.ieee.802_1.aggregation_status.porttype", FT_UINT8
, BASE_DEC
,
5588 VALS(porttype_values
), 0x0c, NULL
, HFILL
}
5590 { &hf_ieee_802_1_aggregated_port_id
,
5591 { "Aggregated Port Id", "lldp.ieee.802_1.aggregated_port_id", FT_UINT32
, BASE_DEC
,
5592 NULL
, 0, NULL
, HFILL
}
5594 { &hf_ieee_8021qau_cnpv_prio0
,
5595 { "Priority 0 CNPV Capability", "lldp.ieee.802_1qau.cnpv.prio0", FT_BOOLEAN
, 8,
5596 TFS(&tfs_enabled_disabled
), 0x01, NULL
, HFILL
}
5598 { &hf_ieee_8021qau_cnpv_prio1
,
5599 { "Priority 1 CNPV Capability", "lldp.ieee.802_1qau.cnpv.prio1", FT_BOOLEAN
, 8,
5600 TFS(&tfs_enabled_disabled
), 0x02, NULL
, HFILL
}
5602 { &hf_ieee_8021qau_cnpv_prio2
,
5603 { "Priority 2 CNPV Capability", "lldp.ieee.802_1qau.cnpv.prio2", FT_BOOLEAN
, 8,
5604 TFS(&tfs_enabled_disabled
), 0x04, NULL
, HFILL
}
5606 { &hf_ieee_8021qau_cnpv_prio3
,
5607 { "Priority 3 CNPV Capability", "lldp.ieee.802_1qau.cnpv.prio3", FT_BOOLEAN
, 8,
5608 TFS(&tfs_enabled_disabled
), 0x08, NULL
, HFILL
}
5610 { &hf_ieee_8021qau_cnpv_prio4
,
5611 { "Priority 4 CNPV Capability", "lldp.ieee.802_1qau.cnpv.prio4", FT_BOOLEAN
, 8,
5612 TFS(&tfs_enabled_disabled
), 0x10, NULL
, HFILL
}
5614 { &hf_ieee_8021qau_cnpv_prio5
,
5615 { "Priority 5 CNPV Capability", "lldp.ieee.802_1qau.cnpv.prio5", FT_BOOLEAN
, 8,
5616 TFS(&tfs_enabled_disabled
), 0x20, NULL
, HFILL
}
5618 { &hf_ieee_8021qau_cnpv_prio6
,
5619 { "Priority 6 CNPV Capability", "lldp.ieee.802_1qau.cnpv.prio6", FT_BOOLEAN
, 8,
5620 TFS(&tfs_enabled_disabled
), 0x40, NULL
, HFILL
}
5622 { &hf_ieee_8021qau_cnpv_prio7
,
5623 { "Priority 7 CNPV Capability", "lldp.ieee.802_1qau.cnpv.prio7", FT_BOOLEAN
, 8,
5624 TFS(&tfs_enabled_disabled
), 0x80, NULL
, HFILL
}
5626 { &hf_ieee_8021qau_ready_prio0
,
5627 { "Priority 0 Ready Indicator", "lldp.ieee.802_1qau.ready.prio0", FT_BOOLEAN
, 8,
5628 TFS(&tfs_set_notset
), 0x01, NULL
, HFILL
}
5630 { &hf_ieee_8021qau_ready_prio1
,
5631 { "Priority 1 Ready Indicator", "lldp.ieee.802_1qau.ready.prio1", FT_BOOLEAN
, 8,
5632 TFS(&tfs_set_notset
), 0x02, NULL
, HFILL
}
5634 { &hf_ieee_8021qau_ready_prio2
,
5635 { "Priority 2 Ready Indicator", "lldp.ieee.802_1qau.ready.prio2", FT_BOOLEAN
, 8,
5636 TFS(&tfs_set_notset
), 0x04, NULL
, HFILL
}
5638 { &hf_ieee_8021qau_ready_prio3
,
5639 { "Priority 3 Ready Indicator", "lldp.ieee.802_1qau.ready.prio3", FT_BOOLEAN
, 8,
5640 TFS(&tfs_set_notset
), 0x08, NULL
, HFILL
}
5642 { &hf_ieee_8021qau_ready_prio4
,
5643 { "Priority 4 Ready Indicator", "lldp.ieee.802_1qau.ready.prio4", FT_BOOLEAN
, 8,
5644 TFS(&tfs_set_notset
), 0x10, NULL
, HFILL
}
5646 { &hf_ieee_8021qau_ready_prio5
,
5647 { "Priority 5 Ready Indicator", "lldp.ieee.802_1qau.ready.prio5", FT_BOOLEAN
, 8,
5648 TFS(&tfs_set_notset
), 0x20, NULL
, HFILL
}
5650 { &hf_ieee_8021qau_ready_prio6
,
5651 { "Priority 6 Ready Indicator", "lldp.ieee.802_1qau.ready.prio6", FT_BOOLEAN
, 8,
5652 TFS(&tfs_set_notset
), 0x40, NULL
, HFILL
}
5654 { &hf_ieee_8021qau_ready_prio7
,
5655 { "Priority 7 Ready Indicator", "lldp.ieee.802_1qau.ready.prio7", FT_BOOLEAN
, 8,
5656 TFS(&tfs_set_notset
), 0x80, NULL
, HFILL
}
5658 { &hf_ieee_8021az_feature_flag_willing
,
5659 { "Willing", "lldp.dcbx.ieee.willing", FT_BOOLEAN
, 8,
5660 TFS(&tfs_yes_no
), 0x80, NULL
, HFILL
}
5662 { &hf_ieee_8021az_feature_flag_cbs
,
5663 { "Credit-Based Shaper", "lldp.dcbx.ieee.ets.cbs", FT_BOOLEAN
, 8,
5664 TFS(&tfs_supported_not_supported
), 0x40, NULL
, HFILL
}
5666 { &hf_ieee_8021az_maxtcs
,
5667 { "Maximum Number of Traffic Classes", "lldp.dcbx.ieee.ets.maxtcs", FT_UINT8
, BASE_DEC
,
5668 NULL
, 0x7, NULL
, HFILL
}
5670 { &hf_ieee_8021az_tsa_class0
,
5671 { "TSA for Traffic Class 0", "lldp.dcbx.ieee.ets.tsa0", FT_UINT8
, BASE_DEC
,
5672 VALS(dcbx_ieee_8021az_tsa
), 0, "Reserved", HFILL
}
5674 { &hf_ieee_8021az_tsa_class1
,
5675 { "TSA for Traffic Class 1", "lldp.dcbx.ieee.ets.tsa1", FT_UINT8
, BASE_DEC
,
5676 VALS(dcbx_ieee_8021az_tsa
), 0, "Reserved", HFILL
}
5678 { &hf_ieee_8021az_tsa_class2
,
5679 { "TSA for Traffic Class 2", "lldp.dcbx.ieee.ets.tsa2", FT_UINT8
, BASE_DEC
,
5680 VALS(dcbx_ieee_8021az_tsa
), 0, "Reserved", HFILL
}
5682 { &hf_ieee_8021az_tsa_class3
,
5683 { "TSA for Traffic Class 3", "lldp.dcbx.ieee.ets.tsa3", FT_UINT8
, BASE_DEC
,
5684 VALS(dcbx_ieee_8021az_tsa
), 0, "Reserved", HFILL
}
5686 { &hf_ieee_8021az_tsa_class4
,
5687 { "TSA for Traffic Class 4", "lldp.dcbx.ieee.ets.tsa4", FT_UINT8
, BASE_DEC
,
5688 VALS(dcbx_ieee_8021az_tsa
), 0, "Reserved", HFILL
}
5690 { &hf_ieee_8021az_tsa_class5
,
5691 { "TSA for Traffic Class 5", "lldp.dcbx.ieee.ets.tsa5", FT_UINT8
, BASE_DEC
,
5692 VALS(dcbx_ieee_8021az_tsa
), 0, "Reserved", HFILL
}
5694 { &hf_ieee_8021az_tsa_class6
,
5695 { "TSA for Traffic Class 6", "lldp.dcbx.ieee.ets.tsa6", FT_UINT8
, BASE_DEC
,
5696 VALS(dcbx_ieee_8021az_tsa
), 0, "Reserved", HFILL
}
5698 { &hf_ieee_8021az_tsa_class7
,
5699 { "TSA for Traffic Class 7", "lldp.dcbx.ieee.ets.tsa7", FT_UINT8
, BASE_DEC
,
5700 VALS(dcbx_ieee_8021az_tsa
), 0, "Reserved", HFILL
}
5702 { &hf_ieee_8021az_feature_flag_mbc
,
5703 { "MACsec Bypass Capability", "lldp.dcbx.ieee.pfc.mbc", FT_BOOLEAN
, 8,
5704 TFS(&tfs_capable_not_capable
), 0x40, NULL
, HFILL
}
5706 { &hf_ieee_8021az_pfc_numtcs
,
5707 { "Max PFC Enabled Traffic Classes", "lldp.dcbx.ieee.pfc.numtcs", FT_UINT8
, BASE_DEC
,
5708 NULL
, 0xF, NULL
, HFILL
}
5710 { &hf_ieee_8021az_app_reserved
,
5711 { "Reserved", "lldp.dcbx.ieee.app.reserved", FT_UINT8
, BASE_HEX
,
5712 NULL
, 0x0, NULL
, HFILL
}
5714 { &hf_ieee_8021az_app_prio
,
5715 { "Application Priority", "lldp.dcbx.ieee.app.prio", FT_UINT8
, BASE_DEC
,
5716 NULL
, 0xE0, NULL
, HFILL
}
5718 { &hf_ieee_8021az_app_selector
,
5719 { "Application Selector", "lldp.dcbx.iee.app.sf", FT_UINT8
, BASE_DEC
,
5720 VALS(dcbx_ieee_8021az_sf
), 0x7, NULL
, HFILL
}
5722 { &hf_ieee_802_3_subtype
,
5723 { "IEEE 802.3 Subtype", "lldp.ieee.802_3.subtype", FT_UINT8
, BASE_HEX
,
5724 VALS(ieee_802_3_subtypes
), 0x0, NULL
, HFILL
}
5726 { &hf_ieee_802_3_mac_phy_auto_neg_status
,
5727 { "Auto-Negotiation Support/Status", "lldp.ieee.802_3.mac_phy_auto_neg_status", FT_UINT8
, BASE_HEX
,
5728 NULL
, 0x0, NULL
, HFILL
}
5730 { &hf_ieee_802_3_mac_phy_auto_neg_status_supported
,
5731 { "Auto-Negotiation", "lldp.ieee.802_3.mac_phy_auto_neg_status.supported", FT_BOOLEAN
, 8,
5732 TFS(&tfs_supported_not_supported
), 0x01, NULL
, HFILL
}
5734 { &hf_ieee_802_3_mac_phy_auto_neg_status_enabled
,
5735 { "Auto-Negotiation", "lldp.ieee.802_3.mac_phy_auto_neg_status.enabled", FT_BOOLEAN
, 8,
5736 TFS(&tfs_enabled_disabled
), 0x02, NULL
, HFILL
}
5738 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps
,
5739 { "PMD Auto-Negotiation Advertised Capability", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps", FT_UINT16
, BASE_HEX
,
5740 NULL
, 0x0, NULL
, HFILL
}
5742 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_tfd
,
5743 { "1000BASE-T (full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.1000base_tfd", FT_BOOLEAN
, 16,
5744 TFS(&tfs_capable_not_capable
), AUTONEG_1000BASE_TFD
, NULL
, HFILL
}
5746 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_t
,
5747 { "1000BASE-T (half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.1000base_t", FT_BOOLEAN
, 16,
5748 TFS(&tfs_capable_not_capable
), AUTONEG_1000BASE_T
, NULL
, HFILL
}
5750 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_xfd
,
5751 { "1000BASE-X (-LX, -SX, -CX full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.1000base_xfd", FT_BOOLEAN
, 16,
5752 TFS(&tfs_capable_not_capable
), AUTONEG_1000BASE_XFD
, NULL
, HFILL
}
5754 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_x
,
5755 { "1000BASE-X (-LX, -SX, -CX half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.1000base_x", FT_BOOLEAN
, 16,
5756 TFS(&tfs_capable_not_capable
), AUTONEG_1000BASE_X
, NULL
, HFILL
}
5758 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_bpause
,
5759 { "Asymmetric and Symmetric PAUSE (for full-duplex links)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.fdx_bpause", FT_BOOLEAN
, 16,
5760 TFS(&tfs_capable_not_capable
), AUTONEG_FDX_BPAUSE
, NULL
, HFILL
}
5762 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_spause
,
5763 { "Symmetric PAUSE (for full-duplex links)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.fdx_spause", FT_BOOLEAN
, 16,
5764 TFS(&tfs_capable_not_capable
), AUTONEG_FDX_SPAUSE
, NULL
, HFILL
}
5766 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_apause
,
5767 { "Asymmetric PAUSE (for full-duplex links)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.fdx_apause", FT_BOOLEAN
, 16,
5768 TFS(&tfs_capable_not_capable
), AUTONEG_FDX_APAUSE
, NULL
, HFILL
}
5770 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_pause
,
5771 { "PAUSE (for full-duplex links)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.fdx_pause", FT_BOOLEAN
, 16,
5772 TFS(&tfs_capable_not_capable
), AUTONEG_FDX_PAUSE
, NULL
, HFILL
}
5774 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2fd
,
5775 { "100BASE-T2 (full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.100base_t2fd", FT_BOOLEAN
, 16,
5776 TFS(&tfs_capable_not_capable
), AUTONEG_100BASE_T2FD
, NULL
, HFILL
}
5778 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2
,
5779 { "100BASE-T2 (half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.100base_t2", FT_BOOLEAN
, 16,
5780 TFS(&tfs_capable_not_capable
), AUTONEG_100BASE_T2
, NULL
, HFILL
}
5782 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_txfd
,
5783 { "100BASE-TX (full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.100base_txfd", FT_BOOLEAN
, 16,
5784 TFS(&tfs_capable_not_capable
), AUTONEG_100BASE_TXFD
, NULL
, HFILL
}
5786 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_tx
,
5787 { "100BASE-TX (half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.100base_tx", FT_BOOLEAN
, 16,
5788 TFS(&tfs_capable_not_capable
), AUTONEG_100BASE_TX
, NULL
, HFILL
}
5790 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t4
,
5791 { "100BASE-T4", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.100base_t4", FT_BOOLEAN
, 16,
5792 TFS(&tfs_capable_not_capable
), AUTONEG_100BASE_T4
, NULL
, HFILL
}
5794 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_tfd
,
5795 { "10BASE-T (full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.10base_tfd", FT_BOOLEAN
, 16,
5796 TFS(&tfs_capable_not_capable
), AUTONEG_10BASET_FD
, NULL
, HFILL
}
5798 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_t
,
5799 { "10BASE-T (half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.10base_t", FT_BOOLEAN
, 16,
5800 TFS(&tfs_capable_not_capable
), AUTONEG_10BASE_T
, NULL
, HFILL
}
5802 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_other
,
5803 { "Other or unknown", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps.other", FT_BOOLEAN
, 16,
5804 TFS(&tfs_capable_not_capable
), AUTONEG_OTHER
, NULL
, HFILL
}
5806 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_tfd
,
5807 { "1000BASE-T (full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.1000base_tfd", FT_BOOLEAN
, 16,
5808 TFS(&tfs_capable_not_capable
), INV_AUTONEG_1000BASE_TFD
, NULL
, HFILL
}
5810 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_t
,
5811 { "1000BASE-T (half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.1000base_t", FT_BOOLEAN
, 16,
5812 TFS(&tfs_capable_not_capable
), INV_AUTONEG_1000BASE_T
, NULL
, HFILL
}
5814 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_xfd
,
5815 { "1000BASE-X (-LX, -SX, -CX full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.1000base_xfd", FT_BOOLEAN
, 16,
5816 TFS(&tfs_capable_not_capable
), INV_AUTONEG_1000BASE_XFD
, NULL
, HFILL
}
5818 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_x
,
5819 { "1000BASE-X (-LX, -SX, -CX half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.1000base_x", FT_BOOLEAN
, 16,
5820 TFS(&tfs_capable_not_capable
), INV_AUTONEG_1000BASE_X
, NULL
, HFILL
}
5822 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_bpause
,
5823 { "Asymmetric and Symmetric PAUSE (for full-duplex links)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.fdx_bpause", FT_BOOLEAN
, 16,
5824 TFS(&tfs_capable_not_capable
), INV_AUTONEG_FDX_BPAUSE
, NULL
, HFILL
}
5826 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_spause
,
5827 { "Symmetric PAUSE (for full-duplex links)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.fdx_spause", FT_BOOLEAN
, 16,
5828 TFS(&tfs_capable_not_capable
), INV_AUTONEG_FDX_SPAUSE
, NULL
, HFILL
}
5830 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_apause
,
5831 { "Asymmetric PAUSE (for full-duplex links)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.fdx_apause", FT_BOOLEAN
, 16,
5832 TFS(&tfs_capable_not_capable
), INV_AUTONEG_FDX_APAUSE
, NULL
, HFILL
}
5834 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_pause
,
5835 { "PAUSE (for full-duplex links)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.fdx_pause", FT_BOOLEAN
, 16,
5836 TFS(&tfs_capable_not_capable
), INV_AUTONEG_FDX_PAUSE
, NULL
, HFILL
}
5838 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2fd
,
5839 { "100BASE-T2 (full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.100base_t2fd", FT_BOOLEAN
, 16,
5840 TFS(&tfs_capable_not_capable
), INV_AUTONEG_100BASE_T2FD
, NULL
, HFILL
}
5842 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2
,
5843 { "100BASE-T2 (half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.100base_t2", FT_BOOLEAN
, 16,
5844 TFS(&tfs_capable_not_capable
), INV_AUTONEG_100BASE_T2
, NULL
, HFILL
}
5846 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_txfd
,
5847 { "100BASE-TX (full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.100base_txfd", FT_BOOLEAN
, 16,
5848 TFS(&tfs_capable_not_capable
), INV_AUTONEG_100BASE_TXFD
, NULL
, HFILL
}
5850 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_tx
,
5851 { "100BASE-TX (half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.100base_tx", FT_BOOLEAN
, 16,
5852 TFS(&tfs_capable_not_capable
), INV_AUTONEG_100BASE_TX
, NULL
, HFILL
}
5854 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t4
,
5855 { "100BASE-T4", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.100base_t4", FT_BOOLEAN
, 16,
5856 TFS(&tfs_capable_not_capable
), INV_AUTONEG_100BASE_T4
, NULL
, HFILL
}
5858 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_tfd
,
5859 { "10BASE-T (full duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.10base_tfd", FT_BOOLEAN
, 16,
5860 TFS(&tfs_capable_not_capable
), INV_AUTONEG_10BASET_FD
, NULL
, HFILL
}
5862 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_t
,
5863 { "10BASE-T (half duplex mode)", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.10base_t", FT_BOOLEAN
, 16,
5864 TFS(&tfs_capable_not_capable
), INV_AUTONEG_10BASE_T
, NULL
, HFILL
}
5866 { &hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_other
,
5867 { "Other or unknown", "lldp.ieee.802_3.pmd_auto_neg_advertised_caps_inv.other", FT_BOOLEAN
, 16,
5868 TFS(&tfs_capable_not_capable
), INV_AUTONEG_OTHER
, NULL
, HFILL
}
5870 { &hf_ieee_802_3_pmd_mau_type
,
5871 { "Operational MAU Type", "lldp.ieee.802_3.pmd_mau_type", FT_UINT16
, BASE_HEX
,
5872 VALS(operational_mau_type_values
), 0x0, "Unknown", HFILL
}
5874 { &hf_ieee_802_3_mdi_power_support
,
5875 { "MDI Power Support", "lldp.ieee.802_3.mdi_power_support", FT_UINT8
, BASE_HEX
,
5876 NULL
, 0x0, NULL
, HFILL
}
5878 { &hf_ieee_802_3_mdi_power_support_port_class
,
5879 { "Port Class", "lldp.ieee.802_3.mdi_power_support.port_class", FT_BOOLEAN
, 8,
5880 TFS(&tfs_ieee_802_3_pse_pd
), 0x01, NULL
, HFILL
}
5882 { &hf_ieee_802_3_mdi_power_support_pse_power_support
,
5883 { "PSE MDI Power", "lldp.ieee.802_3.mdi_power_support.supported", FT_BOOLEAN
, 8,
5884 TFS(&tfs_supported_not_supported
), 0x02, NULL
, HFILL
}
5886 { &hf_ieee_802_3_mdi_power_support_pse_power_enabled
,
5887 { "PSE MDI Power", "lldp.ieee.802_3.mdi_power_support.enabled", FT_BOOLEAN
, 8,
5888 TFS(&tfs_enabled_disabled
), 0x04, NULL
, HFILL
}
5890 { &hf_ieee_802_3_mdi_power_support_pse_pairs
,
5891 { "PSE Pairs Control Ability", "lldp.ieee.802_3.mdi_power_support.pse_pairs", FT_BOOLEAN
, 8,
5892 TFS(&tfs_yes_no
), 0x08, NULL
, HFILL
}
5894 { &hf_ieee_802_3_mdi_power_pse_pair
,
5895 { "PSE Power Pair", "lldp.ieee.802_3.mdi_pse_pair", FT_UINT8
, BASE_DEC
,
5896 VALS(power_pair_802_3
), 0x0, NULL
, HFILL
}
5898 { &hf_ieee_802_3_mdi_power_class
,
5899 { "Power Class", "lldp.ieee.802_3.mdi_power_class", FT_UINT8
, BASE_DEC
,
5900 VALS(power_class_802_3
), 0x0, NULL
, HFILL
}
5902 { &hf_ieee_802_3_mdi_power_type
,
5903 { "Power Type", "lldp.ieee.802_3.mdi_power_type", FT_UINT8
, BASE_DEC
,
5904 VALS(power_type_802_3
), 0xC0, "Unknown", HFILL
}
5906 { &hf_ieee_802_3_mdi_power_source
,
5907 { "Power Source", "lldp.ieee.802_3.mdi_power_source", FT_UINT8
, BASE_DEC
,
5908 NULL
, 0x30, NULL
, HFILL
}
5910 { &hf_ieee_802_3_mdi_power_priority
,
5911 { "Power Priority", "lldp.ieee.802_3.mdi_power_priority", FT_UINT8
, BASE_DEC
,
5912 VALS(media_power_priority
), 0x03, NULL
, HFILL
}
5914 { &hf_ieee_802_3_mdi_power_pd4pid
,
5915 { "PD 4PID", "lldp.ieee.802_3.mdi_power_pd4pid", FT_BOOLEAN
, 8,
5916 TFS(&tfs_supported_not_supported
), 0x4, NULL
, HFILL
}
5918 { &hf_ieee_802_3_mdi_requested_power
,
5919 { "PD Requested Power Value", "lldp.ieee.802_3.mdi_pde_requested", FT_UINT16
, BASE_CUSTOM
,
5920 CF_FUNC(mdi_power_base
), 0, NULL
, HFILL
}
5922 { &hf_ieee_802_3_mdi_allocated_power
,
5923 { "PSE Allocated Power Value", "lldp.ieee.802_3.mdi_pse_allocated", FT_UINT16
, BASE_CUSTOM
,
5924 CF_FUNC(mdi_power_base
), 0, NULL
, HFILL
}
5926 { &hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_a
,
5927 { "DS PD Requested Power Value Mode A", "lldp.ieee.802_3.bt_ds_pd_requested_power_value_mode_a", FT_UINT16
, BASE_CUSTOM
,
5928 CF_FUNC(mdi_power_base
), 0, NULL
, HFILL
}
5930 { &hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_b
,
5931 { "DS PD Requested Power Value Mode B", "lldp.ieee.802_3.bt_ds_pd_requested_power_value_mode_b", FT_UINT16
, BASE_CUSTOM
,
5932 CF_FUNC(mdi_power_base
), 0, NULL
, HFILL
}
5934 { &hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_a
,
5935 { "DS PSE Allocated Power Value Alt A", "lldp.ieee.802_3.bt_ds_pse_allocated_power_value_alt_a", FT_UINT16
, BASE_CUSTOM
,
5936 CF_FUNC(mdi_power_base
), 0, NULL
, HFILL
}
5938 { &hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_b
,
5939 { "DS PSE Allocated Power Value Alt B", "lldp.ieee.802_3.bt_ds_pse_allocated_power_value_alt_b", FT_UINT16
, BASE_CUSTOM
,
5940 CF_FUNC(mdi_power_base
), 0, NULL
, HFILL
}
5942 { &hf_ieee_802_3_bt_power_status
,
5943 { "Power Status", "lldp.ieee.802_3.bt_power_status", FT_UINT16
, BASE_HEX
,
5944 NULL
, 0, NULL
, HFILL
}
5946 { &hf_ieee_802_3_bt_pse_powering_status
,
5947 { "PSE Powering Status", "lldp.ieee.802_3.bt_pse_powering_status", FT_UINT16
, BASE_DEC
,
5948 VALS(pse_powering_status_802_3_bt
), 0xC000, NULL
, HFILL
}
5950 { &hf_ieee_802_3_bt_pd_powered_status
,
5951 { "PD Powered Status", "lldp.ieee.802_3.bt_pd_powered_status", FT_UINT16
, BASE_DEC
,
5952 VALS(pd_powered_status_802_3_bt
), 0x3000, NULL
, HFILL
}
5954 { &hf_ieee_802_3_bt_pse_power_pairs_ext
,
5955 { "PSE Power Pairs ext", "lldp.ieee.802_3.bt_pse_power_pairs_ext", FT_UINT16
, BASE_DEC
,
5956 VALS(power_pairs_ext_802_3_bt
), 0x0C00, NULL
, HFILL
}
5958 { &hf_ieee_802_3_bt_ds_pwr_class_ext_a
,
5959 { "DS Pwr Class Ext A", "lldp.ieee.802_3.bt_ds_pwr_class_ext_a", FT_UINT16
, BASE_DEC
,
5960 VALS(power_type_ext_mode_ab_802_3_bt
), 0x0380, NULL
, HFILL
}
5962 { &hf_ieee_802_3_bt_ds_pwr_class_ext_b
,
5963 { "DS Pwr Class Ext B", "lldp.ieee.802_3.bt_ds_pwr_class_ext_b", FT_UINT16
, BASE_DEC
,
5964 VALS(power_type_ext_mode_ab_802_3_bt
), 0x0070, NULL
, HFILL
}
5966 { &hf_ieee_802_3_bt_pwr_class_ext
,
5967 { "Pwr Class Ext", "lldp.ieee.802_3.bt_pwr_class_ext_", FT_UINT16
, BASE_DEC
,
5968 VALS(power_class_ext_802_3_bt
), 0x000F, NULL
, HFILL
}
5970 { &hf_ieee_802_3_bt_system_setup
,
5971 { "System Setup", "lldp.ieee.802_3.bt_system_setup", FT_UINT8
, BASE_HEX
,
5972 NULL
, 0, NULL
, HFILL
}
5974 { &hf_ieee_802_3_bt_power_type_ext
,
5975 { "Power Type Ext", "lldp.ieee.802_3.bt_power_type_ext", FT_UINT8
, BASE_DEC
,
5976 VALS(power_type_ext_802_3_bt
), 0x0E, NULL
, HFILL
}
5978 { &hf_ieee_802_3_bt_power_pd_load
,
5979 { "PD Load", "lldp.ieee.802_3.bt_power.pd_load", FT_BOOLEAN
, 8,
5980 TFS(&tfs_ieee_802_3_pd_load
), 0x1, NULL
, HFILL
}
5982 { &hf_ieee_802_3_bt_pse_maximum_available_power_value
,
5983 { "PSE Maximum Available Power Value", "lldp.ieee.802_3.bt_pse_maximum_available_power_value", FT_UINT16
, BASE_CUSTOM
,
5984 CF_FUNC(mdi_power_base
), 0, NULL
, HFILL
}
5986 { &hf_ieee_802_3_bt_autoclass
,
5987 { "Autoclass", "lldp.ieee.802_3.bt_autoclass", FT_UINT8
, BASE_HEX
,
5988 NULL
, 0, NULL
, HFILL
}
5990 { &hf_ieee_802_3_bt_pse_autoclass_support
,
5991 { "PSE Autoclass support", "lldp.ieee.802_3.bt_pse_autoclass_support", FT_UINT8
, BASE_DEC
,
5992 NULL
, 0x04, NULL
, HFILL
}
5994 { &hf_ieee_802_3_bt_autoclass_completed
,
5995 { "Autoclass Completed", "lldp.ieee.802_3.bt_autoclass_completed", FT_UINT8
, BASE_DEC
,
5996 NULL
, 0x02, NULL
, HFILL
}
5998 { &hf_ieee_802_3_bt_autoclass_request
,
5999 { "Autoclass Request", "lldp.ieee.802_3.bt_autoclass_request", FT_UINT8
, BASE_DEC
,
6000 NULL
, 0x01, NULL
, HFILL
}
6002 { &hf_ieee_802_3_bt_autoclass_reserved
,
6003 { "Autoclass Reserved", "lldp.ieee.802_3.bt_autoclass_reserved", FT_UINT8
, BASE_HEX
,
6004 NULL
, 0xF8, NULL
, HFILL
}
6006 { &hf_ieee_802_3_bt_power_down
,
6007 { "Power down", "lldp.ieee.802_3.bt_power_down", FT_UINT24
, BASE_HEX
,
6008 NULL
, 0, NULL
, HFILL
}
6010 { &hf_ieee_802_3_bt_power_down_request
,
6011 { "Power down request", "lldp.ieee.802_3.bt_power_down_request", FT_UINT24
, BASE_DEC
,
6012 NULL
, 0xFC0000, NULL
, HFILL
}
6014 { &hf_ieee_802_3_bt_power_down_time
,
6015 { "Power down time", "lldp.ieee.802_3.bt_power_down_time", FT_UINT24
, BASE_DEC
,
6016 NULL
, 0x03FFFF, NULL
, HFILL
}
6018 { &hf_ieee_802_3_aggregation_status
,
6019 { "Aggregation Status", "lldp.ieee.802_3.aggregation_status", FT_UINT8
, BASE_HEX
,
6020 NULL
, 0x0, NULL
, HFILL
}
6022 { &hf_ieee_802_3_aggregation_status_cap
,
6023 { "Aggregation Capability", "lldp.ieee.802_3.aggregation_status.cap", FT_BOOLEAN
, 8,
6024 TFS(&tfs_yes_no
), 0x01, NULL
, HFILL
}
6026 { &hf_ieee_802_3_aggregation_status_enabled
,
6027 { "Aggregation Status", "lldp.ieee.802_3.aggregation_status.enabled", FT_BOOLEAN
, 8,
6028 TFS(&tfs_enabled_disabled
), 0x02, NULL
, HFILL
}
6030 { &hf_ieee_802_3_aggregated_port_id
,
6031 { "Aggregated Port Id", "lldp.ieee.802_3.aggregated_port_id", FT_UINT32
, BASE_DEC
,
6032 NULL
, 0, NULL
, HFILL
}
6034 { &hf_ieee_802_3_max_frame_size
,
6035 { "Maximum Frame Size", "lldp.ieee.802_3.max_frame_size", FT_UINT16
, BASE_DEC
,
6036 NULL
, 0, NULL
, HFILL
}
6038 { &hf_ieee_802_3_eee_transmit
,
6039 { "Transmit", "lldp.ieee.802_3.eee.transmit", FT_UINT16
, BASE_DEC
,
6040 NULL
, 0, NULL
, HFILL
}
6042 { &hf_ieee_802_3_eee_receive
,
6043 { "Receive", "lldp.ieee.802_3.eee.receive", FT_UINT16
, BASE_DEC
,
6044 NULL
, 0, NULL
, HFILL
}
6046 { &hf_ieee_802_3_eee_fallback_receive
,
6047 { "Fallback Receive", "lldp.ieee.802_3.eee.fallback_receive", FT_UINT16
, BASE_DEC
,
6048 NULL
, 0, NULL
, HFILL
}
6050 { &hf_ieee_802_3_eee_echo_transmit
,
6051 { "Echo Transmit", "lldp.ieee.802_3.eee.echo_transmit", FT_UINT16
, BASE_DEC
,
6052 NULL
, 0, NULL
, HFILL
}
6054 { &hf_ieee_802_3_eee_echo_receive
,
6055 { "Echo Receive", "lldp.ieee.802_3.eee.echo_receive", FT_UINT16
, BASE_DEC
,
6056 NULL
, 0, NULL
, HFILL
}
6058 { &hf_ieee_802_1qbg_subtype
,
6059 { "IEEE 802.1Qbg Subtype", "lldp.ieee.802_1qbg.subtype", FT_UINT8
, BASE_HEX
,
6060 VALS(ieee_802_1qbg_subtypes
), 0x0, NULL
, HFILL
}
6062 { &hf_ieee_802_1qbg_evb_support_caps
,
6063 { "Supported capabilities", "lldp.ieee.802_1qbg.evb_support_caps", FT_UINT16
, BASE_HEX
,
6064 NULL
, 0x0, NULL
, HFILL
}
6066 { &hf_ieee_802_1qbg_evb_support_caps_std
,
6067 { "Standard bridging (STD)", "lldp.ieee.802_1qbg.evb_support_caps.std", FT_BOOLEAN
, 16,
6068 TFS(&tfs_capable_not_capable
), EVB_CAPA_STD
, NULL
, HFILL
}
6070 { &hf_ieee_802_1qbg_evb_support_caps_rr
,
6071 { "Reflective relay (RR)", "lldp.ieee.802_1qbg.evb_support_caps.rr", FT_BOOLEAN
, 16,
6072 TFS(&tfs_capable_not_capable
), EVB_CAPA_RR
, NULL
, HFILL
}
6074 { &hf_ieee_802_1qbg_evb_support_caps_rte
,
6075 { "Retransmission timer exponent (RTE)", "lldp.ieee.802_1qbg.evb_support_caps.rte", FT_BOOLEAN
, 16,
6076 TFS(&tfs_capable_not_capable
), EVB_CAPA_RTE
, NULL
, HFILL
}
6078 { &hf_ieee_802_1qbg_evb_support_caps_ecp
,
6079 { "Edge control protocol (ECP)", "lldp.ieee.802_1qbg.evb_support_caps.ecp", FT_BOOLEAN
, 16,
6080 TFS(&tfs_capable_not_capable
), EVB_CAPA_ECP
, NULL
, HFILL
}
6082 { &hf_ieee_802_1qbg_evb_support_caps_vdp
,
6083 { "VSI discovery protocol (VDP)", "lldp.ieee.802_1qbg.evb_support_caps.vdp", FT_BOOLEAN
, 16,
6084 TFS(&tfs_capable_not_capable
), EVB_CAPA_VDP
, NULL
, HFILL
}
6086 { &hf_ieee_802_1qbg_evb_configure_caps
,
6087 { "Configured capabilities", "lldp.ieee.802_1qbg.evb_configure_caps", FT_UINT16
, BASE_HEX
,
6088 NULL
, 0x0, NULL
, HFILL
}
6090 { &hf_ieee_802_1qbg_evb_configure_caps_std
,
6091 { "Standard bridging (STD)", "lldp.ieee.802_1qbg.evb_configure_caps.std", FT_BOOLEAN
, 16,
6092 TFS(&tfs_capable_not_capable
), EVB_CAPA_STD
, NULL
, HFILL
}
6094 { &hf_ieee_802_1qbg_evb_configure_caps_rr
,
6095 { "Reflective relay (RR)", "lldp.ieee.802_1qbg.evb_configure_caps.rr", FT_BOOLEAN
, 16,
6096 TFS(&tfs_capable_not_capable
), EVB_CAPA_RR
, NULL
, HFILL
}
6098 { &hf_ieee_802_1qbg_evb_configure_caps_rte
,
6099 { "Retransmission timer exponent (RTE)", "lldp.ieee.802_1qbg.evb_configure_caps.rte", FT_BOOLEAN
, 16,
6100 TFS(&tfs_capable_not_capable
), EVB_CAPA_RTE
, NULL
, HFILL
}
6102 { &hf_ieee_802_1qbg_evb_configure_caps_ecp
,
6103 { "Edge control protocol (ECP)", "lldp.ieee.802_1qbg.evb_configure_caps.ecp", FT_BOOLEAN
, 16,
6104 TFS(&tfs_capable_not_capable
), EVB_CAPA_ECP
, NULL
, HFILL
}
6106 { &hf_ieee_802_1qbg_evb_configure_caps_vdp
,
6107 { "VSI discovery protocol (VDP)", "lldp.ieee.802_1qbg.evb_configure_caps.vdp", FT_BOOLEAN
, 16,
6108 TFS(&tfs_capable_not_capable
), EVB_CAPA_VDP
, NULL
, HFILL
}
6110 { &hf_ieee_802_1qbg_evb_supported_vsi
,
6111 { "Supported No of VSIs", "lldp.ieee.802_1qbg.evb_supported_vsi", FT_UINT16
, BASE_DEC
,
6112 NULL
, 0x0, NULL
, HFILL
}
6114 { &hf_ieee_802_1qbg_evb_configured_vsi
,
6115 { "Configured No of VSIs", "lldp.ieee.802_1qbg.evb_configured_vsi", FT_UINT16
, BASE_DEC
,
6116 NULL
, 0x0, NULL
, HFILL
}
6118 { &hf_ieee_802_1qbg_evb_retrans_timer
,
6119 { "Retransmission timer exponent", "lldp.ieee.802_1qbg.evb_retrans_timer", FT_UINT8
, BASE_DEC
,
6120 NULL
, 0x0, NULL
, HFILL
}
6122 { &hf_ieee_802_3br_aec
,
6123 { "Additional Ethernet Capabilities", "lldp.ieee.802_3br.eac", FT_UINT16
, BASE_HEX
,
6124 NULL
, 0x0, NULL
, HFILL
}
6126 { &hf_ieee_802_3br_aec_support
,
6127 { "Preemption capabilities support", "lldp.ieee.802_3br.aec.support", FT_BOOLEAN
, 16,
6128 TFS(&tfs_supported_not_supported
), IEEE_802_3BR_AEC_SUPPORT
, NULL
, HFILL
}
6130 { &hf_ieee_802_3br_aec_enable
,
6131 { "Preemption capabilities enable", "lldp.ieee.802_3br.aec.enable", FT_BOOLEAN
, 16,
6132 TFS(&tfs_enabled_disabled
), IEEE_802_3BR_AEC_ENABLE
, NULL
, HFILL
}
6134 { &hf_ieee_802_3br_aec_active
,
6135 { "Preemption capabilities active", "lldp.ieee.802_3br.aec.active", FT_BOOLEAN
, 16,
6136 TFS(&tfs_active_inactive
), IEEE_802_3BR_AEC_ACTIVE
, NULL
, HFILL
}
6138 { &hf_ieee_802_3br_aec_addfragsize
,
6139 { "Additional Fragment Size", "lldp.ieee.802_3br.aec.addfragsize", FT_UINT16
, BASE_DEC
,
6140 NULL
, IEEE_802_3BR_AEC_ADDFRAGSIZE
, NULL
, HFILL
}
6142 { &hf_ieee_802_3br_aec_reserved
,
6143 { "Reserved", "lldp.ieee.802_3br.aec.reserved", FT_UINT16
, BASE_HEX
,
6144 NULL
, IEEE_802_3BR_AEC_RESERVED
, NULL
, HFILL
}
6146 { &hf_media_tlv_subtype
,
6147 { "Media Subtype", "lldp.media.subtype", FT_UINT8
, BASE_HEX
,
6148 VALS(media_subtypes
), 0x0, NULL
, HFILL
}
6150 { &hf_media_tlv_subtype_caps
,
6151 { "Capabilities", "lldp.media.subtype.caps", FT_UINT16
, BASE_HEX
,
6152 NULL
, 0x0, NULL
, HFILL
}
6154 { &hf_media_tlv_subtype_caps_llpd
,
6155 { "LLDP-MED Capabilities", "lldp.media.subtype.caps.llpd", FT_BOOLEAN
, 16,
6156 TFS(&tfs_capable_not_capable
), MEDIA_CAPABILITY_LLDP
, NULL
, HFILL
}
6158 { &hf_media_tlv_subtype_caps_network_policy
,
6159 { "Network Policy", "lldp.media.subtype.caps.network_policy", FT_BOOLEAN
, 16,
6160 TFS(&tfs_capable_not_capable
), MEDIA_CAPABILITY_NETWORK_POLICY
, NULL
, HFILL
}
6162 { &hf_media_tlv_subtype_caps_location_id
,
6163 { "Location Identification", "lldp.media.subtype.caps.location_id", FT_BOOLEAN
, 16,
6164 TFS(&tfs_capable_not_capable
), MEDIA_CAPABILITY_LOCATION_ID
, NULL
, HFILL
}
6166 { &hf_media_tlv_subtype_caps_mdi_pse
,
6167 { "Extended Power via MDI-PSE", "lldp.media.subtype.caps.mdi_pse", FT_BOOLEAN
, 16,
6168 TFS(&tfs_capable_not_capable
), MEDIA_CAPABILITY_MDI_PSE
, NULL
, HFILL
}
6170 { &hf_media_tlv_subtype_caps_mid_pd
,
6171 { "Extended Power via MDI-PD", "lldp.media.subtype.caps.mid_pd", FT_BOOLEAN
, 16,
6172 TFS(&tfs_capable_not_capable
), MEDIA_CAPABILITY_MDI_PD
, NULL
, HFILL
}
6174 { &hf_media_tlv_subtype_caps_inventory
,
6175 { "Inventory", "lldp.media.subtype.caps.inventory", FT_BOOLEAN
, 16,
6176 TFS(&tfs_capable_not_capable
), MEDIA_CAPABILITY_INVENTORY
, NULL
, HFILL
}
6178 { &hf_media_tlv_subtype_class
,
6179 { "Class Type", "lldp.media.subtype.class", FT_UINT8
, BASE_DEC
,
6180 VALS(media_class_values
), 0x0, "Unknown", HFILL
}
6182 { &hf_media_application_type
,
6183 { "Application Type", "lldp.media.app_type", FT_UINT8
, BASE_DEC
,
6184 VALS(media_application_type
), 0x0, "Unknown", HFILL
}
6186 { &hf_media_policy_flag
,
6187 { "Policy", "lldp.media.policy_flag", FT_BOOLEAN
, 24,
6188 TFS(&tfs_unknown_defined
), 0x800000, NULL
, HFILL
}
6190 { &hf_media_tag_flag
,
6191 { "Tagged", "lldp.media.tag_flag", FT_BOOLEAN
, 24,
6192 TFS(&tfs_yes_no
), 0x400000, NULL
, HFILL
}
6194 { &hf_media_vlan_id
,
6195 { "VLAN Id", "lldp.media.vlan_id", FT_UINT24
, BASE_DEC
,
6196 NULL
, 0x1FFE00, NULL
, HFILL
}
6198 { &hf_media_l2_prio
,
6199 { "L2 Priority", "lldp.media.l2_prio", FT_UINT24
, BASE_DEC
,
6200 NULL
, 0x0001C0, NULL
, HFILL
}
6203 { "DSCP Priority", "lldp.media.dscp", FT_UINT24
, BASE_DEC
,
6204 NULL
, 0x00003F, NULL
, HFILL
}
6206 { &hf_media_loc_data_format
,
6207 { "Location Data Format", "lldp.media.loc.data_format", FT_UINT8
, BASE_DEC
,
6208 VALS(location_data_format
), 0x0, NULL
, HFILL
}
6210 { &hf_media_loc_lat_resolution
,
6211 { "Latitude Resolution", "lldp.media.loc.lat_resolution", FT_UINT8
, BASE_CUSTOM
,
6212 CF_FUNC(latitude_or_longitude_resolution
), 0xFC, NULL
, HFILL
}
6214 { &hf_media_loc_lat
,
6215 { "Latitude", "lldp.media.loc.latitude", FT_UINT40
, BASE_CUSTOM
,
6216 CF_FUNC(latitude_base
), 0x0, NULL
, HFILL
}
6218 { &hf_media_loc_long_resolution
,
6219 { "Longitude Resolution", "lldp.media.loc.long_resolution", FT_UINT8
, BASE_CUSTOM
,
6220 CF_FUNC(latitude_or_longitude_resolution
), 0xFC, NULL
, HFILL
}
6222 { &hf_media_loc_long
,
6223 { "Longitude", "lldp.media.loc.longitude", FT_UINT40
, BASE_CUSTOM
,
6224 CF_FUNC(longitude_base
), 0x0, NULL
, HFILL
}
6226 { &hf_media_loc_alt_type
,
6227 { "Altitude Type", "lldp.media.loc.alt_type", FT_UINT8
, BASE_DEC
,
6228 VALS(altitude_type
), 0xF0, "Unknown", HFILL
}
6230 { &hf_media_loc_alt_resolution
,
6231 { "Altitude Resolution", "lldp.media.loc.alt_resolution", FT_UINT16
, BASE_CUSTOM
,
6232 CF_FUNC(altitude_resolution
), 0x0FC0, NULL
, HFILL
}
6234 { &hf_media_loc_alt
,
6235 { "Altitude", "lldp.media.loc.altitude", FT_UINT32
, BASE_CUSTOM
,
6236 CF_FUNC(altitude_base
), 0x0, NULL
, HFILL
}
6238 { &hf_media_loc_ver
,
6239 { "Ver", "lldp.media.loc.ver", FT_UINT8
, BASE_DEC
,
6240 NULL
, 0xC0, NULL
, HFILL
}
6242 { &hf_media_loc_reserved
,
6243 { "Reserved", "lldp.media.loc.reserved", FT_UINT8
, BASE_DEC
,
6244 NULL
, 0x38, NULL
, HFILL
}
6246 { &hf_media_loc_datum
,
6247 { "Datum", "lldp.media.loc.datum", FT_UINT8
, BASE_DEC
,
6248 VALS(datum_type_values
), 0x07, NULL
, HFILL
}
6250 { &hf_media_civic_lci_length
,
6251 { "LCI Length", "lldp.media.civic.length", FT_UINT8
, BASE_DEC
,
6252 NULL
, 0x0, NULL
, HFILL
}
6254 { &hf_media_civic_what
,
6255 { "What", "lldp.media.civic.what", FT_UINT8
, BASE_DEC
,
6256 VALS(civic_address_what_values
), 0x0, "Unknown", HFILL
}
6258 { &hf_media_civic_country
,
6259 { "Country", "lldp.media.civic.country", FT_STRING
, BASE_NONE
,
6260 NULL
, 0x0, NULL
, HFILL
}
6262 { &hf_media_civic_addr_type
,
6263 { "CA Type", "lldp.media.civic.type", FT_UINT8
, BASE_DEC
,
6264 VALS(civic_address_type_values
), 0x0, "Unknown", HFILL
}
6266 { &hf_media_civic_addr_len
,
6267 { "CA Length", "lldp.media.civic.addr_length", FT_UINT8
, BASE_DEC
,
6268 NULL
, 0x0, NULL
, HFILL
}
6270 { &hf_media_civic_addr_value
,
6271 { "CA Value", "lldp.media.civic.value", FT_STRINGZ
, BASE_NONE
,
6272 NULL
, 0x0, NULL
, HFILL
}
6275 { "ELIN", "lldp.media.ecs", FT_STRINGZ
, BASE_NONE
,
6276 NULL
, 0x0, NULL
, HFILL
}
6278 { &hf_media_power_type
,
6279 { "Power Type", "lldp.media.power.type", FT_UINT8
, BASE_DEC
,
6280 VALS(media_power_type
), 0xC0, "Unknown", HFILL
}
6282 { &hf_media_power_source
,
6283 { "Power Source", "lldp.media.power.source", FT_UINT8
, BASE_DEC
,
6284 NULL
, 0x30, NULL
, HFILL
}
6286 { &hf_media_power_priority
,
6287 { "Power Priority", "lldp.media.power.prio", FT_UINT8
, BASE_DEC
,
6288 VALS(media_power_priority
), 0x0F, "Reserved", HFILL
}
6290 { &hf_media_power_value
,
6291 { "Power Value", "lldp.media.power.value", FT_UINT16
, BASE_CUSTOM
,
6292 CF_FUNC(media_power_base
), 0x0, NULL
, HFILL
}
6294 { &hf_media_hardware
,
6295 { "Hardware Revision", "lldp.media.hardware", FT_STRINGZPAD
, BASE_NONE
,
6296 NULL
, 0x0, NULL
, HFILL
}
6298 { &hf_media_firmware
,
6299 { "Firmware Revision", "lldp.media.firmware", FT_STRINGZPAD
, BASE_NONE
,
6300 NULL
, 0x0, NULL
, HFILL
}
6302 { &hf_media_software
,
6303 { "Software Revision", "lldp.media.software", FT_STRINGZPAD
, BASE_NONE
,
6304 NULL
, 0x0, NULL
, HFILL
}
6307 { "Serial Number", "lldp.media.sn", FT_STRINGZPAD
, BASE_NONE
,
6308 NULL
, 0x0, NULL
, HFILL
}
6310 { &hf_media_manufacturer
,
6311 { "Manufacturer Name", "lldp.media.manufacturer", FT_STRINGZPAD
, BASE_NONE
,
6312 NULL
, 0x0, NULL
, HFILL
}
6315 { "Model Name", "lldp.media.model", FT_STRINGZPAD
, BASE_NONE
,
6316 NULL
, 0x0, NULL
, HFILL
}
6319 { "Asset ID", "lldp.media.asset", FT_STRINGZPAD
, BASE_NONE
,
6320 NULL
, 0x0, NULL
, HFILL
}
6322 { &hf_profinet_tlv_subtype
,
6323 { "Subtype", "lldp.profinet.subtype", FT_UINT8
, BASE_HEX
,
6324 VALS(profinet_subtypes
), 0x0, "PROFINET Subtype", HFILL
}
6326 { &hf_profinet_port_rx_delay_local
,
6327 { "Port RX Delay Local", "lldp.profinet.port_rx_delay_local", FT_UINT32
, BASE_DEC
,
6328 NULL
, 0x0, NULL
, HFILL
}
6330 { &hf_profinet_port_rx_delay_remote
,
6331 { "Port RX Delay Remote", "lldp.profinet.port_rx_delay_remote", FT_UINT32
, BASE_DEC
,
6332 NULL
, 0x0, NULL
, HFILL
}
6334 { &hf_profinet_port_tx_delay_local
,
6335 { "Port TX Delay Local", "lldp.profinet.port_tx_delay_local", FT_UINT32
, BASE_DEC
,
6336 NULL
, 0x0, NULL
, HFILL
}
6338 { &hf_profinet_port_tx_delay_remote
,
6339 { "Port TX Delay Remote", "lldp.profinet.port_tx_delay_remote", FT_UINT32
, BASE_DEC
,
6340 NULL
, 0x0, NULL
, HFILL
}
6342 { &hf_profinet_cable_delay_local
,
6343 { "Port Cable Delay Local", "lldp.profinet.cable_delay_local", FT_UINT32
, BASE_DEC
,
6344 NULL
, 0x0, NULL
, HFILL
}
6346 { &hf_profinet_class2_port_status
,
6347 { "RTClass2 Port Status", "lldp.profinet.rtc2_port_status", FT_UINT16
, BASE_HEX
,
6348 VALS(profinet_port2_status_vals
), 0x0, NULL
, HFILL
}
6350 { &hf_profinet_class3_port_status
,
6351 { "RTClass3 Port Status", "lldp.profinet.rtc3_port_status", FT_UINT16
, BASE_HEX
,
6352 VALS(profinet_port3_status_vals
), 0x07, NULL
, HFILL
}
6354 /* class3_port state got some new BITs */
6355 { &hf_profinet_class3_port_status_Fragmentation
,
6356 { "RTClass3_PortStatus.Fragmentation", "lldp.profinet.rtc3_port_status.fragmentation", FT_BOOLEAN
, 16,
6357 TFS(&tfs_on_off
), 0x1000, NULL
, HFILL
}
6359 { &hf_profinet_class3_port_status_reserved
,
6360 { "RTClass3_PortStatus.reserved", "lldp.profinet.rtc3_port_status.reserved", FT_UINT16
, BASE_HEX
,
6361 NULL
, 0x0FF8, "reserved", HFILL
}
6363 { &hf_profinet_class3_port_status_PreambleLength
,
6364 { "RTClass3_PortStatus.PreambleLength", "lldp.profinet.rtc3_port_status.preambleLength", FT_UINT16
, BASE_HEX
,
6365 VALS(profinet_port3_status_PreambleLength
), 0x2000, NULL
, HFILL
}
6367 { &hf_profinet_mrp_domain_uuid
,
6368 { "MRP DomainUUID", "lldp.profinet.mrp_domain_uuid", FT_GUID
, BASE_NONE
,
6369 NULL
, 0x0, NULL
, HFILL
}
6371 { &hf_profinet_tsn_domain_uuid
,
6372 { "TSN DomainUUID", "lldp.profinet.tsn_domain_uuid", FT_GUID
, BASE_NONE
,
6373 NULL
, 0x0, NULL
, HFILL
}
6375 { &hf_profinet_tsn_nme_management_addr
,
6376 { "TSN NME Management Address", "lldp.profinet.tsn_nme_management_addr", FT_BYTES
, BASE_NONE
,
6377 NULL
, 0x0, NULL
, HFILL
}
6379 { &hf_profinet_tsn_nme_management_addr_str_length
,
6380 { "TSN NME Management Address String Length", "lldp.profinet.tsn_nme_management_addr_str_length", FT_UINT8
, BASE_HEX
,
6381 NULL
, 0x0, NULL
, HFILL
}
6383 { &hf_profinet_tsn_nme_management_addr_subtype
,
6384 { "TSN NME Management Address Subtype", "lldp.profinet.tsn_nme_management_addr_subtype", FT_UINT8
, BASE_HEX
,
6385 NULL
, 0x0, NULL
, HFILL
}
6387 { &hf_profinet_tsn_nme_name_uuid
,
6388 { "TSN NME Name UUID", "lldp.profinet.tsn_nme_name_uuid", FT_GUID
, BASE_NONE
,
6389 NULL
, 0x0, NULL
, HFILL
}
6391 { &hf_profinet_tsn_nme_parameter_uuid
,
6392 { "TSN NME Parameter UUID", "lldp.profinet.tsn_nme_parameter_uuid", FT_GUID
, BASE_NONE
,
6393 NULL
, 0x0, NULL
, HFILL
}
6395 { &hf_profinet_time_domain_number
,
6396 { "Time Domain Number", "lldp.profinet.time_domain_number", FT_UINT16
, BASE_HEX
,
6397 VALS(profinet_time_domain_number_vals
), 0x0, NULL
, HFILL
}
6399 { &hf_profinet_time_domain_uuid
,
6400 { "Time Domain UUID", "lldp.profinet.time_domain_uuid", FT_GUID
, BASE_NONE
,
6401 NULL
, 0x0, NULL
, HFILL
}
6403 { &hf_profinet_time_domain_master_identity
,
6404 { "Time Domain Master Identity", "lldp.profinet.time_domain_master_identity", FT_BYTES
, BASE_NONE
,
6405 0x0, 0x0, NULL
, HFILL
}
6407 { &hf_profinet_mrrt_port_status
,
6408 { "MRRT PortStatus", "lldp.profinet.mrrt_port_status", FT_UINT16
, BASE_HEX
,
6409 VALS(profinet_mrrt_port_status_vals
), 0x0, NULL
, HFILL
}
6411 { &hf_profinet_cm_mac
,
6412 { "CMMacAdd", "lldp.profinet.cm_mac_add", FT_ETHER
, BASE_NONE
,
6413 NULL
, 0x0, "CMResponderMacAdd or CMInitiatorMacAdd", HFILL
}
6415 { &hf_profinet_master_source_address
,
6416 { "MasterSourceAddress", "lldp.profinet.master_source_address", FT_ETHER
, BASE_NONE
,
6417 NULL
, 0x0, NULL
, HFILL
}
6419 { &hf_profinet_subdomain_uuid
,
6420 { "SubdomainUUID", "lldp.profinet.subdomain_uuid", FT_GUID
, BASE_NONE
,
6421 NULL
, 0x0, NULL
, HFILL
}
6423 { &hf_profinet_ir_data_uuid
,
6424 { "IRDataUUID", "lldp.profinet.ir_data_uuid", FT_GUID
, BASE_NONE
,
6425 NULL
, 0x0, NULL
, HFILL
}
6427 { &hf_profinet_length_of_period_valid
,
6428 { "LengthOfPeriod.Valid", "lldp.profinet.length_of_period_valid", FT_UINT32
, BASE_DEC
,
6429 NULL
, 0x80000000, "Length field is valid/invalid", HFILL
}
6431 { &hf_profinet_length_of_period_length
,
6432 { "LengthOfPeriod.Length", "lldp.profinet.length_of_period_length", FT_UINT32
, BASE_DEC
,
6433 NULL
, 0x7FFFFFFF, "Duration of a cycle in nanoseconds", HFILL
}
6435 { &hf_profinet_red_period_begin_valid
,
6436 { "RedPeriodBegin.Valid", "lldp.profinet.red_period_begin_valid", FT_UINT32
, BASE_DEC
,
6437 NULL
, 0x80000000, "Offset field is valid/invalid", HFILL
}
6439 { &hf_profinet_red_period_begin_offset
,
6440 { "RedPeriodBegin.Offset", "lldp.profinet.red_period_begin_offset", FT_UINT32
, BASE_DEC
,
6441 NULL
, 0x7FFFFFFF, "RT_CLASS_3 period, offset to cycle begin in nanoseconds", HFILL
}
6443 { &hf_profinet_orange_period_begin_valid
,
6444 { "OrangePeriodBegin.Valid", "lldp.profinet.orange_period_begin_valid", FT_UINT32
, BASE_DEC
,
6445 NULL
, 0x80000000, "Offset field is valid/invalid", HFILL
}
6447 { &hf_profinet_orange_period_begin_offset
,
6448 { "OrangePeriodBegin.Offset","lldp.profinet.orange_period_begin_offset", FT_UINT32
, BASE_DEC
,
6449 NULL
, 0x7FFFFFFF, "RT_CLASS_2 period, offset to cycle begin in nanoseconds", HFILL
}
6451 { &hf_profinet_green_period_begin_valid
,
6452 { "GreenPeriodBegin.Valid", "lldp.profinet.green_period_begin_valid", FT_UINT32
, BASE_DEC
,
6453 NULL
, 0x80000000, "Offset field is valid/invalid", HFILL
}
6455 { &hf_profinet_green_period_begin_offset
,
6456 { "GreenPeriodBegin.Offset", "lldp.profinet.green_period_begin_offset", FT_UINT32
, BASE_DEC
,
6457 NULL
, 0x7FFFFFFF, "Unrestricted period, offset to cycle begin in nanoseconds", HFILL
}
6460 { &hf_cisco_subtype
,
6461 { "Cisco Subtype", "lldp.cisco.subtype", FT_UINT8
, BASE_HEX
,
6462 VALS(cisco_subtypes
), 0x0, NULL
, HFILL
}
6465 { "UPOE Capabilities", "lldp.cisco.upoe", FT_UINT8
, BASE_HEX
,
6466 NULL
, 0x0, "PSE/PD Capabilities", HFILL
}
6468 { &hf_cisco_upoe_supported
,
6469 { "UPOE Supported", "lldp.cisco.upoe.supported", FT_BOOLEAN
, 8,
6470 TFS(&tfs_yes_no
), 0x01, "UPOE (4-pair POE) Supported", HFILL
}
6472 { &hf_cisco_upoe_altb_detection
,
6473 { "ALT-B Detection required", "lldp.cisco.upoe.altb_detection_required", FT_BOOLEAN
, 8,
6474 TFS(&tfs_yes_no
), 0x02, "ALT-B pair Detection/Classification Required", HFILL
}
6476 { &hf_cisco_upoe_req_spare_pair
,
6477 { "PD Request Spare Pair PoE", "lldp.cisco.upoe.pd_altb_desired", FT_BOOLEAN
, 8,
6478 TFS(&tfs_desired_not_desired
), 0x04, "PD ALT-B Pair Desired", HFILL
}
6480 { &hf_cisco_upoe_pse_spare_pair_oper
,
6481 { "PSE Spare Pair PoE", "lldp.cisco.upoe.pse_altb_oper", FT_BOOLEAN
, 8,
6482 TFS(&tfs_enabled_disabled
), 0x08, "PSE ALT-B Pair Operational State", HFILL
}
6485 { &hf_cisco_aci_portstate
,
6486 { "Port State", "lldp.cisco.portstate", FT_UINT8
, BASE_NONE
,
6487 VALS(cisco_portstate_vals
), 0x0, NULL
, HFILL
}
6489 { &hf_cisco_aci_noderole
,
6490 { "Node Role", "lldp.cisco.noderole", FT_UINT8
, BASE_DEC
,
6491 VALS(cisco_noderole_vals
), 0x0, NULL
, HFILL
}
6493 { &hf_cisco_aci_nodeid
,
6494 { "Node ID", "lldp.cisco.nodeid", FT_UINT32
, BASE_DEC
,
6495 NULL
, 0x0, NULL
, HFILL
}
6497 { &hf_cisco_aci_spinelevel
,
6498 { "Spine Level", "lldp.cisco.spinelevel", FT_UINT8
, BASE_DEC
,
6499 NULL
, 0x0, NULL
, HFILL
}
6501 { &hf_cisco_aci_podid
,
6502 { "Pod ID", "lldp.cisco.podid", FT_UINT16
, BASE_DEC
,
6503 NULL
, 0x0, NULL
, HFILL
}
6505 { &hf_cisco_aci_fabricname
,
6506 { "Fabric Name", "lldp.cisco.fabricname", FT_STRING
, BASE_NONE
,
6507 NULL
, 0x0, NULL
, HFILL
}
6509 { &hf_cisco_aci_apiclist
,
6510 { "Appliance Vector", "lldp.cisco.apiclist", FT_BYTES
, BASE_NONE
,
6511 NULL
, 0x0, NULL
, HFILL
}
6513 { &hf_cisco_aci_apicid
,
6514 { "APIC ID", "lldp.cisco.apicid", FT_UINT8
, BASE_DEC
,
6515 NULL
, 0x0, NULL
, HFILL
}
6517 { &hf_cisco_aci_apicipv4
,
6518 { "APIC IPv4", "lldp.cisco.apicipv4", FT_IPv4
, BASE_NONE
,
6519 NULL
, 0x0, NULL
, HFILL
}
6521 { &hf_cisco_aci_apicuuid
,
6522 { "APIC UUID", "lldp.cisco.apicuuid", FT_STRING
, BASE_NONE
,
6523 NULL
, 0x0, NULL
, HFILL
}
6525 { &hf_cisco_aci_nodeip
,
6526 { "Node IP", "lldp.cisco.nodeip", FT_IPv4
, BASE_NONE
,
6527 NULL
, 0x0, NULL
, HFILL
}
6529 { &hf_cisco_aci_portrole
,
6530 { "Port Role", "lldp.cisco.portrole", FT_UINT8
, BASE_NONE
,
6531 VALS(cisco_portrole_vals
), 0x0, NULL
, HFILL
}
6533 { &hf_cisco_aci_version
,
6534 { "Version", "lldp.cisco.version", FT_STRING
, BASE_NONE
,
6535 NULL
, 0x0, NULL
, HFILL
}
6537 { &hf_cisco_aci_fabricvlan
,
6538 { "Fabric VLAN", "lldp.cisco.fabricvlan", FT_UINT16
, BASE_DEC
,
6539 NULL
, 0x0, NULL
, HFILL
}
6541 { &hf_cisco_aci_serialno
,
6542 { "Serial No", "lldp.cisco.serialno", FT_STRING
, BASE_NONE
,
6543 NULL
, 0x0, NULL
, HFILL
}
6545 { &hf_cisco_aci_model
,
6546 { "Model", "lldp.cisco.model", FT_STRING
, BASE_NONE
,
6547 NULL
, 0x0, NULL
, HFILL
}
6549 { &hf_cisco_aci_nodename
,
6550 { "Node Name", "lldp.cisco.nodename", FT_STRING
, BASE_NONE
,
6551 NULL
, 0x0, NULL
, HFILL
}
6553 { &hf_cisco_aci_portmode
,
6554 { "Port Mode", "lldp.cisco.portmode", FT_UINT8
, BASE_NONE
,
6555 VALS(cisco_portmode_vals
), 0x0, NULL
, HFILL
}
6557 { &hf_cisco_aci_authcookie
,
6558 { "Authentication Cookie", "lldp.cisco.authcookie", FT_BYTES
, BASE_NONE
,
6559 NULL
, 0x0, NULL
, HFILL
}
6561 { &hf_cisco_aci_apicmode
,
6562 { "APIC Mode", "lldp.cisco.apicmode", FT_UINT8
, BASE_DEC
,
6563 VALS(cisco_apicmode_vals
), 0x0, NULL
, HFILL
}
6565 { &hf_cisco_aci_fabricid
,
6566 { "Fabric ID", "lldp.cisco.fabricd", FT_UINT16
, BASE_DEC
,
6567 NULL
, 0x0, NULL
, HFILL
}
6570 { &hf_hytec_tlv_subtype
,
6571 { "Hytec Subtype", "lldp.hytec.tlv_subtype", FT_UINT8
, BASE_DEC
,
6572 VALS(hytec_subtypes
), 0x0, NULL
, HFILL
}
6575 { "Group", "lldp.hytec.group", FT_UINT8
, BASE_DEC
,
6576 NULL
, HYTEC_GROUP_MASK
, NULL
, HFILL
}
6578 { &hf_hytec_identifier
,
6579 { "Identifier", "lldp.hytec.identifier", FT_UINT8
, BASE_DEC
,
6580 NULL
, HYTEC_IDENTIFIER_MASK
, NULL
, HFILL
}
6582 { &hf_hytec_transceiver_vendor_product_revision
,
6583 { HYTEC_TID__VENDOR_PRODUCT_REVISION_STR
, "lldp.hytec.transceiver_vendor_product_revision", FT_STRING
, BASE_NONE
,
6584 NULL
, 0x0, NULL
, HFILL
}
6586 { &hf_hytec_single_mode
,
6587 { HYTEC_TBD__SINGLE_MODE_STR
, "lldp.hytec.single_mode", FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
,
6588 UNS(&units_meters
), 0x0, NULL
, HFILL
}
6590 { &hf_hytec_multi_mode_50
,
6591 { HYTEC_TBD__MULTI_MODE_50_STR
, "lldp.hytec.multi_mode_50", FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
,
6592 UNS(&units_meters
), 0x0, NULL
, HFILL
}
6594 { &hf_hytec_multi_mode_62_5
,
6595 { HYTEC_TBD__MULTI_MODE_62_5_STR
, "lldp.hytec.multi_mode_62_5", FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
,
6596 UNS(&units_meters
), 0x0, NULL
, HFILL
}
6598 { &hf_hytec_tx_current_output_power
,
6599 { HYTEC_MD__TX_CURRENT_OUTPUT_POWER_STR
, "lldp.hytec.tx_current_output_power", FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
6600 UNS(&units_microwatt
), 0x0, NULL
, HFILL
}
6602 { &hf_hytec_rx_current_input_power
,
6603 { HYTEC_MD__RX_CURRENT_INPUT_POWER_STR
, "lldp.hytec.rx_current_input_power", FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
6604 UNS(&units_microwatt
), 0x0, NULL
, HFILL
}
6606 { &hf_hytec_rx_input_snr
,
6607 { HYTEC_MD__RX_INPUT_SNR_STR
, "lldp.hytec.rx_input_snr", FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
6608 UNS(&units_decibels
), 0x0, NULL
, HFILL
}
6610 { &hf_hytec_lineloss
,
6611 { HYTEC_MD__LINELOSS_STR
, "lldp.hytec.lineloss", FT_FLOAT
, BASE_NONE
|BASE_UNIT_STRING
,
6612 UNS(&units_decibels
), 0x0, NULL
, HFILL
}
6614 { &hf_hytec_mac_trace_request
,
6615 { HYTEC_MC__MAC_TRACE_REQUEST_STR
, "lldp.hytec.mac_trace_request", FT_NONE
, BASE_NONE
,
6616 NULL
, 0x0, NULL
, HFILL
}
6618 { &hf_hytec_trace_mac_address
,
6619 { "Trace MAC address", "lldp.hytec.trace_mac_address", FT_ETHER
, BASE_NONE
,
6620 NULL
, 0x0, NULL
, HFILL
}
6622 { &hf_hytec_request_mac_address
,
6623 { "Requester's MAC address", "lldp.hytec.requesters_mac_address", FT_ETHER
, BASE_NONE
,
6624 NULL
, 0x0, NULL
, HFILL
}
6626 { &hf_hytec_maximum_depth
,
6627 { "Maximum depth", "lldp.hytec.maximum_depth", FT_UINT8
, BASE_DEC
,
6628 NULL
, 0x0, NULL
, HFILL
}
6630 { &hf_hytec_mac_trace_reply
,
6631 { HYTEC_MC__MAC_TRACE_REPLY_STR
, "lldp.hytec.mac_trace_reply", FT_NONE
, BASE_NONE
,
6632 NULL
, 0x0, NULL
, HFILL
}
6634 { &hf_hytec_answering_mac_address
,
6635 { "Answering MAC address", "lldp.hytec.answering_mac_address", FT_ETHER
, BASE_NONE
,
6636 NULL
, 0x0, NULL
, HFILL
}
6638 { &hf_hytec_actual_depth
,
6639 { "Actual depth", "lldp.hytec.actual_depth", FT_UINT8
, BASE_DEC
,
6640 NULL
, 0x0, NULL
, HFILL
}
6642 { &hf_hytec_name_of_replying_device
,
6643 { HYTEC_MC__NAME_OF_REPLYING_DEVICE_STR
, "lldp.hytec.name_of_replying_device", FT_STRING
, BASE_NONE
,
6644 NULL
, 0x0, NULL
, HFILL
}
6646 { &hf_hytec_outgoing_port_name
,
6647 { HYTEC_MC__OUTGOING_PORT_NAME_STR
, "lldp.hytec.outgoing_port_name", FT_STRING
, BASE_NONE
,
6648 NULL
, 0x0, NULL
, HFILL
}
6650 { &hf_hytec_ipv4_address_of_replying_device
,
6651 { HYTEC_MC__IPV4_ADDRESS_OF_REPLYING_DEVICE_STR
, "lldp.hytec.ipv4_address_of_replying_device", FT_IPv4
, BASE_NONE
,
6652 NULL
, 0x0, NULL
, HFILL
}
6654 { &hf_hytec_end_of_trace
,
6655 { HYTEC_MC__END_OF_TRACE_STR
, "lldp.hytec.end_of_trace", FT_UINT8
, BASE_HEX
,
6656 NULL
, 0x0, NULL
, HFILL
}
6658 { &hf_hytec_ipv6_address_of_replying_device
,
6659 { HYTEC_MC__IPV6_ADDRESS_OF_REPLYING_DEVICE_STR
, "lldp.hytec.ipv6_address_of_replying_device", FT_IPv6
, BASE_NONE
,
6660 NULL
, 0x0, NULL
, HFILL
}
6662 { &hf_hytec_incoming_port_name
,
6663 { HYTEC_MC__INCOMING_PORT_NAME_STR
, "lldp.hytec.incoming_port_name", FT_STRING
, BASE_NONE
,
6664 NULL
, 0x0, NULL
, HFILL
}
6666 { &hf_hytec_trace_identifier
,
6667 { HYTEC_MC__TRACE_IDENTIFIER_STR
, "lldp.hytec.trace_identifier", FT_UINT32
, BASE_HEX
,
6668 NULL
, 0x0, NULL
, HFILL
}
6670 { &hf_hytec_invalid_object_data
,
6671 { "Invalid object data", "lldp.hytec.invalid_object_data", FT_BYTES
, BASE_NONE
,
6672 NULL
, 0x0, NULL
, HFILL
}
6674 { &hf_hytec_unknown_identifier_content
,
6675 { "Unknown Identifier Content","lldp.hytec.unknown_identifier_content", FT_BYTES
, BASE_NONE
,
6676 NULL
, 0x0, NULL
, HFILL
}
6678 { &hf_avaya_subtype
,
6679 { "Avaya Subtype", "lldp.avaya.subtype", FT_UINT8
, BASE_HEX
,
6680 VALS(avaya_subtypes
), 0x0, NULL
, HFILL
}
6683 { "PoE Conservation Level Support", "lldp.avaya.poe", FT_BYTES
, BASE_NONE
,
6684 NULL
, 0x0, NULL
, HFILL
}
6686 { &hf_avaya_call_server
,
6687 { "Call Server IP Address", "lldp.avaya.callserver", FT_IPv4
, BASE_NONE
,
6688 NULL
, 0x0, NULL
, HFILL
}
6690 { &hf_avaya_cna_server
,
6691 { "CNA Server IP Address", "lldp.avaya.cnaserver", FT_IPv4
, BASE_NONE
,
6692 NULL
, 0x0, NULL
, HFILL
}
6694 { &hf_avaya_file_server
,
6695 { "File Server", "lldp.avaya.fileserver", FT_IPv4
, BASE_NONE
,
6696 NULL
, 0x0, NULL
, HFILL
}
6699 { "802.1Q Framing", "lldp.avaya.dot1q", FT_UINT8
, BASE_HEX
,
6700 VALS(avaya_dot1q_subtypes
), 0x0, NULL
, HFILL
}
6702 { &hf_avaya_ipphone
,
6703 { "IP Phone Addresses", "lldp.avaya.ipphone", FT_BYTES
, BASE_NONE
,
6704 NULL
, 0x0, NULL
, HFILL
}
6706 { &hf_avaya_ipphone_ip
,
6707 { "IP Address", "lldp.avaya.ipphone.ip", FT_IPv4
, BASE_NONE
,
6708 NULL
, 0x0, NULL
, HFILL
}
6710 { &hf_avaya_ipphone_mask
,
6711 { "Subnet Mask", "lldp.avaya.ipphone.mask", FT_IPv4
, BASE_NONE
,
6712 NULL
, 0x0, NULL
, HFILL
}
6714 { &hf_avaya_ipphone_gateway
,
6715 { "Gateway IP", "lldp.avaya.ipphone.gateway", FT_IPv4
, BASE_NONE
,
6716 NULL
, 0x0, NULL
, HFILL
}
6719 { "IANA Subtype", "lldp.iana.subtype", FT_UINT8
, BASE_HEX
,
6720 VALS(iana_subtypes
), 0x0, NULL
, HFILL
}
6723 { "Manufacturer Usage Description URL", "lldp.iana.mudurl", FT_STRING
, BASE_NONE
,
6724 NULL
, 0x0, NULL
, HFILL
}
6727 { "ONOS Subtype", "lldp.onos.subtype", FT_UINT8
, BASE_HEX
,
6728 VALS(onos_subtypes
), 0x0, NULL
, HFILL
}
6731 { "Chassis", "lldp.onos.chassis", FT_STRING
, BASE_NONE
,
6732 NULL
, 0x0, NULL
, HFILL
}
6735 { "Port", "lldp.onos.port", FT_STRING
, BASE_NONE
,
6736 NULL
, 0x0, NULL
, HFILL
}
6739 { "ttl", "lldp.onos.ttl", FT_UINT32
, BASE_DEC
,
6740 NULL
, 0x0, NULL
, HFILL
}
6742 { &hf_unknown_subtype
,
6743 { "Unknown Subtype","lldp.unknown_subtype", FT_UINT8
, BASE_DEC
,
6744 NULL
, 0x0, NULL
, HFILL
}
6746 { &hf_unknown_subtype_content
,
6747 { "Unknown Subtype Content","lldp.unknown_subtype.content", FT_BYTES
, BASE_NONE
,
6748 NULL
, 0x0, NULL
, HFILL
}
6750 { &hf_subtype_content_remaining
,
6751 { "Subtype Unknown Trailing Bytes","lldp.subtype.content_remaining", FT_BYTES
, BASE_NONE
,
6752 NULL
, 0x0, NULL
, HFILL
}
6754 { &hf_ex_avaya_tlv_subtype
,
6755 { "Subtype", "lldp.extreme_avaya_ap.subtype", FT_UINT8
, BASE_DEC
,
6756 VALS(ex_avaya_subtypes
), 0x0, NULL
, HFILL
}
6758 { &hf_ex_avaya_hmac_shi
,
6759 { "HMAC-SHA Digest", "lldp.extreme_avaya_ap.hmac_sha_digest", FT_BYTES
, BASE_NONE
,
6760 NULL
, 0x0, NULL
, HFILL
}
6762 { &hf_ex_avaya_element_type
,
6763 { "Element Type", "lldp.extreme_avaya_ap.element_type", FT_UINT24
, BASE_DEC
,
6764 NULL
, 0xfc0000, NULL
, HFILL
}
6766 { &hf_ex_avaya_state
,
6767 { "State", "lldp.extreme_avaya_ap.state", FT_UINT24
, BASE_DEC
,
6768 NULL
, 0x03f000, NULL
, HFILL
}
6770 { &hf_ex_avaya_mgnt_vlan
,
6771 { "Mgmt VLAN", "lldp.extreme_avaya_ap.mgnt_vlan", FT_UINT24
, BASE_DEC
,
6772 NULL
, 0x000fff, NULL
, HFILL
}
6774 { &hf_ex_avaya_vlan
,
6775 { "VLAN", "lldp.extreme_avaya_ap.vlan", FT_UINT16
, BASE_DEC
,
6776 NULL
, 0x0fff, NULL
, HFILL
}
6778 { &hf_ex_avaya_rsvd
,
6779 { "Reserved", "lldp.extreme_avaya_ap.rsvd", FT_UINT8
, BASE_DEC
,
6780 NULL
, 0x0, NULL
, HFILL
}
6782 { &hf_ex_avaya_system_id
,
6783 { "System ID", "lldp.extreme_avaya_ap.system_id", FT_BYTES
, SEP_COLON
,
6784 NULL
, 0x0, NULL
, HFILL
}
6786 { &hf_ex_avaya_status
,
6787 { "Assignment Status", "lldp.extreme_avaya_ap.status", FT_UINT16
, BASE_DEC
,
6788 NULL
, 0xf000, NULL
, HFILL
}
6790 { &hf_ex_avaya_i_sid
,
6791 { "I-SID", "lldp.extreme_avaya_ap.i_sid", FT_UINT24
, BASE_DEC
,
6792 NULL
, 0x0, NULL
, HFILL
}
6794 { &hf_ex_avaya2_tlv_subtype
,
6795 { "Subtype", "lldp.extreme_avaya.fabric.subtype", FT_UINT8
, BASE_DEC
,
6796 VALS(ex_avaya2_subtypes
), 0x0, NULL
, HFILL
}
6798 { &hf_ex_avaya2_fabric_connect
,
6799 { "FC Capability", "lldp.extreme_avaya.fabric.fabric_connect", FT_BOOLEAN
, BASE_NONE
,
6800 TFS(&tfs_enabled_disabled
), 0x0, "Fabric Connect aka auto-sense", HFILL
}
6802 { &hf_ex_avaya2_fabric_numbvlans
,
6803 { "Number B-VLANs", "lldp.extreme_avaya.fabric.numbvlans", FT_UINT8
, BASE_DEC
,
6804 NULL
, 0x0, NULL
, HFILL
}
6806 { &hf_ex_avaya2_fabric_bvlanid
,
6807 { "B-VLAN ID", "lldp.extreme_avaya.fabric.bvlanid", FT_UINT16
, BASE_DEC
,
6808 NULL
, 0x0, NULL
, HFILL
}
6810 { &hf_ex_avaya2_fabric_sysidlength
,
6811 { "SysID Length", "lldp.extreme_avaya.fabric.sysidlength", FT_UINT8
, BASE_DEC
,
6812 NULL
, 0x0, NULL
, HFILL
}
6814 { &hf_ex_avaya2_fabric_sysid
,
6815 { "System ID", "lldp.extreme_avaya.fabric.sysid", FT_SYSTEM_ID
, BASE_NONE
,
6816 NULL
, 0x0, NULL
, HFILL
}
6820 /* Setup protocol subtree array */
6821 static int *ett
[] = {
6827 &ett_port_description
,
6831 &ett_system_cap_summary
,
6832 &ett_system_cap_enabled
,
6833 &ett_management_address
,
6837 &ett_org_spc_dcbx_cin
,
6838 &ett_org_spc_dcbx_cee
,
6839 &ett_org_spc_dcbx_cee_1
,
6840 &ett_org_spc_dcbx_cee_2
,
6841 &ett_org_spc_dcbx_cee_3
,
6842 &ett_org_spc_dcbx_cee_4
,
6843 &ett_org_spc_dcbx_cin_6
,
6844 &ett_org_spc_dcbx_cee_app
,
6845 &ett_org_spc_ieee_802_1_1
,
6846 &ett_org_spc_ieee_802_1_2
,
6847 &ett_org_spc_ieee_802_1_3
,
6848 &ett_org_spc_ieee_802_1_4
,
6849 &ett_org_spc_ieee_802_1_8
,
6850 &ett_org_spc_ieee_802_1_9
,
6851 &ett_org_spc_ieee_802_1_a
,
6852 &ett_org_spc_ieee_802_1_b
,
6853 &ett_org_spc_ieee_802_1_c
,
6854 &ett_org_spc_ieee_dcbx_app
,
6855 &ett_org_spc_ieee_802_3_1
,
6856 &ett_org_spc_ieee_802_3_2
,
6857 &ett_org_spc_ieee_802_3_3
,
6858 &ett_org_spc_ieee_802_3_4
,
6859 &ett_org_spc_ieee_802_3_5
,
6860 &ett_org_spc_ieee_802_3_7
,
6861 &ett_org_spc_media_1
,
6862 &ett_org_spc_media_2
,
6863 &ett_org_spc_media_3
,
6864 &ett_org_spc_media_4
,
6865 &ett_org_spc_media_5
,
6866 &ett_org_spc_media_6
,
6867 &ett_org_spc_media_7
,
6868 &ett_org_spc_media_8
,
6869 &ett_org_spc_media_9
,
6870 &ett_org_spc_media_10
,
6871 &ett_org_spc_media_11
,
6872 &ett_org_spc_ProfinetSubTypes_1
,
6873 &ett_org_spc_ProfinetSubTypes_2
,
6874 &ett_org_spc_ProfinetSubTypes_3
,
6875 &ett_org_spc_ProfinetSubTypes_4
,
6876 &ett_org_spc_ProfinetSubTypes_5
,
6877 &ett_org_spc_ProfinetSubTypes_6
,
6878 &ett_port_vlan_flags
,
6880 &ett_802_3_autoneg_advertised
,
6882 &ett_802_3_bt_power
,
6883 &ett_802_3_bt_system_setup
,
6884 &ett_802_3_bt_autoclass
,
6885 &ett_802_3_bt_power_down
,
6886 &ett_802_3_aggregation
,
6887 &ett_802_1_aggregation
,
6888 &ett_802_1qbg_capabilities_flags
,
6889 &ett_802_3br_capabilities_flags
,
6890 &ett_media_capabilities
,
6891 &ett_profinet_period
,
6892 &ett_cisco_upoe_tlv
,
6893 &ett_avaya_ipphone_tlv
,
6894 &ett_org_spc_hytec_subtype_transceiver
,
6895 &ett_org_spc_hytec_subtype_trace
,
6896 &ett_org_spc_hytec_trace_request
,
6897 &ett_org_spc_hytec_trace_reply
,
6898 &ett_ex_avayaSubTypes_11
,
6899 &ett_ex_avayaSubTypes_12
,
6900 &ett_ex_avaya2SubTypes_4
6903 static ei_register_info ei
[] = {
6904 { &ei_lldp_bad_length
, { "lldp.incorrect_length", PI_MALFORMED
, PI_WARN
, "Invalid length, too short", EXPFILL
}},
6905 { &ei_lldp_bad_length_excess
, { "lldp.excess_length", PI_MALFORMED
, PI_WARN
, "Invalid length, greater than expected", EXPFILL
}},
6906 { &ei_lldp_shutdown_excess_tlv
, { "lldp.excess_tlv", PI_MALFORMED
, PI_WARN
, "Excess TLV in Shutdown PDU", EXPFILL
}},
6907 { &ei_lldp_bad_type
, { "lldp.bad_type", PI_MALFORMED
, PI_WARN
, "Incorrect type", EXPFILL
}},
6908 { &ei_lldp_tlv_deprecated
, { "lldp.tlv_deprecated", PI_PROTOCOL
, PI_WARN
, "TLV has been deprecated", EXPFILL
}},
6911 static const enum_val_t column_info_options
[] = {
6912 { "default_column_info", "Default Column Info", DEFAULT_COLUMN_INFO
},
6913 { "profinet_special_column_info", "PROFINET Special Column Info", PROFINET_SPECIAL_COLUMN_INFO
},
6917 /* Register the protocol name and description */
6918 proto_lldp
= proto_register_protocol("Link Layer Discovery Protocol", "LLDP", "lldp");
6919 lldp_handle
= register_dissector("lldp", dissect_lldp
, proto_lldp
);
6921 /* Register preferences */
6922 lldp_module
= prefs_register_protocol(proto_lldp
, NULL
);
6924 prefs_register_enum_preference(lldp_module
,
6925 "column_info_selection",
6926 "Select Column Info Display Style",
6927 "Which Information will be showed at Column Information is decided by the selection",
6928 &column_info_selection
,
6929 column_info_options
,
6932 prefs_register_bool_preference(lldp_module
,
6933 "assume_unrecognized_tlv",
6934 "Assume unrecognized TLV",
6935 "If checked, assume an unrecognized TLV type should be consumed and treated as an LLDP TLV. Otherwise, end LLDP dissection.",
6936 &assume_unrecognized_tlv
);
6938 /* Required function calls to register the header fields and subtrees used */
6939 proto_register_field_array(proto_lldp
, hf
, array_length(hf
));
6940 proto_register_subtree_array(ett
, array_length(ett
));
6941 oui_unique_code_table
= register_dissector_table("lldp.orgtlv.oui", "LLDP OUI", proto_lldp
, FT_UINT24
, BASE_HEX
);
6943 expert_lldp
= expert_register_protocol(proto_lldp
);
6944 expert_register_field_array(expert_lldp
, ei
, array_length(ei
));
6948 proto_reg_handoff_lldp(void)
6950 dissector_add_uint("ethertype", ETHERTYPE_LLDP
, lldp_handle
);
6951 dissector_add_uint("ethertype", ETHERTYPE_ONOS
, lldp_handle
);
6955 * Editor modelines - https://www.wireshark.org/tools/modelines.html
6960 * indent-tabs-mode: t
6963 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
6964 * :indentSize=8:tabSize=8:noTabs=false: