Introduce VPN support.

This change sets up the basic routing rules for VPNs. It doesn't yet handle UID
ranges (that are meant to apply to the VPN) correctly. That's forthcoming in
other CLs.

Bug: 15409918
Change-Id: I284de04f176dcf6ba702361de6a614266256d04e
diff --git a/server/NetworkController.h b/server/NetworkController.h
index 04a5ace..7f572d6 100644
--- a/server/NetworkController.h
+++ b/server/NetworkController.h
@@ -29,6 +29,7 @@
 
 class Network;
 class PhysicalNetwork;
+class VirtualNetwork;
 
 /*
  * Keeps track of default, per-pid, and per-uid-range network selection, as
@@ -55,6 +56,7 @@
     bool isValidNetwork(unsigned netId) const;
 
     int createNetwork(unsigned netId, Permission permission) WARN_UNUSED_RESULT;
+    int createVpn(unsigned netId, uid_t ownerUid) WARN_UNUSED_RESULT;
     int destroyNetwork(unsigned netId) WARN_UNUSED_RESULT;
 
     int addInterfaceToNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT;
@@ -93,6 +95,7 @@
     std::list<UidEntry> mUidMap;
     unsigned mDefaultNetId;
     std::map<unsigned, PhysicalNetwork*> mPhysicalNetworks;  // Map keys are NetIds.
+    std::map<unsigned, VirtualNetwork*> mVirtualNetworks;  // Map keys are NetIds.
     std::map<uid_t, Permission> mUsers;
 };