wslua: print the correct type for FT_NONE dissector tables

We added FT_NONE dissector tables a while ago. These tables can only be
used for Decode As. Support such dissector tables in lua's print() function.

print(DissectorTable.get("iso14443.subdissector"))

will now print

DissectorTable iso14443.subdissector only for Decode As:

Change-Id: I9f5a2f6d6b1edb2a53ca1d2c0ae158c16fddf05f
Reviewed-on: https://code.wireshark.org/review/33356
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Martin Kaiser 2019-05-25 15:43:31 +02:00 committed by Anders Broman
parent 7dd4e3bcb4
commit 0ab91dd96a

View file

@ -640,6 +640,11 @@ WSLUA_METAMETHOD DissectorTable__tostring(lua_State* L) {
g_string_append_printf(s,"%s Integer(%i):\n",dt->name,base);
break;
}
case FT_NONE:
{
g_string_append_printf(s,"%s only for Decode As:\n",dt->name);
break;
}
default:
luaL_error(L,"Strange table type");
}