netlink: Add common function for extracting payload
Change-Id: I809bd17d50ccb8a8f624b6117c088193f55e79de
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/ipaddress.cpp b/src/ipaddress.cpp
index 6aebc94..56bec97 100644
--- a/src/ipaddress.cpp
+++ b/src/ipaddress.cpp
@@ -98,7 +98,7 @@
{
throw std::runtime_error("Not an address msg");
}
- auto ifaddr = stdplus::raw::extract<ifaddrmsg>(msg);
+ const auto& ifaddr = netlink::extractRtData<ifaddrmsg>(msg);
// Filter out addresses we don't care about
unsigned ifindex = ifaddr.ifa_index;