Hi. Specifying an alternative --prefix is common for those wishing
to keep packages separate and self contained. When doing so with
nProbe, nProbe fails to find its plugins. In no case does nProbe
create a plugins dir, it currently uses lib instead.
Note that './plugins' can be very ambiguous as to its contents and
absolute location.
I'd suggest:
- Removing all the current default locations from the binary
- Seed and hardcode one plugin location into the binary via the
configure --prefix process
- Optionally move the plugins out of the lib directory and into
their own
- Add an nprobe -<plugin_path_option> as a user override or inclusion
FYI, this orphan already exists:
./plugins/Makefile.am:plugindir = $(libdir)/nprobe/plugins
I won't have a patch for any of this. I simply used and made
plugins.c:/tmp/nprobe494/plugins, moved lib/*Plugin* to plugins and
nuked the symlinks in plugins.
### unpatched
# /tmp/nprobe494/bin/nprobe -b 2
29/Jun/2008 20:04:10 [plugin.c:93] No plugins in ./plugins
29/Jun/2008 20:04:10 [plugin.c:93] No plugins in /usr/local/lib/nprobe/plugins
29/Jun/2008 20:04:10 [plugin.c:97] WARNING: Unable to find plugins
directory. nProbe will work without plugins!
29/Jun/2008 20:04:10 [nprobe.c:2896] Tracing enabled
29/Jun/2008 20:04:10 [nprobe.c:2960] WARNING: -n parameter is missing.
127.0.0.1:2055 will be used.
29/Jun/2008 20:04:10 [nprobe.c:1440] Exporting flows towards
127.0.0.1:2055 using UDP
29/Jun/2008 20:04:10 [nprobe.c:3437] Welcome to nprobe v.4.9.4 for
i386-unknown-freebsd4.11
### with test patch
========================================
--- plugin.c.orig Mon Sep 17 18:39:04 2007
+++ plugin.c Sun Jun 29 15:00:11 2008
@@ -40,8 +40,7 @@
extern PluginInfo* httpPluginEntryFctn(void);
extern PluginInfo* smtpPluginEntryFctn(void);
#else
-static char *pluginDirs[] = { "./plugins",
- "/usr/local/lib/nprobe/plugins",
+static char *pluginDirs[] = { "/tmp/nprobe494/lib",
NULL };
#endif
========================================
## initPlugins() seems to load things twice.
# /tmp/nprobe494/bin/nprobe -b 2
29/Jun/2008 20:05:13 [plugin.c:98] Loading plugins from /tmp/nprobe494/lib
29/Jun/2008 20:05:13 [plugin.c:359] WARNING: Unable to locate plugin
'/tmp/nprobe494/lib/libnprobe.so' entry function [Undefined symbol
"PluginEntryFctn"]
29/Jun/2008 20:05:13 [plugin.c:359] WARNING: Unable to locate plugin
'/tmp/nprobe494/lib/libnprobe-4.9.4.so' entry function [Undefined
symbol "PluginEntryFctn"]
29/Jun/2008 20:05:13 [dbPlugin.c:67] WARNING: DB support is not
enabled (disabled at compile time)
29/Jun/2008 20:05:13 [dbPlugin.c:67] WARNING: DB support is not
enabled (disabled at compile time)
29/Jun/2008 20:05:13 [nprobe.c:2896] Tracing enabled
29/Jun/2008 20:05:13 [nprobe.c:2960] WARNING: -n parameter is missing.
127.0.0.1:2055 will be used.
29/Jun/2008 20:05:13 [nprobe.c:1440] Exporting flows towards
127.0.0.1:2055 using UDP
29/Jun/2008 20:05:13 [nprobe.c:3437] Welcome to nprobe v.4.9.4 for
i386-unknown-freebsd4.11
29/Jun/2008 20:05:13 [plugin.c:432] Enabling plugin db
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin dump (no template
is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin Efficiency
calculation (no template is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin Flow Serial
Identifier (no template is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin HTTP Protocol
Dissector (no template is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin RTP (no template
is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin SIP (no template
is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin SMTP Protocol
Dissector (no template is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin Video protocol
detection (skeleton plugin) (no template is using it)
29/Jun/2008 20:05:13 [plugin.c:432] Enabling plugin db
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin dump (no template
is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin Efficiency
calculation (no template is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin Flow Serial
Identifier (no template is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin HTTP Protocol
Dissector (no template is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin RTP (no template
is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin SIP (no template
is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin SMTP Protocol
Dissector (no template is using it)
29/Jun/2008 20:05:13 [plugin.c:428] Disabling plugin Video protocol
detection (skeleton plugin) (no template is using it)
## If all the symlinks in lib are deleted we get:
# /tmp/nprobe494/bin/nprobe -b 2
29/Jun/2008 20:08:19 [plugin.c:98] Loading plugins from /tmp/nprobe494/lib
29/Jun/2008 20:08:19 [plugin.c:359] WARNING: Unable to locate plugin
'/tmp/nprobe494/lib/libnprobe-4.9.4.so' entry function [Undefined
symbol "PluginEntryFctn"]
29/Jun/2008 20:08:19 [dbPlugin.c:67] WARNING: DB support is not
enabled (disabled at compile time)
29/Jun/2008 20:08:19 [nprobe.c:2896] Tracing enabled
29/Jun/2008 20:08:19 [nprobe.c:2960] WARNING: -n parameter is missing.
127.0.0.1:2055 will be used.
29/Jun/2008 20:08:19 [nprobe.c:1440] Exporting flows towards
127.0.0.1:2055 using UDP
29/Jun/2008 20:08:19 [nprobe.c:3437] Welcome to nprobe v.4.9.4 for
i386-unknown-freebsd4.11
29/Jun/2008 20:08:19 [plugin.c:432] Enabling plugin db
29/Jun/2008 20:08:19 [plugin.c:428] Disabling plugin dump (no template
is using it)
29/Jun/2008 20:08:19 [plugin.c:428] Disabling plugin Efficiency
calculation (no template is using it)
29/Jun/2008 20:08:19 [plugin.c:428] Disabling plugin Flow Serial
Identifier (no template is using it)
29/Jun/2008 20:08:19 [plugin.c:428] Disabling plugin HTTP Protocol
Dissector (no template is using it)
29/Jun/2008 20:08:19 [plugin.c:428] Disabling plugin RTP (no template
is using it)
29/Jun/2008 20:08:19 [plugin.c:428] Disabling plugin SIP (no template
is using it)
29/Jun/2008 20:08:19 [plugin.c:428] Disabling plugin SMTP Protocol
Dissector (no template is using it)
29/Jun/2008 20:08:19 [plugin.c:428] Disabling plugin Video protocol
detection (skeleton plugin) (no template is using it)
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc