Add new google ipmi sys command: SysHostPowerOff
New google ipmi sys command to let the BMC knows host shutdown,
allow host to gracefully shutdown and disable the watchdog with given
time delay.
Signed-off-by: Yunyun Lin <linyuny@google.com>
Change-Id: I02171c9cfed57ae5d10d66b515e4ab7ee8856466
diff --git a/host_power_off.hpp b/host_power_off.hpp
new file mode 100644
index 0000000..e399007
--- /dev/null
+++ b/host_power_off.hpp
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "handler.hpp"
+
+#include <ipmid/api.h>
+
+namespace google
+{
+namespace ipmi
+{
+
+struct HostPowerOffRequest
+{
+ uint8_t subcommand;
+ // Delay in seconds.
+ uint32_t delay;
+} __attribute__((packed));
+
+// Disable the fallback watchdog with given time delay and Power Off Host
+ipmi_ret_t hostPowerOff(const uint8_t* reqBuf, uint8_t* replyBuf,
+ size_t* dataLen, const HandlerInterface* handler);
+
+} // namespace ipmi
+} // namespace google