diff options
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/asn1/snmp/packet-snmp-template.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-3g-a11.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-asf.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-bootp.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-capwap.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-dhcpv6.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-diameter.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-gtp.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-gtpv2.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-l2tp.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-mip.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-mip6.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-mpls-echo.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-netflow.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-pcep.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-radius.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-rsvp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-snmp.c | 6 |
18 files changed, 63 insertions, 58 deletions
diff --git a/epan/dissectors/asn1/snmp/packet-snmp-template.c b/epan/dissectors/asn1/snmp/packet-snmp-template.c index 7343744e1d..95f8e53066 100644 --- a/epan/dissectors/asn1/snmp/packet-snmp-template.c +++ b/epan/dissectors/asn1/snmp/packet-snmp-template.c @@ -54,7 +54,7 @@ #include <epan/conversation.h> #include <epan/etypes.h> #include <epan/prefs.h> -#include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <epan/next_tvb.h> #include <epan/uat.h> #include <epan/asn1.h> @@ -2298,8 +2298,8 @@ void proto_register_snmp(void) { "Engine ID Conformance", "snmp.engineid.conform", FT_BOOLEAN, 8, TFS(&tfs_snmp_engineid_conform), F_SNMP_ENGINEID_CONFORM, "Engine ID RFC3411 Conformance", HFILL }}, { &hf_snmp_engineid_enterprise, { - "Engine Enterprise ID", "snmp.engineid.enterprise", FT_UINT32, BASE_DEC|BASE_EXT_STRING, - &sminmpec_values_ext, 0, NULL, HFILL }}, + "Engine Enterprise ID", "snmp.engineid.enterprise", FT_UINT32, BASE_ENTERPRISES, + STRINGS_ENTERPRISES, 0, NULL, HFILL }}, { &hf_snmp_engineid_format, { "Engine ID Format", "snmp.engineid.format", FT_UINT8, BASE_DEC, VALS(snmp_engineid_format_vals), 0, NULL, HFILL }}, diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c index 25460e0eb3..47c9625f47 100644 --- a/epan/dissectors/packet-3g-a11.c +++ b/epan/dissectors/packet-3g-a11.c @@ -44,6 +44,7 @@ #include <epan/expert.h> /* Include vendor id translation */ #include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <epan/to_str.h> #include "packet-radius.h" @@ -2209,7 +2210,7 @@ proto_register_a11(void) }, { &hf_a11_vse_vid, { "Vendor ID", "a11.ext.vid", - FT_UINT32, BASE_HEX|BASE_EXT_STRING, &sminmpec_values_ext, 0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, NULL, HFILL } }, { &hf_a11_vse_apptype, diff --git a/epan/dissectors/packet-asf.c b/epan/dissectors/packet-asf.c index a94282369f..05c6c656af 100644 --- a/epan/dissectors/packet-asf.c +++ b/epan/dissectors/packet-asf.c @@ -28,7 +28,7 @@ #include <epan/packet.h> #include <epan/expert.h> -#include <epan/sminmpec.h> +#include <epan/addr_resolv.h> /* * See @@ -305,7 +305,7 @@ proto_register_asf(void) static hf_register_info hf[] = { { &hf_asf_iana, { "IANA Enterprise Number", "asf.iana", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, NULL, HFILL }}, { &hf_asf_type, { "Message Type", "asf.type", diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index 1b9e48859f..bc017c734d 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -121,7 +121,7 @@ #include <epan/tap.h> #include <epan/stat_tap_ui.h> #include <epan/arptypes.h> -#include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <epan/expert.h> #include <epan/uat.h> #include <epan/oui.h> @@ -6924,7 +6924,7 @@ proto_register_bootp(void) { &hf_bootp_client_identifier_enterprise_num, { "Enterprise-number", "bootp.client_id.enterprise_num", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL }}, { &hf_bootp_client_identifier, @@ -7972,7 +7972,7 @@ proto_register_bootp(void) { &hf_bootp_option82_vi_enterprise, { "Enterprise", "bootp.option.agent_information_option.vi.enterprise", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, "Option 82:9 VI Enterprise", HFILL }}, { &hf_bootp_option82_vi_data_length, @@ -8469,7 +8469,7 @@ proto_register_bootp(void) { &hf_bootp_option_vi_class_enterprise, { "Enterprise", "bootp.option.vi_class.enterprise", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x00, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x00, "Option 124: Enterprise", HFILL }}, { &hf_bootp_option_vi_class_data_length, @@ -8484,7 +8484,7 @@ proto_register_bootp(void) { &hf_bootp_option125_enterprise, { "Enterprise", "bootp.option.vi.enterprise", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x00, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x00, "Option 125: Enterprise", HFILL }}, { &hf_bootp_option125_length, diff --git a/epan/dissectors/packet-capwap.c b/epan/dissectors/packet-capwap.c index bc6d70e24c..5500373992 100644 --- a/epan/dissectors/packet-capwap.c +++ b/epan/dissectors/packet-capwap.c @@ -27,8 +27,9 @@ #include <epan/prefs.h> #include <epan/reassemble.h> #include <epan/expert.h> - #include <epan/sminmpec.h> +#include <epan/addr_resolv.h> + #include "packet-ieee80211.h" void proto_register_capwap_control(void); @@ -3576,7 +3577,7 @@ proto_register_capwap_control(void) }, { &hf_capwap_control_header_msg_type_enterprise_nbr, { "Message Type (Enterprise Number)", "capwap.control.header.message_type.enterprise_number", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL } }, { &hf_capwap_control_header_msg_type_enterprise_specific, @@ -3714,7 +3715,7 @@ proto_register_capwap_control(void) { &hf_capwap_msg_element_type_ac_information_vendor, { "AC Information Vendor", "capwap.control.message_element.ac_information.vendor", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL } }, { &hf_capwap_msg_element_type_ac_information_type, @@ -3933,7 +3934,7 @@ proto_register_capwap_control(void) }, { &hf_capwap_msg_element_type_vsp_vendor_identifier, { "Vendor Identifier", "capwap.control.message_element.vsp.vendor_identifier", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL } }, { &hf_capwap_msg_element_type_vsp_vendor_element_id, @@ -3954,7 +3955,7 @@ proto_register_capwap_control(void) }, { &hf_capwap_msg_element_type_wtp_board_data_vendor, { "WTP Board Data Vendor", "capwap.control.message_element.wtp_board_data.vendor", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL } }, { &hf_capwap_msg_element_type_wtp_board_data_type, @@ -4042,7 +4043,7 @@ proto_register_capwap_control(void) }, { &hf_capwap_msg_element_type_wtp_descriptor_vendor, { "WTP Descriptor Vendor", "capwap.control.message_element.wtp_descriptor.vendor", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL } }, { &hf_capwap_msg_element_type_wtp_descriptor_type, diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c index 0ce53698cb..be669d81c2 100644 --- a/epan/dissectors/packet-dhcpv6.c +++ b/epan/dissectors/packet-dhcpv6.c @@ -55,7 +55,7 @@ #include "config.h" #include <epan/packet.h> -#include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <epan/expert.h> #include <epan/prefs.h> #include <epan/to_str.h> @@ -2378,7 +2378,7 @@ proto_register_dhcpv6(void) { &hf_clientfqdn_s, { "S bit", "dhcpv6.clientfqdn.s", FT_BOOLEAN, 8, TFS(&fqdn_s), 0x1, "Whether the server SHOULD or SHOULD NOT perform the AAAA RR (FQDN-to-address) DNS updates", HFILL}}, { &hf_remoteid_enterprise, - { "Enterprise ID", "dhcpv6.remoteid.enterprise", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0, "RemoteID Enterprise Number", HFILL }}, + { "Enterprise ID", "dhcpv6.remoteid.enterprise", FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, "RemoteID Enterprise Number", HFILL }}, { &hf_duid_bytes, { "DUID", "dhcpv6.duid.bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_duid_type, @@ -2392,7 +2392,7 @@ proto_register_dhcpv6(void) { &hf_duidll_hwtype, { "Hardware type", "dhcpv6.duidll.hwtype", FT_UINT16, BASE_DEC, VALS(arp_hrd_vals), 0, "DUID LL Hardware Type", HFILL }}, { &hf_duiden_enterprise, - { "Enterprise ID", "dhcpv6.duiden.enterprise", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0, "DUID EN Enterprise Number", HFILL }}, + { "Enterprise ID", "dhcpv6.duiden.enterprise", FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, "DUID EN Enterprise Number", HFILL }}, { &hf_duiden_identifier, { "Identifier", "dhcpv6.duiden.identifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_duidll_link_layer_addr, @@ -2436,11 +2436,11 @@ proto_register_dhcpv6(void) { &hf_opt_status_msg, { "Status Message", "dhcpv6.status_msg", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_vendorclass_enterprise, - { "Enterprise ID", "dhcpv6.vendorclass.enterprise", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0, "Vendor Class Enterprise Number", HFILL }}, + { "Enterprise ID", "dhcpv6.vendorclass.enterprise", FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, "Vendor Class Enterprise Number", HFILL }}, { &hf_vendorclass_data, { "vendor-class-data", "dhcpv6.vendorclass.data", FT_STRINGZ, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_vendoropts_enterprise, - { "Enterprise ID", "dhcpv6.vendoropts.enterprise", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0, "Vendor opts Enterprise Number", HFILL }}, + { "Enterprise ID", "dhcpv6.vendoropts.enterprise", FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, "Vendor opts Enterprise Number", HFILL }}, { &hf_vendoropts_enterprise_option_code, { "Option code", "dhcpv6.vendoropts.enterprise.option_code", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_vendoropts_enterprise_option_length, diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index 75c216b04c..da8901e576 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -46,6 +46,7 @@ #include <epan/exceptions.h> #include <epan/prefs.h> #include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <epan/expert.h> #include <epan/tap.h> #include <epan/srt_table.h> @@ -684,9 +685,7 @@ dissect_diameter_avp(diam_ctx_t *c, tvbuff_t *tvb, int offset, diam_sub_dis_t *d vendor->vs_avps_ext = value_string_ext_new(VND_AVP_VS(vendor), VND_AVP_VS_LEN(vendor)+1, wmem_strdup_printf(wmem_epan_scope(), "diameter_vendor_%s", - val_to_str_ext_const(vendorid, - &sminmpec_values_ext, - "Unknown"))); + enterprises_lookup(vendorid, "Unknown"))); #if 0 { /* Debug code */ value_string *vendor_avp_vs = VALUE_STRING_EXT_VS_P(vendor->vs_avps_ext); @@ -720,7 +719,7 @@ dissect_diameter_avp(diam_ctx_t *c, tvbuff_t *tvb, int offset, diam_sub_dis_t *d proto_tree *tu = proto_item_add_subtree(pi,ett_unknown); proto_tree_add_expert_format(tu, c->pinfo, &ei_diameter_avp_code, tvb, offset, 4, "Unknown AVP %u (vendor=%s), if you know what this is you can add it to dictionary.xml", code, - val_to_str_ext_const(vendorid, &sminmpec_values_ext, "Unknown")); + enterprises_lookup(vendorid, "Unknown")); } offset += 4; @@ -2174,7 +2173,7 @@ real_register_diameter_fields(void) { "Reserved","diameter.flags.reserved7", FT_BOOLEAN, 8, TFS(&tfs_set_notset), DIAM_FLAGS_RESERVED7, NULL, HFILL }}, { &hf_diameter_vendor_id, - { "VendorId", "diameter.vendorId", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, + { "VendorId", "diameter.vendorId", FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL }}, { &hf_diameter_application_id, { "ApplicationId", "diameter.applicationId", FT_UINT32, BASE_DEC|BASE_EXT_STRING, VALS_EXT_PTR(dictionary.applications), @@ -2221,8 +2220,8 @@ real_register_diameter_fields(void) { "Reserved","diameter.avp.flags.reserved7", FT_BOOLEAN, 8, TFS(&tfs_set_notset), AVP_FLAGS_RESERVED7, NULL, HFILL }}, { &hf_diameter_avp_vendor_id, - { "AVP Vendor Id","diameter.avp.vendorId", FT_UINT32, BASE_DEC|BASE_EXT_STRING, - &sminmpec_values_ext, 0x0, NULL, HFILL }}, + { "AVP Vendor Id","diameter.avp.vendorId", FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, + 0x0, NULL, HFILL }}, { &(unknown_avp.hf_value), { "Value","diameter.avp.unknown", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_diameter_avp_data_wrong_length, diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index 37058c1cf4..a639931752 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -57,6 +57,7 @@ #include <epan/prefs.h> #include <epan/expert.h> #include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <epan/asn1.h> #include <epan/tap.h> #include <epan/srt_table.h> @@ -8339,7 +8340,7 @@ decode_gtp_priv_ext(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree if (length >= 2) { ext_id = tvb_get_ntohs(tvb, offset); proto_tree_add_uint(ext_tree_priv_ext, hf_gtp_ext_id, tvb, offset, 2, ext_id); - proto_item_append_text(te, "%s (%u)", val_to_str_ext_const(ext_id, &sminmpec_values_ext, "Unknown"), ext_id); + proto_item_append_text(te, "%s (%u)", enterprises_lookup(ext_id, "Unknown"), ext_id); offset = offset + 2; if (length > 2) { @@ -9062,7 +9063,7 @@ proto_register_gtp(void) }, {&hf_gtp_ext_id, { "Extension identifier", "gtp.ext_id", - FT_UINT16, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0, + FT_UINT16, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, "Private Enterprise number", HFILL} }, {&hf_gtp_ext_val, diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c index f0ec9113f1..f0bd0fa136 100644 --- a/epan/dissectors/packet-gtpv2.c +++ b/epan/dissectors/packet-gtpv2.c @@ -30,7 +30,7 @@ #include <epan/to_str.h> #include <epan/asn1.h> #include <epan/expert.h> -#include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include "packet-gsm_a_common.h" #include "packet-gsm_map.h" @@ -5210,7 +5210,7 @@ dissect_gtpv2_private_ext(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre proto_tree_add_item(tree, hf_gtpv2_enterprise_id, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_item_append_text(item, "%s (%u)", val_to_str_ext_const(ext_id, &sminmpec_values_ext, "Unknown"), ext_id); + proto_item_append_text(item, "%s (%u)", enterprises_lookup(ext_id, "Unknown"), ext_id); next_tvb = tvb_new_subset_length(tvb, offset, length-2); if (dissector_try_uint_new(gtpv2_priv_ext_dissector_table, ext_id, next_tvb, pinfo, tree, FALSE, GUINT_TO_POINTER((guint32)instance))){ @@ -8791,7 +8791,7 @@ void proto_register_gtpv2(void) }, { &hf_gtpv2_enterprise_id, {"Enterprise ID", "gtpv2.enterprise_id", - FT_UINT16, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT16, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL} }, { &hf_gtpv2_ti, diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c index 5268728f83..ce80b97dcf 100644 --- a/epan/dissectors/packet-l2tp.c +++ b/epan/dissectors/packet-l2tp.c @@ -61,6 +61,7 @@ #include <epan/packet.h> #include <epan/ipproto.h> #include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <epan/prefs.h> #include <epan/conversation.h> #include <epan/expert.h> @@ -1526,7 +1527,7 @@ static int dissect_l2tp_cisco_avps(tvbuff_t *tvb, packet_info *pinfo _U_, proto_ l2tp_avp_tree = proto_tree_add_subtree_format(tree, tvb, offset, avp_len, ett_l2tp_avp, NULL, "Vendor %s: %s AVP", - val_to_str_ext(avp_vendor_id, &sminmpec_values_ext, "Unknown (%u)"), + enterprises_lookup_format(wmem_packet_scope(), avp_vendor_id, "Unknown (%u)"), val_to_str(avp_type, cisco_avp_type_vals, "Unknown (%u)")); proto_tree_add_item(l2tp_avp_tree, hf_l2tp_avp_mandatory, tvb, offset, 2, ENC_BIG_ENDIAN); @@ -1634,7 +1635,7 @@ static int dissect_l2tp_broadband_avps(tvbuff_t *tvb, packet_info *pinfo _U_, pr l2tp_avp_tree = proto_tree_add_subtree_format(tree, tvb, offset, avp_len, ett_l2tp_avp, NULL, "Vendor %s: %s AVP", - val_to_str_ext(avp_vendor_id, &sminmpec_values_ext, "Unknown (%u)"), + enterprises_lookup_format(wmem_packet_scope(), avp_vendor_id, "Unknown (%u)"), val_to_str(avp_type, broadband_avp_type_vals, "Unknown (%u)")); proto_tree_add_item(l2tp_avp_tree, hf_l2tp_avp_mandatory, tvb, offset, 2, ENC_BIG_ENDIAN); @@ -1816,7 +1817,7 @@ static int dissect_l2tp_ericsson_avps(tvbuff_t *tvb, packet_info *pinfo _U_, pro l2tp_avp_tree = proto_tree_add_subtree_format(tree, tvb, offset, avp_len, ett_l2tp_avp, NULL, "Vendor %s: %s AVP", - val_to_str_ext(avp_vendor_id, &sminmpec_values_ext, "Unknown (%u)"), + enterprises_lookup_format(wmem_packet_scope(), avp_vendor_id, "Unknown (%u)"), val_to_str(avp_type, ericsson_avp_type_vals, "Unknown (%u)")); proto_tree_add_item(l2tp_avp_tree, hf_l2tp_avp_mandatory, tvb, offset, 2, ENC_BIG_ENDIAN); @@ -1905,7 +1906,7 @@ dissect_l2tp_vnd_cablelabs_avps(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre l2tp_avp_tree = proto_tree_add_subtree_format(tree, tvb, offset, avp_len, ett_l2tp_avp, NULL, "Vendor %s: %s AVP", - val_to_str_ext(avp_vendor_id, &sminmpec_values_ext, "Unknown (%u)"), + enterprises_lookup_format(wmem_packet_scope(), avp_vendor_id, "Unknown (%u)"), val_to_str(avp_type, cablelabs_avp_type_vals, "Unknown (%u)")); proto_tree_add_item(l2tp_avp_tree, hf_l2tp_avp_mandatory, tvb, offset, 2, ENC_BIG_ENDIAN); @@ -2037,7 +2038,7 @@ static void process_control_avps(tvbuff_t *tvb, if (!dissector_try_uint_new(l2tp_vendor_avp_dissector_table, avp_vendor_id, avp_tvb, pinfo, l2tp_tree, FALSE, l2tp_cntrl_data)){ l2tp_avp_tree = proto_tree_add_subtree_format(l2tp_tree, tvb, idx, avp_len, ett_l2tp_avp, NULL, "Vendor %s AVP Type %u", - val_to_str_ext(avp_vendor_id, &sminmpec_values_ext, "Unknown (%u)"), + enterprises_lookup_format(wmem_packet_scope(), avp_vendor_id, "Unknown (%u)"), avp_type); proto_tree_add_item(l2tp_avp_tree, hf_l2tp_avp_mandatory, tvb, idx, 2, ENC_BIG_ENDIAN); @@ -3274,7 +3275,7 @@ proto_register_l2tp(void) NULL, HFILL }}, { &hf_l2tp_avp_vendor_id, - { "Vendor ID", "l2tp.avp.vendor_id", FT_UINT16, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0, + { "Vendor ID", "l2tp.avp.vendor_id", FT_UINT16, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, "AVP Vendor ID", HFILL }}, { &hf_l2tp_avp_type, diff --git a/epan/dissectors/packet-mip.c b/epan/dissectors/packet-mip.c index 206d07a0ea..4f7c662242 100644 --- a/epan/dissectors/packet-mip.c +++ b/epan/dissectors/packet-mip.c @@ -30,6 +30,7 @@ #include <epan/expert.h> #include <epan/to_str.h> #include <epan/sminmpec.h> +#include <epan/addr_resolv.h> void proto_register_mip(void); void proto_reg_handoff_mip(void); @@ -1406,7 +1407,7 @@ void proto_register_mip(void) }, { &hf_mip_cvse_vendor_org_id, { "CVSE Vendor/org ID", "mip.ext.cvse.vendor_id", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, NULL, HFILL } }, { &hf_mip_cvse_verizon_cvse_type , @@ -1441,7 +1442,7 @@ void proto_register_mip(void) }, { &hf_mip_nvse_vendor_org_id, { "Vendor ID", "mip.ext.nvse.vendor_id", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0, NULL, HFILL } }, { &hf_mip_nvse_vendor_nvse_type , diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c index 9dcb633c55..7340d8b916 100644 --- a/epan/dissectors/packet-mip6.c +++ b/epan/dissectors/packet-mip6.c @@ -57,6 +57,7 @@ #include <epan/expert.h> #include <epan/ip_opts.h> #include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <wsutil/str_util.h> @@ -2510,7 +2511,7 @@ dissect_mip6_opt_vsm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* proto_tree_add_item_ret_uint(opt_tree, hf_mip6_vsm_vid, tvb, offset, MIP6_VSM_VID_LEN, ENC_BIG_ENDIAN, &vendorid); - proto_item_append_text(ti, ": %s", val_to_str_ext_const(vendorid, &sminmpec_values_ext, "<unknown>")); + proto_item_append_text(ti, ": %s", enterprises_lookup(vendorid, "<unknown>")); offset += 4; next_tvb = tvb_new_subset_remaining(tvb, offset); @@ -4479,7 +4480,7 @@ proto_register_mip6(void) }, { &hf_mip6_vsm_vid, { "Vendor Id", "mip6.vsm.vendorId", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL } }, { &hf_mip6_vsm_subtype, diff --git a/epan/dissectors/packet-mpls-echo.c b/epan/dissectors/packet-mpls-echo.c index 1acdd0a2df..fa203a1922 100644 --- a/epan/dissectors/packet-mpls-echo.c +++ b/epan/dissectors/packet-mpls-echo.c @@ -33,7 +33,7 @@ #include "config.h" #include <epan/packet.h> -#include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <epan/expert.h> #include <epan/to_str.h> @@ -2121,7 +2121,7 @@ proto_register_mpls_echo(void) }, { &hf_mpls_echo_tlv_vendor, { "Vendor Id", "mpls_echo.tlv.vendor_id", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, "MPLS ECHO Vendor Id", HFILL} + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, "MPLS ECHO Vendor Id", HFILL} }, { &hf_mpls_echo_tlv_ilso_addr_type, { "Address Type", "mpls_echo.tlv.ilso.addr_type", diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c index b021383562..9ac96fab06 100644 --- a/epan/dissectors/packet-netflow.c +++ b/epan/dissectors/packet-netflow.c @@ -9960,7 +9960,7 @@ dissect_v9_v10_template_fields(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree length = tvb_get_ntohs(tvb, offset+2); /* XXX: 0 length should not be allowed ? exception: "ScopeSystem" */ if ((ver == 10) && (type & 0x8000)) { /* IPFIX only */ pen = tvb_get_ntohl(tvb, offset+4); - pen_str = val_to_str_ext_const(pen, &sminmpec_values_ext, "(Unknown)"); + pen_str = enterprises_lookup(pen, "(Unknown)"); } if (tmplt_p->fields_p[fields_type] != NULL) { diff --git a/epan/dissectors/packet-pcep.c b/epan/dissectors/packet-pcep.c index c04e717489..e7850a7740 100644 --- a/epan/dissectors/packet-pcep.c +++ b/epan/dissectors/packet-pcep.c @@ -71,7 +71,7 @@ #include <epan/packet.h> #include <epan/to_str.h> #include <epan/expert.h> -#include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include "packet-tcp.h" void proto_register_pcep(void); @@ -5575,7 +5575,7 @@ proto_register_pcep(void) }, { &hf_pcep_enterprise_number, { "Enterprise Number", "pcep.vendor-information.enterprise-number", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, "IANA Private Enterprise Number", HFILL } }, { &hf_pcep_enterprise_specific_info, @@ -5585,7 +5585,7 @@ proto_register_pcep(void) }, { &hf_pcep_tlv_enterprise_number, { "Enterprise Number", "pcep.tlv.enterprise-number", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, "IANA Private Enterprise Number", HFILL } }, { &hf_pcep_tlv_enterprise_specific_info, diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index 5b61783810..8c41019246 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -1493,7 +1493,7 @@ dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo, tvbuff_t *tv offset += 4; vendor = (radius_vendor_info_t *)g_hash_table_lookup(dict->vendors_by_id, GUINT_TO_POINTER(vendor_id)); - vendor_str = val_to_str_ext_const(vendor_id, &sminmpec_values_ext, "Unknown"); + vendor_str = enterprises_lookup(vendor_id, "Unknown"); if (!vendor) { vendor = &no_vendor; } @@ -2466,7 +2466,7 @@ radius_register_avp_dissector(guint32 vendor_id, guint32 _attribute_id, radius_a vendor = (radius_vendor_info_t *)g_malloc(sizeof(radius_vendor_info_t)); vendor->name = g_strdup_printf("%s-%u", - val_to_str_ext_const(vendor_id, &sminmpec_values_ext, "Unknown"), + enterprises_lookup(vendor_id, "Unknown"), vendor_id); vendor->code = vendor_id; vendor->attrs_by_id = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_radius_attr_info); @@ -2684,7 +2684,7 @@ register_radius_fields(const char *unused _U_) { "Type", "radius.avp.type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_radius_avp_vendor_id, - { "Vendor ID", "radius.avp.vendor_id", FT_UINT32, BASE_DEC, NULL, 0x0, + { "Vendor ID", "radius.avp.vendor_id", FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, NULL, HFILL }}, { &hf_radius_avp_vendor_type, { "Type", "radius.avp.vendor_type", FT_UINT8, BASE_DEC, NULL, 0x0, diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index 395f2daeb8..f13ac1653b 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -105,7 +105,7 @@ #include <epan/conversation.h> #include <epan/conversation_table.h> #include <epan/tap.h> -#include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include "packet-rsvp.h" #include "packet-ip.h" #include "packet-diffserv-mpls-common.h" @@ -8211,7 +8211,7 @@ proto_register_rsvp(void) */ {&hf_rsvp_filter[RSVPF_ENT_CODE], { "Enterprise Code", "rsvp.obj_private.enterprise", - FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0, + FT_UINT32, BASE_ENTERPRISES, STRINGS_ENTERPRISES, 0x0, "IANA Network Management Private Enterprise Code", HFILL } }, diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index 1fad9344b2..d28392b179 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -62,7 +62,7 @@ #include <epan/conversation.h> #include <epan/etypes.h> #include <epan/prefs.h> -#include <epan/sminmpec.h> +#include <epan/addr_resolv.h> #include <epan/next_tvb.h> #include <epan/uat.h> #include <epan/asn1.h> @@ -3507,8 +3507,8 @@ void proto_register_snmp(void) { "Engine ID Conformance", "snmp.engineid.conform", FT_BOOLEAN, 8, TFS(&tfs_snmp_engineid_conform), F_SNMP_ENGINEID_CONFORM, "Engine ID RFC3411 Conformance", HFILL }}, { &hf_snmp_engineid_enterprise, { - "Engine Enterprise ID", "snmp.engineid.enterprise", FT_UINT32, BASE_DEC|BASE_EXT_STRING, - &sminmpec_values_ext, 0, NULL, HFILL }}, + "Engine Enterprise ID", "snmp.engineid.enterprise", FT_UINT32, BASE_ENTERPRISES, + STRINGS_ENTERPRISES, 0, NULL, HFILL }}, { &hf_snmp_engineid_format, { "Engine ID Format", "snmp.engineid.format", FT_UINT8, BASE_DEC, VALS(snmp_engineid_format_vals), 0, NULL, HFILL }}, |