Update libnl++ class naming to match Android code style
nl::nlbuf -> nl::Buffer
nl::nlmsg -> nl::Message
nl::NetlinkRequest -> nl::MessageFactory
nl::NetlinkSocket -> nl::Socket
Bug: 162032964
Test: it builds
Change-Id: Id9858805ff3fce3e48f9a82b7dbaea09269bcb3c
diff --git a/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp b/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp
index aeb5005..f7f5f4d 100644
--- a/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp
+++ b/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp
@@ -20,8 +20,8 @@
#include "ifreqs.h"
#include <android-base/logging.h>
-#include <libnl++/NetlinkRequest.h>
-#include <libnl++/NetlinkSocket.h>
+#include <libnl++/MessageFactory.h>
+#include <libnl++/Socket.h>
#include <linux/can.h>
#include <linux/rtnetlink.h>
@@ -62,7 +62,7 @@
}
bool add(std::string dev, std::string type) {
- nl::NetlinkRequest<struct ifinfomsg> req(RTM_NEWLINK,
+ nl::MessageFactory<struct ifinfomsg> req(RTM_NEWLINK,
NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL);
req.addattr(IFLA_IFNAME, dev);
@@ -71,15 +71,15 @@
req.addattr(IFLA_INFO_KIND, type);
}
- nl::NetlinkSocket sock(NETLINK_ROUTE);
+ nl::Socket sock(NETLINK_ROUTE);
return sock.send(req) && sock.receiveAck();
}
bool del(std::string dev) {
- nl::NetlinkRequest<struct ifinfomsg> req(RTM_DELLINK, NLM_F_REQUEST);
+ nl::MessageFactory<struct ifinfomsg> req(RTM_DELLINK, NLM_F_REQUEST);
req.addattr(IFLA_IFNAME, dev);
- nl::NetlinkSocket sock(NETLINK_ROUTE);
+ nl::Socket sock(NETLINK_ROUTE);
return sock.send(req) && sock.receiveAck();
}