Load IPMI provider libraries into net-ipmid
The logic to scan /usr/lib/net-ipmid for shared libraries
and load them and the callback function to register commands
to command table.
Change-Id: Ib09cce5a9b418171822208d1d7b322e4b1c8b2b9
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/main.cpp b/main.cpp
index 0fae8a7..108cf92 100644
--- a/main.cpp
+++ b/main.cpp
@@ -16,6 +16,7 @@
#include "command_table.hpp"
#include "message.hpp"
#include "message_handler.hpp"
+#include "provider_registration.hpp"
#include "sessions_manager.hpp"
#include "socket_channel.hpp"
@@ -180,6 +181,9 @@
goto finish;
}
+ // Register all the IPMI provider libraries applicable for net-ipmid
+ provider::registerCallbackHandlers(NET_IPMID_LIB_PATH);
+
// Register the phosphor-net-ipmid session setup commands
command::sessionSetupCommands();