aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-10-09 12:56:19 +0000
committerMichael Mann <mmann78@netscape.net>2013-10-09 12:56:19 +0000
commit9ccefb0ecd8cc95a24bed1223f70772444cd2a86 (patch)
tree7704b8b689cd40c12f88815bba25d54eb1b48179
parenta56818ad870811a3b5c7ad2197eeff35b860bd2c (diff)
Prefix all "Wireshark application specific" display filters with a "_ws." to distinguish them from dissector filters.
This was committed now to get it into the 1.11 release so users can start getting used to the changed filter names. svn path=/trunk/; revision=52462
-rw-r--r--docbook/release-notes.asciidoc6
-rw-r--r--epan/expert.c10
-rw-r--r--epan/packet.c2
-rw-r--r--epan/proto.c6
-rw-r--r--epan/show_exception.c12
-rw-r--r--epan/wslua/init_wslua.c23
-rw-r--r--ui/gtk/main_menubar.c4
-rw-r--r--ui/gtk/prefs_dlg.c4
-rw-r--r--ui/qt/main_window_slots.cpp4
9 files changed, 40 insertions, 31 deletions
diff --git a/docbook/release-notes.asciidoc b/docbook/release-notes.asciidoc
index fd56989ecd..e2851a71aa 100644
--- a/docbook/release-notes.asciidoc
+++ b/docbook/release-notes.asciidoc
@@ -27,8 +27,7 @@ since version 1.10:
* Wireshark now uses the Qt application framework. The new UI should provide
a significantly better user experience, particularly on Mac OS X and Windows.
* A more flexible, modular memory manger (wmem) has been added.
-* Expert info is now filterable (if the dissector has been updated to support
- the new API).
+* Expert info is now filterable and now requires a new API.
* The Windows installer now uninstalls the previous version of Wireshark
silently. You can still run the uninstaller manually beforehand if you wish
to run it interactively.
@@ -43,6 +42,9 @@ since version 1.10:
* You can now specify an optional offset to the -C option for editcap, which
allows you to start chopping from that offset instead of from the absolute
packet beginning or end.
+* "malformed" display filter has been renamed to "_ws.malformed". A handful of
+ other filters have been given the "_ws." prefix to note they are Wireshark
+ application specific filters and not dissector filters.
=== New Protocol Support
diff --git a/epan/expert.c b/epan/expert.c
index 611746c3de..972573f323 100644
--- a/epan/expert.c
+++ b/epan/expert.c
@@ -87,13 +87,13 @@ expert_packet_init(void)
{
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 @@ expert_packet_init(void)
}
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 @@ expert_packet_init(void)
highest_severity = 0;
- proto_malformed = proto_get_id_by_filter_name("malformed");
+ proto_malformed = proto_get_id_by_filter_name("_ws.malformed");
}
void
diff --git a/epan/packet.c b/epan/packet.c
index 10a7a29106..b0d81f5505 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -129,7 +129,7 @@ packet_cache_proto_handles(void)
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);
}
diff --git a/epan/proto.c b/epan/proto.c
index 6743a036fc..de59924186 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -5027,13 +5027,13 @@ static void
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));
diff --git a/epan/show_exception.c b/epan/show_exception.c
index cc915035ed..43ca165768 100644
--- a/epan/show_exception.c
+++ b/epan/show_exception.c
@@ -42,19 +42,19 @@ void
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));
diff --git a/epan/wslua/init_wslua.c b/epan/wslua/init_wslua.c
index d773658422..c2f81a9a06 100644
--- a/epan/wslua/init_wslua.c
+++ b/epan/wslua/init_wslua.c
@@ -45,6 +45,9 @@ struct _wslua_treeitem* lua_tree;
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 @@ int dissect_lua(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data
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 @@ int dissect_lua(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data
}
} 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,6 +364,11 @@ int wslua_init(register_cb cb, gpointer client_data) {
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|
@@ -382,6 +385,10 @@ int wslua_init(register_cb cb, gpointer client_data) {
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) */
diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c
index 38173ee6ed..8f89964833 100644
--- a/ui/gtk/main_menubar.c
+++ b/ui/gtk/main_menubar.c
@@ -4924,8 +4924,8 @@ set_menus_for_selected_packet(capture_file *cf)
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;
diff --git a/ui/gtk/prefs_dlg.c b/ui/gtk/prefs_dlg.c
index b69119621d..691203fa30 100644
--- a/ui/gtk/prefs_dlg.c
+++ b/ui/gtk/prefs_dlg.c
@@ -1724,8 +1724,8 @@ properties_cb(GtkWidget *w, gpointer dummy)
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 {
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 13949bd7cd..1ee7340e9d 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -765,8 +765,8 @@ void MainWindow::setMenusForSelectedPacket()
// 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;