add handler logic to handle SysCableCheck

Add handler logic to handler for SysCableCheck such that it splits the
true IPMI processing from the business logic.

Tested: Only ran unit-tests (added new ones).
Change-Id: Ieec35cc8839dcd3cfb864b68ffbd1a45d1326fee
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/cable.hpp b/cable.hpp
index ce20226..1075b41 100644
--- a/cable.hpp
+++ b/cable.hpp
@@ -1,5 +1,7 @@
 #pragma once
 
+#include "handler.hpp"
+
 #include <ipmid/api.h>
 
 namespace google
@@ -7,11 +9,17 @@
 namespace ipmi
 {
 
+struct CableReply
+{
+    uint8_t subcommand;
+    uint8_t value;
+} __attribute__((packed));
+
 //
 // Handle the cablecheck.  Sys must supply which ethernet device they're
 // interested in.
-ipmi_ret_t CableCheck(const uint8_t* reqBuf, uint8_t* replyBuf,
-                      size_t* dataLen);
+ipmi_ret_t CableCheck(const uint8_t* reqBuf, uint8_t* replyBuf, size_t* dataLen,
+                      const HandlerInterface* handler = &handlerImpl);
 
 } // namespace ipmi
 } // namespace google