diff options
author | Gerald Combs <gerald@wireshark.org> | 2011-06-01 21:48:17 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2011-06-01 21:48:17 +0000 |
commit | 0272ec5dd3fcaef37fafedb23d14d1d89db712b6 (patch) | |
tree | c4da1f0931d1db98bb5739a82e5942139a36cd1d /epan/plugins.c | |
parent | a02b8fb24786bee85e2cca4b82489aa332f0150d (diff) |
Show the plugin paths in Help→About→Plugins. Add a "-G plugins" option
to TShark which dumps a list of plugins.
svn path=/trunk/; revision=37512
Diffstat (limited to 'epan/plugins.c')
-rw-r--r-- | epan/plugins.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/epan/plugins.c b/epan/plugins.c index a511da44f6..4b6a4a45b7 100644 --- a/epan/plugins.c +++ b/epan/plugins.c @@ -506,4 +506,56 @@ register_all_codecs(void) (pt_plug->register_codec_module)(); } } + +/* + * Dump plugin info to stdout. Copied from gtk/plugins_dlg.c:plugins_scan. + */ +void +plugins_dump_all(void) +{ +#ifdef HAVE_PLUGINS + plugin *pt_plug; + const char *sep; +#endif +#ifdef HAVE_LUA_5_1 + wslua_plugin *lua_plug; +#endif + +#ifdef HAVE_PLUGINS + for (pt_plug = plugin_list; pt_plug != NULL; pt_plug = pt_plug->next) + { + sep = ""; + + printf("%s\t%s\t", pt_plug->name, pt_plug->version); + if (pt_plug->register_protoinfo) + { + printf("dissector"); + sep = ", "; + } + if (pt_plug->register_tap_listener) + { + printf("%stap", sep); + sep = ", "; + } + if (pt_plug->register_wtap_module) + { + printf("%sfile format", sep); + sep = ", "; + } + if (pt_plug->register_codec_module) + { + printf("%scodec", sep); + } + printf("\t%s\n", g_module_name(pt_plug->handle)); + } +#endif + +#ifdef HAVE_LUA_5_1 + for (lua_plug = wslua_plugin_list; lua_plug != NULL; lua_plug = lua_plug->next) + { + printf("%s\t%s\tlua script\t%s\n", lua_plug->name, lua_plug->version, lua_plug->filename); + } +#endif +} + #endif |