Add a test for RouteController.
Test: netd_{unit,integration}_test pass.
Change-Id: I19416fd8a79354303dabec042d090f7ae6962b1b
diff --git a/server/RouteController.h b/server/RouteController.h
index 75b3ca3..48239d7 100644
--- a/server/RouteController.h
+++ b/server/RouteController.h
@@ -21,6 +21,7 @@
#include "Permission.h"
#include <sys/types.h>
+#include <linux/netlink.h>
namespace android {
namespace net {
@@ -92,6 +93,14 @@
Permission permission) WARN_UNUSED_RESULT;
};
+// Public because they are called by by RouteControllerTest.cpp.
+// TODO: come up with a scheme of unit testing this code that does not rely on making all its
+// functions public.
+int modifyIpRoute(uint16_t action, uint32_t table, const char* interface, const char* destination,
+ const char* nexthop) WARN_UNUSED_RESULT;
+int flushRoutes(uint32_t table) WARN_UNUSED_RESULT;
+uint32_t getRulePriority(const nlmsghdr *nlh);
+
} // namespace net
} // namespace android