dns cache per interface iteration 2

support for attach/detach a process (pid) to a
dns cache.
lookup associated dns cache based on the pid
handle pid and interface argument for getaddrinfo
and gethostbyaddress

bug:5465296
Change-Id: I4832c792d22aceabb0481c548003a1fd879c12e4
diff --git a/ResolverController.cpp b/ResolverController.cpp
index 08a54a7..13dd930 100644
--- a/ResolverController.cpp
+++ b/ResolverController.cpp
@@ -76,3 +76,23 @@
 
     return 0;
 }
+
+int ResolverController::setDnsInterfaceForPid(const char* iface, int pid) {
+    if (DBG) {
+        ALOGD("setDnsIfaceForPid iface = %s, pid = %d\n", iface, pid);
+    }
+
+    _resolv_set_iface_for_pid(iface, pid);
+
+    return 0;
+}
+
+int ResolverController::clearDnsInterfaceForPid(int pid) {
+    if (DBG) {
+        ALOGD("clearDnsIfaceForPid pid = %d\n", pid);
+    }
+
+    _resolv_clear_iface_for_pid(pid);
+
+    return 0;
+}