/system/netd/server/ |
D | NetworkController.cpp | 145 int NetworkController::setDefaultNetwork(unsigned netId) { in setDefaultNetwork() argument 148 if (netId == mDefaultNetId) { in setDefaultNetwork() 152 if (netId != NETID_UNSET) { in setDefaultNetwork() 153 Network* network = getNetworkLocked(netId); in setDefaultNetwork() 155 ALOGE("no such netId %u", netId); in setDefaultNetwork() 159 ALOGE("cannot set default to non-physical network with netId %u", netId); in setDefaultNetwork() 178 mDefaultNetId = netId; in setDefaultNetwork() 182 uint32_t NetworkController::getNetworkForDns(unsigned* netId, uid_t uid) const { in getNetworkForDns() argument 187 if (checkUserNetworkAccessLocked(uid, *netId) == 0) { in getNetworkForDns() 198 *netId = virtualNetwork->getNetId(); in getNetworkForDns() [all …]
|
D | NetworkController.h | 51 int setDefaultNetwork(unsigned netId) WARN_UNUSED_RESULT; 56 uint32_t getNetworkForDns(unsigned* netId, uid_t uid) const; 59 void getNetworkContext(unsigned netId, uid_t uid, struct android_net_context* netcontext) const; 61 bool isVirtualNetwork(unsigned netId) const; 63 int createPhysicalNetwork(unsigned netId, Permission permission) WARN_UNUSED_RESULT; 64 int createVirtualNetwork(unsigned netId, bool hasDns, bool secure) WARN_UNUSED_RESULT; 65 int destroyNetwork(unsigned netId) WARN_UNUSED_RESULT; 67 int addInterfaceToNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT; 68 int removeInterfaceFromNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT; 72 int checkUserNetworkAccess(uid_t uid, unsigned netId) const; [all …]
|
D | ResolverController.cpp | 31 int ResolverController::setDnsServers(unsigned netId, const char* domains, in setDnsServers() argument 34 ALOGD("setDnsServers netId = %u\n", netId); in setDnsServers() 36 _resolv_set_nameservers_for_net(netId, servers, numservers, domains); in setDnsServers() 41 int ResolverController::clearDnsServers(unsigned netId) { in clearDnsServers() argument 42 _resolv_set_nameservers_for_net(netId, NULL, 0, ""); in clearDnsServers() 44 ALOGD("clearDnsServers netId = %u\n", netId); in clearDnsServers() 49 int ResolverController::flushDnsCache(unsigned netId) { in flushDnsCache() argument 51 ALOGD("flushDnsCache netId = %u\n", netId); in flushDnsCache() 54 _resolv_flush_cache_for_net(netId); in flushDnsCache()
|
D | RouteController.h | 41 static int addInterfaceToLocalNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT; 42 static int removeInterfaceFromLocalNetwork(unsigned netId, 45 static int addInterfaceToPhysicalNetwork(unsigned netId, const char* interface, 47 static int removeInterfaceFromPhysicalNetwork(unsigned netId, const char* interface, 50 static int addInterfaceToVirtualNetwork(unsigned netId, const char* interface, bool secure, 52 static int removeInterfaceFromVirtualNetwork(unsigned netId, const char* interface, bool secure, 55 static int modifyPhysicalNetworkPermission(unsigned netId, const char* interface, 59 static int addUsersToVirtualNetwork(unsigned netId, const char* interface, bool secure, 61 static int removeUsersFromVirtualNetwork(unsigned netId, const char* interface, bool secure,
|
D | FwmarkServer.cpp | 84 return mNetworkController->checkUserNetworkAccess(command.uid, command.netId); in processClient() 147 fwmark.netId = mNetworkController->getNetworkForConnect(client->getUid()); in processClient() 148 } else if (!mNetworkController->isVirtualNetwork(fwmark.netId)) { in processClient() 149 fwmark.netId = mNetworkController->getDefaultNetwork(); in processClient() 156 fwmark.netId = command.netId; in processClient() 157 if (command.netId == NETID_UNSET) { in processClient() 163 command.netId)) { in processClient() 182 if (!fwmark.explicitlySelected && mNetworkController->isVirtualNetwork(fwmark.netId)) { in processClient() 183 fwmark.netId = mNetworkController->getDefaultNetwork(); in processClient() 194 fwmark.netId = mNetworkController->getNetworkForUser(command.uid); in processClient()
|
D | RouteController.cpp | 439 WARN_UNUSED_RESULT int modifyIncomingPacketMark(unsigned netId, const char* interface, in modifyIncomingPacketMark() argument 443 fwmark.netId = netId; in modifyIncomingPacketMark() 503 WARN_UNUSED_RESULT int modifyVpnSystemPermissionRule(unsigned netId, uint32_t table, bool secure, in modifyVpnSystemPermissionRule() argument 508 fwmark.netId = netId; in modifyVpnSystemPermissionRule() 509 mask.netId = FWMARK_NET_ID_MASK; in modifyVpnSystemPermissionRule() 527 WARN_UNUSED_RESULT int modifyExplicitNetworkRule(unsigned netId, uint32_t table, in modifyExplicitNetworkRule() argument 533 fwmark.netId = netId; in modifyExplicitNetworkRule() 534 mask.netId = FWMARK_NET_ID_MASK; in modifyExplicitNetworkRule() 578 WARN_UNUSED_RESULT int modifyImplicitNetworkRule(unsigned netId, uint32_t table, in modifyImplicitNetworkRule() argument 583 fwmark.netId = netId; in modifyImplicitNetworkRule() [all …]
|
D | ClatdController.cpp | 61 unsigned netId = mNetCtrl->getNetworkForInterface(interface); in startClatd() local 62 if (netId == NETID_UNSET) { in startClatd() 69 snprintf(netIdString, sizeof(netIdString), "%u", netId); in startClatd() 72 fwmark.netId = netId; in startClatd()
|
D | PhysicalNetwork.cpp | 26 WARN_UNUSED_RESULT int addToDefault(unsigned netId, const std::string& interface, in addToDefault() argument 29 ALOGE("failed to add interface %s to default netId %u", interface.c_str(), netId); in addToDefault() 38 WARN_UNUSED_RESULT int removeFromDefault(unsigned netId, const std::string& interface, in removeFromDefault() argument 43 ALOGE("failed to remove interface %s from default netId %u", interface.c_str(), netId); in removeFromDefault() 57 PhysicalNetwork::PhysicalNetwork(unsigned netId, PhysicalNetwork::Delegate* delegate) : in PhysicalNetwork() argument 58 Network(netId), mDelegate(delegate), mPermission(PERMISSION_NONE), mIsDefault(false) { in PhysicalNetwork()
|
D | DnsProxyListener.cpp | 228 unsigned netId = strtoul(argv[7], NULL, 10); in runCommand() local 232 mDnsProxyListener->mNetCtrl->getNetworkContext(netId, uid, &netcontext); in runCommand() 292 unsigned netId = strtoul(argv[1], NULL, 10); in runCommand() local 302 uint32_t mark = mDnsProxyListener->mNetCtrl->getNetworkForDns(&netId, uid); in runCommand() 306 new DnsProxyListener::GetHostByNameHandler(cli, name, af, netId, mark); in runCommand() 315 unsigned netId, in GetHostByNameHandler() argument 320 mNetId(netId), in GetHostByNameHandler() 402 unsigned netId = strtoul(argv[4], NULL, 10); in runCommand() local 417 uint32_t mark = mDnsProxyListener->mNetCtrl->getNetworkForDns(&netId, uid); in runCommand() 421 new DnsProxyListener::GetHostByAddrHandler(cli, addr, addrLen, addrFamily, netId, mark); in runCommand() [all …]
|
D | DummyNetwork.cpp | 27 DummyNetwork::DummyNetwork(unsigned netId) : Network(netId) { in DummyNetwork() argument
|
D | Network.cpp | 52 Network::Network(unsigned netId) : mNetId(netId) { in Network() argument
|
D | LocalNetwork.cpp | 24 LocalNetwork::LocalNetwork(unsigned netId) : Network(netId) { in LocalNetwork() argument
|
D | CommandListener.cpp | 653 unsigned netId = stringToNetId(argv[3]); in runCommand() local 654 rc = sTetherCtrl->setDnsForwarders(netId, &argv[4], argc - 4); in runCommand() 827 unsigned netId = stringToNetId(argv[2]); in runCommand() local 834 rc = sResolverCtrl->setDnsServers(netId, argv[3], &argv[4], argc - 4); in runCommand() 842 rc = sResolverCtrl->clearDnsServers(netId); in runCommand() 850 rc = sResolverCtrl->flushDnsCache(netId); in runCommand() 1597 unsigned netId = stringToNetId(argv[nextArg++]); in runCommand() local 1604 ret = sNetCtrl->addRoute(netId, interface, destination, nexthop, legacy, uid); in runCommand() 1606 ret = sNetCtrl->removeRoute(netId, interface, destination, nexthop, legacy, uid); in runCommand() 1622 unsigned netId = stringToNetId(argv[3]); in runCommand() local [all …]
|
D | VirtualNetwork.cpp | 24 VirtualNetwork::VirtualNetwork(unsigned netId, bool hasDns, bool secure) : in VirtualNetwork() argument 25 Network(netId), mHasDns(hasDns), mSecure(secure) { in VirtualNetwork()
|
D | TetherController.cpp | 224 int TetherController::setDnsForwarders(unsigned netId, char **servers, int numServers) { in setDnsForwarders() argument 229 fwmark.netId = netId; in setDnsForwarders() 260 mDnsNetId = netId; in setDnsForwarders()
|
D | DnsProxyListener.h | 80 unsigned netId, 110 unsigned netId,
|
D | LocalNetwork.h | 24 explicit LocalNetwork(unsigned netId);
|
D | DummyNetwork.h | 25 explicit DummyNetwork(unsigned netId);
|
D | VirtualNetwork.h | 32 VirtualNetwork(unsigned netId, bool hasDns, bool secure);
|
D | Network.h | 52 explicit Network(unsigned netId);
|
D | TetherController.h | 52 int setDnsForwarders(unsigned netId, char **servers, int numServers);
|
/system/netd/client/ |
D | NetdClient.cpp | 91 unsigned netId = netIdForProcess; in netdClientSocket() local 92 if (netId != NETID_UNSET && FwmarkClient::shouldSetFwmark(domain)) { in netdClientSocket() 93 if (int error = setNetworkForSocket(netId, socketFd)) { in netdClientSocket() 100 unsigned getNetworkForResolv(unsigned netId) { in getNetworkForResolv() argument 101 if (netId != NETID_UNSET) { in getNetworkForResolv() 102 return netId; in getNetworkForResolv() 104 netId = netIdForProcess; in getNetworkForResolv() 105 if (netId != NETID_UNSET) { in getNetworkForResolv() 106 return netId; in getNetworkForResolv() 111 int setNetworkForTarget(unsigned netId, std::atomic_uint* target) { in setNetworkForTarget() argument [all …]
|
/system/netd/include/ |
D | NetdClient.h | 28 int getNetworkForSocket(unsigned* netId, int socketFd); 29 int setNetworkForSocket(unsigned netId, int socketFd); 32 int setNetworkForProcess(unsigned netId); 34 int setNetworkForResolv(unsigned netId); 40 int queryUserAccess(uid_t uid, unsigned netId);
|
D | FwmarkCommand.h | 32 unsigned netId; // used only in the SELECT_NETWORK command; ignored otherwise. member
|
D | Fwmark.h | 27 unsigned netId : 16; member
|