diff --git a/Makefile.am b/Makefile.am
index 3bb5e7b..3649ca8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -87,6 +87,7 @@
 		$(SYSTEMD_LIBS) \
 		$(SDBUSPLUS_LIBS) \
 		$(SDEVENTPLUS_LIBS) \
+		$(STDPLUS_LIBS) \
 		$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
 		$(PHOSPHOR_LOGGING_LIBS) \
 		-lstdc++fs
@@ -95,6 +96,7 @@
 		$(SYSTEMD_CFLAGS) \
 		$(SDBUSPLUS_CFLAGS) \
 		$(SDEVENTPLUS_CFLAGS) \
+		$(STDPLUS_CFLAGS) \
 		$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
 		$(PHOSPHOR_LOGGING_CFLAGS) \
 		-flto
diff --git a/configure.ac b/configure.ac
index ee783e2..1dc2bf0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@
 PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221])
 PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
 PKG_CHECK_MODULES([SDEVENTPLUS], [sdeventplus])
+PKG_CHECK_MODULES([STDPLUS], [stdplus])
 AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
 PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
 PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces])
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
index f7343ad..2c8bbd4 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -24,6 +24,7 @@
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/log.hpp>
 #include <sstream>
+#include <stdplus/raw.hpp>
 #include <string>
 #include <string_view>
 #include <xyz/openbmc_project/Common/error.hpp>
@@ -325,7 +326,7 @@
     static_assert(sizeof(ifr.ifr_hwaddr.sa_data) >= sizeof(ether_addr));
     std::string_view hwaddr(reinterpret_cast<char*>(ifr.ifr_hwaddr.sa_data),
                             sizeof(ifr.ifr_hwaddr.sa_data));
