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/provider_registration.hpp b/provider_registration.hpp
new file mode 100644
index 0000000..6c05dde
--- /dev/null
+++ b/provider_registration.hpp
@@ -0,0 +1,27 @@
+#pragma once
+
+namespace provider
+{
+
+/*
+ * @brief Provider Library filename extension
+ *
+ * Autotools versions the shared libraries, so the shared libraries end with
+ * extension name .so.*
+ */
+
+constexpr auto PROVIDER_SONAME_EXTN = ".so.";
+
+/*
+ * @brief Register Callback handlers for IPMI provider libraries
+ *
+ * Open the directory path for net-ipmid provider libraries and scan the
+ * directory for files that end with .so.*. and dlopen the shared libraries
+ * to register the handlers for the callback routines.
+ *
+ * @param[in] providerLibPath - Directory path for reading the IPMI provider
+ *                              libraries
+ */
+void registerCallbackHandlers(const char* providerLibPath);
+
+} // namespace provider