aboutsummaryrefslogtreecommitdiffstats
path: root/epan/epan.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-01-02 06:49:40 +0000
committerGuy Harris <guy@alum.mit.edu>2007-01-02 06:49:40 +0000
commit44c0624bd9f0a4a69777cfdeab8d1b05690c6f36 (patch)
treeb6c33da33b6d3f27fd6dbcdee25edeaabc8d4a38 /epan/epan.c
parent3722c2687bdb8c52198552ef2b124b6ddba793cd (diff)
Add a WIRESHARK_RUN_FROM_BUILD_DIRECTORY environment variable on UN*X;
if set, and if the program isn't running with additional privileges, it'll treat the directory in which the program is found as the data directory. If, on Windows, the version-number subdirectory of {data directory}\plugins doesn't exist (which is assumed to mean that the program is being run from the build directory), or if, on UN*X, WIRESHARK_RUN_FROM_BUILD_DIRECTORY is set, the plugin directory is the "plugins" subdirectory of the data directory, and all subdirectories of that directory are scanned for plugins, as the "plugins" subdirectory of the build directory contains subdirectories for the plugins; this means that if we're running from the build directory, we'll find the plugins we built in the build tree. When generating the wireshark-filter man page, run tshark with WIRESHARK_RUN_FROM_BUILD_DIRECTORY set, so it uses the plugins from the build to generate the list of filters. svn path=/trunk/; revision=20261
Diffstat (limited to 'epan/epan.c')
-rw-r--r--epan/epan.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/epan/epan.c b/epan/epan.c
index 20290ee9cd..f532b6fc7c 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -67,29 +67,8 @@ epan_get_version(void) {
return VERSION;
}
-/*
- * XXX - this takes the plugin directory as an argument, because
- * libwireshark now has its own configure script and "config.h" file,
- * which is what code in the "epan" directory includes, but we need
- * to define PLUGIN_DIR in the top-level directory, as it's used by,
- * for example, the Makefile for the Gryphon plugin, so it knows
- * where to install the plugin.
- *
- * Eventually, we should probably have an "epan-configure" script
- * (or "libwireshark-configure", or whatever), along the lines of what
- * GTK+ and GLib have, that can print, among other things, the directory
- * into which plugins should be installed. That way, only libwireshark
- * need know what directory that is; programs using it won't, *and*
- * Makefiles for plugins can just use "epan-configure" to figure out
- * where to install the plugins.
- *
- * (Would that *more* libraries had configure scripts like that, so
- * that configure scripts didn't have to go through various contortions
- * to figure out where the header files and libraries for various
- * libraries are located.)
- */
void
-epan_init(const char *plugin_dir, void (*register_all_protocols)(void),
+epan_init(void (*register_all_protocols)(void),
void (*register_all_handoffs)(void),
void (*report_failure)(const char *, va_list),
void (*report_open_failure)(const char *, int, gboolean),
@@ -115,7 +94,7 @@ epan_init(const char *plugin_dir, void (*register_all_protocols)(void),
tvbuff_init();
oid_resolv_init();
tap_init();
- proto_init(plugin_dir,register_all_protocols,register_all_handoffs);
+ proto_init(register_all_protocols, register_all_handoffs);
packet_init();
dfilter_init();
final_registration_all_protocols();