Add kcs selfchannel support & define for LAN too
Define sudo API's for returning channel
index for self channel. At moment, This API
returns KCS for host-ipmi
Change-Id: Icefd5d949e94d4399adaffdad102ccb18c1b7cdc
Signed-off-by: ssekar <suryakanth.sekar@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
diff --git a/host-ipmid/ipmid-api.h b/host-ipmid/ipmid-api.h
index 6df903e..b1c078b 100644
--- a/host-ipmid/ipmid-api.h
+++ b/host-ipmid/ipmid-api.h
@@ -131,6 +131,23 @@
IPMI_CC_UNSPECIFIED_ERROR = 0xFF,
};
+// Temp solution: To detect the request source channel.
+// There is no stright forward way to get the exact
+// channel so we are hardcoding it to KCS in case host-ipmid
+// and LAN1 for netipmid.
+// we can't differentiate between LAN1 & LAN2 for netipmid in this logic.
+// As our current design will not be able to support the same. This is done
+// so that in all the places where ever we need to use the self channel can be
+// be implemented properly and based on new architecture.this can be updated.
+typedef enum
+{
+ interfaceKCS = 0,
+ interfaceLAN1 = 1,
+ interfaceUnknown = 0xFF
+} EInterfaceIndex;
+
+EInterfaceIndex getInterfaceIndex(void);
+
sd_bus* ipmid_get_sd_bus_connection(void);
sd_event* ipmid_get_sd_event_connection(void);
sd_bus_slot* ipmid_get_sd_bus_slot(void);