Support more than one clatd at a time.

1. Change from a single PID to a map of interface names to PIDs.
2. Make clatd commands take an interface argument.
3. Give the clatd processes names that depend on their parent
   interface, e.g., clatd-rmnet0.

Bug: 12111730
Change-Id: Ia770952d6511f8598a3356be5911da4ffa01b46a
diff --git a/server/ClatdController.h b/server/ClatdController.h
index 5bf48d9..1985836 100644
--- a/server/ClatdController.h
+++ b/server/ClatdController.h
@@ -17,6 +17,8 @@
 #ifndef _CLATD_CONTROLLER_H
 #define _CLATD_CONTROLLER_H
 
+#include <map>
+
 class NetworkController;
 
 class ClatdController {
@@ -25,12 +27,13 @@
     virtual ~ClatdController();
 
     int startClatd(char *interface);
-    int stopClatd();
-    bool isClatdStarted();
+    int stopClatd(char* interface);
+    bool isClatdStarted(char* interface);
 
 private:
     NetworkController* const mNetCtrl;
-    pid_t mClatdPid;
+    std::map<std::string, pid_t> mClatdPids;
+    pid_t getClatdPid(char* interface);
 };
 
 #endif