-    return mac_address::toString(copyFrom<ether_addr>(hwaddr));
+    return mac_address::toString(stdplus::raw::copyFrom<ether_addr>(hwaddr));
 }
 
 std::string EthernetInterface::generateId(const std::string& ipaddress,
@@ -945,7 +946,7 @@
 
     // We don't need to update the system if the address is unchanged
     ether_addr oldMAC = mac_address::fromString(MacAddressIntf::mACAddress());
-    if (!equal(newMAC, oldMAC))
+    if (!stdplus::raw::equal(newMAC, oldMAC))
     {
         if (!mac_address::isLocalAdmin(newMAC))
         {
@@ -953,7 +954,7 @@
             {
                 auto inventoryMAC =
                     mac_address::getfromInventory(bus, interfaceName());
-                if (!equal(newMAC, inventoryMAC))
+                if (!stdplus::raw::equal(newMAC, inventoryMAC))
                 {
                     log<level::ERR>(
                         "Given MAC address is neither a local Admin "
diff --git a/neighbor.cpp b/neighbor.cpp
index 717719c..dc6a581 100644
--- a/neighbor.cpp
+++ b/neighbor.cpp
@@ -14,6 +14,7 @@
 #include <sys/types.h>
 
 #include <stdexcept>
+#include <stdplus/raw.hpp>
 #include <string_view>
 #include <utility>
 #include <vector>
@@ -32,7 +33,7 @@
     {
         throw std::runtime_error("Not a neighbor msg");
     }
-    auto ndm = extract<ndmsg>(msg, "Bad neighbor msg");
+    auto ndm = stdplus::raw::extract<ndmsg>(msg);
 
     // Filter out neighbors we don't care about
     unsigned ifindex = ndm.ndm_ifindex;
@@ -55,7 +56,7 @@
         auto [hdr, data] = netlink::extractRtAttr(msg);
         if (hdr.rta_type == NDA_LLADDR)
         {
-            neighbor.mac = copyFrom<ether_addr>(data, "Bad neighbor MAC");
+            neighbor.mac = stdplus::raw::copyFrom<ether_addr>(data);
         }
         else if (hdr.rta_type == NDA_DST)
         {
diff --git a/netlink.cpp b/netlink.cpp
index 947b828..9039575 100644
--- a/netlink.cpp
+++ b/netlink.cpp
@@ -9,6 +9,7 @@
 
 #include <array>
 #include <stdexcept>
+#include <stdplus/raw.hpp>
 #include <system_error>
 
 namespace phosphor
@@ -23,7 +24,7 @@
 void processMsg(std::string_view& msgs, bool& done, const ReceiveCallback& cb)
 {
     // Parse and update the message buffer
-    auto hdr = copyFrom<nlmsghdr>(msgs, "Bad netlink header");
+    auto hdr = stdplus::raw::copyFrom<nlmsghdr>(msgs);
     if (hdr.nlmsg_len < sizeof(hdr))
     {
         throw std::runtime_error("Invalid nlmsg length");
@@ -56,7 +57,7 @@
     }
     else if (hdr.nlmsg_type == NLMSG_ERROR)
     {
-        auto err = copyFrom<nlmsgerr>(msg, "Bad netlink error");
+        auto err = stdplus::raw::copyFrom<nlmsgerr>(msg);
         // This is just an ACK so don't do the callback
         if (err.error <= 0)
         {
@@ -175,7 +176,7 @@
 
 std::tuple<rtattr, std::string_view> extractRtAttr(std::string_view& data)
 {
-    auto hdr = copyFrom<rtattr>(data, "Bad rtattr header");
+    auto hdr = stdplus::raw::copyFrom<rtattr>(data);
     if (hdr.rta_len < RTA_LENGTH(0))
     {
         throw std::runtime_error("Invalid rtattr length");
diff --git a/test/Makefile.am b/test/Makefile.am
index 45dab5f..d728099 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -21,6 +21,7 @@
 					$(SYSTEMD_CFLAGS) \
 					$(SDBUSPLUS_CFLAGS) \
 					$(SDEVENTPLUS_CFLAGS) \
+					$(STDPLUS_CFLAGS) \
 					$(PHOSPHOR_LOGGING_CFLAGS) \
 					$(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
 
@@ -29,6 +30,7 @@
 					$(SYSTEMD_LIBS) \
 					$(SDBUSPLUS_LIBS) \
 					$(SDEVENTPLUS_LIBS) \
+					$(STDPLUS_LIBS) \
 					$(PHOSPHOR_LOGGING_LIBS) \
 					$(PHOSPHOR_DBUS_INTERFACES_LIBS)
 
diff --git a/test/mock_syscall.cpp b/test/mock_syscall.cpp
index 5493c58..665094d 100644
--- a/test/mock_syscall.cpp
+++ b/test/mock_syscall.cpp
@@ -19,6 +19,7 @@
 #include <map>
 #include <queue>
 #include <stdexcept>
+#include <stdplus/raw.hpp>
 #include <string>
 #include <string_view>
 #include <vector>
@@ -128,7 +129,7 @@
 ssize_t sendmsg_link_dump(std::queue<std::string>& msgs, std::string_view in)
 {
     const ssize_t ret = in.size();
-    const auto& hdrin = phosphor::copyFrom<nlmsghdr>(in);
+    const auto& hdrin = stdplus::raw::copyFrom<nlmsghdr>(in);
     if (hdrin.nlmsg_type != RTM_GETLINK)
     {
         return 0;
diff --git a/test/test_neighbor.cpp b/test/test_neighbor.cpp
index c7d926e..6b14912 100644
--- a/test/test_neighbor.cpp
+++ b/test/test_neighbor.cpp
@@ -8,6 +8,7 @@
 
 #include <cstring>
 #include <stdexcept>
+#include <stdplus/raw.hpp>
 #include <string>
 #include <vector>
 
@@ -115,7 +116,8 @@
     EXPECT_EQ(msg.ndm_ifindex, neighbors[0].interface);
     EXPECT_EQ(msg.ndm_state, neighbors[0].state);
     EXPECT_FALSE(neighbors[0].mac);
-    EXPECT_TRUE(equal(addr, std::get<in_addr>(neighbors[0].address)));
+    EXPECT_TRUE(
+        stdplus::raw::equal(addr, std::get<in_addr>(neighbors[0].address)));
 }
 
 TEST(ParseNeighbor, FilterInterface)
@@ -150,7 +152,8 @@
     EXPECT_EQ(msg.ndm_ifindex, neighbors[0].interface);
     EXPECT_EQ(msg.ndm_state, neighbors[0].state);
     EXPECT_FALSE(neighbors[0].mac);
-    EXPECT_TRUE(equal(addr, std::get<in_addr>(neighbors[0].address)));
+    EXPECT_TRUE(
+        stdplus::raw::equal(addr, std::get<in_addr>(neighbors[0].address)));
 }
 
 TEST(ParseNeighbor, FilterState)
@@ -185,7 +188,8 @@
     EXPECT_EQ(msg.ndm_ifindex, neighbors[0].interface);
     EXPECT_EQ(msg.ndm_state, neighbors[0].state);
     EXPECT_FALSE(neighbors[0].mac);
-    EXPECT_TRUE(equal(addr, std::get<in_addr>(neighbors[0].address)));
+    EXPECT_TRUE(
+        stdplus::raw::equal(addr, std::get<in_addr>(neighbors[0].address)));
 }
 
 TEST(ParseNeighbor, Full)
@@ -225,8 +229,9 @@
     EXPECT_EQ(msg.ndm_ifindex, neighbors[0].interface);
     EXPECT_EQ(msg.ndm_state, neighbors[0].state);
     EXPECT_TRUE(neighbors[0].mac);
-    EXPECT_TRUE(equal(mac, *neighbors[0].mac));
-    EXPECT_TRUE(equal(addr, std::get<in6_addr>(neighbors[0].address)));
+    EXPECT_TRUE(stdplus::raw::equal(mac, *neighbors[0].mac));
+    EXPECT_TRUE(
+        stdplus::raw::equal(addr, std::get<in6_addr>(neighbors[0].address)));
 }
 
 } // namespace detail
diff --git a/test/test_netlink.cpp b/test/test_netlink.cpp
index 8d20c39..6e5a198 100644
--- a/test/test_netlink.cpp
+++ b/test/test_netlink.cpp
@@ -7,6 +7,7 @@
 
 #include <cstring>
 #include <stdexcept>
+#include <stdplus/raw.hpp>
 #include <string_view>
 
 #include <gtest/gtest.h>
@@ -125,8 +126,9 @@
     processMsg(data, done, cb);
     EXPECT_EQ(0, data.size());
     EXPECT_EQ(1, cbCalls);
-    EXPECT_TRUE(equal(hdr, hdrOut));
-    EXPECT_TRUE(equal(err, extract<nlmsgerr>(dataOut)));
+    EXPECT_TRUE(stdplus::raw::equal(hdr, hdrOut));
+    EXPECT_TRUE(
+        stdplus::raw::equal(err, stdplus::raw::extract<nlmsgerr>(dataOut)));
     EXPECT_EQ(0, dataOut.size());
     EXPECT_TRUE(done);
 }
diff --git a/test/test_util.cpp b/test/test_util.cpp
index 89723f5..83fcb83 100644
--- a/test/test_util.cpp
+++ b/test/test_util.cpp
@@ -5,6 +5,7 @@
 
 #include <cstddef>
 #include <cstring>
+#include <stdplus/raw.hpp>
 #include <string>
 #include <string_view>
 #include <xyz/openbmc_project/Common/error.hpp>
@@ -213,94 +214,6 @@
     EXPECT_EQ("eth28addr", interfaceToUbootEthAddr("eth28"));
 }
 
-TEST_F(TestUtil, CopyFromTooSmall)
-{
-    constexpr auto expected = "abcde"sv;
-    struct
-    {
-        uint8_t data[10];
-    } data;
-    static_assert(sizeof(data) > expected.size());
-    EXPECT_THROW(copyFrom<decltype(data)>(expected), std::runtime_error);
-}
-
-TEST_F(TestUtil, CopyFromSome)
-{
-    constexpr auto expected = "abcde"sv;
-    struct
-    {
-        uint8_t data[2];
-    } data;
-    static_assert(sizeof(data) < expected.size());
-    data = copyFrom<decltype(data)>(expected);
-    EXPECT_EQ(0, memcmp(&data, expected.data(), sizeof(data)));
-}
-
-TEST_F(TestUtil, CopyFromAll)
-{
-    constexpr auto expected = "abcde"sv;
-    struct
-    {
-        uint8_t data[5];
-    } data;
-    static_assert(sizeof(data) == expected.size());
-    data = copyFrom<decltype(data)>(expected);
-    EXPECT_EQ(0, memcmp(&data, expected.data(), sizeof(data)));
-}
-
-TEST_F(TestUtil, ExtractSome)
-{
-    constexpr auto expected = "abcde"sv;
-    auto buf = expected;
-    struct
-    {
-        uint8_t data[2];
-    } data;
-    static_assert(sizeof(data) < expected.size());
-    data = extract<decltype(data)>(buf);
-    EXPECT_EQ(0, memcmp(&data, expected.data(), sizeof(data)));
-    EXPECT_EQ(3, buf.size());
-    EXPECT_EQ(expected.substr(2), buf);
-}
-
-TEST_F(TestUtil, ExtractAll)
-{
-    constexpr auto expected = "abcde"sv;
-    auto buf = expected;
-    struct
-    {
-        uint8_t data[5];
-    } data;
-    static_assert(sizeof(data) == expected.size());
-    data = extract<decltype(data)>(buf);
-    EXPECT_EQ(0, memcmp(&data, expected.data(), sizeof(data)));
-    EXPECT_EQ(0, buf.size());
-}
-
-TEST_F(TestUtil, Equal)
-{
-    struct
-    {
-        int i;
-    } a, b{};
-    a.i = 4;
-    b.i = 4;
-
-    EXPECT_TRUE(equal(a, b));
-}
-
-TEST_F(TestUtil, NotEqual)
-{
-    struct
-    {
-        int i;
-    } a, b{};
-    a.i = 2;
-    b.i = 4;
-
-    EXPECT_FALSE(equal(a, b));
-}
-
 namespace mac_address
 {
 
@@ -313,11 +226,14 @@
 
 TEST(MacFromString, Valid)
 {
-    EXPECT_TRUE(equal(ether_addr{}, fromString("00:00:00:00:00:00")));
-    EXPECT_TRUE(equal(ether_addr{0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa},
-                      fromString("FF:EE:DD:cc:bb:aa")));
-    EXPECT_TRUE(equal(ether_addr{0x00, 0x01, 0x02, 0x03, 0x04, 0x05},
-                      fromString("0:1:2:3:4:5")));
+    EXPECT_TRUE(
+        stdplus::raw::equal(ether_addr{}, fromString("00:00:00:00:00:00")));
+    EXPECT_TRUE(
+        stdplus::raw::equal(ether_addr{0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa},
+                            fromString("FF:EE:DD:cc:bb:aa")));
+    EXPECT_TRUE(
+        stdplus::raw::equal(ether_addr{0x00, 0x01, 0x02, 0x03, 0x04, 0x05},
+                            fromString("0:1:2:3:4:5")));
 }
 
 TEST(MacToString, Valid)
diff --git a/util.cpp b/util.cpp
index 13a607f..fbe576d 100644
--- a/util.cpp
+++ b/util.cpp
@@ -17,6 +17,7 @@
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/log.hpp>
 #include <stdexcept>
+#include <stdplus/raw.hpp>
 #include <string>
 #include <variant>
 #include <xyz/openbmc_project/Common/error.hpp>
@@ -622,7 +623,7 @@
 
 bool isEmpty(const ether_addr& mac)
 {
-    return equal(mac, ether_addr{});
+    return stdplus::raw::equal(mac, ether_addr{});
 }
 
 bool isMulticast(const ether_addr& mac)
diff --git a/util.hpp b/util.hpp
index 251aa0d..f591888 100644
--- a/util.hpp
+++ b/util.hpp
@@ -185,53 +185,6 @@
 
 } // namespace network
 
-/** @brief Copies data from a buffer into a copyable type
- *
- *  @param[in] data - The data buffer being extracted from
- *  @param[in] emsg - The message to print if extraction fails
- *  @return The copyable type with data populated
- */
-template <typename T>
-T copyFrom(std::string_view data, const char* emsg = "Extract Failed")
-{
-    static_assert(std::is_trivially_copyable_v<T>);
-    T ret;
-    if (data.size() < sizeof(ret))
-    {
-        throw std::runtime_error(emsg);
-    }
-    std::memcpy(&ret, data.data(), sizeof(ret));
-    return ret;
-}
-
-/** @brief Extracts data from a buffer into a copyable type
- *         Updates the data buffer to show that data was removed
- *
- *  @param[in,out] data - The data buffer being extracted from
- *  @param[in] emsg     - The message to print if extraction fails
- *  @return The copyable type with data populated
- */
-template <typename T>
-T extract(std::string_view& data, const char* emsg = "Extract Failed")
-{
-    T ret = copyFrom<T>(data, emsg);
-    data.remove_prefix(sizeof(ret));
-    return ret;
-}
-
-/** @brief Compares two of the same trivially copyable types
- *
- *  @param[in] a - The data buffer being extracted from
- *  @param[in] b - The message to print if extraction fails
- *  @return True if the parameters are bitwise identical
- */
-template <typename T>
-bool equal(const T& a, const T& b)
-{
-    static_assert(std::is_trivially_copyable_v<T>);
-    return memcmp(&a, &b, sizeof(T)) == 0;
-}
-
 class Descriptor
 {
   private:
