Remove libnl++ dependency on NETLINK_ROUTE.

One exception is for RTA_* definitions at NetlinkRequest. This class is
going to be refactored anyway, so let's focus on this later.

While we're here, also replace type assumptions with an actual
decltype lookup.

Bug: 162032964
Test: canhalctrl up test virtual vcan123
Change-Id: I3b509fa7b1870d4de7302fb5221a06613dfbb817
diff --git a/automotive/can/1.0/default/libnetdevice/can.cpp b/automotive/can/1.0/default/libnetdevice/can.cpp
index 0aa5afe..c6f1b04 100644
--- a/automotive/can/1.0/default/libnetdevice/can.cpp
+++ b/automotive/can/1.0/default/libnetdevice/can.cpp
@@ -27,6 +27,7 @@
 #include <linux/can/error.h>
 #include <linux/can/netlink.h>
 #include <linux/can/raw.h>
+#include <linux/rtnetlink.h>
 
 namespace android::netdevice::can {
 
diff --git a/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp b/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp
index 04381f2..aeb5005 100644
--- a/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp
+++ b/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp
@@ -24,6 +24,7 @@
 #include <libnl++/NetlinkSocket.h>
 
 #include <linux/can.h>
+#include <linux/rtnetlink.h>
 #include <net/if.h>
 
 namespace android::netdevice {
diff --git a/automotive/can/1.0/default/libnetdevice/vlan.cpp b/automotive/can/1.0/default/libnetdevice/vlan.cpp
index bcc9345..e419154 100644
--- a/automotive/can/1.0/default/libnetdevice/vlan.cpp
+++ b/automotive/can/1.0/default/libnetdevice/vlan.cpp
@@ -22,6 +22,8 @@
 #include <libnl++/NetlinkRequest.h>
 #include <libnl++/NetlinkSocket.h>
 
+#include <linux/rtnetlink.h>
+
 namespace android::netdevice::vlan {
 
 bool add(const std::string& eth, const std::string& vlan, uint16_t id) {