oem-ibm: Modified to write system dump data on unix domain socket.

Currently pldm writes dump data on nbd device.

This commit is to enable dump offload using UNIX socket
On dump offload request, pldm setup a UNIX socket and
write data on socket, webserver connects to this socket
and reads data to offload

Tested By:
1. Offloaded system dump
2. Ran below pldmtool commands for performance test
   while offloading system dump, i don't see an delay
   pldmtool bios GetBIOSTable -t 1
   pldmtool bios GetBIOSTable -t 2

Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Change-Id: Iad8863d87c3b04a8dd588f1f0239f65fcb59f38b
diff --git a/oem/ibm/libpldmresponder/utils.hpp b/oem/ibm/libpldmresponder/utils.hpp
new file mode 100644
index 0000000..8f9ac47
--- /dev/null
+++ b/oem/ibm/libpldmresponder/utils.hpp
@@ -0,0 +1,39 @@
+#pragma once
+
+#include <string>
+
+namespace pldm
+{
+namespace responder
+{
+namespace utils
+{
+
+/** @brief Setup UNIX socket
+ *  This function creates listening socket in non-blocking mode and allows only
+ *  one socket connection. returns accepted socket after accepting connection
+ *  from peer.
+ *
+ *  @param[in] socketInterface - unix socket path
+ *  @return   on success returns accepted socket fd
+ *            on failure returns -1
+ */
+int setupUnixSocket(const std::string& socketInterface);
+
+/** @brief Write data on UNIX socket
+ *  This function writes given data to a non-blocking socket.
+ *  Irrespective of block size, this function make sure of writing given data
+ *  on unix socket.
+ *
+ *  @param[in] sock - unix socket
+ *  @param[in] buf -  data buffer
+ *  @param[in] blockSize - size of data to write
+ *  @return   on success retruns  0
+ *            on failure returns -1
+
+ */
+int writeToUnixSocket(const int sock, const char* buf,
+                      const uint64_t blockSize);
+} // namespace utils
+} // namespace responder
+} // namespace pldm