File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ int run(int argc, char* argv[])
637637 goto EXIT;
638638 }
639639
640- conf.pluginManager .loadPlugins (" /usr/local/lib64/ipfixprobe/ " , loadPluginsRecursive);
640+ conf.pluginManager .loadPlugins (parser. m_plugins_path , loadPluginsRecursive);
641641
642642 printPlugins ();
643643
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ class IpfixprobeOptParser : public OptionsParser {
9191 std::string m_help_str;
9292 bool m_version;
9393 std::vector<int > m_cpu_mask;
94+ std::string m_plugins_path;
9495
9596 IpfixprobeOptParser ()
9697 : OptionsParser(" ipfixprobe" , " flow exporter supporting various custom IPFIX elements" )
@@ -105,6 +106,7 @@ class IpfixprobeOptParser : public OptionsParser {
105106 , m_help(false )
106107 , m_help_str(" " )
107108 , m_version(false )
109+ , m_plugins_path(" /usr/lib64/ipfixprobe/" )
108110 {
109111 m_delim = ' ' ;
110112
@@ -238,6 +240,16 @@ class IpfixprobeOptParser : public OptionsParser {
238240 return m_pid != " " ;
239241 },
240242 OptionFlags::RequiredArgument);
243+ register_option (
244+ " -L" ,
245+ " --plugins-path" ,
246+ " PATH" ,
247+ " Path to the directory with plugins" ,
248+ [this ](const char * arg) {
249+ m_plugins_path = arg;
250+ return m_plugins_path != " " ;
251+ },
252+ OptionFlags::RequiredArgument);
241253 register_option (
242254 " -d" ,
243255 " --daemon" ,
You can’t perform that action at this time.
0 commit comments