Index: epan/expert.c =================================================================== --- epan/expert.c (revision 52369) +++ epan/expert.c (working copy) @@ -87,13 +87,13 @@ { static hf_register_info hf[] = { { &hf_expert_msg, - { "Message", "expert.message", FT_STRING, BASE_NONE, NULL, 0, "Wireshark expert information", HFILL } + { "Message", "_ws.expert.message", FT_STRING, BASE_NONE, NULL, 0, "Wireshark expert information", HFILL } }, { &hf_expert_group, - { "Group", "expert.group", FT_UINT32, BASE_HEX, VALS(expert_group_vals), 0, "Wireshark expert group", HFILL } + { "Group", "_ws.expert.group", FT_UINT32, BASE_HEX, VALS(expert_group_vals), 0, "Wireshark expert group", HFILL } }, { &hf_expert_severity, - { "Severity level", "expert.severity", FT_UINT32, BASE_HEX, VALS(expert_severity_vals), 0, "Wireshark expert severity level", HFILL } + { "Severity level", "_ws.expert.severity", FT_UINT32, BASE_HEX, VALS(expert_severity_vals), 0, "Wireshark expert severity level", HFILL } } }; static gint *ett[] = { @@ -106,7 +106,7 @@ } if (proto_expert == -1) { - proto_expert = proto_register_protocol("Expert Info", "Expert", "expert"); + proto_expert = proto_register_protocol("Expert Info", "Expert", "_ws.expert"); proto_register_field_array(proto_expert, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); proto_set_cant_toggle(proto_expert); @@ -114,7 +114,7 @@ highest_severity = 0; - proto_malformed = proto_get_id_by_filter_name("malformed"); + proto_malformed = proto_get_id_by_filter_name("_ws.malformed"); } void Index: epan/packet.c =================================================================== --- epan/packet.c (revision 52369) +++ epan/packet.c (working copy) @@ -129,7 +129,7 @@ data_handle = find_dissector("data"); g_assert(data_handle != NULL); - proto_malformed = proto_get_id_by_filter_name("malformed"); + proto_malformed = proto_get_id_by_filter_name("_ws.malformed"); g_assert(proto_malformed != -1); } Index: epan/proto.c =================================================================== --- epan/proto.c (revision 52369) +++ epan/proto.c (working copy) @@ -5013,13 +5013,13 @@ register_type_length_mismatch(void) { static ei_register_info ei[] = { - { &ei_type_length_mismatch_error, { "type_length.mismatch", PI_MALFORMED, PI_ERROR, "Trying to fetch X with length Y", EXPFILL }}, - { &ei_type_length_mismatch_warn, { "type_length.mismatch", PI_MALFORMED, PI_WARN, "Trying to fetch X with length Y", EXPFILL }}, + { &ei_type_length_mismatch_error, { "_ws.type_length.mismatch", PI_MALFORMED, PI_ERROR, "Trying to fetch X with length Y", EXPFILL }}, + { &ei_type_length_mismatch_warn, { "_ws.type_length.mismatch", PI_MALFORMED, PI_WARN, "Trying to fetch X with length Y", EXPFILL }}, }; expert_module_t* expert_type_length_mismatch; - proto_type_length_mismatch = proto_register_protocol("Type Length Mismatch", "Type length mismatch", "type_length"); + proto_type_length_mismatch = proto_register_protocol("Type Length Mismatch", "Type length mismatch", "_ws.type_length"); expert_type_length_mismatch = expert_register_protocol(proto_type_length_mismatch); expert_register_field_array(expert_type_length_mismatch, ei, array_length(ei)); Index: epan/show_exception.c =================================================================== --- epan/show_exception.c (revision 52369) +++ epan/show_exception.c (working copy) @@ -42,19 +42,19 @@ register_show_exception(void) { static ei_register_info ei[] = { - { &ei_malformed_dissector_bug, { "malformed.dissector_bug", PI_MALFORMED, PI_ERROR, "Dissector bug", EXPFILL }}, - { &ei_malformed_reassembly, { "malformed.reassembly", PI_MALFORMED, PI_ERROR, "Reassembly error", EXPFILL }}, - { &ei_malformed, { "malformed.expert", PI_MALFORMED, PI_ERROR, "Malformed Packet (Exception occurred)", EXPFILL }}, + { &ei_malformed_dissector_bug, { "_ws.malformed.dissector_bug", PI_MALFORMED, PI_ERROR, "Dissector bug", EXPFILL }}, + { &ei_malformed_reassembly, { "_ws.malformed.reassembly", PI_MALFORMED, PI_ERROR, "Reassembly error", EXPFILL }}, + { &ei_malformed, { "_ws.malformed.expert", PI_MALFORMED, PI_ERROR, "Malformed Packet (Exception occurred)", EXPFILL }}, }; expert_module_t* expert_malformed; - proto_short = proto_register_protocol("Short Frame", "Short frame", "short"); + proto_short = proto_register_protocol("Short Frame", "Short frame", "_ws.short"); proto_malformed = proto_register_protocol("Malformed Packet", - "Malformed packet", "malformed"); + "Malformed packet", "_ws.malformed"); proto_unreassembled = proto_register_protocol( "Unreassembled Fragmented Packet", - "Unreassembled fragmented packet", "unreassembled"); + "Unreassembled fragmented packet", "_ws.unreassembled"); expert_malformed = expert_register_protocol(proto_malformed); expert_register_field_array(expert_malformed, ei, array_length(ei)); Index: epan/wslua/init_wslua.c =================================================================== --- epan/wslua/init_wslua.c (revision 52369) +++ epan/wslua/init_wslua.c (working copy) @@ -45,6 +45,9 @@ tvbuff_t* lua_tvb; int lua_dissectors_table_ref; +static int proto_lua = -1; +static expert_field ei_lua_error = EI_INIT; + dissector_handle_t lua_data_handle; static void lua_frame_end(void) @@ -96,10 +99,7 @@ push_TreeItem(L,lua_tree); if ( lua_pcall(L,3,1,0) ) { - const gchar* error = lua_tostring(L,-1); - - proto_item* pi = proto_tree_add_text(tree,tvb,0,0,"Lua Error: %s",error); - expert_add_info_format_internal(pinfo, pi, PI_UNDECODED, PI_ERROR ,"Lua Error"); + proto_tree_add_expert_format(tree, pinfo, &ei_lua_error, tvb, 0, 0, "Lua Error: %s", lua_tostring(L,-1)); } else { /* if the Lua dissector reported the consumed bytes, pass it to our caller */ @@ -111,10 +111,8 @@ } } else { - proto_item* pi = proto_tree_add_text(tree,tvb,0,0,"Lua Error: did not find the %s dissector" - " in the dissectors table",pinfo->current_proto); - - expert_add_info_format_internal(pinfo, pi, PI_UNDECODED, PI_ERROR ,"Lua Error"); + proto_tree_add_expert_format(tree, pinfo, &ei_lua_error, tvb, 0, 0, + "Lua Error: did not find the %s dissector in the dissectors table", pinfo->current_proto); } register_frame_end_routine(pinfo, lua_frame_end); @@ -366,7 +364,12 @@ gchar* filename; const funnel_ops_t* ops = funnel_get_funnel_ops(); gboolean run_anyway = FALSE; + expert_module_t* expert_lua; + static ei_register_info ei[] = { + { &ei_lua_error, { "_ws.lua.error", PI_UNDECODED, PI_ERROR ,"Lua Error", EXPFILL }}, + }; + /* set up the logger */ g_log_set_handler(LOG_DOMAIN_LUA, (GLogLevelFlags)(G_LOG_LEVEL_CRITICAL| G_LOG_LEVEL_WARNING| @@ -382,6 +385,10 @@ WSLUA_INIT(L); + proto_lua = proto_register_protocol("Lua Dissection", "Lua Dissection", "_ws.lua"); + expert_lua = expert_register_protocol(proto_lua); + expert_register_field_array(expert_lua, ei, array_length(ei)); + lua_atpanic(L,wslua_panic); /* the init_routines table (accessible by the user) */ Index: ui/gtk/main_menubar.c =================================================================== --- ui/gtk/main_menubar.c (revision 52369) +++ ui/gtk/main_menubar.c (working copy) @@ -4924,8 +4924,8 @@ hfinfo = v->hfinfo; if (!g_str_has_prefix(hfinfo->abbrev, "text") && - !g_str_has_prefix(hfinfo->abbrev, "expert") && - !g_str_has_prefix(hfinfo->abbrev, "malformed")) { + !g_str_has_prefix(hfinfo->abbrev, "_ws.expert") && + !g_str_has_prefix(hfinfo->abbrev, "_ws.malformed")) { if (hfinfo->parent == -1) { abbrev = hfinfo->abbrev; Index: ui/gtk/prefs_dlg.c =================================================================== --- ui/gtk/prefs_dlg.c (revision 52369) +++ ui/gtk/prefs_dlg.c (working copy) @@ -1724,8 +1724,8 @@ hfinfo = v->hfinfo; if (!g_str_has_prefix(hfinfo->abbrev, "text") && - !g_str_has_prefix(hfinfo->abbrev, "expert") && - !g_str_has_prefix(hfinfo->abbrev, "malformed")) { + !g_str_has_prefix(hfinfo->abbrev, "_ws.expert") && + !g_str_has_prefix(hfinfo->abbrev, "_ws.malformed")) { if (hfinfo->parent == -1) { abbrev = hfinfo->abbrev; } else { Index: ui/qt/main_window_slots.cpp =================================================================== --- ui/qt/main_window_slots.cpp (revision 52369) +++ ui/qt/main_window_slots.cpp (working copy) @@ -787,8 +787,8 @@ // hfinfo = v->hfinfo; // if (!g_str_has_prefix(hfinfo->abbrev, "text") && -// !g_str_has_prefix(hfinfo->abbrev, "expert") && -// !g_str_has_prefix(hfinfo->abbrev, "malformed")) { +// !g_str_has_prefix(hfinfo->abbrev, "_ws.expert") && +// !g_str_has_prefix(hfinfo->abbrev, "_ws.malformed")) { // if (hfinfo->parent == -1) { // abbrev = hfinfo->abbrev;