ncsi: Impelment the setChannel/ClearInterface function
SetChannel:This function will ask underlying NCSI driver
to set the package or package/channel combination as the
preferred choice.
ClearInterface:This function clears any preferred setting
from the specific interface.
These functions talks with the NCSI driver through
the netlink messages.
Change-Id: Icb5ae35f83b5b0d0f9654ff4a0dd568fe10680a7
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/ncsi_util.hpp b/ncsi_util.hpp
new file mode 100644
index 0000000..c519cb4
--- /dev/null
+++ b/ncsi_util.hpp
@@ -0,0 +1,33 @@
+namespace phosphor
+{
+namespace network
+{
+namespace ncsi
+{
+
+/* @brief This function will ask underlying NCSI driver
+ * to set a specific package or package/channel
+ * combination as the preferred choice.
+ * This function talks with the NCSI driver over
+ * netlink messages.
+ * @param[in] ifindex - Interface Index.
+ * @param[in] package - NCSI Package.
+ * @param[in] channel - Channel number with in the package.
+ * @returns 0 on success and negative value for failure.
+ */
+int setChannel(int ifindex, int package, int channel);
+
+/* @brief This function will ask underlying NCSI driver
+ * to clear any preferred setting from the given
+ * interface.
+ * This function talks with the NCSI driver over
+ * netlink messages.
+ * @param[in] ifindex - Interface Index.
+ * @returns 0 on success and negative value for failure.
+ */
+int clearInterface(int ifindex);
+
+}//namespace ncsi
+}//namespace network
+}//namespace phosphor
+