aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lldp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-lldp.c')
-rw-r--r--epan/dissectors/packet-lldp.c1564
1 files changed, 980 insertions, 584 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c
index cbcd234a13..7667be33e1 100644
--- a/epan/dissectors/packet-lldp.c
+++ b/epan/dissectors/packet-lldp.c
@@ -39,6 +39,7 @@
#include <epan/wmem_scopes.h>
#include <epan/oui.h>
+#include "packet-enip.h"
#define DEFAULT_COLUMN_INFO 1
#define PROFINET_SPECIAL_COLUMN_INFO 2
@@ -55,502 +56,521 @@ typedef struct _profinet_lldp_column_info {
static gint column_info_selection = DEFAULT_COLUMN_INFO;
+static dissector_handle_t lldp_handle;
+
void proto_register_lldp(void);
void proto_reg_handoff_lldp(void);
-static int hf_ex_avaya_tlv_subtype = -1;
-static int hf_ex_avaya_hmac_shi = -1;
-static int hf_ex_avaya_element_type = -1;
-static int hf_ex_avaya_state = -1;
-static int hf_ex_avaya_vlan = -1;
-static int hf_ex_avaya_mgnt_vlan = -1;
-static int hf_ex_avaya_rsvd = -1;
-static int hf_ex_avaya_system_id = -1;
-static int hf_ex_avaya_status = -1;
-static int hf_ex_avaya_i_sid = -1;
-
-static int hf_ex_avaya2_tlv_subtype = -1;
-static int hf_ex_avaya2_fabric_connect = -1;
-static int hf_ex_avaya2_fabric_numbvlans = -1;
-static int hf_ex_avaya2_fabric_bvlanid = -1;
-static int hf_ex_avaya2_fabric_sysidlength = -1;
-static int hf_ex_avaya2_fabric_sysid = -1;
+static int hf_ex_avaya_tlv_subtype;
+static int hf_ex_avaya_hmac_shi;
+static int hf_ex_avaya_element_type;
+static int hf_ex_avaya_state;
+static int hf_ex_avaya_vlan;
+static int hf_ex_avaya_mgnt_vlan;
+static int hf_ex_avaya_rsvd;
+static int hf_ex_avaya_system_id;
+static int hf_ex_avaya_status;
+static int hf_ex_avaya_i_sid;
+
+static int hf_ex_avaya2_tlv_subtype;
+static int hf_ex_avaya2_fabric_connect;
+static int hf_ex_avaya2_fabric_numbvlans;
+static int hf_ex_avaya2_fabric_bvlanid;
+static int hf_ex_avaya2_fabric_sysidlength;
+static int hf_ex_avaya2_fabric_sysid;
/* Sub Dissector Tables */
static dissector_table_t oui_unique_code_table;
/* Initialize the protocol and registered fields */
-static int proto_lldp = -1;
-static int hf_lldp_tlv_type = -1;
-static int hf_lldp_tlv_len = -1;
-static int hf_lldp_tlv_system_cap = -1;
-static int hf_lldp_tlv_system_cap_other = -1;
-static int hf_lldp_tlv_system_cap_repeater = -1;
-static int hf_lldp_tlv_system_cap_bridge = -1;
-static int hf_lldp_tlv_system_cap_wlan_access_pt = -1;
-static int hf_lldp_tlv_system_cap_router = -1;
-static int hf_lldp_tlv_system_cap_telephone = -1;
-static int hf_lldp_tlv_system_cap_docsis_cable_device = -1;
-static int hf_lldp_tlv_system_cap_station_only = -1;
-static int hf_lldp_tlv_system_name = -1;
-static int hf_lldp_tlv_system_desc = -1;
-static int hf_lldp_tlv_enable_system_cap = -1;
-static int hf_lldp_tlv_enable_system_cap_other = -1;
-static int hf_lldp_tlv_enable_system_cap_repeater = -1;
-static int hf_lldp_tlv_enable_system_cap_bridge = -1;
-static int hf_lldp_tlv_enable_system_cap_wlan_access_pt = -1;
-static int hf_lldp_tlv_enable_system_cap_router = -1;
-static int hf_lldp_tlv_enable_system_cap_telephone = -1;
-static int hf_lldp_tlv_enable_system_cap_docsis_cable_device = -1;
-static int hf_lldp_tlv_enable_system_cap_station_only = -1;
-static int hf_chassis_id_subtype = -1;
-static int hf_chassis_id = -1;
-static int hf_chassis_id_mac = -1;
-static int hf_chassis_id_ip4 = -1;
-static int hf_chassis_id_ip6 = -1;
-static int hf_port_id_subtype = -1;
-static int hf_port_id = -1;
-static int hf_port_desc = -1;
-static int hf_port_id_mac = -1;
-static int hf_lldp_network_address_family = -1;
-static int hf_port_id_ip4 = -1;
-static int hf_port_id_ip6 = -1;
-static int hf_time_to_live = -1;
-static int hf_mgn_address_len = -1;
-static int hf_mgn_address_subtype = -1;
-static int hf_mgn_addr_ipv4 = -1;
-static int hf_mgn_addr_ipv6 = -1;
-static int hf_mgn_addr_hex = -1;
-static int hf_mgn_interface_subtype = -1;
-static int hf_mgn_interface_number = -1;
-static int hf_mgn_oid_len = -1;
-static int hf_mgn_obj_id = -1;
-static int hf_org_spc_oui = -1;
-static int hf_dcbx_type = -1;
-static int hf_dcbx_tlv_type = -1;
-static int hf_dcbx_tlv_len = -1;
-static int hf_dcbx_tlv_oper_version = -1;
-static int hf_dcbx_tlv_max_version = -1;
-static int hf_dcbx_control_sequence = -1;
-static int hf_dcbx_control_ack = -1;
-static int hf_dcbx_feature_flag_enabled = -1;
-static int hf_dcbx_feature_flag_error = -1;
-static int hf_dcbx_feature_flag_willing = -1;
-static int hf_dcbx_feature_subtype = -1;
-static int hf_dcbx_feature_pgid_reserved = -1;
-static int hf_dcbx_feature_pgid_prio_0 = -1;
-static int hf_dcbx_feature_pgid_prio_1 = -1;
-static int hf_dcbx_feature_pgid_prio_2 = -1;
-static int hf_dcbx_feature_pgid_prio_3 = -1;
-static int hf_dcbx_feature_pgid_prio_4 = -1;
-static int hf_dcbx_feature_pgid_prio_5 = -1;
-static int hf_dcbx_feature_pgid_prio_6 = -1;
-static int hf_dcbx_feature_pgid_prio_7 = -1;
-static int hf_dcbx_feature_pg_per_0 = -1;
-static int hf_dcbx_feature_pg_per_1 = -1;
-static int hf_dcbx_feature_pg_per_2 = -1;
-static int hf_dcbx_feature_pg_per_3 = -1;
-static int hf_dcbx_feature_pg_per_4 = -1;
-static int hf_dcbx_feature_pg_per_5 = -1;
-static int hf_dcbx_feature_pg_per_6 = -1;
-static int hf_dcbx_feature_pg_per_7 = -1;
-static int hf_dcbx_feature_pg_numtcs = -1;
-static int hf_dcbx_feature_pfc_prio0 = -1;
-static int hf_dcbx_feature_pfc_prio1 = -1;
-static int hf_dcbx_feature_pfc_prio2 = -1;
-static int hf_dcbx_feature_pfc_prio3 = -1;
-static int hf_dcbx_feature_pfc_prio4 = -1;
-static int hf_dcbx_feature_pfc_prio5 = -1;
-static int hf_dcbx_feature_pfc_prio6 = -1;
-static int hf_dcbx_feature_pfc_prio7 = -1;
-static int hf_dcbx_feature_pfc_numtcs = -1;
-static int hf_dcbx_feature_app_proto = -1;
-static int hf_dcbx_feature_app_selector = -1;
-static int hf_dcbx_feature_app_oui = -1;
-static int hf_dcbx_feature_app_prio = -1;
-static int hf_dcbx_feature_flag_llink_type = -1;
-static int hf_ieee_802_1_subtype = -1;
-static int hf_ieee_802_1_port_and_vlan_id_flag = -1;
-static int hf_ieee_802_1_port_and_vlan_id_flag_supported = -1;
-static int hf_ieee_802_1_port_and_vlan_id_flag_enabled = -1;
-static int hf_ieee_802_1_port_vlan_id = -1;
-static int hf_ieee_802_1_port_proto_vlan_id = -1;
-static int hf_ieee_802_1_vlan_id = -1;
-static int hf_ieee_802_1_vlan_name_length = -1;
-static int hf_ieee_802_1_vlan_name = -1;
-static int hf_ieee_802_1_proto_id_length = -1;
-static int hf_ieee_802_1_proto_id = -1;
-static int hf_ieee_802_1_aggregation_status = -1;
-static int hf_ieee_802_1_aggregation_status_cap = -1;
-static int hf_ieee_802_1_aggregation_status_enabled = -1;
-static int hf_ieee_802_1_aggregation_status_porttype = -1;
-static int hf_ieee_802_1_aggregated_port_id = -1;
-static int hf_ieee_8021qau_cnpv_prio0 = -1;
-static int hf_ieee_8021qau_cnpv_prio1 = -1;
-static int hf_ieee_8021qau_cnpv_prio2 = -1;
-static int hf_ieee_8021qau_cnpv_prio3 = -1;
-static int hf_ieee_8021qau_cnpv_prio4 = -1;
-static int hf_ieee_8021qau_cnpv_prio5 = -1;
-static int hf_ieee_8021qau_cnpv_prio6 = -1;
-static int hf_ieee_8021qau_cnpv_prio7 = -1;
-static int hf_ieee_8021qau_ready_prio0 = -1;
-static int hf_ieee_8021qau_ready_prio1 = -1;
-static int hf_ieee_8021qau_ready_prio2 = -1;
-static int hf_ieee_8021qau_ready_prio3 = -1;
-static int hf_ieee_8021qau_ready_prio4 = -1;
-static int hf_ieee_8021qau_ready_prio5 = -1;
-static int hf_ieee_8021qau_ready_prio6 = -1;
-static int hf_ieee_8021qau_ready_prio7 = -1;
-static int hf_ieee_8021az_feature_flag_willing = -1;
-static int hf_ieee_8021az_feature_flag_cbs = -1;
-static int hf_ieee_8021az_maxtcs = -1;
-static int hf_ieee_8021az_tsa_class0 = -1;
-static int hf_ieee_8021az_tsa_class1 = -1;
-static int hf_ieee_8021az_tsa_class2 = -1;
-static int hf_ieee_8021az_tsa_class3 = -1;
-static int hf_ieee_8021az_tsa_class4 = -1;
-static int hf_ieee_8021az_tsa_class5 = -1;
-static int hf_ieee_8021az_tsa_class6 = -1;
-static int hf_ieee_8021az_tsa_class7 = -1;
-static int hf_ieee_8021az_feature_flag_mbc = -1;
-static int hf_ieee_8021az_pfc_numtcs = -1;
-static int hf_ieee_8021az_app_reserved = -1;
-static int hf_ieee_8021az_app_prio = -1;
-static int hf_ieee_8021az_app_selector = -1;
-static int hf_ieee_802_3_subtype = -1;
-static int hf_ieee_802_3_mac_phy_auto_neg_status = -1;
-static int hf_ieee_802_3_mac_phy_auto_neg_status_supported = -1;
-static int hf_ieee_802_3_mac_phy_auto_neg_status_enabled = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_tfd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_t = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_xfd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_x = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_bpause = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_spause = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_apause = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_pause = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2fd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2 = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_txfd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_tx = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t4 = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_tfd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_t = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_other = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_tfd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_t = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_xfd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_x = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_bpause = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_spause = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_apause = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_pause = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2fd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2 = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_txfd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_tx = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t4 = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_tfd = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_t = -1;
-static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_other = -1;
-static int hf_ieee_802_3_pmd_mau_type = -1;
-static int hf_ieee_802_3_mdi_power_support = -1;
-static int hf_ieee_802_3_mdi_power_support_port_class = -1;
-static int hf_ieee_802_3_mdi_power_support_pse_power_support = -1;
-static int hf_ieee_802_3_mdi_power_support_pse_power_enabled = -1;
-static int hf_ieee_802_3_mdi_power_support_pse_pairs = -1;
-static int hf_ieee_802_3_mdi_power_pse_pair = -1;
-static int hf_ieee_802_3_mdi_power_class = -1;
-static int hf_ieee_802_3_mdi_power_type = -1;
-static int hf_ieee_802_3_mdi_power_source = -1;
-static int hf_ieee_802_3_mdi_power_priority = -1;
-static int hf_ieee_802_3_mdi_requested_power = -1;
-static int hf_ieee_802_3_mdi_allocated_power = -1;
-
-static int hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_a = -1;
-static int hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_b = -1;
-static int hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_a = -1;
-static int hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_b = -1;
-static int hf_ieee_802_3_bt_power_status = -1;
-static int hf_ieee_802_3_bt_pse_powering_status = -1;
-static int hf_ieee_802_3_bt_pd_powered_status = -1;
-static int hf_ieee_802_3_bt_pse_power_pairs_ext = -1;
-static int hf_ieee_802_3_bt_ds_pwr_class_ext_a = -1;
-static int hf_ieee_802_3_bt_ds_pwr_class_ext_b = -1;
-static int hf_ieee_802_3_bt_pwr_class_ext = -1;
-static int hf_ieee_802_3_bt_system_setup = -1;
-static int hf_ieee_802_3_bt_power_type_ext = -1;
-static int hf_ieee_802_3_bt_pse_maximum_available_power_value = -1;
-static int hf_ieee_802_3_bt_autoclass = -1;
-static int hf_ieee_802_3_bt_pse_autoclass_support = -1;
-static int hf_ieee_802_3_bt_autoclass_completed = -1;
-static int hf_ieee_802_3_bt_autoclass_request = -1;
-static int hf_ieee_802_3_bt_autoclass_reserved = -1;
-static int hf_ieee_802_3_bt_power_down = -1;
-static int hf_ieee_802_3_bt_power_down_request = -1;
-static int hf_ieee_802_3_bt_power_down_time = -1;
-static int hf_ieee_802_3_aggregation_status = -1;
-static int hf_ieee_802_3_aggregation_status_cap = -1;
-static int hf_ieee_802_3_aggregation_status_enabled = -1;
-static int hf_ieee_802_3_aggregated_port_id = -1;
-static int hf_ieee_802_3_max_frame_size = -1;
-static int hf_ieee_802_3_eee_transmit = -1;
-static int hf_ieee_802_3_eee_receive = -1;
-static int hf_ieee_802_3_eee_fallback_receive = -1;
-static int hf_ieee_802_3_eee_echo_transmit = -1;
-static int hf_ieee_802_3_eee_echo_receive = -1;
-static int hf_ieee_802_1qbg_subtype = -1;
-static int hf_ieee_802_1qbg_evb_support_caps = -1;
-static int hf_ieee_802_1qbg_evb_support_caps_std = -1;
-static int hf_ieee_802_1qbg_evb_support_caps_rr = -1;
-static int hf_ieee_802_1qbg_evb_support_caps_rte = -1;
-static int hf_ieee_802_1qbg_evb_support_caps_ecp = -1;
-static int hf_ieee_802_1qbg_evb_support_caps_vdp = -1;
-static int hf_ieee_802_1qbg_evb_configure_caps = -1;
-static int hf_ieee_802_1qbg_evb_configure_caps_std = -1;
-static int hf_ieee_802_1qbg_evb_configure_caps_rr = -1;
-static int hf_ieee_802_1qbg_evb_configure_caps_rte = -1;
-static int hf_ieee_802_1qbg_evb_configure_caps_ecp = -1;
-static int hf_ieee_802_1qbg_evb_configure_caps_vdp = -1;
-static int hf_ieee_802_1qbg_evb_supported_vsi = -1;
-static int hf_ieee_802_1qbg_evb_configured_vsi = -1;
-static int hf_ieee_802_1qbg_evb_retrans_timer = -1;
-static int hf_ieee_802_3br_aec = -1;
-static int hf_ieee_802_3br_aec_support = -1;
-static int hf_ieee_802_3br_aec_enable = -1;
-static int hf_ieee_802_3br_aec_active = -1;
-static int hf_ieee_802_3br_aec_addfragsize = -1;
-static int hf_ieee_802_3br_aec_reserved = -1;
-static int hf_media_tlv_subtype = -1;
-static int hf_media_tlv_subtype_caps = -1;
-static int hf_media_tlv_subtype_caps_llpd = -1;
-static int hf_media_tlv_subtype_caps_network_policy = -1;
-static int hf_media_tlv_subtype_caps_location_id = -1;
-static int hf_media_tlv_subtype_caps_mdi_pse = -1;
-static int hf_media_tlv_subtype_caps_mid_pd = -1;
-static int hf_media_tlv_subtype_caps_inventory = -1;
-static int hf_media_tlv_subtype_class = -1;
-static int hf_media_application_type = -1;
-static int hf_media_policy_flag = -1;
-static int hf_media_tag_flag = -1;
-static int hf_media_vlan_id = -1;
-static int hf_media_l2_prio = -1;
-static int hf_media_dscp = -1;
-static int hf_media_loc_data_format = -1;
-static int hf_media_loc_lat_resolution = -1;
-static int hf_media_loc_lat = -1;
-static int hf_media_loc_long_resolution = -1;
-static int hf_media_loc_long = -1;
-static int hf_media_loc_alt_type = -1;
-static int hf_media_loc_alt_resolution = -1;
-static int hf_media_loc_alt = -1;
-static int hf_media_loc_datum = -1;
-static int hf_media_civic_lci_length = -1;
-static int hf_media_civic_what = -1;
-static int hf_media_civic_country = -1;
-static int hf_media_civic_addr_type = -1;
-static int hf_media_civic_addr_len = -1;
-static int hf_media_civic_addr_value = -1;
-static int hf_media_ecs = -1;
-static int hf_media_power_type = -1;
-static int hf_media_power_source = -1;
-static int hf_media_power_priority = -1;
-static int hf_media_power_value = -1;
-static int hf_media_hardware = -1;
-static int hf_media_firmware = -1;
-static int hf_media_software = -1;
-static int hf_media_sn = -1;
-static int hf_media_manufacturer = -1;
-static int hf_media_model = -1;
-static int hf_media_asset = -1;
-static int hf_profinet_tlv_subtype = -1;
-static int hf_profinet_class2_port_status = -1;
-static int hf_profinet_class3_port_status = -1;
-static int hf_profinet_class3_port_status_Fragmentation = -1;
-static int hf_profinet_class3_port_status_reserved = -1;
-static int hf_profinet_class3_port_status_PreambleLength = -1;
-static int hf_profinet_port_rx_delay_local = -1;
-static int hf_profinet_port_rx_delay_remote = -1;
-static int hf_profinet_port_tx_delay_local = -1;
-static int hf_profinet_port_tx_delay_remote = -1;
-static int hf_profinet_cable_delay_local = -1;
-static int hf_profinet_mrp_domain_uuid = -1;
-static int hf_profinet_mrrt_port_status = -1;
-static int hf_profinet_cm_mac = -1;
-static int hf_profinet_master_source_address = -1;
-static int hf_profinet_subdomain_uuid = -1;
-static int hf_profinet_ir_data_uuid = -1;
-static int hf_profinet_length_of_period_valid = -1;
-static int hf_profinet_length_of_period_length = -1;
-static int hf_profinet_red_period_begin_valid = -1;
-static int hf_profinet_red_period_begin_offset = -1;
-static int hf_profinet_orange_period_begin_valid = -1;
-static int hf_profinet_orange_period_begin_offset = -1;
-static int hf_profinet_green_period_begin_valid = -1;
-static int hf_profinet_green_period_begin_offset = -1;
-static int hf_cisco_subtype = -1;
-static int hf_cisco_upoe = -1;
-static int hf_cisco_upoe_supported = -1;
-static int hf_cisco_upoe_altb_detection = -1;
-static int hf_cisco_upoe_req_spare_pair = -1;
-static int hf_cisco_upoe_pse_spare_pair_oper = -1;
-static int hf_cisco_aci_portstate = -1;
-static int hf_cisco_aci_noderole = -1;
-static int hf_cisco_aci_nodeid = -1;
-static int hf_cisco_aci_spinelevel = -1;
-static int hf_cisco_aci_podid = -1;
-static int hf_cisco_aci_fabricname = -1;
-static int hf_cisco_aci_apiclist = -1;
-static int hf_cisco_aci_apicid = -1;
-static int hf_cisco_aci_apicipv4 = -1;
-static int hf_cisco_aci_apicuuid = -1;
-static int hf_cisco_aci_nodeip = -1;
-static int hf_cisco_aci_portrole = -1;
-static int hf_cisco_aci_version = -1;
-static int hf_cisco_aci_fabricvlan = -1;
-static int hf_cisco_aci_serialno = -1;
-static int hf_cisco_aci_model = -1;
-static int hf_cisco_aci_nodename = -1;
-static int hf_cisco_aci_portmode = -1;
-static int hf_cisco_aci_authcookie = -1;
-static int hf_cisco_aci_apicmode = -1;
-static int hf_cisco_aci_fabricid = -1;
-static int hf_hytec_tlv_subtype = -1;
-static int hf_hytec_group = -1;
-static int hf_hytec_identifier = -1;
-static int hf_hytec_transceiver_vendor_product_revision = -1;
-static int hf_hytec_single_mode = -1;
-static int hf_hytec_multi_mode_50 = -1;
-static int hf_hytec_multi_mode_62_5 = -1;
-static int hf_hytec_tx_current_output_power = -1;
-static int hf_hytec_rx_current_input_power = -1;
-static int hf_hytec_rx_input_snr = -1;
-static int hf_hytec_lineloss = -1;
-static int hf_hytec_mac_trace_request = -1;
-static int hf_hytec_trace_mac_address = -1;
-static int hf_hytec_request_mac_address = -1;
-static int hf_hytec_maximum_depth = -1;
-static int hf_hytec_mac_trace_reply = -1;
-static int hf_hytec_answering_mac_address = -1;
-static int hf_hytec_actual_depth = -1;
-static int hf_hytec_name_of_replying_device = -1;
-static int hf_hytec_outgoing_port_name = -1;
-static int hf_hytec_ipv4_address_of_replying_device = -1;
-static int hf_hytec_end_of_trace = -1;
-static int hf_hytec_ipv6_address_of_replying_device = -1;
-static int hf_hytec_incoming_port_name = -1;
-static int hf_hytec_trace_identifier = -1;
-static int hf_hytec_invalid_object_data = -1;
-static int hf_hytec_unknown_identifier_content = -1;
-static int hf_avaya_subtype = -1;
-static int hf_avaya_poe = -1;
-static int hf_avaya_call_server = -1;
-static int hf_avaya_cna_server = -1;
-static int hf_avaya_file_server = -1;
-static int hf_avaya_dot1q = -1;
-static int hf_avaya_ipphone = -1;
-static int hf_avaya_ipphone_ip = -1;
-static int hf_avaya_ipphone_mask = -1;
-static int hf_avaya_ipphone_gateway = -1;
-static int hf_unknown_subtype = -1;
-static int hf_unknown_subtype_content = -1;
-static int hf_subtype_content_remaining = -1;
-static int hf_iana_subtype = -1;
-static int hf_iana_mudurl = -1;
-static int hf_onos_subtype = -1;
-static int hf_onos_chassis = -1;
-static int hf_onos_port = -1;
-static int hf_onos_ttl = -1;
+static int proto_lldp;
+static int hf_lldp_tlv_type;
+static int hf_lldp_tlv_len;
+static int hf_lldp_tlv_system_cap;
+static int hf_lldp_tlv_system_cap_other;
+static int hf_lldp_tlv_system_cap_repeater;
+static int hf_lldp_tlv_system_cap_bridge;
+static int hf_lldp_tlv_system_cap_wlan_access_pt;
+static int hf_lldp_tlv_system_cap_router;
+static int hf_lldp_tlv_system_cap_telephone;
+static int hf_lldp_tlv_system_cap_docsis_cable_device;
+static int hf_lldp_tlv_system_cap_station_only;
+static int hf_lldp_tlv_system_cap_cvlan_component;
+static int hf_lldp_tlv_system_cap_svlan_component;
+static int hf_lldp_tlv_system_cap_tpmr_component;
+static int hf_lldp_tlv_system_name;
+static int hf_lldp_tlv_system_desc;
+static int hf_lldp_tlv_enable_system_cap;
+static int hf_lldp_tlv_enable_system_cap_other;
+static int hf_lldp_tlv_enable_system_cap_repeater;
+static int hf_lldp_tlv_enable_system_cap_bridge;
+static int hf_lldp_tlv_enable_system_cap_wlan_access_pt;
+static int hf_lldp_tlv_enable_system_cap_router;
+static int hf_lldp_tlv_enable_system_cap_telephone;
+static int hf_lldp_tlv_enable_system_cap_docsis_cable_device;
+static int hf_lldp_tlv_enable_system_cap_station_only;
+static int hf_lldp_tlv_enable_system_cap_cvlan_component;
+static int hf_lldp_tlv_enable_system_cap_svlan_component;
+static int hf_lldp_tlv_enable_system_cap_tpmr_component;
+static int hf_chassis_id_subtype;
+static int hf_chassis_id;
+static int hf_chassis_id_mac;
+static int hf_chassis_id_ip4;
+static int hf_chassis_id_ip6;
+static int hf_port_id_subtype;
+static int hf_port_id;
+static int hf_port_desc;
+static int hf_port_id_mac;
+static int hf_lldp_network_address_family;
+static int hf_port_id_ip4;
+static int hf_port_id_ip6;
+static int hf_time_to_live;
+static int hf_mgn_address_len;
+static int hf_mgn_address_subtype;
+static int hf_mgn_addr_ipv4;
+static int hf_mgn_addr_ipv6;
+static int hf_mgn_addr_hex;
+static int hf_mgn_interface_subtype;
+static int hf_mgn_interface_number;
+static int hf_mgn_oid_len;
+static int hf_mgn_obj_id;
+static int hf_org_spc_oui;
+static int hf_dcbx_type;
+static int hf_dcbx_tlv_type;
+static int hf_dcbx_tlv_len;
+static int hf_dcbx_tlv_oper_version;
+static int hf_dcbx_tlv_max_version;
+static int hf_dcbx_control_sequence;
+static int hf_dcbx_control_ack;
+static int hf_dcbx_feature_flag_enabled;
+static int hf_dcbx_feature_flag_error;
+static int hf_dcbx_feature_flag_willing;
+static int hf_dcbx_feature_subtype;
+static int hf_dcbx_feature_pgid_reserved;
+static int hf_dcbx_feature_pgid_prio_0;
+static int hf_dcbx_feature_pgid_prio_1;
+static int hf_dcbx_feature_pgid_prio_2;
+static int hf_dcbx_feature_pgid_prio_3;
+static int hf_dcbx_feature_pgid_prio_4;
+static int hf_dcbx_feature_pgid_prio_5;
+static int hf_dcbx_feature_pgid_prio_6;
+static int hf_dcbx_feature_pgid_prio_7;
+static int hf_dcbx_feature_pg_per_0;
+static int hf_dcbx_feature_pg_per_1;
+static int hf_dcbx_feature_pg_per_2;
+static int hf_dcbx_feature_pg_per_3;
+static int hf_dcbx_feature_pg_per_4;
+static int hf_dcbx_feature_pg_per_5;
+static int hf_dcbx_feature_pg_per_6;
+static int hf_dcbx_feature_pg_per_7;
+static int hf_dcbx_feature_pg_numtcs;
+static int hf_dcbx_feature_pfc_prio0;
+static int hf_dcbx_feature_pfc_prio1;
+static int hf_dcbx_feature_pfc_prio2;
+static int hf_dcbx_feature_pfc_prio3;
+static int hf_dcbx_feature_pfc_prio4;
+static int hf_dcbx_feature_pfc_prio5;
+static int hf_dcbx_feature_pfc_prio6;
+static int hf_dcbx_feature_pfc_prio7;
+static int hf_dcbx_feature_pfc_numtcs;
+static int hf_dcbx_feature_app_proto;
+static int hf_dcbx_feature_app_selector;
+static int hf_dcbx_feature_app_oui;
+static int hf_dcbx_feature_app_prio;
+static int hf_dcbx_feature_flag_llink_type;
+static int hf_ieee_802_1_subtype;
+static int hf_ieee_802_1_port_and_vlan_id_flag;
+static int hf_ieee_802_1_port_and_vlan_id_flag_supported;
+static int hf_ieee_802_1_port_and_vlan_id_flag_enabled;
+static int hf_ieee_802_1_port_vlan_id;
+static int hf_ieee_802_1_port_proto_vlan_id;
+static int hf_ieee_802_1_vlan_id;
+static int hf_ieee_802_1_vlan_name_length;
+static int hf_ieee_802_1_vlan_name;
+static int hf_ieee_802_1_proto_id_length;
+static int hf_ieee_802_1_proto_id;
+static int hf_ieee_802_1_aggregation_status;
+static int hf_ieee_802_1_aggregation_status_cap;
+static int hf_ieee_802_1_aggregation_status_enabled;
+static int hf_ieee_802_1_aggregation_status_porttype;
+static int hf_ieee_802_1_aggregated_port_id;
+static int hf_ieee_8021qau_cnpv_prio0;
+static int hf_ieee_8021qau_cnpv_prio1;
+static int hf_ieee_8021qau_cnpv_prio2;
+static int hf_ieee_8021qau_cnpv_prio3;
+static int hf_ieee_8021qau_cnpv_prio4;
+static int hf_ieee_8021qau_cnpv_prio5;
+static int hf_ieee_8021qau_cnpv_prio6;
+static int hf_ieee_8021qau_cnpv_prio7;
+static int hf_ieee_8021qau_ready_prio0;
+static int hf_ieee_8021qau_ready_prio1;
+static int hf_ieee_8021qau_ready_prio2;
+static int hf_ieee_8021qau_ready_prio3;
+static int hf_ieee_8021qau_ready_prio4;
+static int hf_ieee_8021qau_ready_prio5;
+static int hf_ieee_8021qau_ready_prio6;
+static int hf_ieee_8021qau_ready_prio7;
+static int hf_ieee_8021az_feature_flag_willing;
+static int hf_ieee_8021az_feature_flag_cbs;
+static int hf_ieee_8021az_maxtcs;
+static int hf_ieee_8021az_tsa_class0;
+static int hf_ieee_8021az_tsa_class1;
+static int hf_ieee_8021az_tsa_class2;
+static int hf_ieee_8021az_tsa_class3;
+static int hf_ieee_8021az_tsa_class4;
+static int hf_ieee_8021az_tsa_class5;
+static int hf_ieee_8021az_tsa_class6;
+static int hf_ieee_8021az_tsa_class7;
+static int hf_ieee_8021az_feature_flag_mbc;
+static int hf_ieee_8021az_pfc_numtcs;
+static int hf_ieee_8021az_app_reserved;
+static int hf_ieee_8021az_app_prio;
+static int hf_ieee_8021az_app_selector;
+static int hf_ieee_802_3_subtype;
+static int hf_ieee_802_3_mac_phy_auto_neg_status;
+static int hf_ieee_802_3_mac_phy_auto_neg_status_supported;
+static int hf_ieee_802_3_mac_phy_auto_neg_status_enabled;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_tfd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_t;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_xfd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_1000base_x;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_bpause;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_spause;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_apause;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_fdx_pause;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2fd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t2;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_txfd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_tx;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_100base_t4;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_tfd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_10base_t;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_other;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_tfd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_t;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_xfd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_1000base_x;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_bpause;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_spause;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_apause;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_fdx_pause;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2fd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t2;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_txfd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_tx;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_100base_t4;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_tfd;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_10base_t;
+static int hf_ieee_802_3_pmd_auto_neg_advertised_caps_inv_other;
+static int hf_ieee_802_3_pmd_mau_type;
+static int hf_ieee_802_3_mdi_power_support;
+static int hf_ieee_802_3_mdi_power_support_port_class;
+static int hf_ieee_802_3_mdi_power_support_pse_power_support;
+static int hf_ieee_802_3_mdi_power_support_pse_power_enabled;
+static int hf_ieee_802_3_mdi_power_support_pse_pairs;
+static int hf_ieee_802_3_mdi_power_pse_pair;
+static int hf_ieee_802_3_mdi_power_class;
+static int hf_ieee_802_3_mdi_power_type;
+static int hf_ieee_802_3_mdi_power_source;
+static int hf_ieee_802_3_mdi_power_priority;
+static int hf_ieee_802_3_mdi_requested_power;
+static int hf_ieee_802_3_mdi_allocated_power;
+
+static int hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_a;
+static int hf_ieee_802_3_bt_ds_pd_requested_power_value_mode_b;
+static int hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_a;
+static int hf_ieee_802_3_bt_ds_pse_allocated_power_value_alt_b;
+static int hf_ieee_802_3_bt_power_status;
+static int hf_ieee_802_3_bt_pse_powering_status;
+static int hf_ieee_802_3_bt_pd_powered_status;
+static int hf_ieee_802_3_bt_pse_power_pairs_ext;
+static int hf_ieee_802_3_bt_ds_pwr_class_ext_a;
+static int hf_ieee_802_3_bt_ds_pwr_class_ext_b;
+static int hf_ieee_802_3_bt_pwr_class_ext;
+static int hf_ieee_802_3_bt_system_setup;
+static int hf_ieee_802_3_bt_power_type_ext;
+static int hf_ieee_802_3_bt_pse_maximum_available_power_value;
+static int hf_ieee_802_3_bt_autoclass;
+static int hf_ieee_802_3_bt_pse_autoclass_support;
+static int hf_ieee_802_3_bt_autoclass_completed;
+static int hf_ieee_802_3_bt_autoclass_request;
+static int hf_ieee_802_3_bt_autoclass_reserved;
+static int hf_ieee_802_3_bt_power_down;
+static int hf_ieee_802_3_bt_power_down_request;
+static int hf_ieee_802_3_bt_power_down_time;
+static int hf_ieee_802_3_aggregation_status;
+static int hf_ieee_802_3_aggregation_status_cap;
+static int hf_ieee_802_3_aggregation_status_enabled;
+static int hf_ieee_802_3_aggregated_port_id;
+static int hf_ieee_802_3_max_frame_size;
+static int hf_ieee_802_3_eee_transmit;
+static int hf_ieee_802_3_eee_receive;
+static int hf_ieee_802_3_eee_fallback_receive;
+static int hf_ieee_802_3_eee_echo_transmit;
+static int hf_ieee_802_3_eee_echo_receive;
+static int hf_ieee_802_1qbg_subtype;
+static int hf_ieee_802_1qbg_evb_support_caps;
+static int hf_ieee_802_1qbg_evb_support_caps_std;
+static int hf_ieee_802_1qbg_evb_support_caps_rr;
+static int hf_ieee_802_1qbg_evb_support_caps_rte;
+static int hf_ieee_802_1qbg_evb_support_caps_ecp;
+static int hf_ieee_802_1qbg_evb_support_caps_vdp;
+static int hf_ieee_802_1qbg_evb_configure_caps;
+static int hf_ieee_802_1qbg_evb_configure_caps_std;
+static int hf_ieee_802_1qbg_evb_configure_caps_rr;
+static int hf_ieee_802_1qbg_evb_configure_caps_rte;
+static int hf_ieee_802_1qbg_evb_configure_caps_ecp;
+static int hf_ieee_802_1qbg_evb_configure_caps_vdp;
+static int hf_ieee_802_1qbg_evb_supported_vsi;
+static int hf_ieee_802_1qbg_evb_configured_vsi;
+static int hf_ieee_802_1qbg_evb_retrans_timer;
+static int hf_ieee_802_3br_aec;
+static int hf_ieee_802_3br_aec_support;
+static int hf_ieee_802_3br_aec_enable;
+static int hf_ieee_802_3br_aec_active;
+static int hf_ieee_802_3br_aec_addfragsize;
+static int hf_ieee_802_3br_aec_reserved;
+static int hf_media_tlv_subtype;
+static int hf_media_tlv_subtype_caps;
+static int hf_media_tlv_subtype_caps_llpd;
+static int hf_media_tlv_subtype_caps_network_policy;
+static int hf_media_tlv_subtype_caps_location_id;
+static int hf_media_tlv_subtype_caps_mdi_pse;
+static int hf_media_tlv_subtype_caps_mid_pd;
+static int hf_media_tlv_subtype_caps_inventory;
+static int hf_media_tlv_subtype_class;
+static int hf_media_application_type;
+static int hf_media_policy_flag;
+static int hf_media_tag_flag;
+static int hf_media_vlan_id;
+static int hf_media_l2_prio;
+static int hf_media_dscp;
+static int hf_media_loc_data_format;
+static int hf_media_loc_lat_resolution;
+static int hf_media_loc_lat;
+static int hf_media_loc_long_resolution;
+static int hf_media_loc_long;
+static int hf_media_loc_alt_type;
+static int hf_media_loc_alt_resolution;
+static int hf_media_loc_alt;
+static int hf_media_loc_ver;
+static int hf_media_loc_reserved;
+static int hf_media_loc_datum;
+static int hf_media_civic_lci_length;
+static int hf_media_civic_what;
+static int hf_media_civic_country;
+static int hf_media_civic_addr_type;
+static int hf_media_civic_addr_len;
+static int hf_media_civic_addr_value;
+static int hf_media_ecs;
+static int hf_media_power_type;
+static int hf_media_power_source;
+static int hf_media_power_priority;
+static int hf_media_power_value;
+static int hf_media_hardware;
+static int hf_media_firmware;
+static int hf_media_software;
+static int hf_media_sn;
+static int hf_media_manufacturer;
+static int hf_media_model;
+static int hf_media_asset;
+static int hf_profinet_tlv_subtype;
+static int hf_profinet_class2_port_status;
+static int hf_profinet_class3_port_status;
+static int hf_profinet_class3_port_status_Fragmentation;
+static int hf_profinet_class3_port_status_reserved;
+static int hf_profinet_class3_port_status_PreambleLength;
+static int hf_profinet_port_rx_delay_local;
+static int hf_profinet_port_rx_delay_remote;
+static int hf_profinet_port_tx_delay_local;
+static int hf_profinet_port_tx_delay_remote;
+static int hf_profinet_cable_delay_local;
+static int hf_profinet_mrp_domain_uuid;
+static int hf_profinet_tsn_domain_uuid;
+static int hf_profinet_tsn_nme_management_addr;
+static int hf_profinet_tsn_nme_management_addr_str_length;
+static int hf_profinet_tsn_nme_management_addr_subtype;
+static int hf_profinet_tsn_nme_name_uuid;
+static int hf_profinet_tsn_nme_parameter_uuid;
+static int hf_profinet_time_domain_number;
+static int hf_profinet_time_domain_uuid;
+static int hf_profinet_time_domain_master_identity;
+static int hf_profinet_mrrt_port_status;
+static int hf_profinet_cm_mac;
+static int hf_profinet_master_source_address;
+static int hf_profinet_subdomain_uuid;
+static int hf_profinet_ir_data_uuid;
+static int hf_profinet_length_of_period_valid;
+static int hf_profinet_length_of_period_length;
+static int hf_profinet_red_period_begin_valid;
+static int hf_profinet_red_period_begin_offset;
+static int hf_profinet_orange_period_begin_valid;
+static int hf_profinet_orange_period_begin_offset;
+static int hf_profinet_green_period_begin_valid;
+static int hf_profinet_green_period_begin_offset;
+static int hf_cisco_subtype;
+static int hf_cisco_upoe;
+static int hf_cisco_upoe_supported;
+static int hf_cisco_upoe_altb_detection;
+static int hf_cisco_upoe_req_spare_pair;
+static int hf_cisco_upoe_pse_spare_pair_oper;
+static int hf_cisco_aci_portstate;
+static int hf_cisco_aci_noderole;
+static int hf_cisco_aci_nodeid;
+static int hf_cisco_aci_spinelevel;
+static int hf_cisco_aci_podid;
+static int hf_cisco_aci_fabricname;
+static int hf_cisco_aci_apiclist;
+static int hf_cisco_aci_apicid;
+static int hf_cisco_aci_apicipv4;
+static int hf_cisco_aci_apicuuid;
+static int hf_cisco_aci_nodeip;
+static int hf_cisco_aci_portrole;
+static int hf_cisco_aci_version;
+static int hf_cisco_aci_fabricvlan;
+static int hf_cisco_aci_serialno;
+static int hf_cisco_aci_model;
+static int hf_cisco_aci_nodename;
+static int hf_cisco_aci_portmode;
+static int hf_cisco_aci_authcookie;
+static int hf_cisco_aci_apicmode;
+static int hf_cisco_aci_fabricid;
+static int hf_hytec_tlv_subtype;
+static int hf_hytec_group;
+static int hf_hytec_identifier;
+static int hf_hytec_transceiver_vendor_product_revision;
+static int hf_hytec_single_mode;
+static int hf_hytec_multi_mode_50;
+static int hf_hytec_multi_mode_62_5;
+static int hf_hytec_tx_current_output_power;
+static int hf_hytec_rx_current_input_power;
+static int hf_hytec_rx_input_snr;
+static int hf_hytec_lineloss;
+static int hf_hytec_mac_trace_request;
+static int hf_hytec_trace_mac_address;
+static int hf_hytec_request_mac_address;
+static int hf_hytec_maximum_depth;
+static int hf_hytec_mac_trace_reply;
+static int hf_hytec_answering_mac_address;
+static int hf_hytec_actual_depth;
+static int hf_hytec_name_of_replying_device;
+static int hf_hytec_outgoing_port_name;
+static int hf_hytec_ipv4_address_of_replying_device;
+static int hf_hytec_end_of_trace;
+static int hf_hytec_ipv6_address_of_replying_device;
+static int hf_hytec_incoming_port_name;
+static int hf_hytec_trace_identifier;
+static int hf_hytec_invalid_object_data;
+static int hf_hytec_unknown_identifier_content;
+static int hf_avaya_subtype;
+static int hf_avaya_poe;
+static int hf_avaya_call_server;
+static int hf_avaya_cna_server;
+static int hf_avaya_file_server;
+static int hf_avaya_dot1q;
+static int hf_avaya_ipphone;
+static int hf_avaya_ipphone_ip;
+static int hf_avaya_ipphone_mask;
+static int hf_avaya_ipphone_gateway;
+static int hf_unknown_subtype;
+static int hf_unknown_subtype_content;
+static int hf_subtype_content_remaining;
+static int hf_iana_subtype;
+static int hf_iana_mudurl;
+static int hf_onos_subtype;
+static int hf_onos_chassis;
+static int hf_onos_port;
+static int hf_onos_ttl;
/* Initialize the subtree pointers */
-static gint ett_lldp = -1;
-static gint ett_chassis_id = -1;
-static gint ett_port_id = -1;
-static gint ett_time_to_live = -1;
-static gint ett_end_of_lldpdu = -1;
-static gint ett_port_description = -1;
-static gint ett_system_name = -1;
-static gint ett_system_desc = -1;
-static gint ett_system_cap = -1;
-static gint ett_system_cap_summary = -1;
-static gint ett_system_cap_enabled = -1;
-static gint ett_management_address = -1;
-static gint ett_unknown_tlv = -1;
-static gint ett_org_spc_def =-1;
-static gint ett_org_spc_dcbx_cin = -1;
-static gint ett_org_spc_dcbx_cee = -1;
-static gint ett_org_spc_dcbx_cee_1 = -1;
-static gint ett_org_spc_dcbx_cee_2 = -1;
-static gint ett_org_spc_dcbx_cee_3 = -1;
-static gint ett_org_spc_dcbx_cee_4 = -1;
-static gint ett_org_spc_dcbx_cin_6 = -1;
-static gint ett_org_spc_dcbx_cee_app = -1;
-static gint ett_org_spc_ieee_802_1_1 = -1;
-static gint ett_org_spc_ieee_802_1_2 = -1;
-static gint ett_org_spc_ieee_802_1_3 = -1;
-static gint ett_org_spc_ieee_802_1_4 = -1;
-static gint ett_org_spc_ieee_802_1_8 = -1;
-static gint ett_org_spc_ieee_802_1_9 = -1;
-static gint ett_org_spc_ieee_802_1_a = -1;
-static gint ett_org_spc_ieee_802_1_b = -1;
-static gint ett_org_spc_ieee_802_1_c = -1;
-static gint ett_org_spc_ieee_dcbx_app = -1;
-
-static gint ett_org_spc_ieee_802_3_1 = -1;
-static gint ett_org_spc_ieee_802_3_2 = -1;
-static gint ett_org_spc_ieee_802_3_3 = -1;
-static gint ett_org_spc_ieee_802_3_4 = -1;
-static gint ett_org_spc_ieee_802_3_5 = -1;
-static gint ett_org_spc_ieee_802_3_7 = -1;
-
-static gint ett_org_spc_media_1 = -1;
-static gint ett_org_spc_media_2 = -1;
-static gint ett_org_spc_media_3 = -1;
-static gint ett_org_spc_media_4 = -1;
-static gint ett_org_spc_media_5 = -1;
-static gint ett_org_spc_media_6 = -1;
-static gint ett_org_spc_media_7 = -1;
-static gint ett_org_spc_media_8 = -1;
-static gint ett_org_spc_media_9 = -1;
-static gint ett_org_spc_media_10 = -1;
-static gint ett_org_spc_media_11 = -1;
-
-static gint ett_ex_avayaSubTypes_11 = -1;
-static gint ett_ex_avayaSubTypes_12 = -1;
-static gint ett_ex_avaya2SubTypes_4 = -1;
-static gint ett_org_spc_ProfinetSubTypes_1 = -1;
-static gint ett_org_spc_ProfinetSubTypes_2 = -1;
-static gint ett_org_spc_ProfinetSubTypes_3 = -1;
-static gint ett_org_spc_ProfinetSubTypes_4 = -1;
-static gint ett_org_spc_ProfinetSubTypes_5 = -1;
-static gint ett_org_spc_ProfinetSubTypes_6 = -1;
-static gint ett_org_spc_tlv = -1;
-static gint ett_port_vlan_flags = -1;
-static gint ett_802_3_flags = -1;
-static gint ett_802_3_autoneg_advertised = -1;
-static gint ett_802_3_power = -1;
-static gint ett_802_3_bt_power = -1;
-static gint ett_802_3_bt_system_setup = -1;
-static gint ett_802_3_bt_autoclass = -1;
-static gint ett_802_3_bt_power_down = -1;
-static gint ett_802_3_aggregation = -1;
-static gint ett_802_1_aggregation = -1;
-static gint ett_802_1qbg_capabilities_flags = -1;
-static gint ett_802_3br_capabilities_flags = -1;
-static gint ett_media_capabilities = -1;
-static gint ett_profinet_period = -1;
-static gint ett_cisco_upoe_tlv = -1;
-static gint ett_avaya_ipphone_tlv = -1;
-static gint ett_org_spc_hytec_subtype_transceiver = -1;
-static gint ett_org_spc_hytec_subtype_trace = -1;
-static gint ett_org_spc_hytec_trace_request = -1;
-static gint ett_org_spc_hytec_trace_reply = -1;
-
-static expert_field ei_lldp_bad_length = EI_INIT;
-static expert_field ei_lldp_bad_length_excess = EI_INIT;
-static expert_field ei_lldp_bad_type = EI_INIT;
-static expert_field ei_lldp_tlv_deprecated = EI_INIT;
+static gint ett_lldp;
+static gint ett_chassis_id;
+static gint ett_port_id;
+static gint ett_time_to_live;
+static gint ett_end_of_lldpdu;
+static gint ett_port_description;
+static gint ett_system_name;
+static gint ett_system_desc;
+static gint ett_system_cap;
+static gint ett_system_cap_summary;
+static gint ett_system_cap_enabled;
+static gint ett_management_address;
+static gint ett_unknown_tlv;
+static gint ett_org_spc_def;
+static gint ett_org_spc_dcbx_cin;
+static gint ett_org_spc_dcbx_cee;
+static gint ett_org_spc_dcbx_cee_1;
+static gint ett_org_spc_dcbx_cee_2;
+static gint ett_org_spc_dcbx_cee_3;
+static gint ett_org_spc_dcbx_cee_4;
+static gint ett_org_spc_dcbx_cin_6;
+static gint ett_org_spc_dcbx_cee_app;
+static gint ett_org_spc_ieee_802_1_1;
+static gint ett_org_spc_ieee_802_1_2;
+static gint ett_org_spc_ieee_802_1_3;
+static gint ett_org_spc_ieee_802_1_4;
+static gint ett_org_spc_ieee_802_1_8;
+static gint ett_org_spc_ieee_802_1_9;
+static gint ett_org_spc_ieee_802_1_a;
+static gint ett_org_spc_ieee_802_1_b;
+static gint ett_org_spc_ieee_802_1_c;
+static gint ett_org_spc_ieee_dcbx_app;
+
+static gint ett_org_spc_ieee_802_3_1;
+static gint ett_org_spc_ieee_802_3_2;
+static gint ett_org_spc_ieee_802_3_3;
+static gint ett_org_spc_ieee_802_3_4;
+static gint ett_org_spc_ieee_802_3_5;
+static gint ett_org_spc_ieee_802_3_7;
+
+static gint ett_org_spc_media_1;
+static gint ett_org_spc_media_2;
+static gint ett_org_spc_media_3;
+static gint ett_org_spc_media_4;
+static gint ett_org_spc_media_5;
+static gint ett_org_spc_media_6;
+static gint ett_org_spc_media_7;
+static gint ett_org_spc_media_8;
+static gint ett_org_spc_media_9;
+static gint ett_org_spc_media_10;
+static gint ett_org_spc_media_11;
+
+static gint ett_ex_avayaSubTypes_11;
+static gint ett_ex_avayaSubTypes_12;
+static gint ett_ex_avaya2SubTypes_4;
+static gint ett_org_spc_ProfinetSubTypes_1;
+static gint ett_org_spc_ProfinetSubTypes_2;
+static gint ett_org_spc_ProfinetSubTypes_3;
+static gint ett_org_spc_ProfinetSubTypes_4;
+static gint ett_org_spc_ProfinetSubTypes_5;
+static gint ett_org_spc_ProfinetSubTypes_6;
+static gint ett_org_spc_tlv;
+static gint ett_port_vlan_flags;
+static gint ett_802_3_flags;
+static gint ett_802_3_autoneg_advertised;
+static gint ett_802_3_power;
+static gint ett_802_3_bt_power;
+static gint ett_802_3_bt_system_setup;
+static gint ett_802_3_bt_autoclass;
+static gint ett_802_3_bt_power_down;
+static gint ett_802_3_aggregation;
+static gint ett_802_1_aggregation;
+static gint ett_802_1qbg_capabilities_flags;
+static gint ett_802_3br_capabilities_flags;
+static gint ett_media_capabilities;
+static gint ett_profinet_period;
+static gint ett_cisco_upoe_tlv;
+static gint ett_avaya_ipphone_tlv;
+static gint ett_org_spc_hytec_subtype_transceiver;
+static gint ett_org_spc_hytec_subtype_trace;
+static gint ett_org_spc_hytec_trace_request;
+static gint ett_org_spc_hytec_trace_reply;
+
+static expert_field ei_lldp_bad_length;
+static expert_field ei_lldp_bad_length_excess;
+static expert_field ei_lldp_bad_type;
+static expert_field ei_lldp_tlv_deprecated;
/* TLV Types */
#define END_OF_LLDPDU_TLV_TYPE 0x00 /* Mandatory */
@@ -756,12 +776,20 @@ static const value_string media_application_type[] = {
/* PROFINET subtypes */
static const value_string profinet_subtypes[] = {
- { 1, "Measured Delay Values" },
- { 2, "Port Status" },
- { 3, "Alias" },
- { 4, "MRP Port Status" },
- { 5, "Chassis MAC" },
- { 6, "PTCP Status" },
+ { 1, "Measured Delay Values" },
+ { 2, "Port Status" },
+ { 3, "Alias" },
+ { 4, "MRP Port Status" },
+ { 5, "Chassis MAC" },
+ { 6, "PTCP Status" },
+ { 7, "MauType Extension" },
+ { 8, "MRPIC Port Status" },
+ { 9, "TSN Domain"},
+ { 10, "TSN NME Management Address"},
+ { 11, "TSN NME Name UUID"},
+ { 12, "TSN NME Parameter UUID"},
+ { 13, "AS Working Clock"},
+ { 14, "AS Global Time"},
{ 0, NULL }
};
/* extreme avaya ap subtypes */
@@ -951,6 +979,14 @@ static const value_string altitude_type[] = {
{ 0, NULL }
};
+/* Datum Type */
+static const value_string datum_type_values[] = {
+ { 1, "WGS84" },
+ { 2, "NAD83 (Latitude, Longitude) + NAVD88" },
+ { 3, "NAD83 (Latitude, Longitude) + MLLW" },
+ { 0, NULL }
+};
+
/* Civic Address LCI - What field */
static const value_string civic_address_what_values[] = {
{ 0, "Location of the DHCP server" },
@@ -1050,7 +1086,7 @@ static const value_string operational_mau_type_values[] = {
{ 46, "100BASE-LX10 - One single-mode fiber ONU, long wavelength, 10km" },
{ 47, "1000BASE-BX10D - One single-mode fiber OLT, long wavelength, 10km" },
{ 48, "1000BASE-BX10U - One single-mode fiber ONU, long wavelength, 10km" },
- { 49, "1000BASE-LX10 - Two sigle-mode fiber, long wavelength, 10km" },
+ { 49, "1000BASE-LX10 - Two single-mode fiber, long wavelength, 10km" },
{ 50, "1000BASE-PX10D - One single-mode fiber EPON OLT, 10km" },
{ 51, "1000BASE-PX10U - One single-mode fiber EPON ONU, 10km" },
{ 52, "1000BASE-PX20D - One single-mode fiber EPON OLT, 20km" },
@@ -1188,6 +1224,9 @@ static const value_string hytec_mc[] = {
#define SYSTEM_CAPABILITY_TELEPHONE 0x0020
#define SYSTEM_CAPABILITY_DOCSIS 0x0040
#define SYSTEM_CAPABILITY_STATION 0x0080
+#define SYSTEM_CAPABILITY_CVLAN 0x0100
+#define SYSTEM_CAPABILITY_SVLAN 0x0200
+#define SYSTEM_CAPABILITY_TPMR 0x0400
/* Media Capabilities */
#define MEDIA_CAPABILITY_LLDP 0x0001
@@ -1298,6 +1337,13 @@ static const value_string profinet_mrrt_port_status_vals[] = {
/* all other bits reserved */
{ 0, NULL }
};
+static const value_string profinet_time_domain_number_vals[] = {
+ { 0x0000, "Global Time" },
+ { 0x0001, "Global Time Redundant" },
+ { 0x0020, "Working Clock" },
+ { 0x0021, "Working Clock Redundant" },
+ { 0, NULL }
+};
/* IEEE 802.1Qbg Subtypes */
static const value_string ieee_802_1qbg_subtypes[] = {
@@ -1311,14 +1357,85 @@ static const unit_name_string units_m = { " m", NULL };
static void
mdi_power_base(gchar *buf, guint32 value) {
- g_snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u. Watt", value/10, value%10);
+ snprintf(buf, ITEM_LABEL_LENGTH, "%u.%u. Watt", value/10, value%10);
}
static void
media_power_base(gchar *buf, guint32 value) {
- g_snprintf(buf, ITEM_LABEL_LENGTH, "%u mW", value * 100);
+ snprintf(buf, ITEM_LABEL_LENGTH, "%u mW", value * 100);
+}
+
+// Get absolute 2's complement value
+// Returns true if the value is negative (so if
+// it returns false, there is no conversion).
+// bitSize: number of bits of the variable.
+static gboolean
+get2sComplementAbsoluteValue(guint64 * value, guint bitSize){
+ const guint64 signMask = G_GINT64_CONSTANT(0x1) << (bitSize - 1);
+
+ guint64 signedMask = G_GINT64_CONSTANT(0x1) << bitSize;
+ signedMask--;
+ signedMask = ~signedMask;
+
+ if(*value & signMask){
+ *value |= signedMask; // sign propagation
+
+ // Convert to absolute value
+ *value = ~(*value);
+ (*value)++;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static guint64
+getUint64MaskedValue(guint64 value, guint bitSize){
+ guint64 mask = G_GINT64_CONSTANT(0x1) << bitSize;
+ mask--;
+ return value & mask;
+}
+
+static guint64
+pow10_uint64(gint exponent){
+ guint64 val = 1;
+
+ while(exponent > 0){
+ val *= 10;
+ exponent--;
+ }
+
+ while(exponent < 0){
+ val /= 10;
+ exponent++;
+ }
+ return val;
}
+// Decode uint fractional variable
+static guint64
+convertFractionalToFixedSizeDecimal(guint64 value, guint fractionalBitSize, guint numberOfDigitToDisplay){
+ const guint64 resolution = G_GINT64_CONSTANT(0x1) << fractionalBitSize;
+ // => 0x02000000 for 25-bits
+ // => 0x00000100 for 8-bits
+
+ const guint64 fractionalPortionMask = resolution - 1;
+ value &= fractionalPortionMask;
+
+ // Maximum value for numberOfDigitToDisplay is :
+ // log10(G_GINT64_CONSTANT(0xFFFFFFFFFFFFFFFF) / fractionalPortionMask);
+ // => if result is stored in 32-bits, numberOfDigitToDisplay max = 9
+ const guint64 displayMultiplier = pow10_uint64(numberOfDigitToDisplay);
+ value *= displayMultiplier;
+ guint64 moduloValue = value % resolution;
+ value /= resolution;
+ if(moduloValue >= (resolution/2)){
+ value++; // rounded value
+ }
+
+ return value;
+}
+
+
/* Calculate Latitude and Longitude string */
/*
Parameters:
@@ -1328,54 +1445,67 @@ media_power_base(gchar *buf, guint32 value) {
static void
get_latitude_or_longitude(gchar *buf, int option, guint64 unmasked_value)
{
- guint64 value = unmasked_value & G_GINT64_CONSTANT(0x03FFFFFFFF);
- guint64 tempValue = value;
- gboolean negativeNum = FALSE;
- guint32 integerPortion = 0;
- const char *direction;
-
/* The latitude and longitude are 34 bit fixed point value consisting
of 9 bits of integer and 25 bits of fraction.
When option is equal to 0, positive numbers are represent a location
north of the equator and negative (2s complement) numbers are south of the equator.
When option is equal to 1, positive values are east of the prime
meridian and negative (2s complement) numbers are west of the prime meridian.
+ Longitude values outside the range of -180 to 180 decimal degrees or latitude values
+ outside the range of -90 to 90 degrees MUST be considered invalid.
*/
+ const guint variableBitSize = 34;
+ const guint fractionalBitSize = 25;
+ const guint64 maxlatitude = (G_GINT64_CONSTANT(0x1) << fractionalBitSize) * G_GINT64_CONSTANT(90); // 90 degrees
+ const guint64 maxlongitude = (G_GINT64_CONSTANT(0x1) << fractionalBitSize) * G_GINT64_CONSTANT(180); // 180 degrees
- if (value & G_GINT64_CONSTANT(0x0000000200000000))
- {
- /* Have a negative number (2s complement) */
- negativeNum = TRUE;
+ guint64 masked_value = getUint64MaskedValue(unmasked_value, variableBitSize); // get 34-bit value
- tempValue = ~value;
- tempValue += 1;
- }
+ // Get absolute value of a 34-bit 2's variable
+ // => value is 33-bit
+ guint64 absolute_value = masked_value;
+ gboolean isNegative = get2sComplementAbsoluteValue(&absolute_value, variableBitSize);
- /* Get the integer portion */
- integerPortion = (guint32)((tempValue & G_GINT64_CONSTANT(0x00000003FE000000)) >> 25);
+ // Get unsigned integer 8-bit value
+ guint32 integerPortion = (guint32)(absolute_value >> fractionalBitSize);
- /* Calculate decimal portion (using 25 bits for fraction) */
- tempValue = (tempValue & G_GINT64_CONSTANT(0x0000000001FFFFFF))/33554432;
+ // Get fractional 25-bit value
+ const guint numberOfDigitToDisplay = 4;
+ guint64 fixedSizeDecimal = convertFractionalToFixedSizeDecimal(absolute_value, fractionalBitSize, numberOfDigitToDisplay);
- if (option == 0)
- {
- /* Latitude - north/south directions */
- if (negativeNum)
+ const char *direction;
+ const char *err_str = "";
+ if (option == 0){
+ // Latitude - north/south directions
+ if (isNegative){
direction = "South";
- else
+ } else {
direction = "North";
- }
- else
- {
- /* Longitude - east/west directions */
- if (negativeNum)
+ }
+ if(absolute_value > maxlatitude){
+ err_str = "[Error: value > 90 degrees] ";
+ }
+ } else {
+ // Longitude - east/west directions
+ if (isNegative){
direction = "West";
- else
+ } else {
direction = "East";
+ }
+ if(absolute_value > maxlongitude){
+ err_str = "[Error: value > 180 degrees] ";
+ }
}
- g_snprintf(buf, ITEM_LABEL_LENGTH, "%u.%04" G_GINT64_MODIFIER "u degrees %s (0x%010" G_GINT64_MODIFIER "X)",
- integerPortion, tempValue, direction, value);
+ const guint64 fractionalMask = (G_GINT64_CONSTANT(0x1) << fractionalBitSize) - 1;
+
+ // %04 correspond to numberOfDigitToDisplay
+ 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 ")",
+ err_str,
+ integerPortion, fixedSizeDecimal, direction, masked_value,
+ variableBitSize - fractionalBitSize, masked_value >> fractionalBitSize,
+ fractionalBitSize, masked_value & fractionalMask
+ );
}
static void
@@ -1388,6 +1518,126 @@ longitude_base(gchar *buf, guint64 value) {
get_latitude_or_longitude(buf, 1, value);
}
+static void
+altitude_base(gchar *buf, guint32 unmasked_value) {
+ // RFC6225
+ // Altitude: A 30-bit value defined by the AType field.
+ // In some cases, the altitude of the location might not be provided.
+ // An Altitude Type value of zero indicates that the altitude is not
+ // given to the client. In this case, the Altitude and Altitude
+ // Uncertainty fields can contain any value and MUST be ignored.
+ //
+ // If the Altitude Type has a value of one, altitude is measured in
+ // meters, in relation to the zero set by the vertical datum. For AType
+ // = 1, the altitude value is expressed as a 30-bit, fixed-point, two's
+ // complement integer with 22 integer bits and 8 fractional bits.
+ //
+ // A value of two for Altitude Type indicates that the altitude value is
+ // measured in floors. Since altitude in meters may not be known within
+ // a building, a floor indication may be more useful. For AType = 2,
+ // the altitude value is expressed as a 30-bit, fixed-point, two's
+ // complement integer with 22 integer bits and 8 fractional bits.
+ //
+ // the altitude resolution (AltRes) value encodes the number of
+ // high-order altitude bits that should be considered valid.
+ // Values above 30 (decimal) are undefined and reserved.
+
+ const guint variableBitSize = 30;
+ const guint fractionalBitSize = 8;
+
+ guint64 masked_value = getUint64MaskedValue(unmasked_value, variableBitSize); // get 30-bit value
+
+ // Get absolute value of a 30-bit 2's variable
+ // => value is 29-bit
+ guint64 absolute_value = masked_value;
+ gboolean isNegative = get2sComplementAbsoluteValue(&absolute_value, variableBitSize);
+
+ // Get unsigned integer 8-bit value
+ guint32 integerPortion = (guint32)(absolute_value >> fractionalBitSize);
+
+ // Get fractional 8-bit value
+ const guint numberOfDigitToDisplay = 4;
+ guint64 fixedSizeDecimal = convertFractionalToFixedSizeDecimal(absolute_value, fractionalBitSize, numberOfDigitToDisplay);
+
+ const char * sign;
+ if (isNegative){
+ sign = "-";
+ } else {
+ sign = "+";
+ }
+
+
+ const guint64 fractionalMask = (G_GINT64_CONSTANT(0x1) << fractionalBitSize) - 1;
+
+ // %04 correspond to numberOfDigitToDisplay
+ 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 ")",
+ sign, integerPortion, fixedSizeDecimal, masked_value,
+ variableBitSize - fractionalBitSize, masked_value >> fractionalBitSize,
+ fractionalBitSize, masked_value & fractionalMask
+ );
+}
+
+static void
+latitude_or_longitude_resolution(gchar *buf, guint8 value) {
+ // formula, where x is the encoded integer value:
+ // Uncertainty = 2 ^ ( 8 - x )
+
+ gint32 masked_value = value & 0x3F;
+ double resolution = 1.0;
+ gint32 i = 8 - masked_value;
+ while(i > 0){
+ resolution *= 2.0;
+ i--;
+ }
+ while(i < 0){
+ resolution /= 2.0;
+ i++;
+ }
+
+ const char *err_str = "";
+ if(masked_value > 34){
+ err_str = "[Error: value > 34] ";
+ } else if(masked_value < 2){
+ err_str = "[Warning: value < 2] ";
+ }
+
+ snprintf(buf, ITEM_LABEL_LENGTH, "%s%lE degrees (%" PRIi32 ")", err_str, resolution, masked_value);
+}
+
+static void
+altitude_resolution(gchar *buf, guint8 value) {
+ // The encoded altitude of 000000000000000010000110110011 decodes to
+ // 33.69921875. The encoded uncertainty of 15 gives a value of 64;
+ // therefore, the final uncertainty is 33.69921875 +/- 64 (or the range
+ // from -30.30078125 to 97.69921875).
+ // The amount of altitude uncertainty can be determined by the following
+ // formula, where x is the encoded integer value:
+ // Uncertainty = 2 ^ ( 21 - x )
+ // = 2 ^ ( 21 - 15 ) = 2 ^ 6 = 64
+
+ gint32 masked_value = value & 0x3F;
+ double resolution = 1.0;
+ gint32 i = 21 - masked_value;
+ while(i > 0){
+ resolution *= 2.0;
+ i--;
+ }
+ while(i < 0){
+ resolution /= 2.0;
+ i++;
+ }
+
+ const char *err_str = "";
+ if(masked_value > 30){
+ err_str = "[Error: value > 34] ";
+ } else if(masked_value < 2){
+ err_str = "[Warning: value < 2] ";
+ }
+
+ snprintf(buf, ITEM_LABEL_LENGTH, "%s%lf (%" PRIi32 ")", err_str, resolution, masked_value);
+}
+
+
/* Dissect Chassis Id TLV (Mandatory) */
static gint32
dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset,
@@ -1525,7 +1775,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
idType="IA";
strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen - 1));
break;
- case 6: /* Interfae name */
+ case 6: /* Interface name */
idType="IN";
strPtr = tvb_format_stringzpad(pinfo->pool, tvb, offset, (dataLen - 1));
break;
@@ -1670,7 +1920,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
break;
default:
strPtr = tvb_bytes_to_str(pinfo->pool, tvb, offset, (dataLen-2));
- proto_tree_add_item(port_tree, hf_port_id, tvb, offset, (dataLen-2), ENC_ASCII|ENC_NA);
+ proto_tree_add_item(port_tree, hf_port_id, tvb, offset, (dataLen-2), ENC_ASCII);
break;
}
@@ -1719,7 +1969,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
break;
}
- proto_tree_add_item(port_tree, hf_port_id, tvb, offset, (dataLen-1), ENC_ASCII|ENC_NA);
+ proto_tree_add_item(port_tree, hf_port_id, tvb, offset, (dataLen-1), ENC_ASCII);
offset += (dataLen - 1);
break;
@@ -1774,7 +2024,7 @@ dissect_lldp_time_to_live(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
return offset;
}
-/* Dissect End of LLDPDU TLV (Mandatory) */
+/* Dissect End of LLDPDU TLV */
static gint32
dissect_lldp_end_of_lldpdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset)
{
@@ -1795,7 +2045,9 @@ dissect_lldp_end_of_lldpdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
proto_tree_add_item(end_of_lldpdu_tree, hf_lldp_tlv_type, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(end_of_lldpdu_tree, hf_lldp_tlv_len, tvb, offset, 2, ENC_BIG_ENDIAN);
- return -1; /* Force the lldp dissector to terminate */
+ offset += 2;
+ offset += dataLen;
+ return offset;
}
/* Dissect Port Description TLV */
@@ -1825,7 +2077,7 @@ dissect_lldp_port_desc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
offset += 2;
/* Display port description information */
- proto_tree_add_item(port_desc_tree, hf_port_desc, tvb, offset, dataLen, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(port_desc_tree, hf_port_desc, tvb, offset, dataLen, ENC_ASCII);
offset += dataLen;
@@ -1876,9 +2128,9 @@ dissect_lldp_system_name(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
/* Display system name information */
if (tlvsubType == SYSTEM_NAME_TLV_TYPE)
- proto_tree_add_item(system_subtree, hf_lldp_tlv_system_name, tvb, offset, dataLen, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(system_subtree, hf_lldp_tlv_system_name, tvb, offset, dataLen, ENC_ASCII);
else
- proto_tree_add_item(system_subtree, hf_lldp_tlv_system_desc, tvb, offset, dataLen, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(system_subtree, hf_lldp_tlv_system_desc, tvb, offset, dataLen, ENC_ASCII);
offset += dataLen;
@@ -1923,6 +2175,9 @@ dissect_lldp_system_capabilities(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
proto_tree_add_item(capabilities_summary_tree, hf_lldp_tlv_system_cap_telephone, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(capabilities_summary_tree, hf_lldp_tlv_system_cap_docsis_cable_device, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(capabilities_summary_tree, hf_lldp_tlv_system_cap_station_only, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_summary_tree, hf_lldp_tlv_system_cap_cvlan_component, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_summary_tree, hf_lldp_tlv_system_cap_svlan_component, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_summary_tree, hf_lldp_tlv_system_cap_tpmr_component, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
/* Get enabled summary */
@@ -1938,6 +2193,9 @@ dissect_lldp_system_capabilities(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
proto_tree_add_item(capabilities_enabled_tree, hf_lldp_tlv_enable_system_cap_telephone, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(capabilities_enabled_tree, hf_lldp_tlv_enable_system_cap_docsis_cable_device, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(capabilities_enabled_tree, hf_lldp_tlv_enable_system_cap_station_only, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_summary_tree, hf_lldp_tlv_enable_system_cap_cvlan_component, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_summary_tree, hf_lldp_tlv_enable_system_cap_svlan_component, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capabilities_summary_tree, hf_lldp_tlv_enable_system_cap_tpmr_component, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -2296,7 +2554,7 @@ dissect_ieee_802_1_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
if (tempByte > 0)
{
- proto_tree_add_item(tree, hf_ieee_802_1_vlan_name, tvb, offset, tempByte, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_ieee_802_1_vlan_name, tvb, offset, tempByte, ENC_ASCII);
offset += tempByte;
}
@@ -3185,7 +3443,7 @@ dissect_media_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case 1: /* Coordinate-based LCI */
{
/*
- * See RFC 3825.
+ * See RFC 6225 (obsoletes RFC 3825).
* XXX - should this be handled by the BOOTP
* dissector, and exported to us?
*/
@@ -3224,6 +3482,12 @@ dissect_media_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4;
+ /* Get Ver */
+ proto_tree_add_item(tree, hf_media_loc_ver, tvb, offset, 1, ENC_BIG_ENDIAN);
+
+ /* Get reserved */
+ proto_tree_add_item(tree, hf_media_loc_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+
/* Get datum */
proto_tree_add_item(tree, hf_media_loc_datum, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -3279,7 +3543,7 @@ dissect_media_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
- proto_tree_add_item(tree, hf_media_civic_country, tvb, offset, 2, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_media_civic_country, tvb, offset, 2, ENC_ASCII);
offset += 2;
LCI_Length -= 2;
@@ -3312,7 +3576,7 @@ dissect_media_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tempByte > 0)
{
/* Get CA Value */
- proto_tree_add_item(tree, hf_media_civic_addr_value, tvb, offset, tempByte, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_media_civic_addr_value, tvb, offset, tempByte, ENC_ASCII);
offset += tempByte;
LCI_Length -= tempByte;
@@ -3325,7 +3589,7 @@ dissect_media_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
if (tlvLen > 0)
{
- proto_tree_add_item(tree, hf_media_ecs, tvb, offset, tlvLen, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_media_ecs, tvb, offset, tlvLen, ENC_ASCII);
}
break;
@@ -3675,6 +3939,61 @@ dissect_profinet_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pr
hf_profinet_green_period_begin_valid, hf_profinet_green_period_begin_offset);
break;
}
+ case 9: /* LLDP_PNIO_TSNDOMAIN */
+ {
+ /* DomainUUID */
+ proto_tree_add_item(tree, hf_profinet_tsn_domain_uuid, tvb, offset, 16, ENC_BIG_ENDIAN);
+ /*offset += 16;*/
+ break;
+ }
+ case 10: /* LLDP_PNIO_TSNNMEManagementAddr */
+ {
+ guint8 management_string_length = 0;
+ management_string_length = tvb_get_guint8(tvb, offset);
+
+ /* Management Address String Length */
+ proto_tree_add_item(tree, hf_profinet_tsn_nme_management_addr_str_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ /* Management Address Subtype */
+ proto_tree_add_item(tree, hf_profinet_tsn_nme_management_addr_subtype, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ management_string_length -= 1;
+
+ /* Management Address */
+ proto_tree_add_item(tree, hf_profinet_tsn_nme_management_addr, tvb, offset, management_string_length, ENC_NA);
+ /*offset += management_string_length;*/
+ break;
+ }
+ case 11: /* LLDP_PNIO_TSNNMENameUUID */
+ {
+ /* TSNNMENameUUID */
+ proto_tree_add_item(tree, hf_profinet_tsn_nme_name_uuid, tvb, offset, 16, ENC_BIG_ENDIAN);
+ /*offset += 16;*/
+ break;
+ }
+ case 12: /* LLDP_PNIO_TSNNMEParameterUUID */
+ {
+ /* NMEParameterUUID */
+ proto_tree_add_item(tree, hf_profinet_tsn_nme_parameter_uuid, tvb, offset, 16, ENC_BIG_ENDIAN);
+ /*offset += 16;*/
+ break;
+ }
+ case 13: /* LLDP_PNIO_TSNTimeDomain */
+ {
+ /*TimeDomainNumber*/
+ proto_tree_add_item(tree, hf_profinet_time_domain_number, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ /*TimeDomainUUID*/
+ proto_tree_add_item(tree, hf_profinet_time_domain_uuid, tvb, offset, 16, ENC_BIG_ENDIAN);
+ offset += 16;
+
+ /*TimeDomainMasterIdentity*/
+ proto_tree_add_item(tree, hf_profinet_time_domain_master_identity, tvb, offset, 8, ENC_NA);
+ /*offset += 8;*/
+ break;
+ }
default:
proto_tree_add_item(tree, hf_unknown_subtype_content, tvb, offset, -1, ENC_NA);
}
@@ -3746,7 +4065,7 @@ dissect_cisco_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
length -= 2;
break;
case 0xce: // 206 fabric-name, string
- tf = proto_tree_add_item(tree, hf_cisco_aci_fabricname, tvb, offset, length, ENC_ASCII|ENC_NA);
+ tf = proto_tree_add_item(tree, hf_cisco_aci_fabricname, tvb, offset, length, ENC_ASCII);
proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
@@ -3761,7 +4080,7 @@ dissect_cisco_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
proto_tree_add_item(tree, hf_cisco_aci_apicipv4, tvb, offset, 4, ENC_NA);
offset += 4;
length -= 4;
- proto_tree_add_item(tree, hf_cisco_aci_apicuuid, tvb, offset, 36, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_cisco_aci_apicuuid, tvb, offset, 36, ENC_ASCII);
offset += 36;
length -= 36;
}
@@ -3779,7 +4098,7 @@ dissect_cisco_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
length--;
break;
case 0xd2: // 210 fw-ver, string
- tf = proto_tree_add_item(tree, hf_cisco_aci_version, tvb, offset, length, ENC_ASCII|ENC_NA);
+ tf = proto_tree_add_item(tree, hf_cisco_aci_version, tvb, offset, length, ENC_ASCII);
proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
@@ -3791,7 +4110,7 @@ dissect_cisco_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
length -= 2;
break;
case 0xd4: // 212 serial-number, string
- tf = proto_tree_add_item(tree, hf_cisco_aci_serialno, tvb, offset, length, ENC_ASCII|ENC_NA);
+ tf = proto_tree_add_item(tree, hf_cisco_aci_serialno, tvb, offset, length, ENC_ASCII);
proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
@@ -3801,13 +4120,13 @@ dissect_cisco_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
break;
#endif
case 0xd6: // 214 model, string
- tf = proto_tree_add_item(tree, hf_cisco_aci_model, tvb, offset, length, ENC_ASCII|ENC_NA);
+ tf = proto_tree_add_item(tree, hf_cisco_aci_model, tvb, offset, length, ENC_ASCII);
proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
break;
case 0xd7: // 215 name, string
- tf = proto_tree_add_item(tree, hf_cisco_aci_nodename, tvb, offset, length, ENC_ASCII|ENC_NA);
+ tf = proto_tree_add_item(tree, hf_cisco_aci_nodename, tvb, offset, length, ENC_ASCII);
proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
@@ -3892,7 +4211,7 @@ dissect_hytec_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
case HYTEC_TID__VENDOR_PRODUCT_REVISION:
maximum_data_length = 64;
if(0 < msg_len && msg_len <= maximum_data_length)
- proto_tree_add_item(tree, hf_hytec_transceiver_vendor_product_revision, tvb, offset, msg_len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_hytec_transceiver_vendor_product_revision, tvb, offset, msg_len, ENC_ASCII);
else
{ /* unexpected length */
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);
@@ -4011,7 +4330,7 @@ dissect_hytec_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
} /* switch (identifier) */
break;
default: /* unknown group */
- /* indentifier considered also unknown */
+ /* identifier considered also unknown */
proto_item_append_text(identifier_proto_item, "Unknown");
proto_tree_add_item(tree, hf_hytec_unknown_identifier_content, tvb, offset, -1, ENC_NA);
} /* switch (group) */
@@ -4066,7 +4385,7 @@ dissect_hytec_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
break;
case HYTEC_MC__NAME_OF_REPLYING_DEVICE:
maximum_data_length = 64;
- 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|ENC_NA);
+ 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);
else
{ /* unexpected length */
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);
@@ -4075,7 +4394,7 @@ dissect_hytec_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
break;
case HYTEC_MC__OUTGOING_PORT_NAME:
maximum_data_length = 64;
- 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|ENC_NA);
+ 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);
else
{ /* unexpected length */
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);
@@ -4111,7 +4430,7 @@ dissect_hytec_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
break;
case HYTEC_MC__INCOMING_PORT_NAME:
maximum_data_length = 64;
- 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|ENC_NA);
+ 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);
else
{ /* unexpected length */
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);
@@ -4131,7 +4450,7 @@ dissect_hytec_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
} /* switch (identifier) */
break;
default: /* unknown group */
- /* indentifier considered also unknown */
+ /* identifier considered also unknown */
proto_item_append_text(identifier_proto_item, "Unknown");
proto_tree_add_item(tree, hf_hytec_unknown_identifier_content, tvb, offset, -1, ENC_NA);
} /* switch (group) */
@@ -4224,7 +4543,7 @@ dissect_iana_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
case 0x01: /* MUDURL */
if ( msg_len > 0 )
- proto_tree_add_item(tree, hf_iana_mudurl, tvb, offset, msg_len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_iana_mudurl, tvb, offset, msg_len, ENC_ASCII);
break;
default:
@@ -4247,10 +4566,10 @@ dissect_onos_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
switch (subType)
{
case ONOS_CHASSIS_TLV_TYPE:
- proto_tree_add_item(tree, hf_onos_chassis, tvb, offset, msg_len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_onos_chassis, tvb, offset, msg_len, ENC_ASCII);
break;
case ONOS_PORT_TLV_TYPE:
- proto_tree_add_item(tree, hf_onos_port, tvb, offset, msg_len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_onos_port, tvb, offset, msg_len, ENC_ASCII);
break;
case ONOS_TTL_TLV_TYPE:
proto_tree_add_item(tree, hf_onos_ttl, tvb, offset, msg_len, ENC_NA);
@@ -4439,6 +4758,9 @@ dissect_organizational_specific_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tre
case OUI_ONOS:
subTypeStr = val_to_str(subType, onos_subtypes, "Unknown subtype (0x%x)");
break;
+ case OUI_ODVA:
+ subTypeStr = val_to_str(subType, lldp_cip_subtypes, "Unknown subtype (0x%x)");
+ break;
default:
subTypeStr = wmem_strdup_printf(pinfo->pool, "Unknown (%d)",subType);
break;
@@ -4502,6 +4824,9 @@ dissect_organizational_specific_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tre
case OUI_ONOS:
dissect_onos_tlv(vendor_tvb, pinfo, org_tlv_tree);
break;
+ case OUI_ODVA:
+ dissect_lldp_cip_tlv(vendor_tvb, pinfo, org_tlv_tree);
+ break;
default:
dissect_oui_default_tlv(vendor_tvb, pinfo, org_tlv_tree);
}
@@ -4548,7 +4873,7 @@ dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
gint32 rtnValue = 0;
guint16 tempShort;
guint8 tlvType;
- gboolean reachedEnd = FALSE;
+ guint32 tvbLen;
profinet_lldp_column_info *pn_lldp_column_info = NULL;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LLDP");
@@ -4600,9 +4925,9 @@ dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
offset += rtnValue;
-
- /* Dissect optional tlv's until end-of-lldpdu is reached */
- while (!reachedEnd)
+ tvbLen = tvb_captured_length(tvb);
+ /* Dissect optional tlv info that contained in data packets */
+ while (offset < tvbLen)
{
tempShort = tvb_get_ntohs(tvb, offset);
tlvType = TLV_TYPE(tempShort);
@@ -4659,11 +4984,16 @@ dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
if (rtnValue < 0) {
- reachedEnd = TRUE;
set_actual_length(tvb, offset + rtnValue);
+ break;
}
else
offset += rtnValue;
+
+ /* Terminate the LLDP dissector after reaching the END_OF_LLDPDU */
+ if (tlvType == END_OF_LLDPDU_TLV_TYPE) {
+ break;
+ }
}
return tvb_captured_length(tvb);
@@ -4722,6 +5052,18 @@ proto_register_lldp(void)
{ "Station only", "lldp.tlv.system_cap.station_only", FT_BOOLEAN, 16,
TFS(&tfs_capable_not_capable), SYSTEM_CAPABILITY_STATION, NULL, HFILL }
},
+ { &hf_lldp_tlv_system_cap_cvlan_component,
+ { "C-VLAN component", "lldp.tlv.system_cap.cvlan", FT_BOOLEAN, 16,
+ TFS(&tfs_capable_not_capable), SYSTEM_CAPABILITY_CVLAN, NULL, HFILL }
+ },
+ { &hf_lldp_tlv_system_cap_svlan_component,
+ { "S-VLAN component", "lldp.tlv.system_cap.svlan", FT_BOOLEAN, 16,
+ TFS(&tfs_capable_not_capable), SYSTEM_CAPABILITY_SVLAN, NULL, HFILL }
+ },
+ { &hf_lldp_tlv_system_cap_tpmr_component,
+ { "TPMR component", "lldp.tlv.system_cap.tpmr", FT_BOOLEAN, 16,
+ TFS(&tfs_capable_not_capable), SYSTEM_CAPABILITY_TPMR, NULL, HFILL }
+ },
{ &hf_lldp_tlv_system_name,
{ "System Name", "lldp.tlv.system.name", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }
@@ -4766,6 +5108,18 @@ proto_register_lldp(void)
{ "Station only", "lldp.tlv.enable_system_cap.station_only", FT_BOOLEAN, 16,
TFS(&tfs_capable_not_capable), SYSTEM_CAPABILITY_STATION, NULL, HFILL }
},
+ { &hf_lldp_tlv_enable_system_cap_cvlan_component,
+ { "C-VLAN component", "lldp.tlv.enable_system_cap.cvlan", FT_BOOLEAN, 16,
+ TFS(&tfs_capable_not_capable), SYSTEM_CAPABILITY_CVLAN, NULL, HFILL }
+ },
+ { &hf_lldp_tlv_enable_system_cap_svlan_component,
+ { "S-VLAN component", "lldp.tlv.enable_system_cap.svlan", FT_BOOLEAN, 16,
+ TFS(&tfs_capable_not_capable), SYSTEM_CAPABILITY_SVLAN, NULL, HFILL }
+ },
+ { &hf_lldp_tlv_enable_system_cap_tpmr_component,
+ { "TPMR component", "lldp.tlv.enable_system_cap.tpmr", FT_BOOLEAN, 16,
+ TFS(&tfs_capable_not_capable), SYSTEM_CAPABILITY_TPMR, NULL, HFILL }
+ },
{ &hf_chassis_id_subtype,
{ "Chassis Id Subtype", "lldp.chassis.subtype", FT_UINT8, BASE_DEC,
VALS(chassis_id_subtypes), 0, NULL, HFILL }
@@ -4904,39 +5258,39 @@ proto_register_lldp(void)
},
{ &hf_dcbx_feature_pgid_reserved,
{ "Reserved", "lldp.dcbx.feature.pg.reserved", FT_UINT8, BASE_HEX,
- NULL, 0xF000, 0, HFILL }
+ NULL, 0xFE, NULL, HFILL }
},
{ &hf_dcbx_feature_pgid_prio_0,
{ "PGID for Prio 0", "lldp.dcbx.feature.pg.pgid_prio0", FT_UINT16, BASE_DEC,
- NULL, 0xF000, 0, HFILL }
+ NULL, 0xF000, NULL, HFILL }
},
{ &hf_dcbx_feature_pgid_prio_1,
{ "PGID for Prio 1", "lldp.dcbx.feature.pg.pgid_prio1", FT_UINT16, BASE_DEC,
- NULL, 0xF00, 0, HFILL }
+ NULL, 0x0F00, NULL, HFILL }
},
{ &hf_dcbx_feature_pgid_prio_2,
{ "PGID for Prio 2", "lldp.dcbx.feature.pg.pgid_prio2", FT_UINT16, BASE_DEC,
- NULL, 0xF0, 0, HFILL }
+ NULL, 0x00F0, NULL, HFILL }
},
{ &hf_dcbx_feature_pgid_prio_3,
{ "PGID for Prio 3", "lldp.dcbx.feature.pg.pgid_prio3", FT_UINT16, BASE_DEC,
- NULL, 0xF, 0, HFILL }
+ NULL, 0x000F, NULL, HFILL }
},
{ &hf_dcbx_feature_pgid_prio_4,
{ "PGID for Prio 4", "lldp.dcbx.feature.pg.pgid_prio4", FT_UINT16, BASE_DEC,
- NULL, 0xF000, 0, HFILL }
+ NULL, 0xF000, NULL, HFILL }
},
{ &hf_dcbx_feature_pgid_prio_5,
{ "PGID for Prio 5", "lldp.dcbx.feature.pg.pgid_prio5", FT_UINT16, BASE_DEC,
- NULL, 0xF00, 0, HFILL }
+ NULL, 0x0F00, NULL, HFILL }
},
{ &hf_dcbx_feature_pgid_prio_6,
{ "PGID for Prio 6", "lldp.dcbx.feature.pg.pgid_prio6", FT_UINT16, BASE_DEC,
- NULL, 0xF0, 0, HFILL }
+ NULL, 0x00F0, NULL, HFILL }
},
{ &hf_dcbx_feature_pgid_prio_7,
{ "PGID for Prio 7", "lldp.dcbx.feature.pg.pgid_prio7", FT_UINT16, BASE_DEC,
- NULL, 0xF, 0, HFILL }
+ NULL, 0x000F, NULL, HFILL }
},
{ &hf_dcbx_feature_pg_per_0,
{ "Bandwidth for PGID 0", "lldp.dcbx.feature.pg.per0", FT_UINT8, BASE_DEC,
@@ -5692,27 +6046,27 @@ proto_register_lldp(void)
},
{ &hf_media_l2_prio,
{ "L2 Priority", "lldp.media.l2_prio", FT_UINT24, BASE_DEC,
- NULL, 0x1C0, NULL, HFILL }
+ NULL, 0x0001C0, NULL, HFILL }
},
{ &hf_media_dscp,
{ "DSCP Priority", "lldp.media.dscp", FT_UINT24, BASE_DEC,
- NULL, 0x3F, NULL, HFILL }
+ NULL, 0x00003F, NULL, HFILL }
},
{ &hf_media_loc_data_format,
{ "Location Data Format", "lldp.media.loc.data_format", FT_UINT8, BASE_DEC,
VALS(location_data_format), 0x0, NULL, HFILL }
},
{ &hf_media_loc_lat_resolution,
- { "Latitude Resolution", "lldp.media.loc.lat_resolution", FT_UINT8, BASE_DEC,
- NULL, 0xFC, NULL, HFILL }
+ { "Latitude Resolution", "lldp.media.loc.lat_resolution", FT_UINT8, BASE_CUSTOM,
+ CF_FUNC(latitude_or_longitude_resolution), 0xFC, NULL, HFILL }
},
{ &hf_media_loc_lat,
{ "Latitude", "lldp.media.loc.latitude", FT_UINT40, BASE_CUSTOM,
CF_FUNC(latitude_base), 0x0, NULL, HFILL }
},
{ &hf_media_loc_long_resolution,
- { "Longitude Resolution", "lldp.media.loc.long_resolution", FT_UINT8, BASE_DEC,
- NULL, 0xFC, NULL, HFILL }
+ { "Longitude Resolution", "lldp.media.loc.long_resolution", FT_UINT8, BASE_CUSTOM,
+ CF_FUNC(latitude_or_longitude_resolution), 0xFC, NULL, HFILL }
},
{ &hf_media_loc_long,
{ "Longitude", "lldp.media.loc.longitude", FT_UINT40, BASE_CUSTOM,
@@ -5723,16 +6077,24 @@ proto_register_lldp(void)
VALS(altitude_type), 0xF0, "Unknown", HFILL }
},
{ &hf_media_loc_alt_resolution,
- { "Altitude Resolution", "lldp.media.loc.alt_resolution", FT_UINT16, BASE_DEC,
- NULL, 0x0FC0, NULL, HFILL }
+ { "Altitude Resolution", "lldp.media.loc.alt_resolution", FT_UINT16, BASE_CUSTOM,
+ CF_FUNC(altitude_resolution), 0x0FC0, NULL, HFILL }
},
{ &hf_media_loc_alt,
- { "Altitude", "lldp.media.loc.altitude", FT_UINT32, BASE_DEC,
- NULL, 0x03FFFFFFF, NULL, HFILL }
+ { "Altitude", "lldp.media.loc.altitude", FT_UINT32, BASE_CUSTOM,
+ CF_FUNC(altitude_base), 0x0, NULL, HFILL }
+ },
+ { &hf_media_loc_ver,
+ { "Ver", "lldp.media.loc.ver", FT_UINT8, BASE_DEC,
+ NULL, 0xC0, NULL, HFILL }
+ },
+ { &hf_media_loc_reserved,
+ { "Reserved", "lldp.media.loc.reserved", FT_UINT8, BASE_DEC,
+ NULL, 0x38, NULL, HFILL }
},
{ &hf_media_loc_datum,
{ "Datum", "lldp.media.loc.datum", FT_UINT8, BASE_DEC,
- NULL, 0x0, NULL, HFILL }
+ VALS(datum_type_values), 0x07, NULL, HFILL }
},
{ &hf_media_civic_lci_length,
{ "LCI Length", "lldp.media.civic.length", FT_UINT8, BASE_DEC,
@@ -5852,9 +6214,45 @@ proto_register_lldp(void)
VALS(profinet_port3_status_PreambleLength), 0x2000, NULL, HFILL }
},
{ &hf_profinet_mrp_domain_uuid,
- { "MRP DomainUUID", "lldp.profinet.mrp_domain_uuid", FT_GUID, BASE_NONE,
+ { "MRP DomainUUID", "lldp.profinet.mrp_domain_uuid", FT_GUID, BASE_NONE,
+ NULL, 0x0, NULL, HFILL }
+ },
+ { &hf_profinet_tsn_domain_uuid,
+ { "TSN DomainUUID", "lldp.profinet.tsn_domain_uuid", FT_GUID, BASE_NONE,
NULL, 0x0, NULL, HFILL }
},
+ { &hf_profinet_tsn_nme_management_addr,
+ { "TSN NME Management Address", "lldp.profinet.tsn_nme_management_addr", FT_BYTES, BASE_NONE,
+ NULL, 0x0, NULL, HFILL }
+ },
+ { &hf_profinet_tsn_nme_management_addr_str_length,
+ { "TSN NME Management Address String Length", "lldp.profinet.tsn_nme_management_addr_str_length", FT_UINT8, BASE_HEX,
+ NULL, 0x0, NULL, HFILL }
+ },
+ { &hf_profinet_tsn_nme_management_addr_subtype,
+ { "TSN NME Management Address Subtype", "lldp.profinet.tsn_nme_management_addr_subtype", FT_UINT8, BASE_HEX,
+ NULL, 0x0, NULL, HFILL }
+ },
+ { &hf_profinet_tsn_nme_name_uuid,
+ { "TSN NME Name UUID", "lldp.profinet.tsn_nme_name_uuid", FT_GUID, BASE_NONE,
+ NULL, 0x0, NULL, HFILL }
+ },
+ { &hf_profinet_tsn_nme_parameter_uuid,
+ { "TSN NME Parameter UUID", "lldp.profinet.tsn_nme_parameter_uuid", FT_GUID, BASE_NONE,
+ NULL, 0x0, NULL, HFILL }
+ },
+ { &hf_profinet_time_domain_number,
+ { "Time Domain Number", "lldp.profinet.time_domain_number", FT_UINT16, BASE_HEX,
+ VALS(profinet_time_domain_number_vals), 0x0, NULL, HFILL }
+ },
+ { &hf_profinet_time_domain_uuid,
+ { "Time Domain UUID", "lldp.profinet.time_domain_uuid", FT_GUID, BASE_NONE,
+ NULL, 0x0, NULL, HFILL }
+ },
+ { &hf_profinet_time_domain_master_identity,
+ { "Time Domain Master Identity", "lldp.profinet.time_domain_master_identity", FT_BYTES, BASE_NONE,
+ 0x0, 0x0, NULL, HFILL }
+ },
{ &hf_profinet_mrrt_port_status,
{ "MRRT PortStatus", "lldp.profinet.mrrt_port_status", FT_UINT16, BASE_HEX,
VALS(profinet_mrrt_port_status_vals), 0x0, NULL, HFILL }
@@ -6220,11 +6618,11 @@ proto_register_lldp(void)
},
{ &hf_ex_avaya_mgnt_vlan,
{ "Mgmt VLAN", "lldp.extreme_avaya_ap.mgnt_vlan", FT_UINT24, BASE_DEC,
- NULL, 0xfff, NULL, HFILL }
+ NULL, 0x000fff, NULL, HFILL }
},
{ &hf_ex_avaya_vlan,
{ "VLAN", "lldp.extreme_avaya_ap.vlan", FT_UINT16, BASE_DEC,
- NULL, 0xfff, NULL, HFILL }
+ NULL, 0x0fff, NULL, HFILL }
},
{ &hf_ex_avaya_rsvd,
{ "Reserved", "lldp.extreme_avaya_ap.rsvd", FT_UINT8, BASE_DEC,
@@ -6366,6 +6764,7 @@ proto_register_lldp(void)
/* Register the protocol name and description */
proto_lldp = proto_register_protocol("Link Layer Discovery Protocol", "LLDP", "lldp");
+ lldp_handle = register_dissector("lldp", dissect_lldp, proto_lldp);
/* Register preferences */
lldp_module = prefs_register_protocol(proto_lldp, NULL);
@@ -6390,9 +6789,6 @@ proto_register_lldp(void)
void
proto_reg_handoff_lldp(void)
{
- dissector_handle_t lldp_handle;
-
- lldp_handle = create_dissector_handle(dissect_lldp,proto_lldp);
dissector_add_uint("ethertype", ETHERTYPE_LLDP, lldp_handle);
dissector_add_uint("ethertype", ETHERTYPE_ONOS, lldp_handle);
}