Lines Matching refs:interface
26 WARN_UNUSED_RESULT int addToDefault(unsigned netId, const std::string& interface, in addToDefault() argument
28 if (int ret = RouteController::addInterfaceToDefaultNetwork(interface.c_str(), permission)) { in addToDefault()
29 ALOGE("failed to add interface %s to default netId %u", interface.c_str(), netId); in addToDefault()
32 if (int ret = delegate->addFallthrough(interface, permission)) { in addToDefault()
38 WARN_UNUSED_RESULT int removeFromDefault(unsigned netId, const std::string& interface, in removeFromDefault() argument
41 if (int ret = RouteController::removeInterfaceFromDefaultNetwork(interface.c_str(), in removeFromDefault()
43 ALOGE("failed to remove interface %s from default netId %u", interface.c_str(), netId); in removeFromDefault()
46 if (int ret = delegate->removeFallthrough(interface, permission)) { in removeFromDefault()
72 for (const std::string& interface : mInterfaces) { in setPermission() local
73 if (int ret = RouteController::modifyPhysicalNetworkPermission(mNetId, interface.c_str(), in setPermission()
76 interface.c_str(), mNetId, mPermission, permission); in setPermission()
81 for (const std::string& interface : mInterfaces) { in setPermission() local
82 if (int ret = addToDefault(mNetId, interface, permission, mDelegate)) { in setPermission()
85 if (int ret = removeFromDefault(mNetId, interface, mPermission, mDelegate)) { in setPermission()
98 for (const std::string& interface : mInterfaces) { in addAsDefault() local
99 if (int ret = addToDefault(mNetId, interface, mPermission, mDelegate)) { in addAsDefault()
111 for (const std::string& interface : mInterfaces) { in removeAsDefault() local
112 if (int ret = removeFromDefault(mNetId, interface, mPermission, mDelegate)) { in removeAsDefault()
124 int PhysicalNetwork::addInterface(const std::string& interface) { in addInterface() argument
125 if (hasInterface(interface)) { in addInterface()
128 if (int ret = RouteController::addInterfaceToPhysicalNetwork(mNetId, interface.c_str(), in addInterface()
130 ALOGE("failed to add interface %s to netId %u", interface.c_str(), mNetId); in addInterface()
134 if (int ret = addToDefault(mNetId, interface, mPermission, mDelegate)) { in addInterface()
138 mInterfaces.insert(interface); in addInterface()
142 int PhysicalNetwork::removeInterface(const std::string& interface) { in removeInterface() argument
143 if (!hasInterface(interface)) { in removeInterface()
147 if (int ret = removeFromDefault(mNetId, interface, mPermission, mDelegate)) { in removeInterface()
155 if (int ret = RouteController::removeInterfaceFromPhysicalNetwork(mNetId, interface.c_str(), in removeInterface()
157 ALOGE("failed to remove interface %s from netId %u", interface.c_str(), mNetId); in removeInterface()
160 mInterfaces.erase(interface); in removeInterface()