aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-radius.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-06-24 14:25:41 +0100
committerJoão Valverde <j@v6e.pt>2017-06-26 22:40:50 +0000
commit7466880e8a09aa7a9bb797b70fa44bca397881d9 (patch)
tree1634c5d6e433a4803ecd5543a4cb6420e7c886d7 /epan/dissectors/packet-radius.c
parent3071f9dd7409bd5b0432dd8f1bebbeeee1b6c755 (diff)
Parse enterprise-numbers at run time
"enterprise-numbers" is converted to tab-separated values and renamed "enterprises". Unused fields are stripped. PENs are stored in a hash table loaded at run-time. User "enterprises" file is loaded from the personal config dir. Misc make-sminmpec.pl improvements and fixes. Note: names of type "Entity (formerly ...)" have the formerly part commented out for a cleaner output. Change-Id: I60c533afbe3e399077fbf432088064471ad3e1e2 Reviewed-on: https://code.wireshark.org/review/22246 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/dissectors/packet-radius.c')
-rw-r--r--epan/dissectors/packet-radius.c6
1 files changed, 3 insertions, 3 deletions
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,