From 54baebad48bf1b7b8c3a79f84383cf8e844dfac4 Mon Sep 17 00:00:00 2001 From: Chuck Craft Date: Tue, 1 Jun 2021 23:17:39 -0500 Subject: [PATCH] Lua: reconcile expert info groups; add PI_ASSUMPTION --- epan/wslua/init_wslua.c | 24 ++++++++++++++++++++++++ epan/wslua/wslua_proto_expert.c | 6 ++++-- test/lua/globals_2.2.txt | 3 +++ tools/convert_expert_add_info_format.pl | 5 ++++- tools/convert_proto_tree_add_text.pl | 5 ++++- 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/epan/wslua/init_wslua.c b/epan/wslua/init_wslua.c index b5d0ba7b77..75250744cc 100644 --- a/epan/wslua/init_wslua.c +++ b/epan/wslua/init_wslua.c @@ -119,6 +119,18 @@ static expert_field ei_lua_proto_comments_note = EI_INIT; static expert_field ei_lua_proto_comments_warn = EI_INIT; static expert_field ei_lua_proto_comments_error = EI_INIT; +static expert_field ei_lua_proto_decryption_comment = EI_INIT; +static expert_field ei_lua_proto_decryption_chat = EI_INIT; +static expert_field ei_lua_proto_decryption_note = EI_INIT; +static expert_field ei_lua_proto_decryption_warn = EI_INIT; +static expert_field ei_lua_proto_decryption_error = EI_INIT; + +static expert_field ei_lua_proto_assumption_comment = EI_INIT; +static expert_field ei_lua_proto_assumption_chat = EI_INIT; +static expert_field ei_lua_proto_assumption_note = EI_INIT; +static expert_field ei_lua_proto_assumption_warn = EI_INIT; +static expert_field ei_lua_proto_assumption_error = EI_INIT; + static expert_field ei_lua_proto_deprecated_comment = EI_INIT; static expert_field ei_lua_proto_deprecated_chat = EI_INIT; static expert_field ei_lua_proto_deprecated_note = EI_INIT; @@ -912,6 +924,18 @@ void wslua_init(register_cb cb, gpointer client_data) { { &ei_lua_proto_comments_warn, { "_ws.lua.proto.warning", PI_COMMENTS_GROUP, PI_WARN ,"Protocol Warning", EXPFILL }}, { &ei_lua_proto_comments_error, { "_ws.lua.proto.error", PI_COMMENTS_GROUP, PI_ERROR ,"Protocol Error", EXPFILL }}, + { &ei_lua_proto_decryption_comment, { "_ws.lua.proto.comment", PI_DECRYPTION, PI_COMMENT ,"Protocol Comment", EXPFILL }}, + { &ei_lua_proto_decryption_chat, { "_ws.lua.proto.chat", PI_DECRYPTION, PI_CHAT ,"Protocol Chat", EXPFILL }}, + { &ei_lua_proto_decryption_note, { "_ws.lua.proto.note", PI_DECRYPTION, PI_NOTE ,"Protocol Note", EXPFILL }}, + { &ei_lua_proto_decryption_warn, { "_ws.lua.proto.warning", PI_DECRYPTION, PI_WARN ,"Protocol Warning", EXPFILL }}, + { &ei_lua_proto_decryption_error, { "_ws.lua.proto.error", PI_DECRYPTION, PI_ERROR ,"Protocol Error", EXPFILL }}, + + { &ei_lua_proto_assumption_comment, { "_ws.lua.proto.comment", PI_ASSUMPTION, PI_COMMENT ,"Protocol Comment", EXPFILL }}, + { &ei_lua_proto_assumption_chat, { "_ws.lua.proto.chat", PI_ASSUMPTION, PI_CHAT ,"Protocol Chat", EXPFILL }}, + { &ei_lua_proto_assumption_note, { "_ws.lua.proto.note", PI_ASSUMPTION, PI_NOTE ,"Protocol Note", EXPFILL }}, + { &ei_lua_proto_assumption_warn, { "_ws.lua.proto.warning", PI_ASSUMPTION, PI_WARN ,"Protocol Warning", EXPFILL }}, + { &ei_lua_proto_assumption_error, { "_ws.lua.proto.error", PI_ASSUMPTION, PI_ERROR ,"Protocol Error", EXPFILL }}, + { &ei_lua_proto_deprecated_comment, { "_ws.lua.proto.comment", PI_DEPRECATED, PI_COMMENT ,"Protocol Comment", EXPFILL }}, { &ei_lua_proto_deprecated_chat, { "_ws.lua.proto.chat", PI_DEPRECATED, PI_CHAT ,"Protocol Chat", EXPFILL }}, { &ei_lua_proto_deprecated_note, { "_ws.lua.proto.note", PI_DEPRECATED, PI_NOTE ,"Protocol Note", EXPFILL }}, diff --git a/epan/wslua/wslua_proto_expert.c b/epan/wslua/wslua_proto_expert.c index 198d684bb1..a7c7c82a46 100644 --- a/epan/wslua/wslua_proto_expert.c +++ b/epan/wslua/wslua_proto_expert.c @@ -42,8 +42,9 @@ WSLUA_CONSTRUCTOR ProtoExpert_new(lua_State* L) { `expert.group.REQUEST_CODE`, `expert.group.UNDECODED`, `expert.group.REASSEMBLE`, `expert.group.MALFORMED`, `expert.group.DEBUG`, `expert.group.PROTOCOL`, - `expert.group.SECURITY`, `expert.group.COMMENTS_GROUP` - or `expert.group.DECRYPTION`. */ + `expert.group.SECURITY`, `expert.group.COMMENTS_GROUP`, + `expert.group.DECRYPTION`, `expert.group.ASSUMPTION` + or `expert.group.DEPRECATED`. */ #define WSLUA_ARG_ProtoExpert_new_SEVERITY 4 /* Expert severity type: one of: `expert.severity.COMMENT`, `expert.severity.CHAT`, `expert.severity.NOTE`, `expert.severity.WARN`, @@ -88,6 +89,7 @@ WSLUA_CONSTRUCTOR ProtoExpert_new(lua_State* L) { case PI_SECURITY: case PI_COMMENTS_GROUP: case PI_DECRYPTION: + case PI_ASSUMPTION: case PI_DEPRECATED: break; default: diff --git a/test/lua/globals_2.2.txt b/test/lua/globals_2.2.txt index 67442b8112..9f83d033c0 100644 --- a/test/lua/globals_2.2.txt +++ b/test/lua/globals_2.2.txt @@ -405,11 +405,14 @@ ["MENU_STAT_UNSORTED"] = 2, ["MENU_TOOLS_UNSORTED"] = 11, ["NSTime"] = '', + ["PI_ASSUMPTION"] = 218103808, ["PI_CHAT"] = 2097152, ["PI_CHECKSUM"] = 16777216, ["PI_COMMENT"] = 1048576, ["PI_COMMENTS_GROUP"] = 184549376, ["PI_DEBUG"] = 134217728, + ["PI_DECRYPTION"] = 201326592, + ["PI_DEPRECATED"] = 234881024, ["PI_ERROR"] = 8388608, ["PI_GROUP_MASK"] = 4278190080, ["PI_MALFORMED"] = 117440512, diff --git a/tools/convert_expert_add_info_format.pl b/tools/convert_expert_add_info_format.pl index 70d126a172..572893646e 100755 --- a/tools/convert_expert_add_info_format.pl +++ b/tools/convert_expert_add_info_format.pl @@ -56,7 +56,10 @@ my %EXPERT_GROUPS = ('PI_CHECKSUM' => "PI_CHECKSUM", 'PI_DEBUG' => "PI_DEBUG", 'PI_PROTOCOL' => "PI_PROTOCOL", 'PI_SECURITY' => "PI_SECURITY", - 'PI_COMMENTS_GROUP' => "PI_COMMENTS_GROUP"); + 'PI_COMMENTS_GROUP' => "PI_COMMENTS_GROUP", + 'PI_DECRYPTION' => "PI_DECRYPTION", + 'PI_ASSUMPTION' => "PI_ASSUMPTION", + 'PI_DEPRECATED' => "PI_DEPRECATED"); my @expert_list; my $protabbrev = ""; diff --git a/tools/convert_proto_tree_add_text.pl b/tools/convert_proto_tree_add_text.pl index c54964d6d4..357645582a 100755 --- a/tools/convert_proto_tree_add_text.pl +++ b/tools/convert_proto_tree_add_text.pl @@ -94,7 +94,10 @@ my %EXPERT_GROUPS = ('PI_CHECKSUM' => "PI_CHECKSUM", 'PI_DEBUG' => "PI_DEBUG", 'PI_PROTOCOL' => "PI_PROTOCOL", 'PI_SECURITY' => "PI_SECURITY", - 'PI_COMMENTS_GROUP' => "PI_COMMENTS_GROUP"); + 'PI_COMMENTS_GROUP' => "PI_COMMENTS_GROUP", + 'PI_DECRYPTION' => "PI_DECRYPTION", + 'PI_ASSUMPTION' => "PI_ASSUMPTION", + 'PI_DEPRECATED' => "PI_DEPRECATED"); my @proto_tree_list; my @expert_list;